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

int __regparm3 block_and_read(int fd,void *buf,size_t len)

{
  pollwrapper *pw;
  ssize_t sVar1;
  int *piVar2;
  int iVar3;
  uint uVar4;
  
  pw = pollwrap_new();
  do {
    sVar1 = read(0,(void *)fd,0x1f);
    if ((-1 < sVar1) || (piVar2 = __errno_location(), *piVar2 != 0xb)) {
      pollwrap_free(pw);
      return sVar1;
    }
    pollwrap_clear(pw);
    pollwrap_add_fd_rwx(pw,0,1);
    while( true ) {
      iVar3 = pollwrap_poll_endless(pw);
      if (-1 < iVar3) break;
      if (*piVar2 != 4) {
        return iVar3;
      }
    }
    if (iVar3 == 0) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");
    }
    uVar4 = pollwrap_get_fd_rwx(pw,0);
  } while ((uVar4 & 1) != 0);
                    /* WARNING: Subroutine does not return */
  __assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read");
}



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

ssize_t __regparm3 FUN_00061c80(void *param_1)

{
  undefined4 uVar1;
  ssize_t sVar2;
  int *piVar3;
  int iVar4;
  uint uVar5;
  
  uVar1 = FUN_000676a0();
  do {
    sVar2 = read(0,param_1,0x1f);
    if ((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)) {
      FUN_00067740(uVar1);
      return sVar2;
    }
    FUN_000676f0(uVar1);
    FUN_000678b0(uVar1,0,1);
    while( true ) {
      iVar4 = FUN_00067920(uVar1);
      if (-1 < iVar4) break;
      if (*piVar3 != 4) {
        return iVar4;
      }
    }
    if (iVar4 == 0) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");
    }
    uVar5 = FUN_00067a30(uVar1,0);
  } while ((uVar5 & 1) != 0);
                    /* WARNING: Subroutine does not return */
  __assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read");
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00015fa0
ADD EBX,0x430e7
SUB ESP,0x1c
MOV dword ptr [ESP + 0xc],EAX
CALL 0x000676a0
MOV ESI,EAX
LEA ESI,[ESI]
SUB ESP,0x4
PUSH 0x1f
PUSH dword ptr [ESP + 0x14]
PUSH 0x0
CALL 0x000140c0
ADD ESP,0x10
MOV EBP,EAX
TEST EAX,EAX
JNS 0x00061d30
CALL 0x00014540
CMP dword ptr [EAX],0xb
MOV EDI,EAX
JNZ 0x00061d30
SUB ESP,0xc
PUSH ESI
CALL 0x000676f0
ADD ESP,0xc
PUSH 0x1
PUSH 0x0
PUSH ESI
CALL 0x000678b0
ADD ESP,0x10
JMP 0x00061ce5
CMP dword ptr [EDI],0x4
JNZ 0x00061d3c
SUB ESP,0xc
PUSH ESI
CALL 0x00067920
ADD ESP,0x10
MOV EBP,EAX
TEST EAX,EAX
JS 0x00061ce0
JZ 0x00061d46
SUB ESP,0x8
PUSH 0x0
PUSH ESI
CALL 0x00067a30
ADD ESP,0x10
TEST AL,0x1
JNZ 0x00061ca0
LEA EAX,[EBX + 0xfffd7c64]
PUSH EAX
LEA EAX,[EBX + 0xfffd75c0]
PUSH 0x6b
PUSH EAX
LEA EAX,[EBX + 0xfffd75e8]
PUSH EAX
CALL 0x00014870
SUB ESP,0xc
PUSH ESI
CALL 0x00067740
ADD ESP,0x10
ADD ESP,0x1c
MOV EAX,EBP
POP EBX
POP ESI
POP EDI
POP EBP
RET
LEA EAX,[EBX + 0xfffd7c64]
PUSH EAX
LEA EAX,[EBX + 0xfffd75c0]
PUSH 0x68
PUSH EAX
LEA EAX,[EBX + 0xfffd75ce]
PUSH EAX
CALL 0x00014870
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nssize_t __regparm3 FUN_00061c80(void *param_1)\n\n{\n  undefined4 uVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  \n  uVar1 = FUN_000676a0();\n  do {\n    sVar2 = read(0,param_1,0x1f);\n    if ((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)) {\n      FUN_00067740(uVar1);\n      return sVar2;\n    }\n    FUN_000676f0(uVar1);\n    FUN_000678b0(uVar1,0,1);\n    while( true ) {\n      iVar4 = FUN_00067920(uVar1);\n      if (-1 < iVar4) break;\n      if (*piVar3 != 4) {\n        return iVar4;\n      }\n    }\n    if (iVar4 == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }\n    uVar5 = FUN_00067a30(uVar1,0);\n  } while ((uVar5 & 1) != 0);\n                    /* WARNING: Subroutine does not return */\n  __assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read");\n}\n\n" comment (function_definition "ssize_t __regparm3 FUN_00061c80(void *param_1)\n\n{\n  undefined4 uVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  \n  uVar1 = FUN_000676a0();\n  do {\n    sVar2 = read(0,param_1,0x1f);\n    if ((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)) {\n      FUN_00067740(uVar1);\n      return sVar2;\n    }\n    FUN_000676f0(uVar1);\n    FUN_000678b0(uVar1,0,1);\n    while( true ) {\n      iVar4 = FUN_00067920(uVar1);\n      if (-1 < iVar4) break;\n      if (*piVar3 != 4) {\n        return iVar4;\n      }\n    }\n    if (iVar4 == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }\n    uVar5 = FUN_00067a30(uVar1,0);\n  } while ((uVar5 & 1) != 0);\n                    /* WARNING: Subroutine does not return */\n  __assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read");\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00061c80(void *param_1)" identifier (parameter_list "(void *param_1)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined4 uVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  \n  uVar1 = FUN_000676a0();\n  do {\n    sVar2 = read(0,param_1,0x1f);\n    if ((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)) {\n      FUN_00067740(uVar1);\n      return sVar2;\n    }\n    FUN_000676f0(uVar1);\n    FUN_000678b0(uVar1,0,1);\n    while( true ) {\n      iVar4 = FUN_00067920(uVar1);\n      if (-1 < iVar4) break;\n      if (*piVar3 != 4) {\n        return iVar4;\n      }\n    }\n    if (iVar4 == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }\n    uVar5 = FUN_00067a30(uVar1,0);\n  } while ((uVar5 & 1) != 0);\n                    /* WARNING: Subroutine does not return */\n  __assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read");\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "ssize_t sVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "uVar1 = FUN_000676a0();" (assignment_expression "uVar1 = FUN_000676a0()" identifier = (call_expression "FUN_000676a0()" identifier (argument_list "()" ( )))) ;) (do_statement "do {\n    sVar2 = read(0,param_1,0x1f);\n    if ((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)) {\n      FUN_00067740(uVar1);\n      return sVar2;\n    }\n    FUN_000676f0(uVar1);\n    FUN_000678b0(uVar1,0,1);\n    while( true ) {\n      iVar4 = FUN_00067920(uVar1);\n      if (-1 < iVar4) break;\n      if (*piVar3 != 4) {\n        return iVar4;\n      }\n    }\n    if (iVar4 == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }\n    uVar5 = FUN_00067a30(uVar1,0);\n  } while ((uVar5 & 1) != 0);" do (compound_statement "{\n    sVar2 = read(0,param_1,0x1f);\n    if ((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)) {\n      FUN_00067740(uVar1);\n      return sVar2;\n    }\n    FUN_000676f0(uVar1);\n    FUN_000678b0(uVar1,0,1);\n    while( true ) {\n      iVar4 = FUN_00067920(uVar1);\n      if (-1 < iVar4) break;\n      if (*piVar3 != 4) {\n        return iVar4;\n      }\n    }\n    if (iVar4 == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }\n    uVar5 = FUN_00067a30(uVar1,0);\n  }" { (expression_statement "sVar2 = read(0,param_1,0x1f);" (assignment_expression "sVar2 = read(0,param_1,0x1f)" identifier = (call_expression "read(0,param_1,0x1f)" identifier (argument_list "(0,param_1,0x1f)" ( number_literal , identifier , number_literal )))) ;) (if_statement "if ((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)) {\n      FUN_00067740(uVar1);\n      return sVar2;\n    }" if (parenthesized_expression "((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb))" ( (binary_expression "(-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)" (parenthesized_expression "(-1 < sVar2)" ( (binary_expression "-1 < sVar2" number_literal < identifier) )) || (parenthesized_expression "(piVar3 = __errno_location(), *piVar3 != 0xb)" ( (comma_expression "piVar3 = __errno_location(), *piVar3 != 0xb" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) , (binary_expression "*piVar3 != 0xb" (pointer_expression "*piVar3" * identifier) != number_literal)) ))) )) (compound_statement "{\n      FUN_00067740(uVar1);\n      return sVar2;\n    }" { (expression_statement "FUN_00067740(uVar1);" (call_expression "FUN_00067740(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (return_statement "return sVar2;" return identifier ;) })) (expression_statement "FUN_000676f0(uVar1);" (call_expression "FUN_000676f0(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (expression_statement "FUN_000678b0(uVar1,0,1);" (call_expression "FUN_000678b0(uVar1,0,1)" identifier (argument_list "(uVar1,0,1)" ( identifier , number_literal , number_literal ))) ;) (while_statement "while( true ) {\n      iVar4 = FUN_00067920(uVar1);\n      if (-1 < iVar4) break;\n      if (*piVar3 != 4) {\n        return iVar4;\n      }\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      iVar4 = FUN_00067920(uVar1);\n      if (-1 < iVar4) break;\n      if (*piVar3 != 4) {\n        return iVar4;\n      }\n    }" { (expression_statement "iVar4 = FUN_00067920(uVar1);" (assignment_expression "iVar4 = FUN_00067920(uVar1)" identifier = (call_expression "FUN_00067920(uVar1)" identifier (argument_list "(uVar1)" ( identifier )))) ;) (if_statement "if (-1 < iVar4) break;" if (parenthesized_expression "(-1 < iVar4)" ( (binary_expression "-1 < iVar4" number_literal < identifier) )) (break_statement "break;" break ;)) (if_statement "if (*piVar3 != 4) {\n        return iVar4;\n      }" if (parenthesized_expression "(*piVar3 != 4)" ( (binary_expression "*piVar3 != 4" (pointer_expression "*piVar3" * identifier) != number_literal) )) (compound_statement "{\n        return iVar4;\n      }" { (return_statement "return iVar4;" return identifier ;) })) })) (if_statement "if (iVar4 == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }" { comment (expression_statement "__assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");" (call_expression "__assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read")" identifier (argument_list "("ret != 0","unix/uxcons.c",0x68,"block_and_read")" ( (string_literal ""ret != 0"" " string_content ") , (string_literal ""unix/uxcons.c"" " string_content ") , number_literal , (string_literal ""block_and_read"" " string_content ") ))) ;) })) (expression_statement "uVar5 = FUN_00067a30(uVar1,0);" (assignment_expression "uVar5 = FUN_00067a30(uVar1,0)" identifier = (call_expression "FUN_00067a30(uVar1,0)" identifier (argument_list "(uVar1,0)" ( identifier , number_literal )))) ;) }) while (parenthesized_expression "((uVar5 & 1) != 0)" ( (binary_expression "(uVar5 & 1) != 0" (parenthesized_expression "(uVar5 & 1)" ( (binary_expression "uVar5 & 1" identifier & number_literal) )) != number_literal) )) ;) comment (expression_statement "__assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read");" (call_expression "__assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read")" identifier (argument_list "("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read")" ( (string_literal ""pollwrap_check_fd_rwx(pw, fd, SELECT_R)"" " string_content ") , (string_literal ""unix/uxcons.c"" " string_content ") , number_literal , (string_literal ""block_and_read"" " string_content ") ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 block_and_read(int fd,void *buf,size_t len)\n\n{\n  pollwrapper *pw;\n  ssize_t sVar1;\n  int *piVar2;\n  int iVar3;\n  uint uVar4;\n  \n  pw = pollwrap_new();\n  do {\n    sVar1 = read(0,(void *)fd,0x1f);\n    if ((-1 < sVar1) || (piVar2 = __errno_location(), *piVar2 != 0xb)) {\n      pollwrap_free(pw);\n      return sVar1;\n    }\n    pollwrap_clear(pw);\n    pollwrap_add_fd_rwx(pw,0,1);\n    while( true ) {\n      iVar3 = pollwrap_poll_endless(pw);\n      if (-1 < iVar3) break;\n      if (*piVar2 != 4) {\n        return iVar3;\n      }\n    }\n    if (iVar3 == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }\n    uVar4 = pollwrap_get_fd_rwx(pw,0);\n  } while ((uVar4 & 1) != 0);\n                    /* WARNING: Subroutine does not return */\n  __assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read");\n}\n\n" comment (function_definition "int __regparm3 block_and_read(int fd,void *buf,size_t len)\n\n{\n  pollwrapper *pw;\n  ssize_t sVar1;\n  int *piVar2;\n  int iVar3;\n  uint uVar4;\n  \n  pw = pollwrap_new();\n  do {\n    sVar1 = read(0,(void *)fd,0x1f);\n    if ((-1 < sVar1) || (piVar2 = __errno_location(), *piVar2 != 0xb)) {\n      pollwrap_free(pw);\n      return sVar1;\n    }\n    pollwrap_clear(pw);\n    pollwrap_add_fd_rwx(pw,0,1);\n    while( true ) {\n      iVar3 = pollwrap_poll_endless(pw);\n      if (-1 < iVar3) break;\n      if (*piVar2 != 4) {\n        return iVar3;\n      }\n    }\n    if (iVar3 == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }\n    uVar4 = pollwrap_get_fd_rwx(pw,0);\n  } while ((uVar4 & 1) != 0);\n                    /* WARNING: Subroutine does not return */\n  __assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read");\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "block_and_read(int fd,void *buf,size_t len)" identifier (parameter_list "(int fd,void *buf,size_t len)" ( (parameter_declaration "int fd" primitive_type identifier) , (parameter_declaration "void *buf" primitive_type (pointer_declarator "*buf" * identifier)) , (parameter_declaration "size_t len" primitive_type identifier) ))) (compound_statement "{\n  pollwrapper *pw;\n  ssize_t sVar1;\n  int *piVar2;\n  int iVar3;\n  uint uVar4;\n  \n  pw = pollwrap_new();\n  do {\n    sVar1 = read(0,(void *)fd,0x1f);\n    if ((-1 < sVar1) || (piVar2 = __errno_location(), *piVar2 != 0xb)) {\n      pollwrap_free(pw);\n      return sVar1;\n    }\n    pollwrap_clear(pw);\n    pollwrap_add_fd_rwx(pw,0,1);\n    while( true ) {\n      iVar3 = pollwrap_poll_endless(pw);\n      if (-1 < iVar3) break;\n      if (*piVar2 != 4) {\n        return iVar3;\n      }\n    }\n    if (iVar3 == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }\n    uVar4 = pollwrap_get_fd_rwx(pw,0);\n  } while ((uVar4 & 1) != 0);\n                    /* WARNING: Subroutine does not return */\n  __assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read");\n}" { (declaration "pollwrapper *pw;" type_identifier (pointer_declarator "*pw" * identifier) ;) (declaration "ssize_t sVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "pw = pollwrap_new();" (assignment_expression "pw = pollwrap_new()" identifier = (call_expression "pollwrap_new()" identifier (argument_list "()" ( )))) ;) (do_statement "do {\n    sVar1 = read(0,(void *)fd,0x1f);\n    if ((-1 < sVar1) || (piVar2 = __errno_location(), *piVar2 != 0xb)) {\n      pollwrap_free(pw);\n      return sVar1;\n    }\n    pollwrap_clear(pw);\n    pollwrap_add_fd_rwx(pw,0,1);\n    while( true ) {\n      iVar3 = pollwrap_poll_endless(pw);\n      if (-1 < iVar3) break;\n      if (*piVar2 != 4) {\n        return iVar3;\n      }\n    }\n    if (iVar3 == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }\n    uVar4 = pollwrap_get_fd_rwx(pw,0);\n  } while ((uVar4 & 1) != 0);" do (compound_statement "{\n    sVar1 = read(0,(void *)fd,0x1f);\n    if ((-1 < sVar1) || (piVar2 = __errno_location(), *piVar2 != 0xb)) {\n      pollwrap_free(pw);\n      return sVar1;\n    }\n    pollwrap_clear(pw);\n    pollwrap_add_fd_rwx(pw,0,1);\n    while( true ) {\n      iVar3 = pollwrap_poll_endless(pw);\n      if (-1 < iVar3) break;\n      if (*piVar2 != 4) {\n        return iVar3;\n      }\n    }\n    if (iVar3 == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }\n    uVar4 = pollwrap_get_fd_rwx(pw,0);\n  }" { (expression_statement "sVar1 = read(0,(void *)fd,0x1f);" (assignment_expression "sVar1 = read(0,(void *)fd,0x1f)" identifier = (call_expression "read(0,(void *)fd,0x1f)" identifier (argument_list "(0,(void *)fd,0x1f)" ( number_literal , (cast_expression "(void *)fd" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , number_literal )))) ;) (if_statement "if ((-1 < sVar1) || (piVar2 = __errno_location(), *piVar2 != 0xb)) {\n      pollwrap_free(pw);\n      return sVar1;\n    }" if (parenthesized_expression "((-1 < sVar1) || (piVar2 = __errno_location(), *piVar2 != 0xb))" ( (binary_expression "(-1 < sVar1) || (piVar2 = __errno_location(), *piVar2 != 0xb)" (parenthesized_expression "(-1 < sVar1)" ( (binary_expression "-1 < sVar1" number_literal < identifier) )) || (parenthesized_expression "(piVar2 = __errno_location(), *piVar2 != 0xb)" ( (comma_expression "piVar2 = __errno_location(), *piVar2 != 0xb" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) , (binary_expression "*piVar2 != 0xb" (pointer_expression "*piVar2" * identifier) != number_literal)) ))) )) (compound_statement "{\n      pollwrap_free(pw);\n      return sVar1;\n    }" { (expression_statement "pollwrap_free(pw);" (call_expression "pollwrap_free(pw)" identifier (argument_list "(pw)" ( identifier ))) ;) (return_statement "return sVar1;" return identifier ;) })) (expression_statement "pollwrap_clear(pw);" (call_expression "pollwrap_clear(pw)" identifier (argument_list "(pw)" ( identifier ))) ;) (expression_statement "pollwrap_add_fd_rwx(pw,0,1);" (call_expression "pollwrap_add_fd_rwx(pw,0,1)" identifier (argument_list "(pw,0,1)" ( identifier , number_literal , number_literal ))) ;) (while_statement "while( true ) {\n      iVar3 = pollwrap_poll_endless(pw);\n      if (-1 < iVar3) break;\n      if (*piVar2 != 4) {\n        return iVar3;\n      }\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      iVar3 = pollwrap_poll_endless(pw);\n      if (-1 < iVar3) break;\n      if (*piVar2 != 4) {\n        return iVar3;\n      }\n    }" { (expression_statement "iVar3 = pollwrap_poll_endless(pw);" (assignment_expression "iVar3 = pollwrap_poll_endless(pw)" identifier = (call_expression "pollwrap_poll_endless(pw)" identifier (argument_list "(pw)" ( identifier )))) ;) (if_statement "if (-1 < iVar3) break;" if (parenthesized_expression "(-1 < iVar3)" ( (binary_expression "-1 < iVar3" number_literal < identifier) )) (break_statement "break;" break ;)) (if_statement "if (*piVar2 != 4) {\n        return iVar3;\n      }" if (parenthesized_expression "(*piVar2 != 4)" ( (binary_expression "*piVar2 != 4" (pointer_expression "*piVar2" * identifier) != number_literal) )) (compound_statement "{\n        return iVar3;\n      }" { (return_statement "return iVar3;" return identifier ;) })) })) (if_statement "if (iVar3 == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }" { comment (expression_statement "__assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");" (call_expression "__assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read")" identifier (argument_list "("ret != 0","unix/uxcons.c",0x68,"block_and_read")" ( (string_literal ""ret != 0"" " string_content ") , (string_literal ""unix/uxcons.c"" " string_content ") , number_literal , (string_literal ""block_and_read"" " string_content ") ))) ;) })) (expression_statement "uVar4 = pollwrap_get_fd_rwx(pw,0);" (assignment_expression "uVar4 = pollwrap_get_fd_rwx(pw,0)" identifier = (call_expression "pollwrap_get_fd_rwx(pw,0)" identifier (argument_list "(pw,0)" ( identifier , number_literal )))) ;) }) while (parenthesized_expression "((uVar4 & 1) != 0)" ( (binary_expression "(uVar4 & 1) != 0" (parenthesized_expression "(uVar4 & 1)" ( (binary_expression "uVar4 & 1" identifier & number_literal) )) != number_literal) )) ;) comment (expression_statement "__assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read");" (call_expression "__assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read")" identifier (argument_list "("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read")" ( (string_literal ""pollwrap_check_fd_rwx(pw, fd, SELECT_R)"" " string_content ") , (string_literal ""unix/uxcons.c"" " string_content ") , number_literal , (string_literal ""block_and_read"" " string_content ") ))) ;) })))
(translation_unit "ssize_t __regparm3 FUN_00061c80(void *param_1)\n\n{\n  undefined4 uVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  \n  uVar1 = FUN_000676a0();\n  do {\n    sVar2 = read(0,param_1,0x1f);\n    if ((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)) {\n      FUN_00067740(uVar1);\n      return sVar2;\n    }\n    FUN_000676f0(uVar1);\n    FUN_000678b0(uVar1,0,1);\n    while( true ) {\n      iVar4 = FUN_00067920(uVar1);\n      if (-1 < iVar4) break;\n      if (*piVar3 != 4) {\n        return iVar4;\n      }\n    }\n    if (iVar4 == 0) {\n                    \n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }\n    uVar5 = FUN_00067a30(uVar1,0);\n  } while ((uVar5 & 1) != 0);\n                    \n  __assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read");\n}\n\n" (function_definition "ssize_t __regparm3 FUN_00061c80(void *param_1)\n\n{\n  undefined4 uVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  \n  uVar1 = FUN_000676a0();\n  do {\n    sVar2 = read(0,param_1,0x1f);\n    if ((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)) {\n      FUN_00067740(uVar1);\n      return sVar2;\n    }\n    FUN_000676f0(uVar1);\n    FUN_000678b0(uVar1,0,1);\n    while( true ) {\n      iVar4 = FUN_00067920(uVar1);\n      if (-1 < iVar4) break;\n      if (*piVar3 != 4) {\n        return iVar4;\n      }\n    }\n    if (iVar4 == 0) {\n                    \n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }\n    uVar5 = FUN_00067a30(uVar1,0);\n  } while ((uVar5 & 1) != 0);\n                    \n  __assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read");\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00061c80(void *param_1)" identifier (parameter_list "(void *param_1)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined4 uVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  \n  uVar1 = FUN_000676a0();\n  do {\n    sVar2 = read(0,param_1,0x1f);\n    if ((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)) {\n      FUN_00067740(uVar1);\n      return sVar2;\n    }\n    FUN_000676f0(uVar1);\n    FUN_000678b0(uVar1,0,1);\n    while( true ) {\n      iVar4 = FUN_00067920(uVar1);\n      if (-1 < iVar4) break;\n      if (*piVar3 != 4) {\n        return iVar4;\n      }\n    }\n    if (iVar4 == 0) {\n                    \n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }\n    uVar5 = FUN_00067a30(uVar1,0);\n  } while ((uVar5 & 1) != 0);\n                    \n  __assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read");\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "ssize_t sVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "uVar1 = FUN_000676a0();" (assignment_expression "uVar1 = FUN_000676a0()" identifier = (call_expression "FUN_000676a0()" identifier (argument_list "()" ( )))) ;) (do_statement "do {\n    sVar2 = read(0,param_1,0x1f);\n    if ((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)) {\n      FUN_00067740(uVar1);\n      return sVar2;\n    }\n    FUN_000676f0(uVar1);\n    FUN_000678b0(uVar1,0,1);\n    while( true ) {\n      iVar4 = FUN_00067920(uVar1);\n      if (-1 < iVar4) break;\n      if (*piVar3 != 4) {\n        return iVar4;\n      }\n    }\n    if (iVar4 == 0) {\n                    \n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }\n    uVar5 = FUN_00067a30(uVar1,0);\n  } while ((uVar5 & 1) != 0);" do (compound_statement "{\n    sVar2 = read(0,param_1,0x1f);\n    if ((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)) {\n      FUN_00067740(uVar1);\n      return sVar2;\n    }\n    FUN_000676f0(uVar1);\n    FUN_000678b0(uVar1,0,1);\n    while( true ) {\n      iVar4 = FUN_00067920(uVar1);\n      if (-1 < iVar4) break;\n      if (*piVar3 != 4) {\n        return iVar4;\n      }\n    }\n    if (iVar4 == 0) {\n                    \n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }\n    uVar5 = FUN_00067a30(uVar1,0);\n  }" { (expression_statement "sVar2 = read(0,param_1,0x1f);" (assignment_expression "sVar2 = read(0,param_1,0x1f)" identifier = (call_expression "read(0,param_1,0x1f)" identifier (argument_list "(0,param_1,0x1f)" ( number_literal , identifier , number_literal )))) ;) (if_statement "if ((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)) {\n      FUN_00067740(uVar1);\n      return sVar2;\n    }" if (parenthesized_expression "((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb))" ( (binary_expression "(-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)" (parenthesized_expression "(-1 < sVar2)" ( (binary_expression "-1 < sVar2" number_literal < identifier) )) || (parenthesized_expression "(piVar3 = __errno_location(), *piVar3 != 0xb)" ( (comma_expression "piVar3 = __errno_location(), *piVar3 != 0xb" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) , (binary_expression "*piVar3 != 0xb" (pointer_expression "*piVar3" * identifier) != number_literal)) ))) )) (compound_statement "{\n      FUN_00067740(uVar1);\n      return sVar2;\n    }" { (expression_statement "FUN_00067740(uVar1);" (call_expression "FUN_00067740(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (return_statement "return sVar2;" return identifier ;) })) (expression_statement "FUN_000676f0(uVar1);" (call_expression "FUN_000676f0(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (expression_statement "FUN_000678b0(uVar1,0,1);" (call_expression "FUN_000678b0(uVar1,0,1)" identifier (argument_list "(uVar1,0,1)" ( identifier , number_literal , number_literal ))) ;) (while_statement "while( true ) {\n      iVar4 = FUN_00067920(uVar1);\n      if (-1 < iVar4) break;\n      if (*piVar3 != 4) {\n        return iVar4;\n      }\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      iVar4 = FUN_00067920(uVar1);\n      if (-1 < iVar4) break;\n      if (*piVar3 != 4) {\n        return iVar4;\n      }\n    }" { (expression_statement "iVar4 = FUN_00067920(uVar1);" (assignment_expression "iVar4 = FUN_00067920(uVar1)" identifier = (call_expression "FUN_00067920(uVar1)" identifier (argument_list "(uVar1)" ( identifier )))) ;) (if_statement "if (-1 < iVar4) break;" if (parenthesized_expression "(-1 < iVar4)" ( (binary_expression "-1 < iVar4" number_literal < identifier) )) (break_statement "break;" break ;)) (if_statement "if (*piVar3 != 4) {\n        return iVar4;\n      }" if (parenthesized_expression "(*piVar3 != 4)" ( (binary_expression "*piVar3 != 4" (pointer_expression "*piVar3" * identifier) != number_literal) )) (compound_statement "{\n        return iVar4;\n      }" { (return_statement "return iVar4;" return identifier ;) })) })) (if_statement "if (iVar4 == 0) {\n                    \n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n                    \n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }" { (expression_statement "__assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");" (call_expression "__assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read")" identifier (argument_list "("ret != 0","unix/uxcons.c",0x68,"block_and_read")" ( (string_literal ""ret != 0"" " string_content ") , (string_literal ""unix/uxcons.c"" " string_content ") , number_literal , (string_literal ""block_and_read"" " string_content ") ))) ;) })) (expression_statement "uVar5 = FUN_00067a30(uVar1,0);" (assignment_expression "uVar5 = FUN_00067a30(uVar1,0)" identifier = (call_expression "FUN_00067a30(uVar1,0)" identifier (argument_list "(uVar1,0)" ( identifier , number_literal )))) ;) }) while (parenthesized_expression "((uVar5 & 1) != 0)" ( (binary_expression "(uVar5 & 1) != 0" (parenthesized_expression "(uVar5 & 1)" ( (binary_expression "uVar5 & 1" identifier & number_literal) )) != number_literal) )) ;) (expression_statement "__assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read");" (call_expression "__assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read")" identifier (argument_list "("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read")" ( (string_literal ""pollwrap_check_fd_rwx(pw, fd, SELECT_R)"" " string_content ") , (string_literal ""unix/uxcons.c"" " string_content ") , number_literal , (string_literal ""block_and_read"" " string_content ") ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < IDENT) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) , (binary_expression (pointer_expression * IDENT) != LIT)) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT ))) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (break_statement break ;)) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) (compound_statement { (return_statement return IDENT ;) })) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) }) while (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) ;) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })))
(function_definition "ssize_t __regparm3 FUN_00061c80(void *param_1)\n\n{\n  undefined4 uVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  \n  uVar1 = FUN_000676a0();\n  do {\n    sVar2 = read(0,param_1,0x1f);\n    if ((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)) {\n      FUN_00067740(uVar1);\n      return sVar2;\n    }\n    FUN_000676f0(uVar1);\n    FUN_000678b0(uVar1,0,1);\n    while( true ) {\n      iVar4 = FUN_00067920(uVar1);\n      if (-1 < iVar4) break;\n      if (*piVar3 != 4) {\n        return iVar4;\n      }\n    }\n    if (iVar4 == 0) {\n                    \n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }\n    uVar5 = FUN_00067a30(uVar1,0);\n  } while ((uVar5 & 1) != 0);\n                    \n  __assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read");\n}" (primitive_type "ssize_t") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00061c80(void *param_1)" (identifier "FUN_00061c80") (parameter_list "(void *param_1)" (( "(") (parameter_declaration "void *param_1" (primitive_type "void") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  int iVar4;\n  uint uVar5;\n  \n  uVar1 = FUN_000676a0();\n  do {\n    sVar2 = read(0,param_1,0x1f);\n    if ((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)) {\n      FUN_00067740(uVar1);\n      return sVar2;\n    }\n    FUN_000676f0(uVar1);\n    FUN_000678b0(uVar1,0,1);\n    while( true ) {\n      iVar4 = FUN_00067920(uVar1);\n      if (-1 < iVar4) break;\n      if (*piVar3 != 4) {\n        return iVar4;\n      }\n    }\n    if (iVar4 == 0) {\n                    \n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }\n    uVar5 = FUN_00067a30(uVar1,0);\n  } while ((uVar5 & 1) != 0);\n                    \n  __assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read");\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "ssize_t sVar2;" (primitive_type "ssize_t") (identifier "sVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (expression_statement "uVar1 = FUN_000676a0();" (assignment_expression "uVar1 = FUN_000676a0()" (identifier "uVar1") (= "=") (call_expression "FUN_000676a0()" (identifier "FUN_000676a0") (argument_list "()" (( "(") () ")")))) (; ";")) (do_statement "do {\n    sVar2 = read(0,param_1,0x1f);\n    if ((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)) {\n      FUN_00067740(uVar1);\n      return sVar2;\n    }\n    FUN_000676f0(uVar1);\n    FUN_000678b0(uVar1,0,1);\n    while( true ) {\n      iVar4 = FUN_00067920(uVar1);\n      if (-1 < iVar4) break;\n      if (*piVar3 != 4) {\n        return iVar4;\n      }\n    }\n    if (iVar4 == 0) {\n                    \n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }\n    uVar5 = FUN_00067a30(uVar1,0);\n  } while ((uVar5 & 1) != 0);" (do "do") (compound_statement "{\n    sVar2 = read(0,param_1,0x1f);\n    if ((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)) {\n      FUN_00067740(uVar1);\n      return sVar2;\n    }\n    FUN_000676f0(uVar1);\n    FUN_000678b0(uVar1,0,1);\n    while( true ) {\n      iVar4 = FUN_00067920(uVar1);\n      if (-1 < iVar4) break;\n      if (*piVar3 != 4) {\n        return iVar4;\n      }\n    }\n    if (iVar4 == 0) {\n                    \n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }\n    uVar5 = FUN_00067a30(uVar1,0);\n  }" ({ "{") (expression_statement "sVar2 = read(0,param_1,0x1f);" (assignment_expression "sVar2 = read(0,param_1,0x1f)" (identifier "sVar2") (= "=") (call_expression "read(0,param_1,0x1f)" (identifier "read") (argument_list "(0,param_1,0x1f)" (( "(") (number_literal "0") (, ",") (identifier "param_1") (, ",") (number_literal "0x1f") () ")")))) (; ";")) (if_statement "if ((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)) {\n      FUN_00067740(uVar1);\n      return sVar2;\n    }" (if "if") (parenthesized_expression "((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb))" (( "(") (binary_expression "(-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)" (parenthesized_expression "(-1 < sVar2)" (( "(") (binary_expression "-1 < sVar2" (number_literal "-1") (< "<") (identifier "sVar2")) () ")")) (|| "||") (parenthesized_expression "(piVar3 = __errno_location(), *piVar3 != 0xb)" (( "(") (comma_expression "piVar3 = __errno_location(), *piVar3 != 0xb" (assignment_expression "piVar3 = __errno_location()" (identifier "piVar3") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (, ",") (binary_expression "*piVar3 != 0xb" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (!= "!=") (number_literal "0xb"))) () ")"))) () ")")) (compound_statement "{\n      FUN_00067740(uVar1);\n      return sVar2;\n    }" ({ "{") (expression_statement "FUN_00067740(uVar1);" (call_expression "FUN_00067740(uVar1)" (identifier "FUN_00067740") (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")"))) (; ";")) (return_statement "return sVar2;" (return "return") (identifier "sVar2") (; ";")) (} "}"))) (expression_statement "FUN_000676f0(uVar1);" (call_expression "FUN_000676f0(uVar1)" (identifier "FUN_000676f0") (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")"))) (; ";")) (expression_statement "FUN_000678b0(uVar1,0,1);" (call_expression "FUN_000678b0(uVar1,0,1)" (identifier "FUN_000678b0") (argument_list "(uVar1,0,1)" (( "(") (identifier "uVar1") (, ",") (number_literal "0") (, ",") (number_literal "1") () ")"))) (; ";")) (while_statement "while( true ) {\n      iVar4 = FUN_00067920(uVar1);\n      if (-1 < iVar4) break;\n      if (*piVar3 != 4) {\n        return iVar4;\n      }\n    }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n      iVar4 = FUN_00067920(uVar1);\n      if (-1 < iVar4) break;\n      if (*piVar3 != 4) {\n        return iVar4;\n      }\n    }" ({ "{") (expression_statement "iVar4 = FUN_00067920(uVar1);" (assignment_expression "iVar4 = FUN_00067920(uVar1)" (identifier "iVar4") (= "=") (call_expression "FUN_00067920(uVar1)" (identifier "FUN_00067920") (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")")))) (; ";")) (if_statement "if (-1 < iVar4) break;" (if "if") (parenthesized_expression "(-1 < iVar4)" (( "(") (binary_expression "-1 < iVar4" (number_literal "-1") (< "<") (identifier "iVar4")) () ")")) (break_statement "break;" (break "break") (; ";"))) (if_statement "if (*piVar3 != 4) {\n        return iVar4;\n      }" (if "if") (parenthesized_expression "(*piVar3 != 4)" (( "(") (binary_expression "*piVar3 != 4" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (!= "!=") (number_literal "4")) () ")")) (compound_statement "{\n        return iVar4;\n      }" ({ "{") (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}"))) (} "}"))) (if_statement "if (iVar4 == 0) {\n                    \n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");\n    }" ({ "{") (expression_statement "__assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");" (call_expression "__assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read")" (identifier "__assert_fail") (argument_list "("ret != 0","unix/uxcons.c",0x68,"block_and_read")" (( "(") (string_literal ""ret != 0"" (" """) (string_content "ret != 0") (" """)) (, ",") (string_literal ""unix/uxcons.c"" (" """) (string_content "unix/uxcons.c") (" """)) (, ",") (number_literal "0x68") (, ",") (string_literal ""block_and_read"" (" """) (string_content "block_and_read") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "uVar5 = FUN_00067a30(uVar1,0);" (assignment_expression "uVar5 = FUN_00067a30(uVar1,0)" (identifier "uVar5") (= "=") (call_expression "FUN_00067a30(uVar1,0)" (identifier "FUN_00067a30") (argument_list "(uVar1,0)" (( "(") (identifier "uVar1") (, ",") (number_literal "0") () ")")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "((uVar5 & 1) != 0)" (( "(") (binary_expression "(uVar5 & 1) != 0" (parenthesized_expression "(uVar5 & 1)" (( "(") (binary_expression "uVar5 & 1" (identifier "uVar5") (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (; ";")) (expression_statement "__assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read");" (call_expression "__assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read")" (identifier "__assert_fail") (argument_list "("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read")" (( "(") (string_literal ""pollwrap_check_fd_rwx(pw, fd, SELECT_R)"" (" """) (string_content "pollwrap_check_fd_rwx(pw, fd, SELECT_R)") (" """)) (, ",") (string_literal ""unix/uxcons.c"" (" """) (string_content "unix/uxcons.c") (" """)) (, ",") (number_literal "0x6b") (, ",") (string_literal ""block_and_read"" (" """) (string_content "block_and_read") (" """)) () ")"))) (; ";")) (} "}")))

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

int __regparm3 function_1(int fd,void *buf,size_t len)

{
  type_1 *pw;
  ssize_t var_3;
  int *piVar2;
  int var_9;
  type_2 var_12;
  
  pw = var_1();
  do {
    var_3 = var_2(0,(void *)fd,0x1f);
    if ((-1 < var_3) || (piVar2 = var_4(), *piVar2 != 0xb)) {
      var_5(pw);
      return var_3;
    }
    var_6(pw);
    var_7(pw,0,1);
    while( true ) {
      var_9 = var_8(pw);
      if (-1 < var_9) break;
      if (*piVar2 != 4) {
        return var_9;
      }
    }
    if (var_9 == 0) {
                    /* WARNING: Subroutine does not return */
      var_10("ret != 0","unix/uxcons.c",0x68,"block_and_read");
    }
    var_12 = var_11(pw,0);
  } while ((var_12 & 1) != 0);
                    /* WARNING: Subroutine does not return */
  var_10("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read");
}


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

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

ssize_t __regparm3 MASKED(void *param_1)

{
  undefined4 uVar1;
  ssize_t sVar2;
  int *piVar3;
  int iVar4;
  uint uVar5;
  
  uVar1 = FUN_000676a0();
  do {
    sVar2 = read(0,param_1,0x1f);
    if ((-1 < sVar2) || (piVar3 = __errno_location(), *piVar3 != 0xb)) {
      FUN_00067740(uVar1);
      return sVar2;
    }
    FUN_000676f0(uVar1);
    FUN_000678b0(uVar1,0,1);
    while( true ) {
      iVar4 = FUN_00067920(uVar1);
      if (-1 < iVar4) break;
      if (*piVar3 != 4) {
        return iVar4;
      }
    }
    if (iVar4 == 0) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("ret != 0","unix/uxcons.c",0x68,"block_and_read");
    }
    uVar5 = FUN_00067a30(uVar1,0);
  } while ((uVar5 & 1) != 0);
                    /* WARNING: Subroutine does not return */
  __assert_fail("pollwrap_check_fd_rwx(pw, fd, SELECT_R)","unix/uxcons.c",0x6b,"block_and_read");
}

