
int close_stream(FILE *stream)

{
  uint uVar1;
  int iVar2;
  long lVar3;
  int *piVar4;
  
  lVar3 = __fpending();
  uVar1 = stream->_flags;
  iVar2 = rpl_fclose(stream);
  if ((uVar1 & 0x20) == 0) {
    if (iVar2 != 0) {
      if (lVar3 == 0) {
        piVar4 = __errno_location();
        iVar2 = -(uint)(*piVar4 != 9);
      }
      else {
        iVar2 = -1;
      }
    }
  }
  else if (iVar2 == 0) {
    piVar4 = __errno_location();
    *piVar4 = 0;
    iVar2 = -1;
  }
  else {
    iVar2 = -1;
  }
  return iVar2;
}



ulong FUN_00105bee(uint *param_1)

{
  uint uVar1;
  long lVar2;
  ulong uVar3;
  int *piVar4;
  
  lVar2 = __fpending();
  uVar1 = *param_1;
  uVar3 = FUN_00105cdb(param_1);
  if ((uVar1 & 0x20) == 0) {
    if ((int)uVar3 != 0) {
      if (lVar2 == 0) {
        piVar4 = __errno_location();
        uVar3 = (ulong)-(uint)(*piVar4 != 9);
      }
      else {
        uVar3 = 0xffffffff;
      }
    }
  }
  else if ((int)uVar3 == 0) {
    piVar4 = __errno_location();
    *piVar4 = 0;
    uVar3 = 0xffffffff;
  }
  else {
    uVar3 = 0xffffffff;
  }
  return uVar3;
}


