
int nonblock(int fd)

{
  uint uVar1;
  int iVar2;
  int *piVar3;
  char *pcVar4;
  undefined4 in_register_0000003c;
  
  uVar1 = fcntl64(CONCAT44(in_register_0000003c,fd),3);
  if ((int)uVar1 < 0) {
    piVar3 = __errno_location();
    pcVar4 = strerror(*piVar3);
    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",fd,pcVar4);
                    /* WARNING: Subroutine does not return */
    exit(1);
  }
  iVar2 = fcntl64(fd,4,uVar1 | 0x800);
  if (-1 < iVar2) {
    return uVar1 & 0x800;
  }
  piVar3 = __errno_location();
  pcVar4 = strerror(*piVar3);
  __fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",fd,pcVar4);
                    /* WARNING: Subroutine does not return */
  exit(1);
}



uint FUN_0012b16a(ulong param_1)

{
  uint uVar1;
  int iVar2;
  int *piVar3;
  char *pcVar4;
  ulong uVar5;
  
  uVar5 = param_1 & 0xffffffff;
  uVar1 = fcntl64(param_1,3);
  if ((int)uVar1 < 0) {
    piVar3 = __errno_location();
    pcVar4 = strerror(*piVar3);
    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4);
                    /* WARNING: Subroutine does not return */
    exit(1);
  }
  iVar2 = fcntl64(uVar5,4,uVar1 | 0x800);
  if (-1 < iVar2) {
    return uVar1 & 0x800;
  }
  piVar3 = __errno_location();
  pcVar4 = strerror(*piVar3);
  __fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",uVar5,pcVar4);
                    /* WARNING: Subroutine does not return */
  exit(1);
}


PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV EBP,EDI
MOV ESI,0x3
MOV EAX,0x0
CALL 0x00104400
TEST EAX,EAX
JS 0x0012b1af
MOV EBX,EAX
MOV EDX,EAX
OR DH,0x8
MOV ESI,0x4
MOV EDI,EBP
MOV EAX,0x0
CALL 0x00104400
TEST EAX,EAX
JS 0x0012b1e7
MOV EAX,EBX
AND EAX,0x800
ADD RSP,0x8
POP RBX
POP RBP
RET
CALL 0x00104080
MOV EDI,dword ptr [RAX]
CALL 0x001044f0
MOV R8,RAX
MOV ECX,EBP
LEA RDX,[0x13aaa7]
MOV ESI,0x1
MOV RDI,qword ptr [0x00146080]
MOV EAX,0x0
CALL 0x001044e0
MOV EDI,0x1
CALL 0x001044c0
CALL 0x00104080
MOV EDI,dword ptr [RAX]
CALL 0x001044f0
MOV R8,RAX
MOV ECX,EBP
LEA RDX,[0x13aabf]
MOV ESI,0x1
MOV RDI,qword ptr [0x00146080]
MOV EAX,0x0
CALL 0x001044e0
MOV EDI,0x1
CALL 0x001044c0
(translation_unit "uint FUN_0012b16a(ulong param_1)\n\n{\n  uint uVar1;\n  int iVar2;\n  int *piVar3;\n  char *pcVar4;\n  ulong uVar5;\n  \n  uVar5 = param_1 & 0xffffffff;\n  uVar1 = fcntl64(param_1,3);\n  if ((int)uVar1 < 0) {\n    piVar3 = __errno_location();\n    pcVar4 = strerror(*piVar3);\n    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4);\n                    /* WARNING: Subroutine does not return */\n    exit(1);\n  }\n  iVar2 = fcntl64(uVar5,4,uVar1 | 0x800);\n  if (-1 < iVar2) {\n    return uVar1 & 0x800;\n  }\n  piVar3 = __errno_location();\n  pcVar4 = strerror(*piVar3);\n  __fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",uVar5,pcVar4);\n                    /* WARNING: Subroutine does not return */\n  exit(1);\n}\n\n" (function_definition "uint FUN_0012b16a(ulong param_1)\n\n{\n  uint uVar1;\n  int iVar2;\n  int *piVar3;\n  char *pcVar4;\n  ulong uVar5;\n  \n  uVar5 = param_1 & 0xffffffff;\n  uVar1 = fcntl64(param_1,3);\n  if ((int)uVar1 < 0) {\n    piVar3 = __errno_location();\n    pcVar4 = strerror(*piVar3);\n    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4);\n                    /* WARNING: Subroutine does not return */\n    exit(1);\n  }\n  iVar2 = fcntl64(uVar5,4,uVar1 | 0x800);\n  if (-1 < iVar2) {\n    return uVar1 & 0x800;\n  }\n  piVar3 = __errno_location();\n  pcVar4 = strerror(*piVar3);\n  __fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",uVar5,pcVar4);\n                    /* WARNING: Subroutine does not return */\n  exit(1);\n}" type_identifier (function_declarator "FUN_0012b16a(ulong param_1)" identifier (parameter_list "(ulong param_1)" ( (parameter_declaration "ulong param_1" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  int *piVar3;\n  char *pcVar4;\n  ulong uVar5;\n  \n  uVar5 = param_1 & 0xffffffff;\n  uVar1 = fcntl64(param_1,3);\n  if ((int)uVar1 < 0) {\n    piVar3 = __errno_location();\n    pcVar4 = strerror(*piVar3);\n    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4);\n                    /* WARNING: Subroutine does not return */\n    exit(1);\n  }\n  iVar2 = fcntl64(uVar5,4,uVar1 | 0x800);\n  if (-1 < iVar2) {\n    return uVar1 & 0x800;\n  }\n  piVar3 = __errno_location();\n  pcVar4 = strerror(*piVar3);\n  __fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",uVar5,pcVar4);\n                    /* WARNING: Subroutine does not return */\n  exit(1);\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "ulong uVar5;" type_identifier identifier ;) (expression_statement "uVar5 = param_1 & 0xffffffff;" (assignment_expression "uVar5 = param_1 & 0xffffffff" identifier = (binary_expression "param_1 & 0xffffffff" identifier & number_literal)) ;) (expression_statement "uVar1 = fcntl64(param_1,3);" (assignment_expression "uVar1 = fcntl64(param_1,3)" identifier = (call_expression "fcntl64(param_1,3)" identifier (argument_list "(param_1,3)" ( identifier , number_literal )))) ;) (if_statement "if ((int)uVar1 < 0) {\n    piVar3 = __errno_location();\n    pcVar4 = strerror(*piVar3);\n    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4);\n                    /* WARNING: Subroutine does not return */\n    exit(1);\n  }" if (parenthesized_expression "((int)uVar1 < 0)" ( (binary_expression "(int)uVar1 < 0" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n    piVar3 = __errno_location();\n    pcVar4 = strerror(*piVar3);\n    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4);\n                    /* WARNING: Subroutine does not return */\n    exit(1);\n  }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" identifier = (call_expression "strerror(*piVar3)" identifier (argument_list "(*piVar3)" ( (pointer_expression "*piVar3" * identifier) )))) ;) (expression_statement "__fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4);" (call_expression "__fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4)" identifier (argument_list "(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4)" ( identifier , number_literal , (string_literal ""%d: fcntl(F_GETFL): %s\n"" " string_content escape_sequence ") , identifier , identifier ))) ;) comment (expression_statement "exit(1);" (call_expression "exit(1)" identifier (argument_list "(1)" ( number_literal ))) ;) })) (expression_statement "iVar2 = fcntl64(uVar5,4,uVar1 | 0x800);" (assignment_expression "iVar2 = fcntl64(uVar5,4,uVar1 | 0x800)" identifier = (call_expression "fcntl64(uVar5,4,uVar1 | 0x800)" identifier (argument_list "(uVar5,4,uVar1 | 0x800)" ( identifier , number_literal , (binary_expression "uVar1 | 0x800" identifier | number_literal) )))) ;) (if_statement "if (-1 < iVar2) {\n    return uVar1 & 0x800;\n  }" if (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) )) (compound_statement "{\n    return uVar1 & 0x800;\n  }" { (return_statement "return uVar1 & 0x800;" return (binary_expression "uVar1 & 0x800" identifier & number_literal) ;) })) (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" identifier = (call_expression "strerror(*piVar3)" identifier (argument_list "(*piVar3)" ( (pointer_expression "*piVar3" * identifier) )))) ;) (expression_statement "__fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",uVar5,pcVar4);" (call_expression "__fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",uVar5,pcVar4)" identifier (argument_list "(stderr,1,"%d: fcntl(F_SETFL): %s\n",uVar5,pcVar4)" ( identifier , number_literal , (string_literal ""%d: fcntl(F_SETFL): %s\n"" " string_content escape_sequence ") , identifier , identifier ))) ;) comment (expression_statement "exit(1);" (call_expression "exit(1)" identifier (argument_list "(1)" ( number_literal ))) ;) })))
(translation_unit "int nonblock(int fd)\n\n{\n  uint uVar1;\n  int iVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 in_register_0000003c;\n  \n  uVar1 = fcntl64(CONCAT44(in_register_0000003c,fd),3);\n  if ((int)uVar1 < 0) {\n    piVar3 = __errno_location();\n    pcVar4 = strerror(*piVar3);\n    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",fd,pcVar4);\n                    /* WARNING: Subroutine does not return */\n    exit(1);\n  }\n  iVar2 = fcntl64(fd,4,uVar1 | 0x800);\n  if (-1 < iVar2) {\n    return uVar1 & 0x800;\n  }\n  piVar3 = __errno_location();\n  pcVar4 = strerror(*piVar3);\n  __fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",fd,pcVar4);\n                    /* WARNING: Subroutine does not return */\n  exit(1);\n}\n\n" (function_definition "int nonblock(int fd)\n\n{\n  uint uVar1;\n  int iVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 in_register_0000003c;\n  \n  uVar1 = fcntl64(CONCAT44(in_register_0000003c,fd),3);\n  if ((int)uVar1 < 0) {\n    piVar3 = __errno_location();\n    pcVar4 = strerror(*piVar3);\n    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",fd,pcVar4);\n                    /* WARNING: Subroutine does not return */\n    exit(1);\n  }\n  iVar2 = fcntl64(fd,4,uVar1 | 0x800);\n  if (-1 < iVar2) {\n    return uVar1 & 0x800;\n  }\n  piVar3 = __errno_location();\n  pcVar4 = strerror(*piVar3);\n  __fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",fd,pcVar4);\n                    /* WARNING: Subroutine does not return */\n  exit(1);\n}" primitive_type (function_declarator "nonblock(int fd)" identifier (parameter_list "(int fd)" ( (parameter_declaration "int fd" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 in_register_0000003c;\n  \n  uVar1 = fcntl64(CONCAT44(in_register_0000003c,fd),3);\n  if ((int)uVar1 < 0) {\n    piVar3 = __errno_location();\n    pcVar4 = strerror(*piVar3);\n    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",fd,pcVar4);\n                    /* WARNING: Subroutine does not return */\n    exit(1);\n  }\n  iVar2 = fcntl64(fd,4,uVar1 | 0x800);\n  if (-1 < iVar2) {\n    return uVar1 & 0x800;\n  }\n  piVar3 = __errno_location();\n  pcVar4 = strerror(*piVar3);\n  __fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",fd,pcVar4);\n                    /* WARNING: Subroutine does not return */\n  exit(1);\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "undefined4 in_register_0000003c;" type_identifier identifier ;) (expression_statement "uVar1 = fcntl64(CONCAT44(in_register_0000003c,fd),3);" (assignment_expression "uVar1 = fcntl64(CONCAT44(in_register_0000003c,fd),3)" identifier = (call_expression "fcntl64(CONCAT44(in_register_0000003c,fd),3)" identifier (argument_list "(CONCAT44(in_register_0000003c,fd),3)" ( (call_expression "CONCAT44(in_register_0000003c,fd)" identifier (argument_list "(in_register_0000003c,fd)" ( identifier , identifier ))) , number_literal )))) ;) (if_statement "if ((int)uVar1 < 0) {\n    piVar3 = __errno_location();\n    pcVar4 = strerror(*piVar3);\n    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",fd,pcVar4);\n                    /* WARNING: Subroutine does not return */\n    exit(1);\n  }" if (parenthesized_expression "((int)uVar1 < 0)" ( (binary_expression "(int)uVar1 < 0" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n    piVar3 = __errno_location();\n    pcVar4 = strerror(*piVar3);\n    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",fd,pcVar4);\n                    /* WARNING: Subroutine does not return */\n    exit(1);\n  }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" identifier = (call_expression "strerror(*piVar3)" identifier (argument_list "(*piVar3)" ( (pointer_expression "*piVar3" * identifier) )))) ;) (expression_statement "__fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",fd,pcVar4);" (call_expression "__fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",fd,pcVar4)" identifier (argument_list "(stderr,1,"%d: fcntl(F_GETFL): %s\n",fd,pcVar4)" ( identifier , number_literal , (string_literal ""%d: fcntl(F_GETFL): %s\n"" " string_content escape_sequence ") , identifier , identifier ))) ;) comment (expression_statement "exit(1);" (call_expression "exit(1)" identifier (argument_list "(1)" ( number_literal ))) ;) })) (expression_statement "iVar2 = fcntl64(fd,4,uVar1 | 0x800);" (assignment_expression "iVar2 = fcntl64(fd,4,uVar1 | 0x800)" identifier = (call_expression "fcntl64(fd,4,uVar1 | 0x800)" identifier (argument_list "(fd,4,uVar1 | 0x800)" ( identifier , number_literal , (binary_expression "uVar1 | 0x800" identifier | number_literal) )))) ;) (if_statement "if (-1 < iVar2) {\n    return uVar1 & 0x800;\n  }" if (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) )) (compound_statement "{\n    return uVar1 & 0x800;\n  }" { (return_statement "return uVar1 & 0x800;" return (binary_expression "uVar1 & 0x800" identifier & number_literal) ;) })) (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" identifier = (call_expression "strerror(*piVar3)" identifier (argument_list "(*piVar3)" ( (pointer_expression "*piVar3" * identifier) )))) ;) (expression_statement "__fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",fd,pcVar4);" (call_expression "__fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",fd,pcVar4)" identifier (argument_list "(stderr,1,"%d: fcntl(F_SETFL): %s\n",fd,pcVar4)" ( identifier , number_literal , (string_literal ""%d: fcntl(F_SETFL): %s\n"" " string_content escape_sequence ") , identifier , identifier ))) ;) comment (expression_statement "exit(1);" (call_expression "exit(1)" identifier (argument_list "(1)" ( number_literal ))) ;) })))
(translation_unit "uint FUN_0012b16a(ulong param_1)\n\n{\n  uint uVar1;\n  int iVar2;\n  int *piVar3;\n  char *pcVar4;\n  ulong uVar5;\n  \n  uVar5 = param_1 & 0xffffffff;\n  uVar1 = fcntl64(param_1,3);\n  if ((int)uVar1 < 0) {\n    piVar3 = __errno_location();\n    pcVar4 = strerror(*piVar3);\n    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4);\n                    \n    exit(1);\n  }\n  iVar2 = fcntl64(uVar5,4,uVar1 | 0x800);\n  if (-1 < iVar2) {\n    return uVar1 & 0x800;\n  }\n  piVar3 = __errno_location();\n  pcVar4 = strerror(*piVar3);\n  __fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",uVar5,pcVar4);\n                    \n  exit(1);\n}\n\n" (function_definition "uint FUN_0012b16a(ulong param_1)\n\n{\n  uint uVar1;\n  int iVar2;\n  int *piVar3;\n  char *pcVar4;\n  ulong uVar5;\n  \n  uVar5 = param_1 & 0xffffffff;\n  uVar1 = fcntl64(param_1,3);\n  if ((int)uVar1 < 0) {\n    piVar3 = __errno_location();\n    pcVar4 = strerror(*piVar3);\n    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4);\n                    \n    exit(1);\n  }\n  iVar2 = fcntl64(uVar5,4,uVar1 | 0x800);\n  if (-1 < iVar2) {\n    return uVar1 & 0x800;\n  }\n  piVar3 = __errno_location();\n  pcVar4 = strerror(*piVar3);\n  __fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",uVar5,pcVar4);\n                    \n  exit(1);\n}" type_identifier (function_declarator "FUN_0012b16a(ulong param_1)" identifier (parameter_list "(ulong param_1)" ( (parameter_declaration "ulong param_1" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  int *piVar3;\n  char *pcVar4;\n  ulong uVar5;\n  \n  uVar5 = param_1 & 0xffffffff;\n  uVar1 = fcntl64(param_1,3);\n  if ((int)uVar1 < 0) {\n    piVar3 = __errno_location();\n    pcVar4 = strerror(*piVar3);\n    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4);\n                    \n    exit(1);\n  }\n  iVar2 = fcntl64(uVar5,4,uVar1 | 0x800);\n  if (-1 < iVar2) {\n    return uVar1 & 0x800;\n  }\n  piVar3 = __errno_location();\n  pcVar4 = strerror(*piVar3);\n  __fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",uVar5,pcVar4);\n                    \n  exit(1);\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "ulong uVar5;" type_identifier identifier ;) (expression_statement "uVar5 = param_1 & 0xffffffff;" (assignment_expression "uVar5 = param_1 & 0xffffffff" identifier = (binary_expression "param_1 & 0xffffffff" identifier & number_literal)) ;) (expression_statement "uVar1 = fcntl64(param_1,3);" (assignment_expression "uVar1 = fcntl64(param_1,3)" identifier = (call_expression "fcntl64(param_1,3)" identifier (argument_list "(param_1,3)" ( identifier , number_literal )))) ;) (if_statement "if ((int)uVar1 < 0) {\n    piVar3 = __errno_location();\n    pcVar4 = strerror(*piVar3);\n    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4);\n                    \n    exit(1);\n  }" if (parenthesized_expression "((int)uVar1 < 0)" ( (binary_expression "(int)uVar1 < 0" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n    piVar3 = __errno_location();\n    pcVar4 = strerror(*piVar3);\n    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4);\n                    \n    exit(1);\n  }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" identifier = (call_expression "strerror(*piVar3)" identifier (argument_list "(*piVar3)" ( (pointer_expression "*piVar3" * identifier) )))) ;) (expression_statement "__fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4);" (call_expression "__fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4)" identifier (argument_list "(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4)" ( identifier , number_literal , (string_literal ""%d: fcntl(F_GETFL): %s\n"" " string_content escape_sequence ") , identifier , identifier ))) ;) (expression_statement "exit(1);" (call_expression "exit(1)" identifier (argument_list "(1)" ( number_literal ))) ;) })) (expression_statement "iVar2 = fcntl64(uVar5,4,uVar1 | 0x800);" (assignment_expression "iVar2 = fcntl64(uVar5,4,uVar1 | 0x800)" identifier = (call_expression "fcntl64(uVar5,4,uVar1 | 0x800)" identifier (argument_list "(uVar5,4,uVar1 | 0x800)" ( identifier , number_literal , (binary_expression "uVar1 | 0x800" identifier | number_literal) )))) ;) (if_statement "if (-1 < iVar2) {\n    return uVar1 & 0x800;\n  }" if (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) )) (compound_statement "{\n    return uVar1 & 0x800;\n  }" { (return_statement "return uVar1 & 0x800;" return (binary_expression "uVar1 & 0x800" identifier & number_literal) ;) })) (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" identifier = (call_expression "strerror(*piVar3)" identifier (argument_list "(*piVar3)" ( (pointer_expression "*piVar3" * identifier) )))) ;) (expression_statement "__fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",uVar5,pcVar4);" (call_expression "__fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",uVar5,pcVar4)" identifier (argument_list "(stderr,1,"%d: fcntl(F_SETFL): %s\n",uVar5,pcVar4)" ( identifier , number_literal , (string_literal ""%d: fcntl(F_SETFL): %s\n"" " string_content escape_sequence ") , identifier , identifier ))) ;) (expression_statement "exit(1);" (call_expression "exit(1)" identifier (argument_list "(1)" ( number_literal ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (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 IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (string_literal " string_content escape_sequence ") , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , (binary_expression IDENT | LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (return_statement return (binary_expression IDENT & LIT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (string_literal " string_content escape_sequence ") , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) })))
(function_definition "uint FUN_0012b16a(ulong param_1)\n\n{\n  uint uVar1;\n  int iVar2;\n  int *piVar3;\n  char *pcVar4;\n  ulong uVar5;\n  \n  uVar5 = param_1 & 0xffffffff;\n  uVar1 = fcntl64(param_1,3);\n  if ((int)uVar1 < 0) {\n    piVar3 = __errno_location();\n    pcVar4 = strerror(*piVar3);\n    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4);\n                    \n    exit(1);\n  }\n  iVar2 = fcntl64(uVar5,4,uVar1 | 0x800);\n  if (-1 < iVar2) {\n    return uVar1 & 0x800;\n  }\n  piVar3 = __errno_location();\n  pcVar4 = strerror(*piVar3);\n  __fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",uVar5,pcVar4);\n                    \n  exit(1);\n}" (type_identifier "uint") (function_declarator "FUN_0012b16a(ulong param_1)" (identifier "FUN_0012b16a") (parameter_list "(ulong param_1)" (( "(") (parameter_declaration "ulong param_1" (type_identifier "ulong") (identifier "param_1")) () ")"))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  int *piVar3;\n  char *pcVar4;\n  ulong uVar5;\n  \n  uVar5 = param_1 & 0xffffffff;\n  uVar1 = fcntl64(param_1,3);\n  if ((int)uVar1 < 0) {\n    piVar3 = __errno_location();\n    pcVar4 = strerror(*piVar3);\n    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4);\n                    \n    exit(1);\n  }\n  iVar2 = fcntl64(uVar5,4,uVar1 | 0x800);\n  if (-1 < iVar2) {\n    return uVar1 & 0x800;\n  }\n  piVar3 = __errno_location();\n  pcVar4 = strerror(*piVar3);\n  __fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",uVar5,pcVar4);\n                    \n  exit(1);\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "char *pcVar4;" (primitive_type "char") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (declaration "ulong uVar5;" (type_identifier "ulong") (identifier "uVar5") (; ";")) (expression_statement "uVar5 = param_1 & 0xffffffff;" (assignment_expression "uVar5 = param_1 & 0xffffffff" (identifier "uVar5") (= "=") (binary_expression "param_1 & 0xffffffff" (identifier "param_1") (& "&") (number_literal "0xffffffff"))) (; ";")) (expression_statement "uVar1 = fcntl64(param_1,3);" (assignment_expression "uVar1 = fcntl64(param_1,3)" (identifier "uVar1") (= "=") (call_expression "fcntl64(param_1,3)" (identifier "fcntl64") (argument_list "(param_1,3)" (( "(") (identifier "param_1") (, ",") (number_literal "3") () ")")))) (; ";")) (if_statement "if ((int)uVar1 < 0) {\n    piVar3 = __errno_location();\n    pcVar4 = strerror(*piVar3);\n    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4);\n                    \n    exit(1);\n  }" (if "if") (parenthesized_expression "((int)uVar1 < 0)" (( "(") (binary_expression "(int)uVar1 < 0" (cast_expression "(int)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar1")) (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    piVar3 = __errno_location();\n    pcVar4 = strerror(*piVar3);\n    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4);\n                    \n    exit(1);\n  }" ({ "{") (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" (identifier "piVar3") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" (identifier "pcVar4") (= "=") (call_expression "strerror(*piVar3)" (identifier "strerror") (argument_list "(*piVar3)" (( "(") (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) () ")")))) (; ";")) (expression_statement "__fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4);" (call_expression "__fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4)" (identifier "__fprintf_chk") (argument_list "(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4)" (( "(") (identifier "stderr") (, ",") (number_literal "1") (, ",") (string_literal ""%d: fcntl(F_GETFL): %s\n"" (" """) (string_content "%d: fcntl(F_GETFL): %s") (escape_sequence "\n") (" """)) (, ",") (identifier "uVar5") (, ",") (identifier "pcVar4") () ")"))) (; ";")) (expression_statement "exit(1);" (call_expression "exit(1)" (identifier "exit") (argument_list "(1)" (( "(") (number_literal "1") () ")"))) (; ";")) (} "}"))) (expression_statement "iVar2 = fcntl64(uVar5,4,uVar1 | 0x800);" (assignment_expression "iVar2 = fcntl64(uVar5,4,uVar1 | 0x800)" (identifier "iVar2") (= "=") (call_expression "fcntl64(uVar5,4,uVar1 | 0x800)" (identifier "fcntl64") (argument_list "(uVar5,4,uVar1 | 0x800)" (( "(") (identifier "uVar5") (, ",") (number_literal "4") (, ",") (binary_expression "uVar1 | 0x800" (identifier "uVar1") (| "|") (number_literal "0x800")) () ")")))) (; ";")) (if_statement "if (-1 < iVar2) {\n    return uVar1 & 0x800;\n  }" (if "if") (parenthesized_expression "(-1 < iVar2)" (( "(") (binary_expression "-1 < iVar2" (number_literal "-1") (< "<") (identifier "iVar2")) () ")")) (compound_statement "{\n    return uVar1 & 0x800;\n  }" ({ "{") (return_statement "return uVar1 & 0x800;" (return "return") (binary_expression "uVar1 & 0x800" (identifier "uVar1") (& "&") (number_literal "0x800")) (; ";")) (} "}"))) (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" (identifier "piVar3") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" (identifier "pcVar4") (= "=") (call_expression "strerror(*piVar3)" (identifier "strerror") (argument_list "(*piVar3)" (( "(") (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) () ")")))) (; ";")) (expression_statement "__fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",uVar5,pcVar4);" (call_expression "__fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",uVar5,pcVar4)" (identifier "__fprintf_chk") (argument_list "(stderr,1,"%d: fcntl(F_SETFL): %s\n",uVar5,pcVar4)" (( "(") (identifier "stderr") (, ",") (number_literal "1") (, ",") (string_literal ""%d: fcntl(F_SETFL): %s\n"" (" """) (string_content "%d: fcntl(F_SETFL): %s") (escape_sequence "\n") (" """)) (, ",") (identifier "uVar5") (, ",") (identifier "pcVar4") () ")"))) (; ";")) (expression_statement "exit(1);" (call_expression "exit(1)" (identifier "exit") (argument_list "(1)" (( "(") (number_literal "1") () ")"))) (; ";")) (} "}")))

