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

_Bool test_socket_open(int sock)

{
  int iVar1;
  byte bVar2;
  char *fmt;
  int iVar3;
  __fd_mask *p_Var4;
  int in_GS_OFFSET;
  timeval to;
  fd_set check_set;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (0x3ff < sock) {
    fmt = (char *)dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5);
    logprintf(LOG_NOTQUIET,fmt,0x400);
                    /* WARNING: Subroutine does not return */
    exit(1);
  }
  iVar3 = 0x20;
  p_Var4 = check_set.fds_bits;
  for (; iVar3 != 0; iVar3 = iVar3 + -1) {
    *p_Var4 = 0;
    p_Var4 = p_Var4 + 1;
  }
  iVar3 = __fdelt_chk(sock);
  to.tv_sec = 0;
  to.tv_usec = 1;
  bVar2 = (byte)(sock >> 0x1f);
  check_set.fds_bits[iVar3] =
       check_set.fds_bits[iVar3] | 1 << (((char)sock + (bVar2 >> 3) & 0x1f) - (bVar2 >> 3) & 0x1f);
  iVar3 = select(sock + 1,(fd_set *)&check_set,(fd_set *)0x0,(fd_set *)0x0,(timeval *)&to);
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar3 == 0;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

bool __regparm2 FUN_00019850(undefined4 param_1,undefined4 param_2,int param_3)

