
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int _rl_restore_tty_signals(void)

{
  int __fd;
  int *piVar1;
  int iVar2;
  
  if (tty_sigs_disabled == 0) {
    return tty_sigs_disabled;
  }
  __fd = fileno((FILE *)rl_instream);
  while( true ) {
    iVar2 = tcsetattr(__fd,1,(termios *)&sigstty);
    if (-1 < iVar2) {
      tty_sigs_disabled = 0;
      return 0;
    }
    piVar1 = __errno_location();
    if (*piVar1 != 4) break;
    *piVar1 = 0;
  }
  return -1;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

int _rl_restore_tty_signals(void)

{
  int __fd;
  int *piVar1;
  int iVar2;
  
  if (DAT_00179c60 == 0) {
    return DAT_00179c60;
  }
  __fd = fileno(rl_instream);
  while( true ) {
    iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0);
    if (-1 < iVar2) {
      DAT_00179c60 = 0;
      return 0;
    }
    piVar1 = __errno_location();
    if (*piVar1 != 4) break;
    *piVar1 = 0;
  }
  return -1;
}


PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000312b0
ADD EBX,0x89b98
MOV EAX,dword ptr [EBX + 0x7c60]
TEST EAX,EAX
JNZ 0x000e8480
POP EBX
POP ESI
POP EDI
RET
LEA EAX,[EBX + 0x7b3c]
SUB ESP,0xc
LEA ESI,[EBX + 0x7cc0]
PUSH dword ptr [EAX]
CALL 0x0002e900
ADD ESP,0x10
MOV EDI,EAX
JMP 0x000e84b0
CALL 0x0002e8b0
CMP dword ptr [EAX],0x4
JNZ 0x000e84d8
MOV dword ptr [EAX],0x0
SUB ESP,0x4
PUSH ESI
PUSH 0x1
PUSH EDI
CALL 0x0002e5c0
ADD ESP,0x10
TEST EAX,EAX
JS 0x000e84a0
MOV dword ptr [EBX + 0x7c60],0x0
XOR EAX,EAX
POP EBX
POP ESI
POP EDI
RET
POP EBX
MOV EAX,0xffffffff
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint _rl_restore_tty_signals(void)\n\n{\n  int __fd;\n  int *piVar1;\n  int iVar2;\n  \n  if (DAT_00179c60 == 0) {\n    return DAT_00179c60;\n  }\n  __fd = fileno(rl_instream);\n  while( true ) {\n    iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0);\n    if (-1 < iVar2) {\n      DAT_00179c60 = 0;\n      return 0;\n    }\n    piVar1 = __errno_location();\n    if (*piVar1 != 4) break;\n    *piVar1 = 0;\n  }\n  return -1;\n}\n\n" comment (function_definition "int _rl_restore_tty_signals(void)\n\n{\n  int __fd;\n  int *piVar1;\n  int iVar2;\n  \n  if (DAT_00179c60 == 0) {\n    return DAT_00179c60;\n  }\n  __fd = fileno(rl_instream);\n  while( true ) {\n    iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0);\n    if (-1 < iVar2) {\n      DAT_00179c60 = 0;\n      return 0;\n    }\n    piVar1 = __errno_location();\n    if (*piVar1 != 4) break;\n    *piVar1 = 0;\n  }\n  return -1;\n}" primitive_type (function_declarator "_rl_restore_tty_signals(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int __fd;\n  int *piVar1;\n  int iVar2;\n  \n  if (DAT_00179c60 == 0) {\n    return DAT_00179c60;\n  }\n  __fd = fileno(rl_instream);\n  while( true ) {\n    iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0);\n    if (-1 < iVar2) {\n      DAT_00179c60 = 0;\n      return 0;\n    }\n    piVar1 = __errno_location();\n    if (*piVar1 != 4) break;\n    *piVar1 = 0;\n  }\n  return -1;\n}" { (declaration "int __fd;" primitive_type identifier ;) (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (DAT_00179c60 == 0) {\n    return DAT_00179c60;\n  }" if (parenthesized_expression "(DAT_00179c60 == 0)" ( (binary_expression "DAT_00179c60 == 0" identifier == number_literal) )) (compound_statement "{\n    return DAT_00179c60;\n  }" { (return_statement "return DAT_00179c60;" return identifier ;) })) (expression_statement "__fd = fileno(rl_instream);" (assignment_expression "__fd = fileno(rl_instream)" identifier = (call_expression "fileno(rl_instream)" identifier (argument_list "(rl_instream)" ( identifier )))) ;) (while_statement "while( true ) {\n    iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0);\n    if (-1 < iVar2) {\n      DAT_00179c60 = 0;\n      return 0;\n    }\n    piVar1 = __errno_location();\n    if (*piVar1 != 4) break;\n    *piVar1 = 0;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0);\n    if (-1 < iVar2) {\n      DAT_00179c60 = 0;\n      return 0;\n    }\n    piVar1 = __errno_location();\n    if (*piVar1 != 4) break;\n    *piVar1 = 0;\n  }" { (expression_statement "iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0);" (assignment_expression "iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0)" identifier = (call_expression "tcsetattr(__fd,1,(termios *)&DAT_00179cc0)" identifier (argument_list "(__fd,1,(termios *)&DAT_00179cc0)" ( identifier , number_literal , (cast_expression "(termios *)&DAT_00179cc0" ( (type_descriptor "termios *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_00179cc0" & identifier)) )))) ;) (if_statement "if (-1 < iVar2) {\n      DAT_00179c60 = 0;\n      return 0;\n    }" if (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) )) (compound_statement "{\n      DAT_00179c60 = 0;\n      return 0;\n    }" { (expression_statement "DAT_00179c60 = 0;" (assignment_expression "DAT_00179c60 = 0" identifier = number_literal) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "piVar1 = __errno_location();" (assignment_expression "piVar1 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar1 != 4) break;" if (parenthesized_expression "(*piVar1 != 4)" ( (binary_expression "*piVar1 != 4" (pointer_expression "*piVar1" * identifier) != number_literal) )) (break_statement "break;" break ;)) (expression_statement "*piVar1 = 0;" (assignment_expression "*piVar1 = 0" (pointer_expression "*piVar1" * identifier) = number_literal) ;) })) (return_statement "return -1;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint _rl_restore_tty_signals(void)\n\n{\n  int __fd;\n  int *piVar1;\n  int iVar2;\n  \n  if (tty_sigs_disabled == 0) {\n    return tty_sigs_disabled;\n  }\n  __fd = fileno((FILE *)rl_instream);\n  while( true ) {\n    iVar2 = tcsetattr(__fd,1,(termios *)&sigstty);\n    if (-1 < iVar2) {\n      tty_sigs_disabled = 0;\n      return 0;\n    }\n    piVar1 = __errno_location();\n    if (*piVar1 != 4) break;\n    *piVar1 = 0;\n  }\n  return -1;\n}\n\n" comment comment (function_definition "int _rl_restore_tty_signals(void)\n\n{\n  int __fd;\n  int *piVar1;\n  int iVar2;\n  \n  if (tty_sigs_disabled == 0) {\n    return tty_sigs_disabled;\n  }\n  __fd = fileno((FILE *)rl_instream);\n  while( true ) {\n    iVar2 = tcsetattr(__fd,1,(termios *)&sigstty);\n    if (-1 < iVar2) {\n      tty_sigs_disabled = 0;\n      return 0;\n    }\n    piVar1 = __errno_location();\n    if (*piVar1 != 4) break;\n    *piVar1 = 0;\n  }\n  return -1;\n}" primitive_type (function_declarator "_rl_restore_tty_signals(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int __fd;\n  int *piVar1;\n  int iVar2;\n  \n  if (tty_sigs_disabled == 0) {\n    return tty_sigs_disabled;\n  }\n  __fd = fileno((FILE *)rl_instream);\n  while( true ) {\n    iVar2 = tcsetattr(__fd,1,(termios *)&sigstty);\n    if (-1 < iVar2) {\n      tty_sigs_disabled = 0;\n      return 0;\n    }\n    piVar1 = __errno_location();\n    if (*piVar1 != 4) break;\n    *piVar1 = 0;\n  }\n  return -1;\n}" { (declaration "int __fd;" primitive_type identifier ;) (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (tty_sigs_disabled == 0) {\n    return tty_sigs_disabled;\n  }" if (parenthesized_expression "(tty_sigs_disabled == 0)" ( (binary_expression "tty_sigs_disabled == 0" identifier == number_literal) )) (compound_statement "{\n    return tty_sigs_disabled;\n  }" { (return_statement "return tty_sigs_disabled;" return identifier ;) })) (expression_statement "__fd = fileno((FILE *)rl_instream);" (assignment_expression "__fd = fileno((FILE *)rl_instream)" identifier = (call_expression "fileno((FILE *)rl_instream)" identifier (argument_list "((FILE *)rl_instream)" ( (cast_expression "(FILE *)rl_instream" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (while_statement "while( true ) {\n    iVar2 = tcsetattr(__fd,1,(termios *)&sigstty);\n    if (-1 < iVar2) {\n      tty_sigs_disabled = 0;\n      return 0;\n    }\n    piVar1 = __errno_location();\n    if (*piVar1 != 4) break;\n    *piVar1 = 0;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar2 = tcsetattr(__fd,1,(termios *)&sigstty);\n    if (-1 < iVar2) {\n      tty_sigs_disabled = 0;\n      return 0;\n    }\n    piVar1 = __errno_location();\n    if (*piVar1 != 4) break;\n    *piVar1 = 0;\n  }" { (expression_statement "iVar2 = tcsetattr(__fd,1,(termios *)&sigstty);" (assignment_expression "iVar2 = tcsetattr(__fd,1,(termios *)&sigstty)" identifier = (call_expression "tcsetattr(__fd,1,(termios *)&sigstty)" identifier (argument_list "(__fd,1,(termios *)&sigstty)" ( identifier , number_literal , (cast_expression "(termios *)&sigstty" ( (type_descriptor "termios *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&sigstty" & identifier)) )))) ;) (if_statement "if (-1 < iVar2) {\n      tty_sigs_disabled = 0;\n      return 0;\n    }" if (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) )) (compound_statement "{\n      tty_sigs_disabled = 0;\n      return 0;\n    }" { (expression_statement "tty_sigs_disabled = 0;" (assignment_expression "tty_sigs_disabled = 0" identifier = number_literal) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "piVar1 = __errno_location();" (assignment_expression "piVar1 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar1 != 4) break;" if (parenthesized_expression "(*piVar1 != 4)" ( (binary_expression "*piVar1 != 4" (pointer_expression "*piVar1" * identifier) != number_literal) )) (break_statement "break;" break ;)) (expression_statement "*piVar1 = 0;" (assignment_expression "*piVar1 = 0" (pointer_expression "*piVar1" * identifier) = number_literal) ;) })) (return_statement "return -1;" return number_literal ;) })))
(translation_unit "int _rl_restore_tty_signals(void)\n\n{\n  int __fd;\n  int *piVar1;\n  int iVar2;\n  \n  if (DAT_00179c60 == 0) {\n    return DAT_00179c60;\n  }\n  __fd = fileno(rl_instream);\n  while( true ) {\n    iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0);\n    if (-1 < iVar2) {\n      DAT_00179c60 = 0;\n      return 0;\n    }\n    piVar1 = __errno_location();\n    if (*piVar1 != 4) break;\n    *piVar1 = 0;\n  }\n  return -1;\n}\n\n" (function_definition "int _rl_restore_tty_signals(void)\n\n{\n  int __fd;\n  int *piVar1;\n  int iVar2;\n  \n  if (DAT_00179c60 == 0) {\n    return DAT_00179c60;\n  }\n  __fd = fileno(rl_instream);\n  while( true ) {\n    iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0);\n    if (-1 < iVar2) {\n      DAT_00179c60 = 0;\n      return 0;\n    }\n    piVar1 = __errno_location();\n    if (*piVar1 != 4) break;\n    *piVar1 = 0;\n  }\n  return -1;\n}" primitive_type (function_declarator "_rl_restore_tty_signals(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int __fd;\n  int *piVar1;\n  int iVar2;\n  \n  if (DAT_00179c60 == 0) {\n    return DAT_00179c60;\n  }\n  __fd = fileno(rl_instream);\n  while( true ) {\n    iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0);\n    if (-1 < iVar2) {\n      DAT_00179c60 = 0;\n      return 0;\n    }\n    piVar1 = __errno_location();\n    if (*piVar1 != 4) break;\n    *piVar1 = 0;\n  }\n  return -1;\n}" { (declaration "int __fd;" primitive_type identifier ;) (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (DAT_00179c60 == 0) {\n    return DAT_00179c60;\n  }" if (parenthesized_expression "(DAT_00179c60 == 0)" ( (binary_expression "DAT_00179c60 == 0" identifier == number_literal) )) (compound_statement "{\n    return DAT_00179c60;\n  }" { (return_statement "return DAT_00179c60;" return identifier ;) })) (expression_statement "__fd = fileno(rl_instream);" (assignment_expression "__fd = fileno(rl_instream)" identifier = (call_expression "fileno(rl_instream)" identifier (argument_list "(rl_instream)" ( identifier )))) ;) (while_statement "while( true ) {\n    iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0);\n    if (-1 < iVar2) {\n      DAT_00179c60 = 0;\n      return 0;\n    }\n    piVar1 = __errno_location();\n    if (*piVar1 != 4) break;\n    *piVar1 = 0;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0);\n    if (-1 < iVar2) {\n      DAT_00179c60 = 0;\n      return 0;\n    }\n    piVar1 = __errno_location();\n    if (*piVar1 != 4) break;\n    *piVar1 = 0;\n  }" { (expression_statement "iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0);" (assignment_expression "iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0)" identifier = (call_expression "tcsetattr(__fd,1,(termios *)&DAT_00179cc0)" identifier (argument_list "(__fd,1,(termios *)&DAT_00179cc0)" ( identifier , number_literal , (cast_expression "(termios *)&DAT_00179cc0" ( (type_descriptor "termios *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_00179cc0" & identifier)) )))) ;) (if_statement "if (-1 < iVar2) {\n      DAT_00179c60 = 0;\n      return 0;\n    }" if (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) )) (compound_statement "{\n      DAT_00179c60 = 0;\n      return 0;\n    }" { (expression_statement "DAT_00179c60 = 0;" (assignment_expression "DAT_00179c60 = 0" identifier = number_literal) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "piVar1 = __errno_location();" (assignment_expression "piVar1 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar1 != 4) break;" if (parenthesized_expression "(*piVar1 != 4)" ( (binary_expression "*piVar1 != 4" (pointer_expression "*piVar1" * identifier) != number_literal) )) (break_statement "break;" break ;)) (expression_statement "*piVar1 = 0;" (assignment_expression "*piVar1 = 0" (pointer_expression "*piVar1" * identifier) = number_literal) ;) })) (return_statement "return -1;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression & IDENT)) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) (break_statement break ;)) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) })) (return_statement return LIT ;) })))
(function_definition "int _rl_restore_tty_signals(void)\n\n{\n  int __fd;\n  int *piVar1;\n  int iVar2;\n  \n  if (DAT_00179c60 == 0) {\n    return DAT_00179c60;\n  }\n  __fd = fileno(rl_instream);\n  while( true ) {\n    iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0);\n    if (-1 < iVar2) {\n      DAT_00179c60 = 0;\n      return 0;\n    }\n    piVar1 = __errno_location();\n    if (*piVar1 != 4) break;\n    *piVar1 = 0;\n  }\n  return -1;\n}" (primitive_type "int") (function_declarator "_rl_restore_tty_signals(void)" (identifier "_rl_restore_tty_signals") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  int __fd;\n  int *piVar1;\n  int iVar2;\n  \n  if (DAT_00179c60 == 0) {\n    return DAT_00179c60;\n  }\n  __fd = fileno(rl_instream);\n  while( true ) {\n    iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0);\n    if (-1 < iVar2) {\n      DAT_00179c60 = 0;\n      return 0;\n    }\n    piVar1 = __errno_location();\n    if (*piVar1 != 4) break;\n    *piVar1 = 0;\n  }\n  return -1;\n}" ({ "{") (declaration "int __fd;" (primitive_type "int") (identifier "__fd") (; ";")) (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (if_statement "if (DAT_00179c60 == 0) {\n    return DAT_00179c60;\n  }" (if "if") (parenthesized_expression "(DAT_00179c60 == 0)" (( "(") (binary_expression "DAT_00179c60 == 0" (identifier "DAT_00179c60") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return DAT_00179c60;\n  }" ({ "{") (return_statement "return DAT_00179c60;" (return "return") (identifier "DAT_00179c60") (; ";")) (} "}"))) (expression_statement "__fd = fileno(rl_instream);" (assignment_expression "__fd = fileno(rl_instream)" (identifier "__fd") (= "=") (call_expression "fileno(rl_instream)" (identifier "fileno") (argument_list "(rl_instream)" (( "(") (identifier "rl_instream") () ")")))) (; ";")) (while_statement "while( true ) {\n    iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0);\n    if (-1 < iVar2) {\n      DAT_00179c60 = 0;\n      return 0;\n    }\n    piVar1 = __errno_location();\n    if (*piVar1 != 4) break;\n    *piVar1 = 0;\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0);\n    if (-1 < iVar2) {\n      DAT_00179c60 = 0;\n      return 0;\n    }\n    piVar1 = __errno_location();\n    if (*piVar1 != 4) break;\n    *piVar1 = 0;\n  }" ({ "{") (expression_statement "iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0);" (assignment_expression "iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0)" (identifier "iVar2") (= "=") (call_expression "tcsetattr(__fd,1,(termios *)&DAT_00179cc0)" (identifier "tcsetattr") (argument_list "(__fd,1,(termios *)&DAT_00179cc0)" (( "(") (identifier "__fd") (, ",") (number_literal "1") (, ",") (cast_expression "(termios *)&DAT_00179cc0" (( "(") (type_descriptor "termios *" (type_identifier "termios") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "&DAT_00179cc0" (& "&") (identifier "DAT_00179cc0"))) () ")")))) (; ";")) (if_statement "if (-1 < iVar2) {\n      DAT_00179c60 = 0;\n      return 0;\n    }" (if "if") (parenthesized_expression "(-1 < iVar2)" (( "(") (binary_expression "-1 < iVar2" (number_literal "-1") (< "<") (identifier "iVar2")) () ")")) (compound_statement "{\n      DAT_00179c60 = 0;\n      return 0;\n    }" ({ "{") (expression_statement "DAT_00179c60 = 0;" (assignment_expression "DAT_00179c60 = 0" (identifier "DAT_00179c60") (= "=") (number_literal "0")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "piVar1 = __errno_location();" (assignment_expression "piVar1 = __errno_location()" (identifier "piVar1") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (*piVar1 != 4) break;" (if "if") (parenthesized_expression "(*piVar1 != 4)" (( "(") (binary_expression "*piVar1 != 4" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (!= "!=") (number_literal "4")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "*piVar1 = 0;" (assignment_expression "*piVar1 = 0" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int function_1(void)

{
  int __fd;
  int *piVar1;
  int var_4;
  
  if (var_1 == 0) {
    return var_1;
  }
  __fd = var_2((type_1 *)rl_instream);
  while( true ) {
    var_4 = var_3(__fd,1,(type_2 *)&sigstty);
    if (-1 < var_4) {
      var_1 = 0;
      return 0;
    }
    piVar1 = var_5();
    if (*piVar1 != 4) break;
    *piVar1 = 0;
  }
  return -1;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (break_statement)) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) (return_statement (number_literal)))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

int MASKED(void)

{
  int __fd;
  int *piVar1;
  int iVar2;
  
  if (DAT_00179c60 == 0) {
    return DAT_00179c60;
  }
  __fd = fileno(rl_instream);
  while( true ) {
    iVar2 = tcsetattr(__fd,1,(termios *)&DAT_00179cc0);
    if (-1 < iVar2) {
      DAT_00179c60 = 0;
      return 0;
    }
    piVar1 = __errno_location();
    if (*piVar1 != 4) break;
    *piVar1 = 0;
  }
  return -1;
}