PUSH R12
PUSH RBP
PUSH RBX
MOV RBP,RDI
CALL 0x00102080
MOV R12,RAX
MOV EBX,dword ptr [RBP]
AND EBX,0x20
MOV RDI,RBP
CALL 0x00105cdb
TEST EBX,EBX
JNZ 0x00105c2d
TEST EAX,EAX
JZ 0x00105c28
TEST R12,R12
JNZ 0x00105c43
CALL 0x00102050
CMP dword ptr [RAX],0x9
SETNZ AL
MOVZX EAX,AL
NEG EAX
POP RBX
POP RBP
POP R12
RET
TEST EAX,EAX
JNZ 0x00105c4a
CALL 0x00102050
MOV dword ptr [RAX],0x0
MOV EAX,0xffffffff
JMP 0x00105c28
MOV EAX,0xffffffff
JMP 0x00105c28
MOV EAX,0xffffffff
JMP 0x00105c28
(translation_unit "ulong FUN_00105bee(uint *param_1)\n\n{\n  uint uVar1;\n  long lVar2;\n  ulong uVar3;\n  int *piVar4;\n  \n  lVar2 = __fpending();\n  uVar1 = *param_1;\n  uVar3 = FUN_00105cdb(param_1);\n  if ((uVar1 & 0x20) == 0) {\n    if ((int)uVar3 != 0) {\n      if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }\n    }\n  }\n  else if ((int)uVar3 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    uVar3 = 0xffffffff;\n  }\n  else {\n    uVar3 = 0xffffffff;\n  }\n  return uVar3;\n}\n\n" (function_definition "ulong FUN_00105bee(uint *param_1)\n\n{\n  uint uVar1;\n  long lVar2;\n  ulong uVar3;\n  int *piVar4;\n  \n  lVar2 = __fpending();\n  uVar1 = *param_1;\n  uVar3 = FUN_00105cdb(param_1);\n  if ((uVar1 & 0x20) == 0) {\n    if ((int)uVar3 != 0) {\n      if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }\n    }\n  }\n  else if ((int)uVar3 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    uVar3 = 0xffffffff;\n  }\n  else {\n    uVar3 = 0xffffffff;\n  }\n  return uVar3;\n}" type_identifier (function_declarator "FUN_00105bee(uint *param_1)" identifier (parameter_list "(uint *param_1)" ( (parameter_declaration "uint *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  long lVar2;\n  ulong uVar3;\n  int *piVar4;\n  \n  lVar2 = __fpending();\n  uVar1 = *param_1;\n  uVar3 = FUN_00105cdb(param_1);\n  if ((uVar1 & 0x20) == 0) {\n    if ((int)uVar3 != 0) {\n      if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }\n    }\n  }\n  else if ((int)uVar3 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    uVar3 = 0xffffffff;\n  }\n  else {\n    uVar3 = 0xffffffff;\n  }\n  return uVar3;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (expression_statement "lVar2 = __fpending();" (assignment_expression "lVar2 = __fpending()" identifier = (call_expression "__fpending()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar3 = FUN_00105cdb(param_1);" (assignment_expression "uVar3 = FUN_00105cdb(param_1)" identifier = (call_expression "FUN_00105cdb(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((uVar1 & 0x20) == 0) {\n    if ((int)uVar3 != 0) {\n      if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }\n    }\n  }\n  else if ((int)uVar3 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    uVar3 = 0xffffffff;\n  }\n  else {\n    uVar3 = 0xffffffff;\n  }" if (parenthesized_expression "((uVar1 & 0x20) == 0)" ( (binary_expression "(uVar1 & 0x20) == 0" (parenthesized_expression "(uVar1 & 0x20)" ( (binary_expression "uVar1 & 0x20" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    if ((int)uVar3 != 0) {\n      if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }\n    }\n  }" { (if_statement "if ((int)uVar3 != 0) {\n      if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }\n    }" if (parenthesized_expression "((int)uVar3 != 0)" ( (binary_expression "(int)uVar3 != 0" (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier) != number_literal) )) (compound_statement "{\n      if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }\n    }" { (if_statement "if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }" if (parenthesized_expression "(lVar2 == 0)" ( (binary_expression "lVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar3 = (ulong)-(uint)(*piVar4 != 9);" (assignment_expression "uVar3 = (ulong)-(uint)(*piVar4 != 9)" identifier = (binary_expression "(ulong)-(uint)(*piVar4 != 9)" (parenthesized_expression "(ulong)" ( identifier )) - (call_expression "(uint)(*piVar4 != 9)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*piVar4 != 9)" ( (binary_expression "*piVar4 != 9" (pointer_expression "*piVar4" * identifier) != number_literal) ))))) ;) }) (else_clause "else {\n        uVar3 = 0xffffffff;\n      }" else (compound_statement "{\n        uVar3 = 0xffffffff;\n      }" { (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" identifier = number_literal) ;) }))) })) }) (else_clause "else if ((int)uVar3 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    uVar3 = 0xffffffff;\n  }\n  else {\n    uVar3 = 0xffffffff;\n  }" else (if_statement "if ((int)uVar3 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    uVar3 = 0xffffffff;\n  }\n  else {\n    uVar3 = 0xffffffff;\n  }" if (parenthesized_expression "((int)uVar3 == 0)" ( (binary_expression "(int)uVar3 == 0" (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal) )) (compound_statement "{\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    uVar3 = 0xffffffff;\n  }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar4 = 0;" (assignment_expression "*piVar4 = 0" (pointer_expression "*piVar4" * identifier) = number_literal) ;) (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n    uVar3 = 0xffffffff;\n  }" else (compound_statement "{\n    uVar3 = 0xffffffff;\n  }" { (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" identifier = number_literal) ;) }))))) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit "int close_stream(FILE *stream)\n\n{\n  uint uVar1;\n  int iVar2;\n  long lVar3;\n  int *piVar4;\n  \n  lVar3 = __fpending();\n  uVar1 = stream->_flags;\n  iVar2 = rpl_fclose(stream);\n  if ((uVar1 & 0x20) == 0) {\n    if (iVar2 != 0) {\n      if (lVar3 == 0) {\n        piVar4 = __errno_location();\n        iVar2 = -(uint)(*piVar4 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }\n  else if (iVar2 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }\n  return iVar2;\n}\n\n" (function_definition "int close_stream(FILE *stream)\n\n{\n  uint uVar1;\n  int iVar2;\n  long lVar3;\n  int *piVar4;\n  \n  lVar3 = __fpending();\n  uVar1 = stream->_flags;\n  iVar2 = rpl_fclose(stream);\n  if ((uVar1 & 0x20) == 0) {\n    if (iVar2 != 0) {\n      if (lVar3 == 0) {\n        piVar4 = __errno_location();\n        iVar2 = -(uint)(*piVar4 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }\n  else if (iVar2 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }\n  return iVar2;\n}" primitive_type (function_declarator "close_stream(FILE *stream)" identifier (parameter_list "(FILE *stream)" ( (parameter_declaration "FILE *stream" type_identifier (pointer_declarator "*stream" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  long lVar3;\n  int *piVar4;\n  \n  lVar3 = __fpending();\n  uVar1 = stream->_flags;\n  iVar2 = rpl_fclose(stream);\n  if ((uVar1 & 0x20) == 0) {\n    if (iVar2 != 0) {\n      if (lVar3 == 0) {\n        piVar4 = __errno_location();\n        iVar2 = -(uint)(*piVar4 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }\n  else if (iVar2 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }\n  return iVar2;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (expression_statement "lVar3 = __fpending();" (assignment_expression "lVar3 = __fpending()" identifier = (call_expression "__fpending()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar1 = stream->_flags;" (assignment_expression "uVar1 = stream->_flags" identifier = (field_expression "stream->_flags" identifier -> field_identifier)) ;) (expression_statement "iVar2 = rpl_fclose(stream);" (assignment_expression "iVar2 = rpl_fclose(stream)" identifier = (call_expression "rpl_fclose(stream)" identifier (argument_list "(stream)" ( identifier )))) ;) (if_statement "if ((uVar1 & 0x20) == 0) {\n    if (iVar2 != 0) {\n      if (lVar3 == 0) {\n        piVar4 = __errno_location();\n        iVar2 = -(uint)(*piVar4 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }\n  else if (iVar2 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }" if (parenthesized_expression "((uVar1 & 0x20) == 0)" ( (binary_expression "(uVar1 & 0x20) == 0" (parenthesized_expression "(uVar1 & 0x20)" ( (binary_expression "uVar1 & 0x20" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    if (iVar2 != 0) {\n      if (lVar3 == 0) {\n        piVar4 = __errno_location();\n        iVar2 = -(uint)(*piVar4 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }\n  }" { (if_statement "if (iVar2 != 0) {\n      if (lVar3 == 0) {\n        piVar4 = __errno_location();\n        iVar2 = -(uint)(*piVar4 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      if (lVar3 == 0) {\n        piVar4 = __errno_location();\n        iVar2 = -(uint)(*piVar4 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }\n    }" { (if_statement "if (lVar3 == 0) {\n        piVar4 = __errno_location();\n        iVar2 = -(uint)(*piVar4 != 9);\n      }\n      else {\n        iVar2 = -1;\n      }" if (parenthesized_expression "(lVar3 == 0)" ( (binary_expression "lVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        piVar4 = __errno_location();\n        iVar2 = -(uint)(*piVar4 != 9);\n      }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar2 = -(uint)(*piVar4 != 9);" (assignment_expression "iVar2 = -(uint)(*piVar4 != 9)" identifier = (unary_expression "-(uint)(*piVar4 != 9)" - (call_expression "(uint)(*piVar4 != 9)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*piVar4 != 9)" ( (binary_expression "*piVar4 != 9" (pointer_expression "*piVar4" * identifier) != number_literal) ))))) ;) }) (else_clause "else {\n        iVar2 = -1;\n      }" else (compound_statement "{\n        iVar2 = -1;\n      }" { (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) }))) })) }) (else_clause "else if (iVar2 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }" else (if_statement "if (iVar2 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    iVar2 = -1;\n  }\n  else {\n    iVar2 = -1;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    iVar2 = -1;\n  }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar4 = 0;" (assignment_expression "*piVar4 = 0" (pointer_expression "*piVar4" * identifier) = number_literal) ;) (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) }) (else_clause "else {\n    iVar2 = -1;\n  }" else (compound_statement "{\n    iVar2 = -1;\n  }" { (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) }))))) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "ulong FUN_00105bee(uint *param_1)\n\n{\n  uint uVar1;\n  long lVar2;\n  ulong uVar3;\n  int *piVar4;\n  \n  lVar2 = __fpending();\n  uVar1 = *param_1;\n  uVar3 = FUN_00105cdb(param_1);\n  if ((uVar1 & 0x20) == 0) {\n    if ((int)uVar3 != 0) {\n      if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }\n    }\n  }\n  else if ((int)uVar3 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    uVar3 = 0xffffffff;\n  }\n  else {\n    uVar3 = 0xffffffff;\n  }\n  return uVar3;\n}\n\n" (function_definition "ulong FUN_00105bee(uint *param_1)\n\n{\n  uint uVar1;\n  long lVar2;\n  ulong uVar3;\n  int *piVar4;\n  \n  lVar2 = __fpending();\n  uVar1 = *param_1;\n  uVar3 = FUN_00105cdb(param_1);\n  if ((uVar1 & 0x20) == 0) {\n    if ((int)uVar3 != 0) {\n      if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }\n    }\n  }\n  else if ((int)uVar3 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    uVar3 = 0xffffffff;\n  }\n  else {\n    uVar3 = 0xffffffff;\n  }\n  return uVar3;\n}" type_identifier (function_declarator "FUN_00105bee(uint *param_1)" identifier (parameter_list "(uint *param_1)" ( (parameter_declaration "uint *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  long lVar2;\n  ulong uVar3;\n  int *piVar4;\n  \n  lVar2 = __fpending();\n  uVar1 = *param_1;\n  uVar3 = FUN_00105cdb(param_1);\n  if ((uVar1 & 0x20) == 0) {\n    if ((int)uVar3 != 0) {\n      if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }\n    }\n  }\n  else if ((int)uVar3 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    uVar3 = 0xffffffff;\n  }\n  else {\n    uVar3 = 0xffffffff;\n  }\n  return uVar3;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (expression_statement "lVar2 = __fpending();" (assignment_expression "lVar2 = __fpending()" identifier = (call_expression "__fpending()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar3 = FUN_00105cdb(param_1);" (assignment_expression "uVar3 = FUN_00105cdb(param_1)" identifier = (call_expression "FUN_00105cdb(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((uVar1 & 0x20) == 0) {\n    if ((int)uVar3 != 0) {\n      if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }\n    }\n  }\n  else if ((int)uVar3 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    uVar3 = 0xffffffff;\n  }\n  else {\n    uVar3 = 0xffffffff;\n  }" if (parenthesized_expression "((uVar1 & 0x20) == 0)" ( (binary_expression "(uVar1 & 0x20) == 0" (parenthesized_expression "(uVar1 & 0x20)" ( (binary_expression "uVar1 & 0x20" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    if ((int)uVar3 != 0) {\n      if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }\n    }\n  }" { (if_statement "if ((int)uVar3 != 0) {\n      if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }\n    }" if (parenthesized_expression "((int)uVar3 != 0)" ( (binary_expression "(int)uVar3 != 0" (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier) != number_literal) )) (compound_statement "{\n      if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }\n    }" { (if_statement "if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }" if (parenthesized_expression "(lVar2 == 0)" ( (binary_expression "lVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar3 = (ulong)-(uint)(*piVar4 != 9);" (assignment_expression "uVar3 = (ulong)-(uint)(*piVar4 != 9)" identifier = (binary_expression "(ulong)-(uint)(*piVar4 != 9)" (parenthesized_expression "(ulong)" ( identifier )) - (call_expression "(uint)(*piVar4 != 9)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*piVar4 != 9)" ( (binary_expression "*piVar4 != 9" (pointer_expression "*piVar4" * identifier) != number_literal) ))))) ;) }) (else_clause "else {\n        uVar3 = 0xffffffff;\n      }" else (compound_statement "{\n        uVar3 = 0xffffffff;\n      }" { (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" identifier = number_literal) ;) }))) })) }) (else_clause "else if ((int)uVar3 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    uVar3 = 0xffffffff;\n  }\n  else {\n    uVar3 = 0xffffffff;\n  }" else (if_statement "if ((int)uVar3 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    uVar3 = 0xffffffff;\n  }\n  else {\n    uVar3 = 0xffffffff;\n  }" if (parenthesized_expression "((int)uVar3 == 0)" ( (binary_expression "(int)uVar3 == 0" (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal) )) (compound_statement "{\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    uVar3 = 0xffffffff;\n  }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar4 = 0;" (assignment_expression "*piVar4 = 0" (pointer_expression "*piVar4" * identifier) = number_literal) ;) (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n    uVar3 = 0xffffffff;\n  }" else (compound_statement "{\n    uVar3 = 0xffffffff;\n  }" { (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" identifier = number_literal) ;) }))))) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (pointer_expression * IDENT) != LIT) ))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }))) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }))))) (return_statement return IDENT ;) })))
(function_definition "ulong FUN_00105bee(uint *param_1)\n\n{\n  uint uVar1;\n  long lVar2;\n  ulong uVar3;\n  int *piVar4;\n  \n  lVar2 = __fpending();\n  uVar1 = *param_1;\n  uVar3 = FUN_00105cdb(param_1);\n  if ((uVar1 & 0x20) == 0) {\n    if ((int)uVar3 != 0) {\n      if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }\n    }\n  }\n  else if ((int)uVar3 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    uVar3 = 0xffffffff;\n  }\n  else {\n    uVar3 = 0xffffffff;\n  }\n  return uVar3;\n}" (type_identifier "ulong") (function_declarator "FUN_00105bee(uint *param_1)" (identifier "FUN_00105bee") (parameter_list "(uint *param_1)" (( "(") (parameter_declaration "uint *param_1" (type_identifier "uint") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  uint uVar1;\n  long lVar2;\n  ulong uVar3;\n  int *piVar4;\n  \n  lVar2 = __fpending();\n  uVar1 = *param_1;\n  uVar3 = FUN_00105cdb(param_1);\n  if ((uVar1 & 0x20) == 0) {\n    if ((int)uVar3 != 0) {\n      if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }\n    }\n  }\n  else if ((int)uVar3 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    uVar3 = 0xffffffff;\n  }\n  else {\n    uVar3 = 0xffffffff;\n  }\n  return uVar3;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "long lVar2;" (sized_type_specifier "long" (long "long")) (identifier "lVar2") (; ";")) (declaration "ulong uVar3;" (type_identifier "ulong") (identifier "uVar3") (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (expression_statement "lVar2 = __fpending();" (assignment_expression "lVar2 = __fpending()" (identifier "lVar2") (= "=") (call_expression "__fpending()" (identifier "__fpending") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" (identifier "uVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "uVar3 = FUN_00105cdb(param_1);" (assignment_expression "uVar3 = FUN_00105cdb(param_1)" (identifier "uVar3") (= "=") (call_expression "FUN_00105cdb(param_1)" (identifier "FUN_00105cdb") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if ((uVar1 & 0x20) == 0) {\n    if ((int)uVar3 != 0) {\n      if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }\n    }\n  }\n  else if ((int)uVar3 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    uVar3 = 0xffffffff;\n  }\n  else {\n    uVar3 = 0xffffffff;\n  }" (if "if") (parenthesized_expression "((uVar1 & 0x20) == 0)" (( "(") (binary_expression "(uVar1 & 0x20) == 0" (parenthesized_expression "(uVar1 & 0x20)" (( "(") (binary_expression "uVar1 & 0x20" (identifier "uVar1") (& "&") (number_literal "0x20")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if ((int)uVar3 != 0) {\n      if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }\n    }\n  }" ({ "{") (if_statement "if ((int)uVar3 != 0) {\n      if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }\n    }" (if "if") (parenthesized_expression "((int)uVar3 != 0)" (( "(") (binary_expression "(int)uVar3 != 0" (cast_expression "(int)uVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar3")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }\n    }" ({ "{") (if_statement "if (lVar2 == 0) {\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }\n      else {\n        uVar3 = 0xffffffff;\n      }" (if "if") (parenthesized_expression "(lVar2 == 0)" (( "(") (binary_expression "lVar2 == 0" (identifier "lVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        piVar4 = __errno_location();\n        uVar3 = (ulong)-(uint)(*piVar4 != 9);\n      }" ({ "{") (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" (identifier "piVar4") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar3 = (ulong)-(uint)(*piVar4 != 9);" (assignment_expression "uVar3 = (ulong)-(uint)(*piVar4 != 9)" (identifier "uVar3") (= "=") (binary_expression "(ulong)-(uint)(*piVar4 != 9)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (- "-") (call_expression "(uint)(*piVar4 != 9)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(*piVar4 != 9)" (( "(") (binary_expression "*piVar4 != 9" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (!= "!=") (number_literal "9")) () ")"))))) (; ";")) (} "}")) (else_clause "else {\n        uVar3 = 0xffffffff;\n      }" (else "else") (compound_statement "{\n        uVar3 = 0xffffffff;\n      }" ({ "{") (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" (identifier "uVar3") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}")))) (} "}"))) (} "}")) (else_clause "else if ((int)uVar3 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    uVar3 = 0xffffffff;\n  }\n  else {\n    uVar3 = 0xffffffff;\n  }" (else "else") (if_statement "if ((int)uVar3 == 0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    uVar3 = 0xffffffff;\n  }\n  else {\n    uVar3 = 0xffffffff;\n  }" (if "if") (parenthesized_expression "((int)uVar3 == 0)" (( "(") (binary_expression "(int)uVar3 == 0" (cast_expression "(int)uVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar3")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    piVar4 = __errno_location();\n    *piVar4 = 0;\n    uVar3 = 0xffffffff;\n  }" ({ "{") (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" (identifier "piVar4") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "*piVar4 = 0;" (assignment_expression "*piVar4 = 0" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" (identifier "uVar3") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}")) (else_clause "else {\n    uVar3 = 0xffffffff;\n  }" (else "else") (compound_statement "{\n    uVar3 = 0xffffffff;\n  }" ({ "{") (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" (identifier "uVar3") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}")))))) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}")))

int function_1(type_1 *stream)

{
  type_2 var_3;
  int var_4;
  long var_5;
  int *piVar4;
  
  var_5 = var_1();
  var_3 = stream->_flags;
  var_4 = var_2(stream);
  if ((var_3 & 0x20) == 0) {
    if (var_4 != 0) {
      if (var_5 == 0) {
        piVar4 = var_6();
        var_4 = -(type_2)(*piVar4 != 9);
      }
      else {
        var_4 = -1;
      }
    }
  }
  else if (var_4 == 0) {
    piVar4 = var_6();
    *piVar4 = 0;
    var_4 = -1;
  }
  else {
    var_4 = -1;
  }
  return var_4;
}


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

ulong MASKED(uint *param_1)

{
  uint uVar1;
  long lVar2;
  ulong uVar3;
  int *piVar4;
  
  lVar2 = __fpending();
  uVar1 = *param_1;
  uVar3 = FUN_00105cdb(param_1);
  if ((uVar1 & 0x20) == 0) {
    if ((int)uVar3 != 0) {
      if (lVar2 == 0) {
        piVar4 = __errno_location();
        uVar3 = (ulong)-(uint)(*piVar4 != 9);
      }
      else {
        uVar3 = 0xffffffff;
      }
    }
  }
  else if ((int)uVar3 == 0) {
    piVar4 = __errno_location();
    *piVar4 = 0;
    uVar3 = 0xffffffff;
  }
  else {
    uVar3 = 0xffffffff;
  }
  return uVar3;
}

