
int check_bash_input(int fd)

{
  int iVar1;
  
  if ((*(int *)PTR_bash_input_001446a4 != 4) || (fd != *(int *)(PTR_bash_input_001446a4 + 8))) {
    if (*(int *)PTR_interactive_shell_00144598 != 0) {
      return 0;
    }
    if (fd != *(int *)PTR_default_buffered_input_0014469c) {
      return 0;
    }
  }
  if (0 < fd) {
    iVar1 = save_bash_input(fd,-1);
    return -(uint)(iVar1 == -1);
  }
  if (fd != 0) {
    return 0;
  }
  iVar1 = sync_buffered_stream(0);
  return -(uint)(iVar1 == -1);
}



int check_bash_input(int param_1)

{
  int iVar1;
  
  if ((*(int *)PTR_bash_input_001446a4 != 4) || (param_1 != *(int *)(PTR_bash_input_001446a4 + 8)))
  {
    if (*(int *)PTR_interactive_shell_00144598 != 0) {
      return 0;
    }
    if (param_1 != *(int *)PTR_default_buffered_input_0014469c) {
      return 0;
    }
  }
  if (0 < param_1) {
    iVar1 = save_bash_input(param_1,0xffffffff);
    return -(uint)(iVar1 == -1);
  }
  if (param_1 != 0) {
    return 0;
  }
  iVar1 = sync_buffered_stream();
  return -(uint)(iVar1 == -1);
}