int function_1(int fd)

{
  type_1 var_7;
  int var_8;
  int *piVar3;
  char *pcVar4;
  type_2 in_register_0000003c;
  
  var_7 = var_1(var_2(in_register_0000003c,fd),3);
  if ((int)var_7 < 0) {
    piVar3 = var_3();
    pcVar4 = var_4(*piVar3);
    var_5(stderr,1,"%d: fcntl(F_GETFL): %s\n",fd,pcVar4);
                    /* WARNING: Subroutine does not return */
    var_6(1);
  }
  var_8 = var_1(fd,4,var_7 | 0x800);
  if (-1 < var_8) {
    return var_7 & 0x800;
  }
  piVar3 = var_3();
  pcVar4 = var_4(*piVar3);
  var_5(stderr,1,"%d: fcntl(F_SETFL): %s\n",fd,pcVar4);
                    /* WARNING: Subroutine does not return */
  var_6(1);
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (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: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (string_literal (string_content) (escape_sequence)) (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (return_statement (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (string_literal (string_content) (escape_sequence)) (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))))))

uint MASKED(ulong param_1)

{
  uint uVar1;
  int iVar2;
  int *piVar3;
  char *pcVar4;
  ulong uVar5;
  
  uVar5 = param_1 & 0xffffffff;
  uVar1 = fcntl64(param_1,3);
  if ((int)uVar1 < 0) {
    piVar3 = __errno_location();
    pcVar4 = strerror(*piVar3);
    __fprintf_chk(stderr,1,"%d: fcntl(F_GETFL): %s\n",uVar5,pcVar4);
                    /* WARNING: Subroutine does not return */
    exit(1);
  }
  iVar2 = fcntl64(uVar5,4,uVar1 | 0x800);
  if (-1 < iVar2) {
    return uVar1 & 0x800;
  }
  piVar3 = __errno_location();
  pcVar4 = strerror(*piVar3);
  __fprintf_chk(stderr,1,"%d: fcntl(F_SETFL): %s\n",uVar5,pcVar4);
                    /* WARNING: Subroutine does not return */
  exit(1);
}