{
  byte bVar1;
  undefined4 uVar2;
  int iVar3;
  __fd_mask *p_Var4;
  int in_GS_OFFSET;
  timeval local_a8;
  uint local_a0 [32];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x19859;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (0x3ff < param_3) {
    uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2);
    FUN_0003af00(1,uVar2,0x400);
                    /* WARNING: Subroutine does not return */
    exit(1);
  }
  p_Var4 = (__fd_mask *)local_a0;
  for (iVar3 = 0x20; iVar3 != 0; iVar3 = iVar3 + -1) {
    *p_Var4 = 0;
    p_Var4 = p_Var4 + 1;
  }
  iVar3 = __fdelt_chk(param_3);
  local_a8.tv_sec = 0;
  local_a8.tv_usec = 1;
  bVar1 = (byte)(param_3 >> 0x1f);
  local_a0[iVar3] =
       local_a0[iVar3] | 1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f);
  iVar3 = select(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar3 == 0;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006da50();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00019070
ADD EBX,0x87377
SUB ESP,0x9c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x8c],EAX
XOR EAX,EAX
MOV ESI,dword ptr [ESP + 0xb0]
CMP ESI,0x3ff
JG 0x000198fe
LEA EBP,[ESP + 0xc]
MOV ECX,0x20
XOR EAX,EAX
MOV EDI,EBP
CLD
STOSD.REP ES:EDI
SUB ESP,0xc
PUSH ESI
CALL 0x00016f50
MOV EDX,ESI
MOV dword ptr [ESP + 0x14],0x0
SAR EDX,0x1f
MOV dword ptr [ESP + 0x18],0x1
SHR EDX,0x1b
LEA ECX,[ESI + EDX*0x1]
ADD ESI,0x1
AND ECX,0x1f
SUB ECX,EDX
MOV EDX,0x1
SHL EDX,CL
OR dword ptr [ESP + EAX*0x4 + 0x1c],EDX
POP EAX
LEA EAX,[ESP + 0x10]
PUSH EAX
PUSH 0x0
PUSH 0x0
PUSH EBP
PUSH ESI
CALL 0x00016a00
ADD ESP,0x20
TEST EAX,EAX
SETZ AL
MOV EDI,dword ptr [ESP + 0x8c]
XOR EDI,dword ptr GS:[0x14]
JNZ 0x0001992b
ADD ESP,0x9c
POP EBX
POP ESI
POP EDI
POP EBP
RET
LEA EAX,[EBX + 0xfffcd4ec]
PUSH EDX
PUSH 0x5
PUSH EAX
PUSH 0x0
CALL 0x000166c0
ADD ESP,0xc
PUSH 0x400
PUSH EAX
PUSH 0x1
CALL 0x0003af00
MOV dword ptr [ESP],0x1
CALL 0x00016f00
CALL 0x0006da50
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nbool __regparm2 FUN_00019850(undefined4 param_1,undefined4 param_2,int param_3)\n\n{\n  byte bVar1;\n  undefined4 uVar2;\n  int iVar3;\n  __fd_mask *p_Var4;\n  int in_GS_OFFSET;\n  timeval local_a8;\n  uint local_a0 [32];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x19859;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (0x3ff < param_3) {\n    uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2);\n    FUN_0003af00(1,uVar2,0x400);\n                    /* WARNING: Subroutine does not return */\n    exit(1);\n  }\n  p_Var4 = (__fd_mask *)local_a0;\n  for (iVar3 = 0x20; iVar3 != 0; iVar3 = iVar3 + -1) {\n    *p_Var4 = 0;\n    p_Var4 = p_Var4 + 1;\n  }\n  iVar3 = __fdelt_chk(param_3);\n  local_a8.tv_sec = 0;\n  local_a8.tv_usec = 1;\n  bVar1 = (byte)(param_3 >> 0x1f);\n  local_a0[iVar3] =\n       local_a0[iVar3] | 1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f);\n  iVar3 = select(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 == 0;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006da50();\n}\n\n" comment (function_definition "bool __regparm2 FUN_00019850(undefined4 param_1,undefined4 param_2,int param_3)\n\n{\n  byte bVar1;\n  undefined4 uVar2;\n  int iVar3;\n  __fd_mask *p_Var4;\n  int in_GS_OFFSET;\n  timeval local_a8;\n  uint local_a0 [32];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x19859;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (0x3ff < param_3) {\n    uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2);\n    FUN_0003af00(1,uVar2,0x400);\n                    /* WARNING: Subroutine does not return */\n    exit(1);\n  }\n  p_Var4 = (__fd_mask *)local_a0;\n  for (iVar3 = 0x20; iVar3 != 0; iVar3 = iVar3 + -1) {\n    *p_Var4 = 0;\n    p_Var4 = p_Var4 + 1;\n  }\n  iVar3 = __fdelt_chk(param_3);\n  local_a8.tv_sec = 0;\n  local_a8.tv_usec = 1;\n  bVar1 = (byte)(param_3 >> 0x1f);\n  local_a0[iVar3] =\n       local_a0[iVar3] | 1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f);\n  iVar3 = select(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 == 0;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006da50();\n}" primitive_type (ERROR "__regparm2" identifier) (function_declarator "FUN_00019850(undefined4 param_1,undefined4 param_2,int param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,int param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  undefined4 uVar2;\n  int iVar3;\n  __fd_mask *p_Var4;\n  int in_GS_OFFSET;\n  timeval local_a8;\n  uint local_a0 [32];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x19859;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (0x3ff < param_3) {\n    uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2);\n    FUN_0003af00(1,uVar2,0x400);\n                    /* WARNING: Subroutine does not return */\n    exit(1);\n  }\n  p_Var4 = (__fd_mask *)local_a0;\n  for (iVar3 = 0x20; iVar3 != 0; iVar3 = iVar3 + -1) {\n    *p_Var4 = 0;\n    p_Var4 = p_Var4 + 1;\n  }\n  iVar3 = __fdelt_chk(param_3);\n  local_a8.tv_sec = 0;\n  local_a8.tv_usec = 1;\n  bVar1 = (byte)(param_3 >> 0x1f);\n  local_a0[iVar3] =\n       local_a0[iVar3] | 1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f);\n  iVar3 = select(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 == 0;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006da50();\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "__fd_mask *p_Var4;" type_identifier (pointer_declarator "*p_Var4" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "timeval local_a8;" type_identifier identifier ;) (declaration "uint local_a0 [32];" type_identifier (array_declarator "local_a0 [32]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x19859;" (assignment_expression "uStack_14 = 0x19859" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (0x3ff < param_3) {\n    uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2);\n    FUN_0003af00(1,uVar2,0x400);\n                    /* WARNING: Subroutine does not return */\n    exit(1);\n  }" if (parenthesized_expression "(0x3ff < param_3)" ( (binary_expression "0x3ff < param_3" number_literal < identifier) )) (compound_statement "{\n    uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2);\n    FUN_0003af00(1,uVar2,0x400);\n                    /* WARNING: Subroutine does not return */\n    exit(1);\n  }" { (expression_statement "uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2);" (assignment_expression "uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2)" identifier = (call_expression "dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2)" identifier (argument_list "(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2)" ( number_literal , (string_literal ""Too many fds open.  Cannot use select on a fd >= %d\n"" " string_content escape_sequence ") , number_literal , identifier )))) ;) (expression_statement "FUN_0003af00(1,uVar2,0x400);" (call_expression "FUN_0003af00(1,uVar2,0x400)" identifier (argument_list "(1,uVar2,0x400)" ( number_literal , identifier , number_literal ))) ;) comment (expression_statement "exit(1);" (call_expression "exit(1)" identifier (argument_list "(1)" ( number_literal ))) ;) })) (expression_statement "p_Var4 = (__fd_mask *)local_a0;" (assignment_expression "p_Var4 = (__fd_mask *)local_a0" identifier = (cast_expression "(__fd_mask *)local_a0" ( (type_descriptor "__fd_mask *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (for_statement "for (iVar3 = 0x20; iVar3 != 0; iVar3 = iVar3 + -1) {\n    *p_Var4 = 0;\n    p_Var4 = p_Var4 + 1;\n  }" for ( (assignment_expression "iVar3 = 0x20" identifier = number_literal) ; (binary_expression "iVar3 != 0" identifier != number_literal) ; (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ) (compound_statement "{\n    *p_Var4 = 0;\n    p_Var4 = p_Var4 + 1;\n  }" { (expression_statement "*p_Var4 = 0;" (assignment_expression "*p_Var4 = 0" (pointer_expression "*p_Var4" * identifier) = number_literal) ;) (expression_statement "p_Var4 = p_Var4 + 1;" (assignment_expression "p_Var4 = p_Var4 + 1" identifier = (binary_expression "p_Var4 + 1" identifier + number_literal)) ;) })) (expression_statement "iVar3 = __fdelt_chk(param_3);" (assignment_expression "iVar3 = __fdelt_chk(param_3)" identifier = (call_expression "__fdelt_chk(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (expression_statement "local_a8.tv_sec = 0;" (assignment_expression "local_a8.tv_sec = 0" (field_expression "local_a8.tv_sec" identifier . field_identifier) = number_literal) ;) (expression_statement "local_a8.tv_usec = 1;" (assignment_expression "local_a8.tv_usec = 1" (field_expression "local_a8.tv_usec" identifier . field_identifier) = number_literal) ;) (expression_statement "bVar1 = (byte)(param_3 >> 0x1f);" (assignment_expression "bVar1 = (byte)(param_3 >> 0x1f)" identifier = (call_expression "(byte)(param_3 >> 0x1f)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(param_3 >> 0x1f)" ( (binary_expression "param_3 >> 0x1f" identifier >> number_literal) )))) ;) (expression_statement "local_a0[iVar3] =\n       local_a0[iVar3] | 1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f);" (assignment_expression "local_a0[iVar3] =\n       local_a0[iVar3] | 1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f)" (subscript_expression "local_a0[iVar3]" identifier [ identifier ]) = (binary_expression "local_a0[iVar3] | 1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f)" (subscript_expression "local_a0[iVar3]" identifier [ identifier ]) | (binary_expression "1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f)" number_literal << (parenthesized_expression "(((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f)" ( (binary_expression "((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f" (binary_expression "((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3)" (parenthesized_expression "((char)param_3 + (bVar1 >> 3) & 0x1f)" ( (binary_expression "(char)param_3 + (bVar1 >> 3) & 0x1f" (binary_expression "(char)param_3 + (bVar1 >> 3)" (cast_expression "(char)param_3" ( (type_descriptor "char" primitive_type) ) identifier) + (parenthesized_expression "(bVar1 >> 3)" ( (binary_expression "bVar1 >> 3" identifier >> number_literal) ))) & number_literal) )) - (parenthesized_expression "(bVar1 >> 3)" ( (binary_expression "bVar1 >> 3" identifier >> number_literal) ))) & number_literal) ))))) ;) (expression_statement "iVar3 = select(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8);" (assignment_expression "iVar3 = select(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8)" identifier = (call_expression "select(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8)" identifier (argument_list "(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8)" ( (binary_expression "param_3 + 1" identifier + number_literal) , (cast_expression "(fd_set *)local_a0" ( (type_descriptor "fd_set *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , (cast_expression "(fd_set *)0x0" ( (type_descriptor "fd_set *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(fd_set *)0x0" ( (type_descriptor "fd_set *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (pointer_expression "&local_a8" & identifier) )))) ;) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 == 0;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar3 == 0;\n  }" { (return_statement "return iVar3 == 0;" return (binary_expression "iVar3 == 0" identifier == number_literal) ;) })) comment (expression_statement "FUN_0006da50();" (call_expression "FUN_0006da50()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\n_Bool test_socket_open(int sock)\n\n{\n  int iVar1;\n  byte bVar2;\n  char *fmt;\n  int iVar3;\n  __fd_mask *p_Var4;\n  int in_GS_OFFSET;\n  timeval to;\n  fd_set check_set;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (0x3ff < sock) {\n    fmt = (char *)dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5);\n    logprintf(LOG_NOTQUIET,fmt,0x400);\n                    /* WARNING: Subroutine does not return */\n    exit(1);\n  }\n  iVar3 = 0x20;\n  p_Var4 = check_set.fds_bits;\n  for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n    *p_Var4 = 0;\n    p_Var4 = p_Var4 + 1;\n  }\n  iVar3 = __fdelt_chk(sock);\n  to.tv_sec = 0;\n  to.tv_usec = 1;\n  bVar2 = (byte)(sock >> 0x1f);\n  check_set.fds_bits[iVar3] =\n       check_set.fds_bits[iVar3] | 1 << (((char)sock + (bVar2 >> 3) & 0x1f) - (bVar2 >> 3) & 0x1f);\n  iVar3 = select(sock + 1,(fd_set *)&check_set,(fd_set *)0x0,(fd_set *)0x0,(timeval *)&to);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 == 0;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "_Bool test_socket_open(int sock)\n\n{\n  int iVar1;\n  byte bVar2;\n  char *fmt;\n  int iVar3;\n  __fd_mask *p_Var4;\n  int in_GS_OFFSET;\n  timeval to;\n  fd_set check_set;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (0x3ff < sock) {\n    fmt = (char *)dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5);\n    logprintf(LOG_NOTQUIET,fmt,0x400);\n                    /* WARNING: Subroutine does not return */\n    exit(1);\n  }\n  iVar3 = 0x20;\n  p_Var4 = check_set.fds_bits;\n  for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n    *p_Var4 = 0;\n    p_Var4 = p_Var4 + 1;\n  }\n  iVar3 = __fdelt_chk(sock);\n  to.tv_sec = 0;\n  to.tv_usec = 1;\n  bVar2 = (byte)(sock >> 0x1f);\n  check_set.fds_bits[iVar3] =\n       check_set.fds_bits[iVar3] | 1 << (((char)sock + (bVar2 >> 3) & 0x1f) - (bVar2 >> 3) & 0x1f);\n  iVar3 = select(sock + 1,(fd_set *)&check_set,(fd_set *)0x0,(fd_set *)0x0,(timeval *)&to);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 == 0;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" type_identifier (function_declarator "test_socket_open(int sock)" identifier (parameter_list "(int sock)" ( (parameter_declaration "int sock" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  byte bVar2;\n  char *fmt;\n  int iVar3;\n  __fd_mask *p_Var4;\n  int in_GS_OFFSET;\n  timeval to;\n  fd_set check_set;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (0x3ff < sock) {\n    fmt = (char *)dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5);\n    logprintf(LOG_NOTQUIET,fmt,0x400);\n                    /* WARNING: Subroutine does not return */\n    exit(1);\n  }\n  iVar3 = 0x20;\n  p_Var4 = check_set.fds_bits;\n  for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n    *p_Var4 = 0;\n    p_Var4 = p_Var4 + 1;\n  }\n  iVar3 = __fdelt_chk(sock);\n  to.tv_sec = 0;\n  to.tv_usec = 1;\n  bVar2 = (byte)(sock >> 0x1f);\n  check_set.fds_bits[iVar3] =\n       check_set.fds_bits[iVar3] | 1 << (((char)sock + (bVar2 >> 3) & 0x1f) - (bVar2 >> 3) & 0x1f);\n  iVar3 = select(sock + 1,(fd_set *)&check_set,(fd_set *)0x0,(fd_set *)0x0,(timeval *)&to);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 == 0;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "char *fmt;" primitive_type (pointer_declarator "*fmt" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "__fd_mask *p_Var4;" type_identifier (pointer_declarator "*p_Var4" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "timeval to;" type_identifier identifier ;) (declaration "fd_set check_set;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (0x3ff < sock) {\n    fmt = (char *)dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5);\n    logprintf(LOG_NOTQUIET,fmt,0x400);\n                    /* WARNING: Subroutine does not return */\n    exit(1);\n  }" if (parenthesized_expression "(0x3ff < sock)" ( (binary_expression "0x3ff < sock" number_literal < identifier) )) (compound_statement "{\n    fmt = (char *)dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5);\n    logprintf(LOG_NOTQUIET,fmt,0x400);\n                    /* WARNING: Subroutine does not return */\n    exit(1);\n  }" { (expression_statement "fmt = (char *)dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5);" (assignment_expression "fmt = (char *)dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5)" identifier = (cast_expression "(char *)dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5)" identifier (argument_list "(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5)" ( number_literal , (string_literal ""Too many fds open.  Cannot use select on a fd >= %d\n"" " string_content escape_sequence ") , number_literal ))))) ;) (expression_statement "logprintf(LOG_NOTQUIET,fmt,0x400);" (call_expression "logprintf(LOG_NOTQUIET,fmt,0x400)" identifier (argument_list "(LOG_NOTQUIET,fmt,0x400)" ( identifier , identifier , number_literal ))) ;) comment (expression_statement "exit(1);" (call_expression "exit(1)" identifier (argument_list "(1)" ( number_literal ))) ;) })) (expression_statement "iVar3 = 0x20;" (assignment_expression "iVar3 = 0x20" identifier = number_literal) ;) (expression_statement "p_Var4 = check_set.fds_bits;" (assignment_expression "p_Var4 = check_set.fds_bits" identifier = (field_expression "check_set.fds_bits" identifier . field_identifier)) ;) (for_statement "for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n    *p_Var4 = 0;\n    p_Var4 = p_Var4 + 1;\n  }" for ( ; (binary_expression "iVar3 != 0" identifier != number_literal) ; (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ) (compound_statement "{\n    *p_Var4 = 0;\n    p_Var4 = p_Var4 + 1;\n  }" { (expression_statement "*p_Var4 = 0;" (assignment_expression "*p_Var4 = 0" (pointer_expression "*p_Var4" * identifier) = number_literal) ;) (expression_statement "p_Var4 = p_Var4 + 1;" (assignment_expression "p_Var4 = p_Var4 + 1" identifier = (binary_expression "p_Var4 + 1" identifier + number_literal)) ;) })) (expression_statement "iVar3 = __fdelt_chk(sock);" (assignment_expression "iVar3 = __fdelt_chk(sock)" identifier = (call_expression "__fdelt_chk(sock)" identifier (argument_list "(sock)" ( identifier )))) ;) (expression_statement "to.tv_sec = 0;" (assignment_expression "to.tv_sec = 0" (field_expression "to.tv_sec" identifier . field_identifier) = number_literal) ;) (expression_statement "to.tv_usec = 1;" (assignment_expression "to.tv_usec = 1" (field_expression "to.tv_usec" identifier . field_identifier) = number_literal) ;) (expression_statement "bVar2 = (byte)(sock >> 0x1f);" (assignment_expression "bVar2 = (byte)(sock >> 0x1f)" identifier = (call_expression "(byte)(sock >> 0x1f)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(sock >> 0x1f)" ( (binary_expression "sock >> 0x1f" identifier >> number_literal) )))) ;) (expression_statement "check_set.fds_bits[iVar3] =\n       check_set.fds_bits[iVar3] | 1 << (((char)sock + (bVar2 >> 3) & 0x1f) - (bVar2 >> 3) & 0x1f);" (assignment_expression "check_set.fds_bits[iVar3] =\n       check_set.fds_bits[iVar3] | 1 << (((char)sock + (bVar2 >> 3) & 0x1f) - (bVar2 >> 3) & 0x1f)" (subscript_expression "check_set.fds_bits[iVar3]" (field_expression "check_set.fds_bits" identifier . field_identifier) [ identifier ]) = (binary_expression "check_set.fds_bits[iVar3] | 1 << (((char)sock + (bVar2 >> 3) & 0x1f) - (bVar2 >> 3) & 0x1f)" (subscript_expression "check_set.fds_bits[iVar3]" (field_expression "check_set.fds_bits" identifier . field_identifier) [ identifier ]) | (binary_expression "1 << (((char)sock + (bVar2 >> 3) & 0x1f) - (bVar2 >> 3) & 0x1f)" number_literal << (parenthesized_expression "(((char)sock + (bVar2 >> 3) & 0x1f) - (bVar2 >> 3) & 0x1f)" ( (binary_expression "((char)sock + (bVar2 >> 3) & 0x1f) - (bVar2 >> 3) & 0x1f" (binary_expression "((char)sock + (bVar2 >> 3) & 0x1f) - (bVar2 >> 3)" (parenthesized_expression "((char)sock + (bVar2 >> 3) & 0x1f)" ( (binary_expression "(char)sock + (bVar2 >> 3) & 0x1f" (binary_expression "(char)sock + (bVar2 >> 3)" (cast_expression "(char)sock" ( (type_descriptor "char" primitive_type) ) identifier) + (parenthesized_expression "(bVar2 >> 3)" ( (binary_expression "bVar2 >> 3" identifier >> number_literal) ))) & number_literal) )) - (parenthesized_expression "(bVar2 >> 3)" ( (binary_expression "bVar2 >> 3" identifier >> number_literal) ))) & number_literal) ))))) ;) (expression_statement "iVar3 = select(sock + 1,(fd_set *)&check_set,(fd_set *)0x0,(fd_set *)0x0,(timeval *)&to);" (assignment_expression "iVar3 = select(sock + 1,(fd_set *)&check_set,(fd_set *)0x0,(fd_set *)0x0,(timeval *)&to)" identifier = (call_expression "select(sock + 1,(fd_set *)&check_set,(fd_set *)0x0,(fd_set *)0x0,(timeval *)&to)" identifier (argument_list "(sock + 1,(fd_set *)&check_set,(fd_set *)0x0,(fd_set *)0x0,(timeval *)&to)" ( (binary_expression "sock + 1" identifier + number_literal) , (cast_expression "(fd_set *)&check_set" ( (type_descriptor "fd_set *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&check_set" & identifier)) , (cast_expression "(fd_set *)0x0" ( (type_descriptor "fd_set *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(fd_set *)0x0" ( (type_descriptor "fd_set *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(timeval *)&to" ( (type_descriptor "timeval *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&to" & identifier)) )))) ;) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 == 0;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar3 == 0;\n  }" { (return_statement "return iVar3 == 0;" return (binary_expression "iVar3 == 0" identifier == number_literal) ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "bool __regparm2 FUN_00019850(undefined4 param_1,undefined4 param_2,int param_3)\n\n{\n  byte bVar1;\n  undefined4 uVar2;\n  int iVar3;\n  __fd_mask *p_Var4;\n  int in_GS_OFFSET;\n  timeval local_a8;\n  uint local_a0 [32];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x19859;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (0x3ff < param_3) {\n    uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2);\n    FUN_0003af00(1,uVar2,0x400);\n                    \n    exit(1);\n  }\n  p_Var4 = (__fd_mask *)local_a0;\n  for (iVar3 = 0x20; iVar3 != 0; iVar3 = iVar3 + -1) {\n    *p_Var4 = 0;\n    p_Var4 = p_Var4 + 1;\n  }\n  iVar3 = __fdelt_chk(param_3);\n  local_a8.tv_sec = 0;\n  local_a8.tv_usec = 1;\n  bVar1 = (byte)(param_3 >> 0x1f);\n  local_a0[iVar3] =\n       local_a0[iVar3] | 1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f);\n  iVar3 = select(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 == 0;\n  }\n                    \n  FUN_0006da50();\n}\n\n" (function_definition "bool __regparm2 FUN_00019850(undefined4 param_1,undefined4 param_2,int param_3)\n\n{\n  byte bVar1;\n  undefined4 uVar2;\n  int iVar3;\n  __fd_mask *p_Var4;\n  int in_GS_OFFSET;\n  timeval local_a8;\n  uint local_a0 [32];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x19859;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (0x3ff < param_3) {\n    uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2);\n    FUN_0003af00(1,uVar2,0x400);\n                    \n    exit(1);\n  }\n  p_Var4 = (__fd_mask *)local_a0;\n  for (iVar3 = 0x20; iVar3 != 0; iVar3 = iVar3 + -1) {\n    *p_Var4 = 0;\n    p_Var4 = p_Var4 + 1;\n  }\n  iVar3 = __fdelt_chk(param_3);\n  local_a8.tv_sec = 0;\n  local_a8.tv_usec = 1;\n  bVar1 = (byte)(param_3 >> 0x1f);\n  local_a0[iVar3] =\n       local_a0[iVar3] | 1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f);\n  iVar3 = select(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 == 0;\n  }\n                    \n  FUN_0006da50();\n}" primitive_type (ERROR "__regparm2" identifier) (function_declarator "FUN_00019850(undefined4 param_1,undefined4 param_2,int param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,int param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  undefined4 uVar2;\n  int iVar3;\n  __fd_mask *p_Var4;\n  int in_GS_OFFSET;\n  timeval local_a8;\n  uint local_a0 [32];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x19859;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (0x3ff < param_3) {\n    uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2);\n    FUN_0003af00(1,uVar2,0x400);\n                    \n    exit(1);\n  }\n  p_Var4 = (__fd_mask *)local_a0;\n  for (iVar3 = 0x20; iVar3 != 0; iVar3 = iVar3 + -1) {\n    *p_Var4 = 0;\n    p_Var4 = p_Var4 + 1;\n  }\n  iVar3 = __fdelt_chk(param_3);\n  local_a8.tv_sec = 0;\n  local_a8.tv_usec = 1;\n  bVar1 = (byte)(param_3 >> 0x1f);\n  local_a0[iVar3] =\n       local_a0[iVar3] | 1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f);\n  iVar3 = select(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 == 0;\n  }\n                    \n  FUN_0006da50();\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "__fd_mask *p_Var4;" type_identifier (pointer_declarator "*p_Var4" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "timeval local_a8;" type_identifier identifier ;) (declaration "uint local_a0 [32];" type_identifier (array_declarator "local_a0 [32]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x19859;" (assignment_expression "uStack_14 = 0x19859" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (0x3ff < param_3) {\n    uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2);\n    FUN_0003af00(1,uVar2,0x400);\n                    \n    exit(1);\n  }" if (parenthesized_expression "(0x3ff < param_3)" ( (binary_expression "0x3ff < param_3" number_literal < identifier) )) (compound_statement "{\n    uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2);\n    FUN_0003af00(1,uVar2,0x400);\n                    \n    exit(1);\n  }" { (expression_statement "uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2);" (assignment_expression "uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2)" identifier = (call_expression "dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2)" identifier (argument_list "(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2)" ( number_literal , (string_literal ""Too many fds open.  Cannot use select on a fd >= %d\n"" " string_content escape_sequence ") , number_literal , identifier )))) ;) (expression_statement "FUN_0003af00(1,uVar2,0x400);" (call_expression "FUN_0003af00(1,uVar2,0x400)" identifier (argument_list "(1,uVar2,0x400)" ( number_literal , identifier , number_literal ))) ;) (expression_statement "exit(1);" (call_expression "exit(1)" identifier (argument_list "(1)" ( number_literal ))) ;) })) (expression_statement "p_Var4 = (__fd_mask *)local_a0;" (assignment_expression "p_Var4 = (__fd_mask *)local_a0" identifier = (cast_expression "(__fd_mask *)local_a0" ( (type_descriptor "__fd_mask *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (for_statement "for (iVar3 = 0x20; iVar3 != 0; iVar3 = iVar3 + -1) {\n    *p_Var4 = 0;\n    p_Var4 = p_Var4 + 1;\n  }" for ( (assignment_expression "iVar3 = 0x20" identifier = number_literal) ; (binary_expression "iVar3 != 0" identifier != number_literal) ; (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ) (compound_statement "{\n    *p_Var4 = 0;\n    p_Var4 = p_Var4 + 1;\n  }" { (expression_statement "*p_Var4 = 0;" (assignment_expression "*p_Var4 = 0" (pointer_expression "*p_Var4" * identifier) = number_literal) ;) (expression_statement "p_Var4 = p_Var4 + 1;" (assignment_expression "p_Var4 = p_Var4 + 1" identifier = (binary_expression "p_Var4 + 1" identifier + number_literal)) ;) })) (expression_statement "iVar3 = __fdelt_chk(param_3);" (assignment_expression "iVar3 = __fdelt_chk(param_3)" identifier = (call_expression "__fdelt_chk(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (expression_statement "local_a8.tv_sec = 0;" (assignment_expression "local_a8.tv_sec = 0" (field_expression "local_a8.tv_sec" identifier . field_identifier) = number_literal) ;) (expression_statement "local_a8.tv_usec = 1;" (assignment_expression "local_a8.tv_usec = 1" (field_expression "local_a8.tv_usec" identifier . field_identifier) = number_literal) ;) (expression_statement "bVar1 = (byte)(param_3 >> 0x1f);" (assignment_expression "bVar1 = (byte)(param_3 >> 0x1f)" identifier = (call_expression "(byte)(param_3 >> 0x1f)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(param_3 >> 0x1f)" ( (binary_expression "param_3 >> 0x1f" identifier >> number_literal) )))) ;) (expression_statement "local_a0[iVar3] =\n       local_a0[iVar3] | 1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f);" (assignment_expression "local_a0[iVar3] =\n       local_a0[iVar3] | 1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f)" (subscript_expression "local_a0[iVar3]" identifier [ identifier ]) = (binary_expression "local_a0[iVar3] | 1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f)" (subscript_expression "local_a0[iVar3]" identifier [ identifier ]) | (binary_expression "1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f)" number_literal << (parenthesized_expression "(((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f)" ( (binary_expression "((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f" (binary_expression "((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3)" (parenthesized_expression "((char)param_3 + (bVar1 >> 3) & 0x1f)" ( (binary_expression "(char)param_3 + (bVar1 >> 3) & 0x1f" (binary_expression "(char)param_3 + (bVar1 >> 3)" (cast_expression "(char)param_3" ( (type_descriptor "char" primitive_type) ) identifier) + (parenthesized_expression "(bVar1 >> 3)" ( (binary_expression "bVar1 >> 3" identifier >> number_literal) ))) & number_literal) )) - (parenthesized_expression "(bVar1 >> 3)" ( (binary_expression "bVar1 >> 3" identifier >> number_literal) ))) & number_literal) ))))) ;) (expression_statement "iVar3 = select(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8);" (assignment_expression "iVar3 = select(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8)" identifier = (call_expression "select(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8)" identifier (argument_list "(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8)" ( (binary_expression "param_3 + 1" identifier + number_literal) , (cast_expression "(fd_set *)local_a0" ( (type_descriptor "fd_set *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , (cast_expression "(fd_set *)0x0" ( (type_descriptor "fd_set *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(fd_set *)0x0" ( (type_descriptor "fd_set *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (pointer_expression "&local_a8" & identifier) )))) ;) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 == 0;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar3 == 0;\n  }" { (return_statement "return iVar3 == 0;" return (binary_expression "iVar3 == 0" identifier == number_literal) ;) })) (expression_statement "FUN_0006da50();" (call_expression "FUN_0006da50()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (string_literal " string_content escape_sequence ") , LIT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT , IDENT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ;) (for_statement for ( (assignment_expression IDENT = LIT) ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (binary_expression IDENT + LIT)) ) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = LIT) ;) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT >> LIT) )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (binary_expression (subscript_expression IDENT [ IDENT ]) | (binary_expression LIT << (parenthesized_expression ( (binary_expression (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression IDENT >> LIT) ))) & LIT) )) - (parenthesized_expression ( (binary_expression IDENT >> LIT) ))) & LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return (binary_expression IDENT == LIT) ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "bool __regparm2 FUN_00019850(undefined4 param_1,undefined4 param_2,int param_3)\n\n{\n  byte bVar1;\n  undefined4 uVar2;\n  int iVar3;\n  __fd_mask *p_Var4;\n  int in_GS_OFFSET;\n  timeval local_a8;\n  uint local_a0 [32];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x19859;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (0x3ff < param_3) {\n    uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2);\n    FUN_0003af00(1,uVar2,0x400);\n                    \n    exit(1);\n  }\n  p_Var4 = (__fd_mask *)local_a0;\n  for (iVar3 = 0x20; iVar3 != 0; iVar3 = iVar3 + -1) {\n    *p_Var4 = 0;\n    p_Var4 = p_Var4 + 1;\n  }\n  iVar3 = __fdelt_chk(param_3);\n  local_a8.tv_sec = 0;\n  local_a8.tv_usec = 1;\n  bVar1 = (byte)(param_3 >> 0x1f);\n  local_a0[iVar3] =\n       local_a0[iVar3] | 1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f);\n  iVar3 = select(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 == 0;\n  }\n                    \n  FUN_0006da50();\n}" (primitive_type "bool") (ERROR "__regparm2" (identifier "__regparm2")) (function_declarator "FUN_00019850(undefined4 param_1,undefined4 param_2,int param_3)" (identifier "FUN_00019850") (parameter_list "(undefined4 param_1,undefined4 param_2,int param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  byte bVar1;\n  undefined4 uVar2;\n  int iVar3;\n  __fd_mask *p_Var4;\n  int in_GS_OFFSET;\n  timeval local_a8;\n  uint local_a0 [32];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x19859;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (0x3ff < param_3) {\n    uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2);\n    FUN_0003af00(1,uVar2,0x400);\n                    \n    exit(1);\n  }\n  p_Var4 = (__fd_mask *)local_a0;\n  for (iVar3 = 0x20; iVar3 != 0; iVar3 = iVar3 + -1) {\n    *p_Var4 = 0;\n    p_Var4 = p_Var4 + 1;\n  }\n  iVar3 = __fdelt_chk(param_3);\n  local_a8.tv_sec = 0;\n  local_a8.tv_usec = 1;\n  bVar1 = (byte)(param_3 >> 0x1f);\n  local_a0[iVar3] =\n       local_a0[iVar3] | 1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f);\n  iVar3 = select(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 == 0;\n  }\n                    \n  FUN_0006da50();\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "__fd_mask *p_Var4;" (type_identifier "__fd_mask") (pointer_declarator "*p_Var4" (* "*") (identifier "p_Var4")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "timeval local_a8;" (type_identifier "timeval") (identifier "local_a8") (; ";")) (declaration "uint local_a0 [32];" (type_identifier "uint") (array_declarator "local_a0 [32]" (identifier "local_a0") ([ "[") (number_literal "32") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x19859;" (assignment_expression "uStack_14 = 0x19859" (identifier "uStack_14") (= "=") (number_literal "0x19859")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if (0x3ff < param_3) {\n    uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2);\n    FUN_0003af00(1,uVar2,0x400);\n                    \n    exit(1);\n  }" (if "if") (parenthesized_expression "(0x3ff < param_3)" (( "(") (binary_expression "0x3ff < param_3" (number_literal "0x3ff") (< "<") (identifier "param_3")) () ")")) (compound_statement "{\n    uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2);\n    FUN_0003af00(1,uVar2,0x400);\n                    \n    exit(1);\n  }" ({ "{") (expression_statement "uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2);" (assignment_expression "uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2)" (identifier "uVar2") (= "=") (call_expression "dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2)" (identifier "dcgettext") (argument_list "(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2)" (( "(") (number_literal "0") (, ",") (string_literal ""Too many fds open.  Cannot use select on a fd >= %d\n"" (" """) (string_content "Too many fds open.  Cannot use select on a fd >= %d") (escape_sequence "\n") (" """)) (, ",") (number_literal "5") (, ",") (identifier "param_2") () ")")))) (; ";")) (expression_statement "FUN_0003af00(1,uVar2,0x400);" (call_expression "FUN_0003af00(1,uVar2,0x400)" (identifier "FUN_0003af00") (argument_list "(1,uVar2,0x400)" (( "(") (number_literal "1") (, ",") (identifier "uVar2") (, ",") (number_literal "0x400") () ")"))) (; ";")) (expression_statement "exit(1);" (call_expression "exit(1)" (identifier "exit") (argument_list "(1)" (( "(") (number_literal "1") () ")"))) (; ";")) (} "}"))) (expression_statement "p_Var4 = (__fd_mask *)local_a0;" (assignment_expression "p_Var4 = (__fd_mask *)local_a0" (identifier "p_Var4") (= "=") (cast_expression "(__fd_mask *)local_a0" (( "(") (type_descriptor "__fd_mask *" (type_identifier "__fd_mask") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "local_a0"))) (; ";")) (for_statement "for (iVar3 = 0x20; iVar3 != 0; iVar3 = iVar3 + -1) {\n    *p_Var4 = 0;\n    p_Var4 = p_Var4 + 1;\n  }" (for "for") (( "(") (assignment_expression "iVar3 = 0x20" (identifier "iVar3") (= "=") (number_literal "0x20")) (; ";") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "iVar3 = iVar3 + -1" (identifier "iVar3") (= "=") (binary_expression "iVar3 + -1" (identifier "iVar3") (+ "+") (number_literal "-1"))) () ")") (compound_statement "{\n    *p_Var4 = 0;\n    p_Var4 = p_Var4 + 1;\n  }" ({ "{") (expression_statement "*p_Var4 = 0;" (assignment_expression "*p_Var4 = 0" (pointer_expression "*p_Var4" (* "*") (identifier "p_Var4")) (= "=") (number_literal "0")) (; ";")) (expression_statement "p_Var4 = p_Var4 + 1;" (assignment_expression "p_Var4 = p_Var4 + 1" (identifier "p_Var4") (= "=") (binary_expression "p_Var4 + 1" (identifier "p_Var4") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "iVar3 = __fdelt_chk(param_3);" (assignment_expression "iVar3 = __fdelt_chk(param_3)" (identifier "iVar3") (= "=") (call_expression "__fdelt_chk(param_3)" (identifier "__fdelt_chk") (argument_list "(param_3)" (( "(") (identifier "param_3") () ")")))) (; ";")) (expression_statement "local_a8.tv_sec = 0;" (assignment_expression "local_a8.tv_sec = 0" (field_expression "local_a8.tv_sec" (identifier "local_a8") (. ".") (field_identifier "tv_sec")) (= "=") (number_literal "0")) (; ";")) (expression_statement "local_a8.tv_usec = 1;" (assignment_expression "local_a8.tv_usec = 1" (field_expression "local_a8.tv_usec" (identifier "local_a8") (. ".") (field_identifier "tv_usec")) (= "=") (number_literal "1")) (; ";")) (expression_statement "bVar1 = (byte)(param_3 >> 0x1f);" (assignment_expression "bVar1 = (byte)(param_3 >> 0x1f)" (identifier "bVar1") (= "=") (call_expression "(byte)(param_3 >> 0x1f)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(param_3 >> 0x1f)" (( "(") (binary_expression "param_3 >> 0x1f" (identifier "param_3") (>> ">>") (number_literal "0x1f")) () ")")))) (; ";")) (expression_statement "local_a0[iVar3] =\n       local_a0[iVar3] | 1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f);" (assignment_expression "local_a0[iVar3] =\n       local_a0[iVar3] | 1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f)" (subscript_expression "local_a0[iVar3]" (identifier "local_a0") ([ "[") (identifier "iVar3") (] "]")) (= "=") (binary_expression "local_a0[iVar3] | 1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f)" (subscript_expression "local_a0[iVar3]" (identifier "local_a0") ([ "[") (identifier "iVar3") (] "]")) (| "|") (binary_expression "1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f)" (number_literal "1") (<< "<<") (parenthesized_expression "(((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f)" (( "(") (binary_expression "((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f" (binary_expression "((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3)" (parenthesized_expression "((char)param_3 + (bVar1 >> 3) & 0x1f)" (( "(") (binary_expression "(char)param_3 + (bVar1 >> 3) & 0x1f" (binary_expression "(char)param_3 + (bVar1 >> 3)" (cast_expression "(char)param_3" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "param_3")) (+ "+") (parenthesized_expression "(bVar1 >> 3)" (( "(") (binary_expression "bVar1 >> 3" (identifier "bVar1") (>> ">>") (number_literal "3")) () ")"))) (& "&") (number_literal "0x1f")) () ")")) (- "-") (parenthesized_expression "(bVar1 >> 3)" (( "(") (binary_expression "bVar1 >> 3" (identifier "bVar1") (>> ">>") (number_literal "3")) () ")"))) (& "&") (number_literal "0x1f")) () ")"))))) (; ";")) (expression_statement "iVar3 = select(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8);" (assignment_expression "iVar3 = select(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8)" (identifier "iVar3") (= "=") (call_expression "select(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8)" (identifier "select") (argument_list "(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8)" (( "(") (binary_expression "param_3 + 1" (identifier "param_3") (+ "+") (number_literal "1")) (, ",") (cast_expression "(fd_set *)local_a0" (( "(") (type_descriptor "fd_set *" (type_identifier "fd_set") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "local_a0")) (, ",") (cast_expression "(fd_set *)0x0" (( "(") (type_descriptor "fd_set *" (type_identifier "fd_set") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (, ",") (cast_expression "(fd_set *)0x0" (( "(") (type_descriptor "fd_set *" (type_identifier "fd_set") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (, ",") (pointer_expression "&local_a8" (& "&") (identifier "local_a8")) () ")")))) (; ";")) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 == 0;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return iVar3 == 0;\n  }" ({ "{") (return_statement "return iVar3 == 0;" (return "return") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "FUN_0006da50();" (call_expression "FUN_0006da50()" (identifier "FUN_0006da50") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

type_1 function_1(int var_2)

{
  int var_11;
  type_2 var_9;
  char *fmt;
  int var_6;
  type_3 *var_7;
  int var_1;
  type_4 to;
  type_5 check_set;
  
  var_11 = *(int *)(var_1 + 0x14);
  if (0x3ff < var_2) {
    fmt = (char *)var_3(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5);
    var_4(LOG_NOTQUIET,fmt,0x400);
                    /* WARNING: Subroutine does not return */
    var_5(1);
  }
  var_6 = 0x20;
  var_7 = check_set.fds_bits;
  for (; var_6 != 0; var_6 = var_6 + -1) {
    *var_7 = 0;
    var_7 = var_7 + 1;
  }
  var_6 = var_8(var_2);
  to.tv_sec = 0;
  to.tv_usec = 1;
  var_9 = (type_2)(var_2 >> 0x1f);
  check_set.fds_bits[var_6] =
       check_set.fds_bits[var_6] | 1 << (((char)var_2 + (var_9 >> 3) & 0x1f) - (var_9 >> 3) & 0x1f);
  var_6 = var_10(var_2 + 1,(type_5 *)&check_set,(type_5 *)0x0,(type_5 *)0x0,(type_4 *)&to);
  if (var_11 == *(int *)(var_1 + 0x14)) {
    return var_6 == 0;
  }
                    /* WARNING: Subroutine does not return */
  var_12();
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (string_literal (string_content) (escape_sequence)) (number_literal) (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal) (identifier) (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) (for_statement initializer: (assignment_expression left: (identifier) right: (number_literal)) condition: (binary_expression left: (identifier) right: (number_literal)) update: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) body: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (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))))) (expression_statement (assignment_expression left: (field_expression argument: (identifier) field: (field_identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (field_expression argument: (identifier) field: (field_identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (identifier)) right: (binary_expression left: (subscript_expression argument: (identifier) index: (identifier)) right: (binary_expression left: (number_literal) right: (parenthesized_expression (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)) (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)) (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)) (pointer_expression argument: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (return_statement (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

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

bool __regparm2 MASKED(undefined4 param_1,undefined4 param_2,int param_3)

{
  byte bVar1;
  undefined4 uVar2;
  int iVar3;
  __fd_mask *p_Var4;
  int in_GS_OFFSET;
  timeval local_a8;
  uint local_a0 [32];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x19859;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (0x3ff < param_3) {
    uVar2 = dcgettext(0,"Too many fds open.  Cannot use select on a fd >= %d\n",5,param_2);
    FUN_0003af00(1,uVar2,0x400);
                    /* WARNING: Subroutine does not return */
    exit(1);
  }
  p_Var4 = (__fd_mask *)local_a0;
  for (iVar3 = 0x20; iVar3 != 0; iVar3 = iVar3 + -1) {
    *p_Var4 = 0;
    p_Var4 = p_Var4 + 1;
  }
  iVar3 = __fdelt_chk(param_3);
  local_a8.tv_sec = 0;
  local_a8.tv_usec = 1;
  bVar1 = (byte)(param_3 >> 0x1f);
  local_a0[iVar3] =
       local_a0[iVar3] | 1 << (((char)param_3 + (bVar1 >> 3) & 0x1f) - (bVar1 >> 3) & 0x1f);
  iVar3 = select(param_3 + 1,(fd_set *)local_a0,(fd_set *)0x0,(fd_set *)0x0,&local_a8);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar3 == 0;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006da50();
}