lui gp,0xc
addiu gp,gp,0x1828
addu gp,gp,t9
lw v0,-0x7e9c(gp)
addiu sp,sp,-0x20
li v1,0x4
sw gp,0x10(sp)
sw ra,0x1c(sp)
lw a1,0x0(v0)
beq a1,v1,0x0008ad98
_nop
lw v0,-0x7fa8(gp)
lw v0,0x0(v0)
beq v0,zero,0x0008ad64
_lw v1,-0x7ea4(gp)
or v0,zero,zero
lw ra,0x1c(sp)
jr ra
_addiu sp,sp,0x20
lw v1,0x0(v1)
bne a0,v1,0x0008ad5c
_lw ra,0x1c(sp)
bgtz a0,0x0008adac
_lw t9,-0x718c(gp)
bne a0,zero,0x0008ad54
_lw t9,-0x736c(gp)
bal 0x0008aa84
_nop
addiu v0,v0,0x1
sltiu v0,v0,0x1
b 0x0008ad58
_subu v0,zero,v0
lw v0,0x8(v0)
bne a0,v0,0x0008ad44
_nop
b 0x0008ad70
_nop
bal 0x0008ab1c
_li a1,-0x1
addiu v0,v0,0x1
sltiu v0,v0,0x1
b 0x0008ad58
_subu v0,zero,v0
(translation_unit "int check_bash_input(int param_1)\n\n{\n  int iVar1;\n  \n  if ((*(int *)PTR_bash_input_001446a4 != 4) || (param_1 != *(int *)(PTR_bash_input_001446a4 + 8)))\n  {\n    if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }\n    if (param_1 != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }\n  }\n  if (0 < param_1) {\n    iVar1 = save_bash_input(param_1,0xffffffff);\n    return -(uint)(iVar1 == -1);\n  }\n  if (param_1 != 0) {\n    return 0;\n  }\n  iVar1 = sync_buffered_stream();\n  return -(uint)(iVar1 == -1);\n}\n\n" (function_definition "int check_bash_input(int param_1)\n\n{\n  int iVar1;\n  \n  if ((*(int *)PTR_bash_input_001446a4 != 4) || (param_1 != *(int *)(PTR_bash_input_001446a4 + 8)))\n  {\n    if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }\n    if (param_1 != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }\n  }\n  if (0 < param_1) {\n    iVar1 = save_bash_input(param_1,0xffffffff);\n    return -(uint)(iVar1 == -1);\n  }\n  if (param_1 != 0) {\n    return 0;\n  }\n  iVar1 = sync_buffered_stream();\n  return -(uint)(iVar1 == -1);\n}" primitive_type (function_declarator "check_bash_input(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if ((*(int *)PTR_bash_input_001446a4 != 4) || (param_1 != *(int *)(PTR_bash_input_001446a4 + 8)))\n  {\n    if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }\n    if (param_1 != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }\n  }\n  if (0 < param_1) {\n    iVar1 = save_bash_input(param_1,0xffffffff);\n    return -(uint)(iVar1 == -1);\n  }\n  if (param_1 != 0) {\n    return 0;\n  }\n  iVar1 = sync_buffered_stream();\n  return -(uint)(iVar1 == -1);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if ((*(int *)PTR_bash_input_001446a4 != 4) || (param_1 != *(int *)(PTR_bash_input_001446a4 + 8)))\n  {\n    if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }\n    if (param_1 != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }\n  }" if (parenthesized_expression "((*(int *)PTR_bash_input_001446a4 != 4) || (param_1 != *(int *)(PTR_bash_input_001446a4 + 8)))" ( (binary_expression "(*(int *)PTR_bash_input_001446a4 != 4) || (param_1 != *(int *)(PTR_bash_input_001446a4 + 8))" (parenthesized_expression "(*(int *)PTR_bash_input_001446a4 != 4)" ( (binary_expression "*(int *)PTR_bash_input_001446a4 != 4" (pointer_expression "*(int *)PTR_bash_input_001446a4" * (cast_expression "(int *)PTR_bash_input_001446a4" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) != number_literal) )) || (parenthesized_expression "(param_1 != *(int *)(PTR_bash_input_001446a4 + 8))" ( (binary_expression "param_1 != *(int *)(PTR_bash_input_001446a4 + 8)" identifier != (pointer_expression "*(int *)(PTR_bash_input_001446a4 + 8)" * (cast_expression "(int *)(PTR_bash_input_001446a4 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_bash_input_001446a4 + 8)" ( (binary_expression "PTR_bash_input_001446a4 + 8" identifier + number_literal) ))))) ))) )) (compound_statement "{\n    if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }\n    if (param_1 != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }\n  }" { (if_statement "if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }" if (parenthesized_expression "(*(int *)PTR_interactive_shell_00144598 != 0)" ( (binary_expression "*(int *)PTR_interactive_shell_00144598 != 0" (pointer_expression "*(int *)PTR_interactive_shell_00144598" * (cast_expression "(int *)PTR_interactive_shell_00144598" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) != number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (param_1 != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }" if (parenthesized_expression "(param_1 != *(int *)PTR_default_buffered_input_0014469c)" ( (binary_expression "param_1 != *(int *)PTR_default_buffered_input_0014469c" identifier != (pointer_expression "*(int *)PTR_default_buffered_input_0014469c" * (cast_expression "(int *)PTR_default_buffered_input_0014469c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) })) (if_statement "if (0 < param_1) {\n    iVar1 = save_bash_input(param_1,0xffffffff);\n    return -(uint)(iVar1 == -1);\n  }" if (parenthesized_expression "(0 < param_1)" ( (binary_expression "0 < param_1" number_literal < identifier) )) (compound_statement "{\n    iVar1 = save_bash_input(param_1,0xffffffff);\n    return -(uint)(iVar1 == -1);\n  }" { (expression_statement "iVar1 = save_bash_input(param_1,0xffffffff);" (assignment_expression "iVar1 = save_bash_input(param_1,0xffffffff)" identifier = (call_expression "save_bash_input(param_1,0xffffffff)" identifier (argument_list "(param_1,0xffffffff)" ( identifier , number_literal )))) ;) (return_statement "return -(uint)(iVar1 == -1);" return (unary_expression "-(uint)(iVar1 == -1)" - (call_expression "(uint)(iVar1 == -1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 == -1)" ( (binary_expression "iVar1 == -1" identifier == number_literal) )))) ;) })) (if_statement "if (param_1 != 0) {\n    return 0;\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = sync_buffered_stream();" (assignment_expression "iVar1 = sync_buffered_stream()" identifier = (call_expression "sync_buffered_stream()" identifier (argument_list "()" ( )))) ;) (return_statement "return -(uint)(iVar1 == -1);" return (unary_expression "-(uint)(iVar1 == -1)" - (call_expression "(uint)(iVar1 == -1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 == -1)" ( (binary_expression "iVar1 == -1" identifier == number_literal) )))) ;) })))
(translation_unit "int check_bash_input(int fd)\n\n{\n  int iVar1;\n  \n  if ((*(int *)PTR_bash_input_001446a4 != 4) || (fd != *(int *)(PTR_bash_input_001446a4 + 8))) {\n    if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }\n    if (fd != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }\n  }\n  if (0 < fd) {\n    iVar1 = save_bash_input(fd,-1);\n    return -(uint)(iVar1 == -1);\n  }\n  if (fd != 0) {\n    return 0;\n  }\n  iVar1 = sync_buffered_stream(0);\n  return -(uint)(iVar1 == -1);\n}\n\n" (function_definition "int check_bash_input(int fd)\n\n{\n  int iVar1;\n  \n  if ((*(int *)PTR_bash_input_001446a4 != 4) || (fd != *(int *)(PTR_bash_input_001446a4 + 8))) {\n    if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }\n    if (fd != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }\n  }\n  if (0 < fd) {\n    iVar1 = save_bash_input(fd,-1);\n    return -(uint)(iVar1 == -1);\n  }\n  if (fd != 0) {\n    return 0;\n  }\n  iVar1 = sync_buffered_stream(0);\n  return -(uint)(iVar1 == -1);\n}" primitive_type (function_declarator "check_bash_input(int fd)" identifier (parameter_list "(int fd)" ( (parameter_declaration "int fd" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if ((*(int *)PTR_bash_input_001446a4 != 4) || (fd != *(int *)(PTR_bash_input_001446a4 + 8))) {\n    if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }\n    if (fd != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }\n  }\n  if (0 < fd) {\n    iVar1 = save_bash_input(fd,-1);\n    return -(uint)(iVar1 == -1);\n  }\n  if (fd != 0) {\n    return 0;\n  }\n  iVar1 = sync_buffered_stream(0);\n  return -(uint)(iVar1 == -1);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if ((*(int *)PTR_bash_input_001446a4 != 4) || (fd != *(int *)(PTR_bash_input_001446a4 + 8))) {\n    if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }\n    if (fd != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }\n  }" if (parenthesized_expression "((*(int *)PTR_bash_input_001446a4 != 4) || (fd != *(int *)(PTR_bash_input_001446a4 + 8)))" ( (binary_expression "(*(int *)PTR_bash_input_001446a4 != 4) || (fd != *(int *)(PTR_bash_input_001446a4 + 8))" (parenthesized_expression "(*(int *)PTR_bash_input_001446a4 != 4)" ( (binary_expression "*(int *)PTR_bash_input_001446a4 != 4" (pointer_expression "*(int *)PTR_bash_input_001446a4" * (cast_expression "(int *)PTR_bash_input_001446a4" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) != number_literal) )) || (parenthesized_expression "(fd != *(int *)(PTR_bash_input_001446a4 + 8))" ( (binary_expression "fd != *(int *)(PTR_bash_input_001446a4 + 8)" identifier != (pointer_expression "*(int *)(PTR_bash_input_001446a4 + 8)" * (cast_expression "(int *)(PTR_bash_input_001446a4 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_bash_input_001446a4 + 8)" ( (binary_expression "PTR_bash_input_001446a4 + 8" identifier + number_literal) ))))) ))) )) (compound_statement "{\n    if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }\n    if (fd != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }\n  }" { (if_statement "if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }" if (parenthesized_expression "(*(int *)PTR_interactive_shell_00144598 != 0)" ( (binary_expression "*(int *)PTR_interactive_shell_00144598 != 0" (pointer_expression "*(int *)PTR_interactive_shell_00144598" * (cast_expression "(int *)PTR_interactive_shell_00144598" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) != number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (fd != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }" if (parenthesized_expression "(fd != *(int *)PTR_default_buffered_input_0014469c)" ( (binary_expression "fd != *(int *)PTR_default_buffered_input_0014469c" identifier != (pointer_expression "*(int *)PTR_default_buffered_input_0014469c" * (cast_expression "(int *)PTR_default_buffered_input_0014469c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) })) (if_statement "if (0 < fd) {\n    iVar1 = save_bash_input(fd,-1);\n    return -(uint)(iVar1 == -1);\n  }" if (parenthesized_expression "(0 < fd)" ( (binary_expression "0 < fd" number_literal < identifier) )) (compound_statement "{\n    iVar1 = save_bash_input(fd,-1);\n    return -(uint)(iVar1 == -1);\n  }" { (expression_statement "iVar1 = save_bash_input(fd,-1);" (assignment_expression "iVar1 = save_bash_input(fd,-1)" identifier = (call_expression "save_bash_input(fd,-1)" identifier (argument_list "(fd,-1)" ( identifier , number_literal )))) ;) (return_statement "return -(uint)(iVar1 == -1);" return (unary_expression "-(uint)(iVar1 == -1)" - (call_expression "(uint)(iVar1 == -1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 == -1)" ( (binary_expression "iVar1 == -1" identifier == number_literal) )))) ;) })) (if_statement "if (fd != 0) {\n    return 0;\n  }" if (parenthesized_expression "(fd != 0)" ( (binary_expression "fd != 0" identifier != number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = sync_buffered_stream(0);" (assignment_expression "iVar1 = sync_buffered_stream(0)" identifier = (call_expression "sync_buffered_stream(0)" identifier (argument_list "(0)" ( number_literal )))) ;) (return_statement "return -(uint)(iVar1 == -1);" return (unary_expression "-(uint)(iVar1 == -1)" - (call_expression "(uint)(iVar1 == -1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 == -1)" ( (binary_expression "iVar1 == -1" identifier == number_literal) )))) ;) })))
(translation_unit "int check_bash_input(int param_1)\n\n{\n  int iVar1;\n  \n  if ((*(int *)PTR_bash_input_001446a4 != 4) || (param_1 != *(int *)(PTR_bash_input_001446a4 + 8)))\n  {\n    if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }\n    if (param_1 != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }\n  }\n  if (0 < param_1) {\n    iVar1 = save_bash_input(param_1,0xffffffff);\n    return -(uint)(iVar1 == -1);\n  }\n  if (param_1 != 0) {\n    return 0;\n  }\n  iVar1 = sync_buffered_stream();\n  return -(uint)(iVar1 == -1);\n}\n\n" (function_definition "int check_bash_input(int param_1)\n\n{\n  int iVar1;\n  \n  if ((*(int *)PTR_bash_input_001446a4 != 4) || (param_1 != *(int *)(PTR_bash_input_001446a4 + 8)))\n  {\n    if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }\n    if (param_1 != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }\n  }\n  if (0 < param_1) {\n    iVar1 = save_bash_input(param_1,0xffffffff);\n    return -(uint)(iVar1 == -1);\n  }\n  if (param_1 != 0) {\n    return 0;\n  }\n  iVar1 = sync_buffered_stream();\n  return -(uint)(iVar1 == -1);\n}" primitive_type (function_declarator "check_bash_input(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if ((*(int *)PTR_bash_input_001446a4 != 4) || (param_1 != *(int *)(PTR_bash_input_001446a4 + 8)))\n  {\n    if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }\n    if (param_1 != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }\n  }\n  if (0 < param_1) {\n    iVar1 = save_bash_input(param_1,0xffffffff);\n    return -(uint)(iVar1 == -1);\n  }\n  if (param_1 != 0) {\n    return 0;\n  }\n  iVar1 = sync_buffered_stream();\n  return -(uint)(iVar1 == -1);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if ((*(int *)PTR_bash_input_001446a4 != 4) || (param_1 != *(int *)(PTR_bash_input_001446a4 + 8)))\n  {\n    if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }\n    if (param_1 != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }\n  }" if (parenthesized_expression "((*(int *)PTR_bash_input_001446a4 != 4) || (param_1 != *(int *)(PTR_bash_input_001446a4 + 8)))" ( (binary_expression "(*(int *)PTR_bash_input_001446a4 != 4) || (param_1 != *(int *)(PTR_bash_input_001446a4 + 8))" (parenthesized_expression "(*(int *)PTR_bash_input_001446a4 != 4)" ( (binary_expression "*(int *)PTR_bash_input_001446a4 != 4" (pointer_expression "*(int *)PTR_bash_input_001446a4" * (cast_expression "(int *)PTR_bash_input_001446a4" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) != number_literal) )) || (parenthesized_expression "(param_1 != *(int *)(PTR_bash_input_001446a4 + 8))" ( (binary_expression "param_1 != *(int *)(PTR_bash_input_001446a4 + 8)" identifier != (pointer_expression "*(int *)(PTR_bash_input_001446a4 + 8)" * (cast_expression "(int *)(PTR_bash_input_001446a4 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_bash_input_001446a4 + 8)" ( (binary_expression "PTR_bash_input_001446a4 + 8" identifier + number_literal) ))))) ))) )) (compound_statement "{\n    if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }\n    if (param_1 != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }\n  }" { (if_statement "if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }" if (parenthesized_expression "(*(int *)PTR_interactive_shell_00144598 != 0)" ( (binary_expression "*(int *)PTR_interactive_shell_00144598 != 0" (pointer_expression "*(int *)PTR_interactive_shell_00144598" * (cast_expression "(int *)PTR_interactive_shell_00144598" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) != number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (param_1 != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }" if (parenthesized_expression "(param_1 != *(int *)PTR_default_buffered_input_0014469c)" ( (binary_expression "param_1 != *(int *)PTR_default_buffered_input_0014469c" identifier != (pointer_expression "*(int *)PTR_default_buffered_input_0014469c" * (cast_expression "(int *)PTR_default_buffered_input_0014469c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) })) (if_statement "if (0 < param_1) {\n    iVar1 = save_bash_input(param_1,0xffffffff);\n    return -(uint)(iVar1 == -1);\n  }" if (parenthesized_expression "(0 < param_1)" ( (binary_expression "0 < param_1" number_literal < identifier) )) (compound_statement "{\n    iVar1 = save_bash_input(param_1,0xffffffff);\n    return -(uint)(iVar1 == -1);\n  }" { (expression_statement "iVar1 = save_bash_input(param_1,0xffffffff);" (assignment_expression "iVar1 = save_bash_input(param_1,0xffffffff)" identifier = (call_expression "save_bash_input(param_1,0xffffffff)" identifier (argument_list "(param_1,0xffffffff)" ( identifier , number_literal )))) ;) (return_statement "return -(uint)(iVar1 == -1);" return (unary_expression "-(uint)(iVar1 == -1)" - (call_expression "(uint)(iVar1 == -1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 == -1)" ( (binary_expression "iVar1 == -1" identifier == number_literal) )))) ;) })) (if_statement "if (param_1 != 0) {\n    return 0;\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = sync_buffered_stream();" (assignment_expression "iVar1 = sync_buffered_stream()" identifier = (call_expression "sync_buffered_stream()" identifier (argument_list "()" ( )))) ;) (return_statement "return -(uint)(iVar1 == -1);" return (unary_expression "-(uint)(iVar1 == -1)" - (call_expression "(uint)(iVar1 == -1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 == -1)" ( (binary_expression "iVar1 == -1" identifier == number_literal) )))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) != LIT) )) || (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) != LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) )) (compound_statement { (return_statement return LIT ;) })) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (return_statement return (unary_expression - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT == LIT) )))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (return_statement return (unary_expression - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT == LIT) )))) ;) })))
(function_definition "int check_bash_input(int param_1)\n\n{\n  int iVar1;\n  \n  if ((*(int *)PTR_bash_input_001446a4 != 4) || (param_1 != *(int *)(PTR_bash_input_001446a4 + 8)))\n  {\n    if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }\n    if (param_1 != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }\n  }\n  if (0 < param_1) {\n    iVar1 = save_bash_input(param_1,0xffffffff);\n    return -(uint)(iVar1 == -1);\n  }\n  if (param_1 != 0) {\n    return 0;\n  }\n  iVar1 = sync_buffered_stream();\n  return -(uint)(iVar1 == -1);\n}" (primitive_type "int") (function_declarator "check_bash_input(int param_1)" (identifier "check_bash_input") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  if ((*(int *)PTR_bash_input_001446a4 != 4) || (param_1 != *(int *)(PTR_bash_input_001446a4 + 8)))\n  {\n    if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }\n    if (param_1 != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }\n  }\n  if (0 < param_1) {\n    iVar1 = save_bash_input(param_1,0xffffffff);\n    return -(uint)(iVar1 == -1);\n  }\n  if (param_1 != 0) {\n    return 0;\n  }\n  iVar1 = sync_buffered_stream();\n  return -(uint)(iVar1 == -1);\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (if_statement "if ((*(int *)PTR_bash_input_001446a4 != 4) || (param_1 != *(int *)(PTR_bash_input_001446a4 + 8)))\n  {\n    if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }\n    if (param_1 != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }\n  }" (if "if") (parenthesized_expression "((*(int *)PTR_bash_input_001446a4 != 4) || (param_1 != *(int *)(PTR_bash_input_001446a4 + 8)))" (( "(") (binary_expression "(*(int *)PTR_bash_input_001446a4 != 4) || (param_1 != *(int *)(PTR_bash_input_001446a4 + 8))" (parenthesized_expression "(*(int *)PTR_bash_input_001446a4 != 4)" (( "(") (binary_expression "*(int *)PTR_bash_input_001446a4 != 4" (pointer_expression "*(int *)PTR_bash_input_001446a4" (* "*") (cast_expression "(int *)PTR_bash_input_001446a4" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_bash_input_001446a4"))) (!= "!=") (number_literal "4")) () ")")) (|| "||") (parenthesized_expression "(param_1 != *(int *)(PTR_bash_input_001446a4 + 8))" (( "(") (binary_expression "param_1 != *(int *)(PTR_bash_input_001446a4 + 8)" (identifier "param_1") (!= "!=") (pointer_expression "*(int *)(PTR_bash_input_001446a4 + 8)" (* "*") (cast_expression "(int *)(PTR_bash_input_001446a4 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_bash_input_001446a4 + 8)" (( "(") (binary_expression "PTR_bash_input_001446a4 + 8" (identifier "PTR_bash_input_001446a4") (+ "+") (number_literal "8")) () ")"))))) () ")"))) () ")")) (compound_statement "{\n    if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }\n    if (param_1 != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }\n  }" ({ "{") (if_statement "if (*(int *)PTR_interactive_shell_00144598 != 0) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(*(int *)PTR_interactive_shell_00144598 != 0)" (( "(") (binary_expression "*(int *)PTR_interactive_shell_00144598 != 0" (pointer_expression "*(int *)PTR_interactive_shell_00144598" (* "*") (cast_expression "(int *)PTR_interactive_shell_00144598" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_interactive_shell_00144598"))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (param_1 != *(int *)PTR_default_buffered_input_0014469c) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(param_1 != *(int *)PTR_default_buffered_input_0014469c)" (( "(") (binary_expression "param_1 != *(int *)PTR_default_buffered_input_0014469c" (identifier "param_1") (!= "!=") (pointer_expression "*(int *)PTR_default_buffered_input_0014469c" (* "*") (cast_expression "(int *)PTR_default_buffered_input_0014469c" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_default_buffered_input_0014469c")))) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (} "}"))) (if_statement "if (0 < param_1) {\n    iVar1 = save_bash_input(param_1,0xffffffff);\n    return -(uint)(iVar1 == -1);\n  }" (if "if") (parenthesized_expression "(0 < param_1)" (( "(") (binary_expression "0 < param_1" (number_literal "0") (< "<") (identifier "param_1")) () ")")) (compound_statement "{\n    iVar1 = save_bash_input(param_1,0xffffffff);\n    return -(uint)(iVar1 == -1);\n  }" ({ "{") (expression_statement "iVar1 = save_bash_input(param_1,0xffffffff);" (assignment_expression "iVar1 = save_bash_input(param_1,0xffffffff)" (identifier "iVar1") (= "=") (call_expression "save_bash_input(param_1,0xffffffff)" (identifier "save_bash_input") (argument_list "(param_1,0xffffffff)" (( "(") (identifier "param_1") (, ",") (number_literal "0xffffffff") () ")")))) (; ";")) (return_statement "return -(uint)(iVar1 == -1);" (return "return") (unary_expression "-(uint)(iVar1 == -1)" (- "-") (call_expression "(uint)(iVar1 == -1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(iVar1 == -1)" (( "(") (binary_expression "iVar1 == -1" (identifier "iVar1") (== "==") (number_literal "-1")) () ")")))) (; ";")) (} "}"))) (if_statement "if (param_1 != 0) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(param_1 != 0)" (( "(") (binary_expression "param_1 != 0" (identifier "param_1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar1 = sync_buffered_stream();" (assignment_expression "iVar1 = sync_buffered_stream()" (identifier "iVar1") (= "=") (call_expression "sync_buffered_stream()" (identifier "sync_buffered_stream") (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return -(uint)(iVar1 == -1);" (return "return") (unary_expression "-(uint)(iVar1 == -1)" (- "-") (call_expression "(uint)(iVar1 == -1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(iVar1 == -1)" (( "(") (binary_expression "iVar1 == -1" (identifier "iVar1") (== "==") (number_literal "-1")) () ")")))) (; ";")) (} "}")))

int function_1(int var_1)

{
  int var_4;
  
  if ((*(int *)var_2 != 4) || (var_1 != *(int *)(var_2 + 8))) {
    if (*(int *)PTR_interactive_shell_00144598 != 0) {
      return 0;
    }
    if (var_1 != *(int *)PTR_default_buffered_input_0014469c) {
      return 0;
    }
  }
  if (0 < var_1) {
    var_4 = var_3(var_1,-1);
    return -(uint)(var_4 == -1);
  }
  if (var_1 != 0) {
    return 0;
  }
  var_4 = var_5(0);
  return -(uint)(var_4 == -1);
}


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

int MASKED(int param_1)

{
  int iVar1;
  
  if ((*(int *)PTR_bash_input_001446a4 != 4) || (param_1 != *(int *)(PTR_bash_input_001446a4 + 8)))
  {
    if (*(int *)PTR_interactive_shell_00144598 != 0) {
      return 0;
    }
    if (param_1 != *(int *)PTR_default_buffered_input_0014469c) {
      return 0;
    }
  }
  if (0 < param_1) {
    iVar1 = save_bash_input(param_1,0xffffffff);
    return -(uint)(iVar1 == -1);
  }
  if (param_1 != 0) {
    return 0;
  }
  iVar1 = sync_buffered_stream();
  return -(uint)(iVar1 == -1);
}

