
/* WARNING: Unknown calling convention */

int wait_any(int interesting)

{
  redirect *prVar1;
  undefined *puVar2;
  undefined *puVar3;
  int iVar4;
  int iVar5;
  int *piVar6;
  int status;
  sigset_t set;
  sigset_t oldset;
  
  puVar3 = PTR___stack_chk_guard_004b238c;
  status = 0;
  iVar4 = *(int *)PTR___stack_chk_guard_004b238c;
  (*(code *)PTR_sigemptyset_004b2208)(&set);
  (*(code *)PTR_sigaddset_004b2270)(&set,2);
  (*(code *)PTR_sigaddset_004b2270)(&set,1);
  (*(code *)PTR_sigaddset_004b2270)(&set,3);
  (*(code *)PTR_sigprocmask_004b23ac)(1,&set,&oldset);
LAB_0045ce00:
  iVar5 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&status,interesting == 0);
  do {
    puVar2 = PTR_waitpid_004b2308;
    if ((iVar5 == 0) || ((interesting != 0 && (interesting == iVar5)))) {
LAB_0045ce84:
      (*(code *)PTR_sigprocmask_004b23ac)(3,&oldset,0);
      if (iVar4 == *(int *)puVar3) {
        return status;
      }
      (*(code *)PTR___stack_chk_fail_004b2348)();
      iVar4 = (*(code *)PTR_fclose_004b21e0)();
      return iVar4;
    }
    prVar1 = red_head;
    if (iVar5 == -1) {
      piVar6 = (int *)(*(code *)PTR___errno_location_004b2250)();
      if (*piVar6 == 10) goto LAB_0045ce84;
      goto LAB_0045ce00;
    }
    while( true ) {
      if (prVar1 == (redirect *)0x0) goto LAB_0045ce00;
      if (prVar1->pid == iVar5) break;
      prVar1 = prVar1->next;
    }
    prVar1->pid = -1;
    prVar1->status = status;
    iVar5 = (*(code *)puVar2)(0xffffffff,&status,interesting == 0);
  } while( true );
}



undefined4 FUN_0045cd34(int param_1)

{
  int iVar1;
  undefined *puVar2;
  undefined *puVar3;
  int iVar4;
  int *piVar5;
  undefined4 uVar6;
  undefined4 local_128;
  undefined1 auStack_124 [128];
  undefined1 auStack_a4 [128];
  int local_24;
  
  puVar3 = PTR___stack_chk_guard_004b238c;
  local_128 = 0;
  local_24 = *(int *)PTR___stack_chk_guard_004b238c;
  (*(code *)PTR_sigemptyset_004b2208)(auStack_124);
  (*(code *)PTR_sigaddset_004b2270)(auStack_124,2);
  (*(code *)PTR_sigaddset_004b2270)(auStack_124,1);
  (*(code *)PTR_sigaddset_004b2270)(auStack_124,3);
  (*(code *)PTR_sigprocmask_004b23ac)(1,auStack_124,auStack_a4);
LAB_0045ce00:
  iVar4 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0);
  do {
    puVar2 = PTR_waitpid_004b2308;
    if ((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))) {
LAB_0045ce84:
      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);
      if (local_24 == *(int *)puVar3) {
        return local_128;
      }
      (*(code *)PTR___stack_chk_fail_004b2348)();
                    /* WARNING: Could not recover jumptable at 0x0045cf04. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      uVar6 = (*(code *)PTR_fclose_004b21e0)();
      return uVar6;
    }
    iVar1 = DAT_004b6068;
    if (iVar4 == -1) {
      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();
      if (*piVar5 == 10) goto LAB_0045ce84;
      goto LAB_0045ce00;
    }
    while( true ) {
      if (iVar1 == 0) goto LAB_0045ce00;
      if (*(int *)(iVar1 + 0x10) == iVar4) break;
      iVar1 = *(int *)(iVar1 + 0x1c);
    }
    *(undefined4 *)(iVar1 + 0x10) = 0xffffffff;
    *(undefined4 *)(iVar1 + 0x14) = local_128;
    iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0);
  } while( true );
}


lui gp,0x4c
addiu sp,sp,-0x140
addiu gp,gp,-0x64e0
sw s4,0x130(sp)
lw s4,-0x7794(gp)
lw t9,-0x7918(gp)
sw s2,0x128(sp)
addiu s2,sp,0x1c
sw ra,0x13c(sp)
sw s6,0x138(sp)
addiu s6,sp,0x18
sw s5,0x134(sp)
addiu s5,sp,0x9c
sw s3,0x12c(sp)
li s3,0xa
sw s1,0x124(sp)
sw s0,0x120(sp)
or s0,a0,zero
sw gp,0x10(sp)
or a0,s2,zero
sw zero,0x18(sp)
sltiu s1,s0,0x1
lw v0,0x0(s4)
sw v0,0x11c(sp)
jalr t9
_nop
li a1,0x2
lw gp,0x10(sp)
lw t9,-0x78b0(gp)
jalr t9
_or a0,s2,zero
li a1,0x1
lw gp,0x10(sp)
lw t9,-0x78b0(gp)
jalr t9
_or a0,s2,zero
li a1,0x3
lw gp,0x10(sp)
lw t9,-0x78b0(gp)
jalr t9
_or a0,s2,zero
li a0,0x1
lw gp,0x10(sp)
or a1,s2,zero
or a2,s5,zero
lw t9,-0x7774(gp)
jalr t9
_lui s2,0x4b
lw gp,0x10(sp)
lw t9,-0x7818(gp)
li a0,-0x1
or a2,s1,zero
jalr t9
_or a1,s6,zero
beq v0,zero,0x0045ce80
_lw gp,0x10(sp)
beq s0,zero,0x0045ce24
_li v1,-0x1
beq s0,v0,0x0045ce84
_lw t9,-0x7774(gp)
beq v0,v1,0x0045ced0
_lw t9,-0x78d0(gp)
lw v1,0x6068(s2)
bne v1,zero,0x0045ce4c
_lw t9,-0x7818(gp)
b 0x0045ce00
_li a0,-0x1
lw v1,0x1c(v1)
beq v1,zero,0x0045ce00
_li a0,-0x1
lw a0,0x10(v1)
bne a0,v0,0x0045ce40
_lw t9,-0x7818(gp)
li v0,-0x1
li a0,-0x1
sw v0,0x10(v1)
or a2,s1,zero
lw v0,0x18(sp)
or a1,s6,zero
jalr t9
_sw v0,0x14(v1)
bne v0,zero,0x0045ce14
_lw gp,0x10(sp)
lw t9,-0x7774(gp)
li a0,0x3
or a2,zero,zero
jalr t9
_or a1,s5,zero
lw a0,0x11c(sp)
lw v1,0x0(s4)
lw gp,0x10(sp)
bne a0,v1,0x0045ceec
_lw v0,0x18(sp)
lw ra,0x13c(sp)
lw s6,0x138(sp)
lw s5,0x134(sp)
lw s4,0x130(sp)
lw s3,0x12c(sp)
lw s2,0x128(sp)
lw s1,0x124(sp)
lw s0,0x120(sp)
jr ra
_addiu sp,sp,0x140
jalr t9
_nop
lw v0,0x0(v0)
bne v0,s3,0x0045cdf8
_lw gp,0x10(sp)
b 0x0045ce84
_lw t9,-0x7774(gp)
lw t9,-0x77d8(gp)
jalr t9
_nop
lui gp,0x4c
addiu gp,gp,-0x64e0
lw t9,-0x7940(gp)
jr t9
_nop
(translation_unit "undefined4 FUN_0045cd34(int param_1)\n\n{\n  int iVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  undefined4 local_128;\n  undefined1 auStack_124 [128];\n  undefined1 auStack_a4 [128];\n  int local_24;\n  \n  puVar3 = PTR___stack_chk_guard_004b238c;\n  local_128 = 0;\n  local_24 = *(int *)PTR___stack_chk_guard_004b238c;\n  (*(code *)PTR_sigemptyset_004b2208)(auStack_124);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,2);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,1);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,3);\n  (*(code *)PTR_sigprocmask_004b23ac)(1,auStack_124,auStack_a4);\nLAB_0045ce00:\n  iVar4 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0);\n  do {\n    puVar2 = PTR_waitpid_004b2308;\n    if ((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);\n      if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n                    /* WARNING: Could not recover jumptable at 0x0045cf04. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar6 = (*(code *)PTR_fclose_004b21e0)();\n      return uVar6;\n    }\n    iVar1 = DAT_004b6068;\n    if (iVar4 == -1) {\n      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar5 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }\n    while( true ) {\n      if (iVar1 == 0) goto LAB_0045ce00;\n      if (*(int *)(iVar1 + 0x10) == iVar4) break;\n      iVar1 = *(int *)(iVar1 + 0x1c);\n    }\n    *(undefined4 *)(iVar1 + 0x10) = 0xffffffff;\n    *(undefined4 *)(iVar1 + 0x14) = local_128;\n    iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0);\n  } while( true );\n}\n\n" (function_definition "undefined4 FUN_0045cd34(int param_1)\n\n{\n  int iVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  undefined4 local_128;\n  undefined1 auStack_124 [128];\n  undefined1 auStack_a4 [128];\n  int local_24;\n  \n  puVar3 = PTR___stack_chk_guard_004b238c;\n  local_128 = 0;\n  local_24 = *(int *)PTR___stack_chk_guard_004b238c;\n  (*(code *)PTR_sigemptyset_004b2208)(auStack_124);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,2);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,1);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,3);\n  (*(code *)PTR_sigprocmask_004b23ac)(1,auStack_124,auStack_a4);\nLAB_0045ce00:\n  iVar4 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0);\n  do {\n    puVar2 = PTR_waitpid_004b2308;\n    if ((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);\n      if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n                    /* WARNING: Could not recover jumptable at 0x0045cf04. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar6 = (*(code *)PTR_fclose_004b21e0)();\n      return uVar6;\n    }\n    iVar1 = DAT_004b6068;\n    if (iVar4 == -1) {\n      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar5 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }\n    while( true ) {\n      if (iVar1 == 0) goto LAB_0045ce00;\n      if (*(int *)(iVar1 + 0x10) == iVar4) break;\n      iVar1 = *(int *)(iVar1 + 0x1c);\n    }\n    *(undefined4 *)(iVar1 + 0x10) = 0xffffffff;\n    *(undefined4 *)(iVar1 + 0x14) = local_128;\n    iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0);\n  } while( true );\n}" type_identifier (function_declarator "FUN_0045cd34(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  undefined4 local_128;\n  undefined1 auStack_124 [128];\n  undefined1 auStack_a4 [128];\n  int local_24;\n  \n  puVar3 = PTR___stack_chk_guard_004b238c;\n  local_128 = 0;\n  local_24 = *(int *)PTR___stack_chk_guard_004b238c;\n  (*(code *)PTR_sigemptyset_004b2208)(auStack_124);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,2);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,1);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,3);\n  (*(code *)PTR_sigprocmask_004b23ac)(1,auStack_124,auStack_a4);\nLAB_0045ce00:\n  iVar4 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0);\n  do {\n    puVar2 = PTR_waitpid_004b2308;\n    if ((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);\n      if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n                    /* WARNING: Could not recover jumptable at 0x0045cf04. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar6 = (*(code *)PTR_fclose_004b21e0)();\n      return uVar6;\n    }\n    iVar1 = DAT_004b6068;\n    if (iVar4 == -1) {\n      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar5 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }\n    while( true ) {\n      if (iVar1 == 0) goto LAB_0045ce00;\n      if (*(int *)(iVar1 + 0x10) == iVar4) break;\n      iVar1 = *(int *)(iVar1 + 0x1c);\n    }\n    *(undefined4 *)(iVar1 + 0x10) = 0xffffffff;\n    *(undefined4 *)(iVar1 + 0x14) = local_128;\n    iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0);\n  } while( true );\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (declaration "undefined4 local_128;" type_identifier identifier ;) (declaration "undefined1 auStack_124 [128];" type_identifier (array_declarator "auStack_124 [128]" identifier [ number_literal ]) ;) (declaration "undefined1 auStack_a4 [128];" type_identifier (array_declarator "auStack_a4 [128]" identifier [ number_literal ]) ;) (declaration "int local_24;" primitive_type identifier ;) (expression_statement "puVar3 = PTR___stack_chk_guard_004b238c;" (assignment_expression "puVar3 = PTR___stack_chk_guard_004b238c" identifier = identifier) ;) (expression_statement "local_128 = 0;" (assignment_expression "local_128 = 0" identifier = number_literal) ;) (expression_statement "local_24 = *(int *)PTR___stack_chk_guard_004b238c;" (assignment_expression "local_24 = *(int *)PTR___stack_chk_guard_004b238c" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_004b238c" * (cast_expression "(int *)PTR___stack_chk_guard_004b238c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "(*(code *)PTR_sigemptyset_004b2208)(auStack_124);" (call_expression "(*(code *)PTR_sigemptyset_004b2208)(auStack_124)" (parenthesized_expression "(*(code *)PTR_sigemptyset_004b2208)" ( (pointer_expression "*(code *)PTR_sigemptyset_004b2208" * (cast_expression "(code *)PTR_sigemptyset_004b2208" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_124)" ( identifier ))) ;) (expression_statement "(*(code *)PTR_sigaddset_004b2270)(auStack_124,2);" (call_expression "(*(code *)PTR_sigaddset_004b2270)(auStack_124,2)" (parenthesized_expression "(*(code *)PTR_sigaddset_004b2270)" ( (pointer_expression "*(code *)PTR_sigaddset_004b2270" * (cast_expression "(code *)PTR_sigaddset_004b2270" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_124,2)" ( identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_sigaddset_004b2270)(auStack_124,1);" (call_expression "(*(code *)PTR_sigaddset_004b2270)(auStack_124,1)" (parenthesized_expression "(*(code *)PTR_sigaddset_004b2270)" ( (pointer_expression "*(code *)PTR_sigaddset_004b2270" * (cast_expression "(code *)PTR_sigaddset_004b2270" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_124,1)" ( identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_sigaddset_004b2270)(auStack_124,3);" (call_expression "(*(code *)PTR_sigaddset_004b2270)(auStack_124,3)" (parenthesized_expression "(*(code *)PTR_sigaddset_004b2270)" ( (pointer_expression "*(code *)PTR_sigaddset_004b2270" * (cast_expression "(code *)PTR_sigaddset_004b2270" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_124,3)" ( identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_sigprocmask_004b23ac)(1,auStack_124,auStack_a4);" (call_expression "(*(code *)PTR_sigprocmask_004b23ac)(1,auStack_124,auStack_a4)" (parenthesized_expression "(*(code *)PTR_sigprocmask_004b23ac)" ( (pointer_expression "*(code *)PTR_sigprocmask_004b23ac" * (cast_expression "(code *)PTR_sigprocmask_004b23ac" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(1,auStack_124,auStack_a4)" ( number_literal , identifier , identifier ))) ;) (labeled_statement "LAB_0045ce00:\n  iVar4 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0);" statement_identifier : (expression_statement "iVar4 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0);" (assignment_expression "iVar4 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0)" identifier = (call_expression "(*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0)" (parenthesized_expression "(*(code *)PTR_waitpid_004b2308)" ( (pointer_expression "*(code *)PTR_waitpid_004b2308" * (cast_expression "(code *)PTR_waitpid_004b2308" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0xffffffff,&local_128,param_1 == 0)" ( number_literal , (pointer_expression "&local_128" & identifier) , (binary_expression "param_1 == 0" identifier == number_literal) )))) ;)) (do_statement "do {\n    puVar2 = PTR_waitpid_004b2308;\n    if ((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);\n      if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n                    /* WARNING: Could not recover jumptable at 0x0045cf04. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar6 = (*(code *)PTR_fclose_004b21e0)();\n      return uVar6;\n    }\n    iVar1 = DAT_004b6068;\n    if (iVar4 == -1) {\n      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar5 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }\n    while( true ) {\n      if (iVar1 == 0) goto LAB_0045ce00;\n      if (*(int *)(iVar1 + 0x10) == iVar4) break;\n      iVar1 = *(int *)(iVar1 + 0x1c);\n    }\n    *(undefined4 *)(iVar1 + 0x10) = 0xffffffff;\n    *(undefined4 *)(iVar1 + 0x14) = local_128;\n    iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0);\n  } while( true );" do (compound_statement "{\n    puVar2 = PTR_waitpid_004b2308;\n    if ((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);\n      if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n                    /* WARNING: Could not recover jumptable at 0x0045cf04. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar6 = (*(code *)PTR_fclose_004b21e0)();\n      return uVar6;\n    }\n    iVar1 = DAT_004b6068;\n    if (iVar4 == -1) {\n      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar5 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }\n    while( true ) {\n      if (iVar1 == 0) goto LAB_0045ce00;\n      if (*(int *)(iVar1 + 0x10) == iVar4) break;\n      iVar1 = *(int *)(iVar1 + 0x1c);\n    }\n    *(undefined4 *)(iVar1 + 0x10) = 0xffffffff;\n    *(undefined4 *)(iVar1 + 0x14) = local_128;\n    iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0);\n  }" { (expression_statement "puVar2 = PTR_waitpid_004b2308;" (assignment_expression "puVar2 = PTR_waitpid_004b2308" identifier = identifier) ;) (if_statement "if ((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);\n      if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n                    /* WARNING: Could not recover jumptable at 0x0045cf04. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar6 = (*(code *)PTR_fclose_004b21e0)();\n      return uVar6;\n    }" if (parenthesized_expression "((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4))))" ( (binary_expression "(iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))" (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) || (parenthesized_expression "((param_1 != 0 && (param_1 == iVar4)))" ( (parenthesized_expression "(param_1 != 0 && (param_1 == iVar4))" ( (binary_expression "param_1 != 0 && (param_1 == iVar4)" (binary_expression "param_1 != 0" identifier != number_literal) && (parenthesized_expression "(param_1 == iVar4)" ( (binary_expression "param_1 == iVar4" identifier == identifier) ))) )) ))) )) (compound_statement "{\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);\n      if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n                    /* WARNING: Could not recover jumptable at 0x0045cf04. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar6 = (*(code *)PTR_fclose_004b21e0)();\n      return uVar6;\n    }" { (labeled_statement "LAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);" statement_identifier : (expression_statement "(*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);" (call_expression "(*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0)" (parenthesized_expression "(*(code *)PTR_sigprocmask_004b23ac)" ( (pointer_expression "*(code *)PTR_sigprocmask_004b23ac" * (cast_expression "(code *)PTR_sigprocmask_004b23ac" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(3,auStack_a4,0)" ( number_literal , identifier , number_literal ))) ;)) (if_statement "if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }" if (parenthesized_expression "(local_24 == *(int *)puVar3)" ( (binary_expression "local_24 == *(int *)puVar3" identifier == (pointer_expression "*(int *)puVar3" * (cast_expression "(int *)puVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n        return local_128;\n      }" { (return_statement "return local_128;" return identifier ;) })) (expression_statement "(*(code *)PTR___stack_chk_fail_004b2348)();" (call_expression "(*(code *)PTR___stack_chk_fail_004b2348)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_004b2348)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_004b2348" * (cast_expression "(code *)PTR___stack_chk_fail_004b2348" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) comment comment (expression_statement "uVar6 = (*(code *)PTR_fclose_004b21e0)();" (assignment_expression "uVar6 = (*(code *)PTR_fclose_004b21e0)()" identifier = (call_expression "(*(code *)PTR_fclose_004b21e0)()" (parenthesized_expression "(*(code *)PTR_fclose_004b21e0)" ( (pointer_expression "*(code *)PTR_fclose_004b21e0" * (cast_expression "(code *)PTR_fclose_004b21e0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (return_statement "return uVar6;" return identifier ;) })) (expression_statement "iVar1 = DAT_004b6068;" (assignment_expression "iVar1 = DAT_004b6068" identifier = identifier) ;) (if_statement "if (iVar4 == -1) {\n      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar5 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }" if (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) (compound_statement "{\n      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar5 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }" { (expression_statement "piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();" (assignment_expression "piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_004b2250)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_004b2250)()" (parenthesized_expression "(*(code *)PTR___errno_location_004b2250)" ( (pointer_expression "*(code *)PTR___errno_location_004b2250" * (cast_expression "(code *)PTR___errno_location_004b2250" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (if_statement "if (*piVar5 == 10) goto LAB_0045ce84;" if (parenthesized_expression "(*piVar5 == 10)" ( (binary_expression "*piVar5 == 10" (pointer_expression "*piVar5" * identifier) == number_literal) )) (goto_statement "goto LAB_0045ce84;" goto statement_identifier ;)) (goto_statement "goto LAB_0045ce00;" goto statement_identifier ;) })) (while_statement "while( true ) {\n      if (iVar1 == 0) goto LAB_0045ce00;\n      if (*(int *)(iVar1 + 0x10) == iVar4) break;\n      iVar1 = *(int *)(iVar1 + 0x1c);\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      if (iVar1 == 0) goto LAB_0045ce00;\n      if (*(int *)(iVar1 + 0x10) == iVar4) break;\n      iVar1 = *(int *)(iVar1 + 0x1c);\n    }" { (if_statement "if (iVar1 == 0) goto LAB_0045ce00;" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0045ce00;" goto statement_identifier ;)) (if_statement "if (*(int *)(iVar1 + 0x10) == iVar4) break;" if (parenthesized_expression "(*(int *)(iVar1 + 0x10) == iVar4)" ( (binary_expression "*(int *)(iVar1 + 0x10) == iVar4" (pointer_expression "*(int *)(iVar1 + 0x10)" * (cast_expression "(int *)(iVar1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) )))) == identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar1 = *(int *)(iVar1 + 0x1c);" (assignment_expression "iVar1 = *(int *)(iVar1 + 0x1c)" identifier = (pointer_expression "*(int *)(iVar1 + 0x1c)" * (cast_expression "(int *)(iVar1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x1c)" ( (binary_expression "iVar1 + 0x1c" identifier + number_literal) ))))) ;) })) (expression_statement "*(undefined4 *)(iVar1 + 0x10) = 0xffffffff;" (assignment_expression "*(undefined4 *)(iVar1 + 0x10) = 0xffffffff" (pointer_expression "*(undefined4 *)(iVar1 + 0x10)" * (cast_expression "(undefined4 *)(iVar1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x14) = local_128;" (assignment_expression "*(undefined4 *)(iVar1 + 0x14) = local_128" (pointer_expression "*(undefined4 *)(iVar1 + 0x14)" * (cast_expression "(undefined4 *)(iVar1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x14)" ( (binary_expression "iVar1 + 0x14" identifier + number_literal) )))) = identifier) ;) (expression_statement "iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0);" (assignment_expression "iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0)" identifier = (call_expression "(*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0)" (parenthesized_expression "(*(code *)puVar2)" ( (pointer_expression "*(code *)puVar2" * (cast_expression "(code *)puVar2" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0xffffffff,&local_128,param_1 == 0)" ( number_literal , (pointer_expression "&local_128" & identifier) , (binary_expression "param_1 == 0" identifier == number_literal) )))) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nint wait_any(int interesting)\n\n{\n  redirect *prVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int iVar4;\n  int iVar5;\n  int *piVar6;\n  int status;\n  sigset_t set;\n  sigset_t oldset;\n  \n  puVar3 = PTR___stack_chk_guard_004b238c;\n  status = 0;\n  iVar4 = *(int *)PTR___stack_chk_guard_004b238c;\n  (*(code *)PTR_sigemptyset_004b2208)(&set);\n  (*(code *)PTR_sigaddset_004b2270)(&set,2);\n  (*(code *)PTR_sigaddset_004b2270)(&set,1);\n  (*(code *)PTR_sigaddset_004b2270)(&set,3);\n  (*(code *)PTR_sigprocmask_004b23ac)(1,&set,&oldset);\nLAB_0045ce00:\n  iVar5 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&status,interesting == 0);\n  do {\n    puVar2 = PTR_waitpid_004b2308;\n    if ((iVar5 == 0) || ((interesting != 0 && (interesting == iVar5)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,&oldset,0);\n      if (iVar4 == *(int *)puVar3) {\n        return status;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n      iVar4 = (*(code *)PTR_fclose_004b21e0)();\n      return iVar4;\n    }\n    prVar1 = red_head;\n    if (iVar5 == -1) {\n      piVar6 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar6 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }\n    while( true ) {\n      if (prVar1 == (redirect *)0x0) goto LAB_0045ce00;\n      if (prVar1->pid == iVar5) break;\n      prVar1 = prVar1->next;\n    }\n    prVar1->pid = -1;\n    prVar1->status = status;\n    iVar5 = (*(code *)puVar2)(0xffffffff,&status,interesting == 0);\n  } while( true );\n}\n\n" comment (function_definition "int wait_any(int interesting)\n\n{\n  redirect *prVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int iVar4;\n  int iVar5;\n  int *piVar6;\n  int status;\n  sigset_t set;\n  sigset_t oldset;\n  \n  puVar3 = PTR___stack_chk_guard_004b238c;\n  status = 0;\n  iVar4 = *(int *)PTR___stack_chk_guard_004b238c;\n  (*(code *)PTR_sigemptyset_004b2208)(&set);\n  (*(code *)PTR_sigaddset_004b2270)(&set,2);\n  (*(code *)PTR_sigaddset_004b2270)(&set,1);\n  (*(code *)PTR_sigaddset_004b2270)(&set,3);\n  (*(code *)PTR_sigprocmask_004b23ac)(1,&set,&oldset);\nLAB_0045ce00:\n  iVar5 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&status,interesting == 0);\n  do {\n    puVar2 = PTR_waitpid_004b2308;\n    if ((iVar5 == 0) || ((interesting != 0 && (interesting == iVar5)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,&oldset,0);\n      if (iVar4 == *(int *)puVar3) {\n        return status;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n      iVar4 = (*(code *)PTR_fclose_004b21e0)();\n      return iVar4;\n    }\n    prVar1 = red_head;\n    if (iVar5 == -1) {\n      piVar6 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar6 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }\n    while( true ) {\n      if (prVar1 == (redirect *)0x0) goto LAB_0045ce00;\n      if (prVar1->pid == iVar5) break;\n      prVar1 = prVar1->next;\n    }\n    prVar1->pid = -1;\n    prVar1->status = status;\n    iVar5 = (*(code *)puVar2)(0xffffffff,&status,interesting == 0);\n  } while( true );\n}" primitive_type (function_declarator "wait_any(int interesting)" identifier (parameter_list "(int interesting)" ( (parameter_declaration "int interesting" primitive_type identifier) ))) (compound_statement "{\n  redirect *prVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int iVar4;\n  int iVar5;\n  int *piVar6;\n  int status;\n  sigset_t set;\n  sigset_t oldset;\n  \n  puVar3 = PTR___stack_chk_guard_004b238c;\n  status = 0;\n  iVar4 = *(int *)PTR___stack_chk_guard_004b238c;\n  (*(code *)PTR_sigemptyset_004b2208)(&set);\n  (*(code *)PTR_sigaddset_004b2270)(&set,2);\n  (*(code *)PTR_sigaddset_004b2270)(&set,1);\n  (*(code *)PTR_sigaddset_004b2270)(&set,3);\n  (*(code *)PTR_sigprocmask_004b23ac)(1,&set,&oldset);\nLAB_0045ce00:\n  iVar5 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&status,interesting == 0);\n  do {\n    puVar2 = PTR_waitpid_004b2308;\n    if ((iVar5 == 0) || ((interesting != 0 && (interesting == iVar5)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,&oldset,0);\n      if (iVar4 == *(int *)puVar3) {\n        return status;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n      iVar4 = (*(code *)PTR_fclose_004b21e0)();\n      return iVar4;\n    }\n    prVar1 = red_head;\n    if (iVar5 == -1) {\n      piVar6 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar6 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }\n    while( true ) {\n      if (prVar1 == (redirect *)0x0) goto LAB_0045ce00;\n      if (prVar1->pid == iVar5) break;\n      prVar1 = prVar1->next;\n    }\n    prVar1->pid = -1;\n    prVar1->status = status;\n    iVar5 = (*(code *)puVar2)(0xffffffff,&status,interesting == 0);\n  } while( true );\n}" { (declaration "redirect *prVar1;" type_identifier (pointer_declarator "*prVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int *piVar6;" primitive_type (pointer_declarator "*piVar6" * identifier) ;) (declaration "int status;" primitive_type identifier ;) (declaration "sigset_t set;" type_identifier identifier ;) (declaration "sigset_t oldset;" type_identifier identifier ;) (expression_statement "puVar3 = PTR___stack_chk_guard_004b238c;" (assignment_expression "puVar3 = PTR___stack_chk_guard_004b238c" identifier = identifier) ;) (expression_statement "status = 0;" (assignment_expression "status = 0" identifier = number_literal) ;) (expression_statement "iVar4 = *(int *)PTR___stack_chk_guard_004b238c;" (assignment_expression "iVar4 = *(int *)PTR___stack_chk_guard_004b238c" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_004b238c" * (cast_expression "(int *)PTR___stack_chk_guard_004b238c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "(*(code *)PTR_sigemptyset_004b2208)(&set);" (call_expression "(*(code *)PTR_sigemptyset_004b2208)(&set)" (parenthesized_expression "(*(code *)PTR_sigemptyset_004b2208)" ( (pointer_expression "*(code *)PTR_sigemptyset_004b2208" * (cast_expression "(code *)PTR_sigemptyset_004b2208" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(&set)" ( (pointer_expression "&set" & identifier) ))) ;) (expression_statement "(*(code *)PTR_sigaddset_004b2270)(&set,2);" (call_expression "(*(code *)PTR_sigaddset_004b2270)(&set,2)" (parenthesized_expression "(*(code *)PTR_sigaddset_004b2270)" ( (pointer_expression "*(code *)PTR_sigaddset_004b2270" * (cast_expression "(code *)PTR_sigaddset_004b2270" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(&set,2)" ( (pointer_expression "&set" & identifier) , number_literal ))) ;) (expression_statement "(*(code *)PTR_sigaddset_004b2270)(&set,1);" (call_expression "(*(code *)PTR_sigaddset_004b2270)(&set,1)" (parenthesized_expression "(*(code *)PTR_sigaddset_004b2270)" ( (pointer_expression "*(code *)PTR_sigaddset_004b2270" * (cast_expression "(code *)PTR_sigaddset_004b2270" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(&set,1)" ( (pointer_expression "&set" & identifier) , number_literal ))) ;) (expression_statement "(*(code *)PTR_sigaddset_004b2270)(&set,3);" (call_expression "(*(code *)PTR_sigaddset_004b2270)(&set,3)" (parenthesized_expression "(*(code *)PTR_sigaddset_004b2270)" ( (pointer_expression "*(code *)PTR_sigaddset_004b2270" * (cast_expression "(code *)PTR_sigaddset_004b2270" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(&set,3)" ( (pointer_expression "&set" & identifier) , number_literal ))) ;) (expression_statement "(*(code *)PTR_sigprocmask_004b23ac)(1,&set,&oldset);" (call_expression "(*(code *)PTR_sigprocmask_004b23ac)(1,&set,&oldset)" (parenthesized_expression "(*(code *)PTR_sigprocmask_004b23ac)" ( (pointer_expression "*(code *)PTR_sigprocmask_004b23ac" * (cast_expression "(code *)PTR_sigprocmask_004b23ac" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(1,&set,&oldset)" ( number_literal , (pointer_expression "&set" & identifier) , (pointer_expression "&oldset" & identifier) ))) ;) (labeled_statement "LAB_0045ce00:\n  iVar5 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&status,interesting == 0);" statement_identifier : (expression_statement "iVar5 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&status,interesting == 0);" (assignment_expression "iVar5 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&status,interesting == 0)" identifier = (call_expression "(*(code *)PTR_waitpid_004b2308)(0xffffffff,&status,interesting == 0)" (parenthesized_expression "(*(code *)PTR_waitpid_004b2308)" ( (pointer_expression "*(code *)PTR_waitpid_004b2308" * (cast_expression "(code *)PTR_waitpid_004b2308" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0xffffffff,&status,interesting == 0)" ( number_literal , (pointer_expression "&status" & identifier) , (binary_expression "interesting == 0" identifier == number_literal) )))) ;)) (do_statement "do {\n    puVar2 = PTR_waitpid_004b2308;\n    if ((iVar5 == 0) || ((interesting != 0 && (interesting == iVar5)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,&oldset,0);\n      if (iVar4 == *(int *)puVar3) {\n        return status;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n      iVar4 = (*(code *)PTR_fclose_004b21e0)();\n      return iVar4;\n    }\n    prVar1 = red_head;\n    if (iVar5 == -1) {\n      piVar6 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar6 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }\n    while( true ) {\n      if (prVar1 == (redirect *)0x0) goto LAB_0045ce00;\n      if (prVar1->pid == iVar5) break;\n      prVar1 = prVar1->next;\n    }\n    prVar1->pid = -1;\n    prVar1->status = status;\n    iVar5 = (*(code *)puVar2)(0xffffffff,&status,interesting == 0);\n  } while( true );" do (compound_statement "{\n    puVar2 = PTR_waitpid_004b2308;\n    if ((iVar5 == 0) || ((interesting != 0 && (interesting == iVar5)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,&oldset,0);\n      if (iVar4 == *(int *)puVar3) {\n        return status;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n      iVar4 = (*(code *)PTR_fclose_004b21e0)();\n      return iVar4;\n    }\n    prVar1 = red_head;\n    if (iVar5 == -1) {\n      piVar6 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar6 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }\n    while( true ) {\n      if (prVar1 == (redirect *)0x0) goto LAB_0045ce00;\n      if (prVar1->pid == iVar5) break;\n      prVar1 = prVar1->next;\n    }\n    prVar1->pid = -1;\n    prVar1->status = status;\n    iVar5 = (*(code *)puVar2)(0xffffffff,&status,interesting == 0);\n  }" { (expression_statement "puVar2 = PTR_waitpid_004b2308;" (assignment_expression "puVar2 = PTR_waitpid_004b2308" identifier = identifier) ;) (if_statement "if ((iVar5 == 0) || ((interesting != 0 && (interesting == iVar5)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,&oldset,0);\n      if (iVar4 == *(int *)puVar3) {\n        return status;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n      iVar4 = (*(code *)PTR_fclose_004b21e0)();\n      return iVar4;\n    }" if (parenthesized_expression "((iVar5 == 0) || ((interesting != 0 && (interesting == iVar5))))" ( (binary_expression "(iVar5 == 0) || ((interesting != 0 && (interesting == iVar5)))" (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) || (parenthesized_expression "((interesting != 0 && (interesting == iVar5)))" ( (parenthesized_expression "(interesting != 0 && (interesting == iVar5))" ( (binary_expression "interesting != 0 && (interesting == iVar5)" (binary_expression "interesting != 0" identifier != number_literal) && (parenthesized_expression "(interesting == iVar5)" ( (binary_expression "interesting == iVar5" identifier == identifier) ))) )) ))) )) (compound_statement "{\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,&oldset,0);\n      if (iVar4 == *(int *)puVar3) {\n        return status;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n      iVar4 = (*(code *)PTR_fclose_004b21e0)();\n      return iVar4;\n    }" { (labeled_statement "LAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,&oldset,0);" statement_identifier : (expression_statement "(*(code *)PTR_sigprocmask_004b23ac)(3,&oldset,0);" (call_expression "(*(code *)PTR_sigprocmask_004b23ac)(3,&oldset,0)" (parenthesized_expression "(*(code *)PTR_sigprocmask_004b23ac)" ( (pointer_expression "*(code *)PTR_sigprocmask_004b23ac" * (cast_expression "(code *)PTR_sigprocmask_004b23ac" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(3,&oldset,0)" ( number_literal , (pointer_expression "&oldset" & identifier) , number_literal ))) ;)) (if_statement "if (iVar4 == *(int *)puVar3) {\n        return status;\n      }" if (parenthesized_expression "(iVar4 == *(int *)puVar3)" ( (binary_expression "iVar4 == *(int *)puVar3" identifier == (pointer_expression "*(int *)puVar3" * (cast_expression "(int *)puVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n        return status;\n      }" { (return_statement "return status;" return identifier ;) })) (expression_statement "(*(code *)PTR___stack_chk_fail_004b2348)();" (call_expression "(*(code *)PTR___stack_chk_fail_004b2348)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_004b2348)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_004b2348" * (cast_expression "(code *)PTR___stack_chk_fail_004b2348" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "iVar4 = (*(code *)PTR_fclose_004b21e0)();" (assignment_expression "iVar4 = (*(code *)PTR_fclose_004b21e0)()" identifier = (call_expression "(*(code *)PTR_fclose_004b21e0)()" (parenthesized_expression "(*(code *)PTR_fclose_004b21e0)" ( (pointer_expression "*(code *)PTR_fclose_004b21e0" * (cast_expression "(code *)PTR_fclose_004b21e0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (return_statement "return iVar4;" return identifier ;) })) (expression_statement "prVar1 = red_head;" (assignment_expression "prVar1 = red_head" identifier = identifier) ;) (if_statement "if (iVar5 == -1) {\n      piVar6 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar6 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }" if (parenthesized_expression "(iVar5 == -1)" ( (binary_expression "iVar5 == -1" identifier == number_literal) )) (compound_statement "{\n      piVar6 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar6 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }" { (expression_statement "piVar6 = (int *)(*(code *)PTR___errno_location_004b2250)();" (assignment_expression "piVar6 = (int *)(*(code *)PTR___errno_location_004b2250)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_004b2250)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_004b2250)()" (parenthesized_expression "(*(code *)PTR___errno_location_004b2250)" ( (pointer_expression "*(code *)PTR___errno_location_004b2250" * (cast_expression "(code *)PTR___errno_location_004b2250" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (if_statement "if (*piVar6 == 10) goto LAB_0045ce84;" if (parenthesized_expression "(*piVar6 == 10)" ( (binary_expression "*piVar6 == 10" (pointer_expression "*piVar6" * identifier) == number_literal) )) (goto_statement "goto LAB_0045ce84;" goto statement_identifier ;)) (goto_statement "goto LAB_0045ce00;" goto statement_identifier ;) })) (while_statement "while( true ) {\n      if (prVar1 == (redirect *)0x0) goto LAB_0045ce00;\n      if (prVar1->pid == iVar5) break;\n      prVar1 = prVar1->next;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      if (prVar1 == (redirect *)0x0) goto LAB_0045ce00;\n      if (prVar1->pid == iVar5) break;\n      prVar1 = prVar1->next;\n    }" { (if_statement "if (prVar1 == (redirect *)0x0) goto LAB_0045ce00;" if (parenthesized_expression "(prVar1 == (redirect *)0x0)" ( (binary_expression "prVar1 == (redirect *)0x0" identifier == (cast_expression "(redirect *)0x0" ( (type_descriptor "redirect *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0045ce00;" goto statement_identifier ;)) (if_statement "if (prVar1->pid == iVar5) break;" if (parenthesized_expression "(prVar1->pid == iVar5)" ( (binary_expression "prVar1->pid == iVar5" (field_expression "prVar1->pid" identifier -> field_identifier) == identifier) )) (break_statement "break;" break ;)) (expression_statement "prVar1 = prVar1->next;" (assignment_expression "prVar1 = prVar1->next" identifier = (field_expression "prVar1->next" identifier -> field_identifier)) ;) })) (expression_statement "prVar1->pid = -1;" (assignment_expression "prVar1->pid = -1" (field_expression "prVar1->pid" identifier -> field_identifier) = number_literal) ;) (expression_statement "prVar1->status = status;" (assignment_expression "prVar1->status = status" (field_expression "prVar1->status" identifier -> field_identifier) = identifier) ;) (expression_statement "iVar5 = (*(code *)puVar2)(0xffffffff,&status,interesting == 0);" (assignment_expression "iVar5 = (*(code *)puVar2)(0xffffffff,&status,interesting == 0)" identifier = (call_expression "(*(code *)puVar2)(0xffffffff,&status,interesting == 0)" (parenthesized_expression "(*(code *)puVar2)" ( (pointer_expression "*(code *)puVar2" * (cast_expression "(code *)puVar2" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0xffffffff,&status,interesting == 0)" ( number_literal , (pointer_expression "&status" & identifier) , (binary_expression "interesting == 0" identifier == number_literal) )))) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "undefined4 FUN_0045cd34(int param_1)\n\n{\n  int iVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  undefined4 local_128;\n  undefined1 auStack_124 [128];\n  undefined1 auStack_a4 [128];\n  int local_24;\n  \n  puVar3 = PTR___stack_chk_guard_004b238c;\n  local_128 = 0;\n  local_24 = *(int *)PTR___stack_chk_guard_004b238c;\n  (*(code *)PTR_sigemptyset_004b2208)(auStack_124);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,2);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,1);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,3);\n  (*(code *)PTR_sigprocmask_004b23ac)(1,auStack_124,auStack_a4);\nLAB_0045ce00:\n  iVar4 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0);\n  do {\n    puVar2 = PTR_waitpid_004b2308;\n    if ((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);\n      if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n                    \n                    \n      uVar6 = (*(code *)PTR_fclose_004b21e0)();\n      return uVar6;\n    }\n    iVar1 = DAT_004b6068;\n    if (iVar4 == -1) {\n      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar5 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }\n    while( true ) {\n      if (iVar1 == 0) goto LAB_0045ce00;\n      if (*(int *)(iVar1 + 0x10) == iVar4) break;\n      iVar1 = *(int *)(iVar1 + 0x1c);\n    }\n    *(undefined4 *)(iVar1 + 0x10) = 0xffffffff;\n    *(undefined4 *)(iVar1 + 0x14) = local_128;\n    iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0);\n  } while( true );\n}\n\n" (function_definition "undefined4 FUN_0045cd34(int param_1)\n\n{\n  int iVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  undefined4 local_128;\n  undefined1 auStack_124 [128];\n  undefined1 auStack_a4 [128];\n  int local_24;\n  \n  puVar3 = PTR___stack_chk_guard_004b238c;\n  local_128 = 0;\n  local_24 = *(int *)PTR___stack_chk_guard_004b238c;\n  (*(code *)PTR_sigemptyset_004b2208)(auStack_124);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,2);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,1);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,3);\n  (*(code *)PTR_sigprocmask_004b23ac)(1,auStack_124,auStack_a4);\nLAB_0045ce00:\n  iVar4 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0);\n  do {\n    puVar2 = PTR_waitpid_004b2308;\n    if ((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);\n      if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n                    \n                    \n      uVar6 = (*(code *)PTR_fclose_004b21e0)();\n      return uVar6;\n    }\n    iVar1 = DAT_004b6068;\n    if (iVar4 == -1) {\n      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar5 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }\n    while( true ) {\n      if (iVar1 == 0) goto LAB_0045ce00;\n      if (*(int *)(iVar1 + 0x10) == iVar4) break;\n      iVar1 = *(int *)(iVar1 + 0x1c);\n    }\n    *(undefined4 *)(iVar1 + 0x10) = 0xffffffff;\n    *(undefined4 *)(iVar1 + 0x14) = local_128;\n    iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0);\n  } while( true );\n}" type_identifier (function_declarator "FUN_0045cd34(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  undefined4 local_128;\n  undefined1 auStack_124 [128];\n  undefined1 auStack_a4 [128];\n  int local_24;\n  \n  puVar3 = PTR___stack_chk_guard_004b238c;\n  local_128 = 0;\n  local_24 = *(int *)PTR___stack_chk_guard_004b238c;\n  (*(code *)PTR_sigemptyset_004b2208)(auStack_124);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,2);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,1);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,3);\n  (*(code *)PTR_sigprocmask_004b23ac)(1,auStack_124,auStack_a4);\nLAB_0045ce00:\n  iVar4 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0);\n  do {\n    puVar2 = PTR_waitpid_004b2308;\n    if ((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);\n      if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n                    \n                    \n      uVar6 = (*(code *)PTR_fclose_004b21e0)();\n      return uVar6;\n    }\n    iVar1 = DAT_004b6068;\n    if (iVar4 == -1) {\n      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar5 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }\n    while( true ) {\n      if (iVar1 == 0) goto LAB_0045ce00;\n      if (*(int *)(iVar1 + 0x10) == iVar4) break;\n      iVar1 = *(int *)(iVar1 + 0x1c);\n    }\n    *(undefined4 *)(iVar1 + 0x10) = 0xffffffff;\n    *(undefined4 *)(iVar1 + 0x14) = local_128;\n    iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0);\n  } while( true );\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (declaration "undefined4 local_128;" type_identifier identifier ;) (declaration "undefined1 auStack_124 [128];" type_identifier (array_declarator "auStack_124 [128]" identifier [ number_literal ]) ;) (declaration "undefined1 auStack_a4 [128];" type_identifier (array_declarator "auStack_a4 [128]" identifier [ number_literal ]) ;) (declaration "int local_24;" primitive_type identifier ;) (expression_statement "puVar3 = PTR___stack_chk_guard_004b238c;" (assignment_expression "puVar3 = PTR___stack_chk_guard_004b238c" identifier = identifier) ;) (expression_statement "local_128 = 0;" (assignment_expression "local_128 = 0" identifier = number_literal) ;) (expression_statement "local_24 = *(int *)PTR___stack_chk_guard_004b238c;" (assignment_expression "local_24 = *(int *)PTR___stack_chk_guard_004b238c" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_004b238c" * (cast_expression "(int *)PTR___stack_chk_guard_004b238c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "(*(code *)PTR_sigemptyset_004b2208)(auStack_124);" (call_expression "(*(code *)PTR_sigemptyset_004b2208)(auStack_124)" (parenthesized_expression "(*(code *)PTR_sigemptyset_004b2208)" ( (pointer_expression "*(code *)PTR_sigemptyset_004b2208" * (cast_expression "(code *)PTR_sigemptyset_004b2208" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_124)" ( identifier ))) ;) (expression_statement "(*(code *)PTR_sigaddset_004b2270)(auStack_124,2);" (call_expression "(*(code *)PTR_sigaddset_004b2270)(auStack_124,2)" (parenthesized_expression "(*(code *)PTR_sigaddset_004b2270)" ( (pointer_expression "*(code *)PTR_sigaddset_004b2270" * (cast_expression "(code *)PTR_sigaddset_004b2270" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_124,2)" ( identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_sigaddset_004b2270)(auStack_124,1);" (call_expression "(*(code *)PTR_sigaddset_004b2270)(auStack_124,1)" (parenthesized_expression "(*(code *)PTR_sigaddset_004b2270)" ( (pointer_expression "*(code *)PTR_sigaddset_004b2270" * (cast_expression "(code *)PTR_sigaddset_004b2270" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_124,1)" ( identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_sigaddset_004b2270)(auStack_124,3);" (call_expression "(*(code *)PTR_sigaddset_004b2270)(auStack_124,3)" (parenthesized_expression "(*(code *)PTR_sigaddset_004b2270)" ( (pointer_expression "*(code *)PTR_sigaddset_004b2270" * (cast_expression "(code *)PTR_sigaddset_004b2270" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_124,3)" ( identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_sigprocmask_004b23ac)(1,auStack_124,auStack_a4);" (call_expression "(*(code *)PTR_sigprocmask_004b23ac)(1,auStack_124,auStack_a4)" (parenthesized_expression "(*(code *)PTR_sigprocmask_004b23ac)" ( (pointer_expression "*(code *)PTR_sigprocmask_004b23ac" * (cast_expression "(code *)PTR_sigprocmask_004b23ac" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(1,auStack_124,auStack_a4)" ( number_literal , identifier , identifier ))) ;) (labeled_statement "LAB_0045ce00:\n  iVar4 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0);" statement_identifier : (expression_statement "iVar4 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0);" (assignment_expression "iVar4 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0)" identifier = (call_expression "(*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0)" (parenthesized_expression "(*(code *)PTR_waitpid_004b2308)" ( (pointer_expression "*(code *)PTR_waitpid_004b2308" * (cast_expression "(code *)PTR_waitpid_004b2308" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0xffffffff,&local_128,param_1 == 0)" ( number_literal , (pointer_expression "&local_128" & identifier) , (binary_expression "param_1 == 0" identifier == number_literal) )))) ;)) (do_statement "do {\n    puVar2 = PTR_waitpid_004b2308;\n    if ((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);\n      if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n                    \n                    \n      uVar6 = (*(code *)PTR_fclose_004b21e0)();\n      return uVar6;\n    }\n    iVar1 = DAT_004b6068;\n    if (iVar4 == -1) {\n      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar5 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }\n    while( true ) {\n      if (iVar1 == 0) goto LAB_0045ce00;\n      if (*(int *)(iVar1 + 0x10) == iVar4) break;\n      iVar1 = *(int *)(iVar1 + 0x1c);\n    }\n    *(undefined4 *)(iVar1 + 0x10) = 0xffffffff;\n    *(undefined4 *)(iVar1 + 0x14) = local_128;\n    iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0);\n  } while( true );" do (compound_statement "{\n    puVar2 = PTR_waitpid_004b2308;\n    if ((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);\n      if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n                    \n                    \n      uVar6 = (*(code *)PTR_fclose_004b21e0)();\n      return uVar6;\n    }\n    iVar1 = DAT_004b6068;\n    if (iVar4 == -1) {\n      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar5 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }\n    while( true ) {\n      if (iVar1 == 0) goto LAB_0045ce00;\n      if (*(int *)(iVar1 + 0x10) == iVar4) break;\n      iVar1 = *(int *)(iVar1 + 0x1c);\n    }\n    *(undefined4 *)(iVar1 + 0x10) = 0xffffffff;\n    *(undefined4 *)(iVar1 + 0x14) = local_128;\n    iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0);\n  }" { (expression_statement "puVar2 = PTR_waitpid_004b2308;" (assignment_expression "puVar2 = PTR_waitpid_004b2308" identifier = identifier) ;) (if_statement "if ((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);\n      if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n                    \n                    \n      uVar6 = (*(code *)PTR_fclose_004b21e0)();\n      return uVar6;\n    }" if (parenthesized_expression "((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4))))" ( (binary_expression "(iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))" (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) || (parenthesized_expression "((param_1 != 0 && (param_1 == iVar4)))" ( (parenthesized_expression "(param_1 != 0 && (param_1 == iVar4))" ( (binary_expression "param_1 != 0 && (param_1 == iVar4)" (binary_expression "param_1 != 0" identifier != number_literal) && (parenthesized_expression "(param_1 == iVar4)" ( (binary_expression "param_1 == iVar4" identifier == identifier) ))) )) ))) )) (compound_statement "{\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);\n      if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n                    \n                    \n      uVar6 = (*(code *)PTR_fclose_004b21e0)();\n      return uVar6;\n    }" { (labeled_statement "LAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);" statement_identifier : (expression_statement "(*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);" (call_expression "(*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0)" (parenthesized_expression "(*(code *)PTR_sigprocmask_004b23ac)" ( (pointer_expression "*(code *)PTR_sigprocmask_004b23ac" * (cast_expression "(code *)PTR_sigprocmask_004b23ac" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(3,auStack_a4,0)" ( number_literal , identifier , number_literal ))) ;)) (if_statement "if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }" if (parenthesized_expression "(local_24 == *(int *)puVar3)" ( (binary_expression "local_24 == *(int *)puVar3" identifier == (pointer_expression "*(int *)puVar3" * (cast_expression "(int *)puVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n        return local_128;\n      }" { (return_statement "return local_128;" return identifier ;) })) (expression_statement "(*(code *)PTR___stack_chk_fail_004b2348)();" (call_expression "(*(code *)PTR___stack_chk_fail_004b2348)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_004b2348)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_004b2348" * (cast_expression "(code *)PTR___stack_chk_fail_004b2348" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "uVar6 = (*(code *)PTR_fclose_004b21e0)();" (assignment_expression "uVar6 = (*(code *)PTR_fclose_004b21e0)()" identifier = (call_expression "(*(code *)PTR_fclose_004b21e0)()" (parenthesized_expression "(*(code *)PTR_fclose_004b21e0)" ( (pointer_expression "*(code *)PTR_fclose_004b21e0" * (cast_expression "(code *)PTR_fclose_004b21e0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (return_statement "return uVar6;" return identifier ;) })) (expression_statement "iVar1 = DAT_004b6068;" (assignment_expression "iVar1 = DAT_004b6068" identifier = identifier) ;) (if_statement "if (iVar4 == -1) {\n      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar5 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }" if (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) (compound_statement "{\n      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar5 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }" { (expression_statement "piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();" (assignment_expression "piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_004b2250)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_004b2250)()" (parenthesized_expression "(*(code *)PTR___errno_location_004b2250)" ( (pointer_expression "*(code *)PTR___errno_location_004b2250" * (cast_expression "(code *)PTR___errno_location_004b2250" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (if_statement "if (*piVar5 == 10) goto LAB_0045ce84;" if (parenthesized_expression "(*piVar5 == 10)" ( (binary_expression "*piVar5 == 10" (pointer_expression "*piVar5" * identifier) == number_literal) )) (goto_statement "goto LAB_0045ce84;" goto statement_identifier ;)) (goto_statement "goto LAB_0045ce00;" goto statement_identifier ;) })) (while_statement "while( true ) {\n      if (iVar1 == 0) goto LAB_0045ce00;\n      if (*(int *)(iVar1 + 0x10) == iVar4) break;\n      iVar1 = *(int *)(iVar1 + 0x1c);\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      if (iVar1 == 0) goto LAB_0045ce00;\n      if (*(int *)(iVar1 + 0x10) == iVar4) break;\n      iVar1 = *(int *)(iVar1 + 0x1c);\n    }" { (if_statement "if (iVar1 == 0) goto LAB_0045ce00;" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0045ce00;" goto statement_identifier ;)) (if_statement "if (*(int *)(iVar1 + 0x10) == iVar4) break;" if (parenthesized_expression "(*(int *)(iVar1 + 0x10) == iVar4)" ( (binary_expression "*(int *)(iVar1 + 0x10) == iVar4" (pointer_expression "*(int *)(iVar1 + 0x10)" * (cast_expression "(int *)(iVar1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) )))) == identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar1 = *(int *)(iVar1 + 0x1c);" (assignment_expression "iVar1 = *(int *)(iVar1 + 0x1c)" identifier = (pointer_expression "*(int *)(iVar1 + 0x1c)" * (cast_expression "(int *)(iVar1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x1c)" ( (binary_expression "iVar1 + 0x1c" identifier + number_literal) ))))) ;) })) (expression_statement "*(undefined4 *)(iVar1 + 0x10) = 0xffffffff;" (assignment_expression "*(undefined4 *)(iVar1 + 0x10) = 0xffffffff" (pointer_expression "*(undefined4 *)(iVar1 + 0x10)" * (cast_expression "(undefined4 *)(iVar1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x14) = local_128;" (assignment_expression "*(undefined4 *)(iVar1 + 0x14) = local_128" (pointer_expression "*(undefined4 *)(iVar1 + 0x14)" * (cast_expression "(undefined4 *)(iVar1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x14)" ( (binary_expression "iVar1 + 0x14" identifier + number_literal) )))) = identifier) ;) (expression_statement "iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0);" (assignment_expression "iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0)" identifier = (call_expression "(*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0)" (parenthesized_expression "(*(code *)puVar2)" ( (pointer_expression "*(code *)puVar2" * (cast_expression "(code *)puVar2" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0xffffffff,&local_128,param_1 == 0)" ( number_literal , (pointer_expression "&local_128" & identifier) , (binary_expression "param_1 == 0" identifier == number_literal) )))) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , LIT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , LIT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , LIT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT , IDENT , IDENT ))) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT , (pointer_expression & IDENT) , (binary_expression IDENT == LIT) )))) ;)) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression IDENT != LIT) && (parenthesized_expression ( (binary_expression IDENT == IDENT) ))) )) ))) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT , IDENT , LIT ))) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( )))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (goto_statement goto statement_identifier ;)) (goto_statement goto statement_identifier ;) })) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == IDENT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT , (pointer_expression & IDENT) , (binary_expression IDENT == LIT) )))) ;) }) while (parenthesized_expression ( BOOL )) ;) })))
(function_definition "undefined4 FUN_0045cd34(int param_1)\n\n{\n  int iVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  undefined4 local_128;\n  undefined1 auStack_124 [128];\n  undefined1 auStack_a4 [128];\n  int local_24;\n  \n  puVar3 = PTR___stack_chk_guard_004b238c;\n  local_128 = 0;\n  local_24 = *(int *)PTR___stack_chk_guard_004b238c;\n  (*(code *)PTR_sigemptyset_004b2208)(auStack_124);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,2);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,1);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,3);\n  (*(code *)PTR_sigprocmask_004b23ac)(1,auStack_124,auStack_a4);\nLAB_0045ce00:\n  iVar4 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0);\n  do {\n    puVar2 = PTR_waitpid_004b2308;\n    if ((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);\n      if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n                    \n                    \n      uVar6 = (*(code *)PTR_fclose_004b21e0)();\n      return uVar6;\n    }\n    iVar1 = DAT_004b6068;\n    if (iVar4 == -1) {\n      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar5 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }\n    while( true ) {\n      if (iVar1 == 0) goto LAB_0045ce00;\n      if (*(int *)(iVar1 + 0x10) == iVar4) break;\n      iVar1 = *(int *)(iVar1 + 0x1c);\n    }\n    *(undefined4 *)(iVar1 + 0x10) = 0xffffffff;\n    *(undefined4 *)(iVar1 + 0x14) = local_128;\n    iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0);\n  } while( true );\n}" (type_identifier "undefined4") (function_declarator "FUN_0045cd34(int param_1)" (identifier "FUN_0045cd34") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  undefined4 local_128;\n  undefined1 auStack_124 [128];\n  undefined1 auStack_a4 [128];\n  int local_24;\n  \n  puVar3 = PTR___stack_chk_guard_004b238c;\n  local_128 = 0;\n  local_24 = *(int *)PTR___stack_chk_guard_004b238c;\n  (*(code *)PTR_sigemptyset_004b2208)(auStack_124);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,2);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,1);\n  (*(code *)PTR_sigaddset_004b2270)(auStack_124,3);\n  (*(code *)PTR_sigprocmask_004b23ac)(1,auStack_124,auStack_a4);\nLAB_0045ce00:\n  iVar4 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0);\n  do {\n    puVar2 = PTR_waitpid_004b2308;\n    if ((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);\n      if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n                    \n                    \n      uVar6 = (*(code *)PTR_fclose_004b21e0)();\n      return uVar6;\n    }\n    iVar1 = DAT_004b6068;\n    if (iVar4 == -1) {\n      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar5 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }\n    while( true ) {\n      if (iVar1 == 0) goto LAB_0045ce00;\n      if (*(int *)(iVar1 + 0x10) == iVar4) break;\n      iVar1 = *(int *)(iVar1 + 0x1c);\n    }\n    *(undefined4 *)(iVar1 + 0x10) = 0xffffffff;\n    *(undefined4 *)(iVar1 + 0x14) = local_128;\n    iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0);\n  } while( true );\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined *puVar2;" (type_identifier "undefined") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined *puVar3;" (type_identifier "undefined") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int *piVar5;" (primitive_type "int") (pointer_declarator "*piVar5" (* "*") (identifier "piVar5")) (; ";")) (declaration "undefined4 uVar6;" (type_identifier "undefined4") (identifier "uVar6") (; ";")) (declaration "undefined4 local_128;" (type_identifier "undefined4") (identifier "local_128") (; ";")) (declaration "undefined1 auStack_124 [128];" (type_identifier "undefined1") (array_declarator "auStack_124 [128]" (identifier "auStack_124") ([ "[") (number_literal "128") (] "]")) (; ";")) (declaration "undefined1 auStack_a4 [128];" (type_identifier "undefined1") (array_declarator "auStack_a4 [128]" (identifier "auStack_a4") ([ "[") (number_literal "128") (] "]")) (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (expression_statement "puVar3 = PTR___stack_chk_guard_004b238c;" (assignment_expression "puVar3 = PTR___stack_chk_guard_004b238c" (identifier "puVar3") (= "=") (identifier "PTR___stack_chk_guard_004b238c")) (; ";")) (expression_statement "local_128 = 0;" (assignment_expression "local_128 = 0" (identifier "local_128") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_24 = *(int *)PTR___stack_chk_guard_004b238c;" (assignment_expression "local_24 = *(int *)PTR___stack_chk_guard_004b238c" (identifier "local_24") (= "=") (pointer_expression "*(int *)PTR___stack_chk_guard_004b238c" (* "*") (cast_expression "(int *)PTR___stack_chk_guard_004b238c" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_guard_004b238c")))) (; ";")) (expression_statement "(*(code *)PTR_sigemptyset_004b2208)(auStack_124);" (call_expression "(*(code *)PTR_sigemptyset_004b2208)(auStack_124)" (parenthesized_expression "(*(code *)PTR_sigemptyset_004b2208)" (( "(") (pointer_expression "*(code *)PTR_sigemptyset_004b2208" (* "*") (cast_expression "(code *)PTR_sigemptyset_004b2208" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sigemptyset_004b2208"))) () ")")) (argument_list "(auStack_124)" (( "(") (identifier "auStack_124") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_sigaddset_004b2270)(auStack_124,2);" (call_expression "(*(code *)PTR_sigaddset_004b2270)(auStack_124,2)" (parenthesized_expression "(*(code *)PTR_sigaddset_004b2270)" (( "(") (pointer_expression "*(code *)PTR_sigaddset_004b2270" (* "*") (cast_expression "(code *)PTR_sigaddset_004b2270" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sigaddset_004b2270"))) () ")")) (argument_list "(auStack_124,2)" (( "(") (identifier "auStack_124") (, ",") (number_literal "2") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_sigaddset_004b2270)(auStack_124,1);" (call_expression "(*(code *)PTR_sigaddset_004b2270)(auStack_124,1)" (parenthesized_expression "(*(code *)PTR_sigaddset_004b2270)" (( "(") (pointer_expression "*(code *)PTR_sigaddset_004b2270" (* "*") (cast_expression "(code *)PTR_sigaddset_004b2270" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sigaddset_004b2270"))) () ")")) (argument_list "(auStack_124,1)" (( "(") (identifier "auStack_124") (, ",") (number_literal "1") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_sigaddset_004b2270)(auStack_124,3);" (call_expression "(*(code *)PTR_sigaddset_004b2270)(auStack_124,3)" (parenthesized_expression "(*(code *)PTR_sigaddset_004b2270)" (( "(") (pointer_expression "*(code *)PTR_sigaddset_004b2270" (* "*") (cast_expression "(code *)PTR_sigaddset_004b2270" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sigaddset_004b2270"))) () ")")) (argument_list "(auStack_124,3)" (( "(") (identifier "auStack_124") (, ",") (number_literal "3") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_sigprocmask_004b23ac)(1,auStack_124,auStack_a4);" (call_expression "(*(code *)PTR_sigprocmask_004b23ac)(1,auStack_124,auStack_a4)" (parenthesized_expression "(*(code *)PTR_sigprocmask_004b23ac)" (( "(") (pointer_expression "*(code *)PTR_sigprocmask_004b23ac" (* "*") (cast_expression "(code *)PTR_sigprocmask_004b23ac" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sigprocmask_004b23ac"))) () ")")) (argument_list "(1,auStack_124,auStack_a4)" (( "(") (number_literal "1") (, ",") (identifier "auStack_124") (, ",") (identifier "auStack_a4") () ")"))) (; ";")) (labeled_statement "LAB_0045ce00:\n  iVar4 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0);" (statement_identifier "LAB_0045ce00") (: ":") (expression_statement "iVar4 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0);" (assignment_expression "iVar4 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0)" (identifier "iVar4") (= "=") (call_expression "(*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0)" (parenthesized_expression "(*(code *)PTR_waitpid_004b2308)" (( "(") (pointer_expression "*(code *)PTR_waitpid_004b2308" (* "*") (cast_expression "(code *)PTR_waitpid_004b2308" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_waitpid_004b2308"))) () ")")) (argument_list "(0xffffffff,&local_128,param_1 == 0)" (( "(") (number_literal "0xffffffff") (, ",") (pointer_expression "&local_128" (& "&") (identifier "local_128")) (, ",") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")))) (; ";"))) (do_statement "do {\n    puVar2 = PTR_waitpid_004b2308;\n    if ((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);\n      if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n                    \n                    \n      uVar6 = (*(code *)PTR_fclose_004b21e0)();\n      return uVar6;\n    }\n    iVar1 = DAT_004b6068;\n    if (iVar4 == -1) {\n      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar5 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }\n    while( true ) {\n      if (iVar1 == 0) goto LAB_0045ce00;\n      if (*(int *)(iVar1 + 0x10) == iVar4) break;\n      iVar1 = *(int *)(iVar1 + 0x1c);\n    }\n    *(undefined4 *)(iVar1 + 0x10) = 0xffffffff;\n    *(undefined4 *)(iVar1 + 0x14) = local_128;\n    iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0);\n  } while( true );" (do "do") (compound_statement "{\n    puVar2 = PTR_waitpid_004b2308;\n    if ((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);\n      if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n                    \n                    \n      uVar6 = (*(code *)PTR_fclose_004b21e0)();\n      return uVar6;\n    }\n    iVar1 = DAT_004b6068;\n    if (iVar4 == -1) {\n      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar5 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }\n    while( true ) {\n      if (iVar1 == 0) goto LAB_0045ce00;\n      if (*(int *)(iVar1 + 0x10) == iVar4) break;\n      iVar1 = *(int *)(iVar1 + 0x1c);\n    }\n    *(undefined4 *)(iVar1 + 0x10) = 0xffffffff;\n    *(undefined4 *)(iVar1 + 0x14) = local_128;\n    iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0);\n  }" ({ "{") (expression_statement "puVar2 = PTR_waitpid_004b2308;" (assignment_expression "puVar2 = PTR_waitpid_004b2308" (identifier "puVar2") (= "=") (identifier "PTR_waitpid_004b2308")) (; ";")) (if_statement "if ((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))) {\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);\n      if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n                    \n                    \n      uVar6 = (*(code *)PTR_fclose_004b21e0)();\n      return uVar6;\n    }" (if "if") (parenthesized_expression "((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4))))" (( "(") (binary_expression "(iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))" (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "((param_1 != 0 && (param_1 == iVar4)))" (( "(") (parenthesized_expression "(param_1 != 0 && (param_1 == iVar4))" (( "(") (binary_expression "param_1 != 0 && (param_1 == iVar4)" (binary_expression "param_1 != 0" (identifier "param_1") (!= "!=") (number_literal "0")) (&& "&&") (parenthesized_expression "(param_1 == iVar4)" (( "(") (binary_expression "param_1 == iVar4" (identifier "param_1") (== "==") (identifier "iVar4")) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\nLAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);\n      if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }\n      (*(code *)PTR___stack_chk_fail_004b2348)();\n                    \n                    \n      uVar6 = (*(code *)PTR_fclose_004b21e0)();\n      return uVar6;\n    }" ({ "{") (labeled_statement "LAB_0045ce84:\n      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);" (statement_identifier "LAB_0045ce84") (: ":") (expression_statement "(*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);" (call_expression "(*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0)" (parenthesized_expression "(*(code *)PTR_sigprocmask_004b23ac)" (( "(") (pointer_expression "*(code *)PTR_sigprocmask_004b23ac" (* "*") (cast_expression "(code *)PTR_sigprocmask_004b23ac" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sigprocmask_004b23ac"))) () ")")) (argument_list "(3,auStack_a4,0)" (( "(") (number_literal "3") (, ",") (identifier "auStack_a4") (, ",") (number_literal "0") () ")"))) (; ";"))) (if_statement "if (local_24 == *(int *)puVar3) {\n        return local_128;\n      }" (if "if") (parenthesized_expression "(local_24 == *(int *)puVar3)" (( "(") (binary_expression "local_24 == *(int *)puVar3" (identifier "local_24") (== "==") (pointer_expression "*(int *)puVar3" (* "*") (cast_expression "(int *)puVar3" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar3")))) () ")")) (compound_statement "{\n        return local_128;\n      }" ({ "{") (return_statement "return local_128;" (return "return") (identifier "local_128") (; ";")) (} "}"))) (expression_statement "(*(code *)PTR___stack_chk_fail_004b2348)();" (call_expression "(*(code *)PTR___stack_chk_fail_004b2348)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_004b2348)" (( "(") (pointer_expression "*(code *)PTR___stack_chk_fail_004b2348" (* "*") (cast_expression "(code *)PTR___stack_chk_fail_004b2348" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_fail_004b2348"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "uVar6 = (*(code *)PTR_fclose_004b21e0)();" (assignment_expression "uVar6 = (*(code *)PTR_fclose_004b21e0)()" (identifier "uVar6") (= "=") (call_expression "(*(code *)PTR_fclose_004b21e0)()" (parenthesized_expression "(*(code *)PTR_fclose_004b21e0)" (( "(") (pointer_expression "*(code *)PTR_fclose_004b21e0" (* "*") (cast_expression "(code *)PTR_fclose_004b21e0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fclose_004b21e0"))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return uVar6;" (return "return") (identifier "uVar6") (; ";")) (} "}"))) (expression_statement "iVar1 = DAT_004b6068;" (assignment_expression "iVar1 = DAT_004b6068" (identifier "iVar1") (= "=") (identifier "DAT_004b6068")) (; ";")) (if_statement "if (iVar4 == -1) {\n      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar5 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }" (if "if") (parenthesized_expression "(iVar4 == -1)" (( "(") (binary_expression "iVar4 == -1" (identifier "iVar4") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();\n      if (*piVar5 == 10) goto LAB_0045ce84;\n      goto LAB_0045ce00;\n    }" ({ "{") (expression_statement "piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();" (assignment_expression "piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)()" (identifier "piVar5") (= "=") (cast_expression "(int *)(*(code *)PTR___errno_location_004b2250)()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR___errno_location_004b2250)()" (parenthesized_expression "(*(code *)PTR___errno_location_004b2250)" (( "(") (pointer_expression "*(code *)PTR___errno_location_004b2250" (* "*") (cast_expression "(code *)PTR___errno_location_004b2250" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___errno_location_004b2250"))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (if_statement "if (*piVar5 == 10) goto LAB_0045ce84;" (if "if") (parenthesized_expression "(*piVar5 == 10)" (( "(") (binary_expression "*piVar5 == 10" (pointer_expression "*piVar5" (* "*") (identifier "piVar5")) (== "==") (number_literal "10")) () ")")) (goto_statement "goto LAB_0045ce84;" (goto "goto") (statement_identifier "LAB_0045ce84") (; ";"))) (goto_statement "goto LAB_0045ce00;" (goto "goto") (statement_identifier "LAB_0045ce00") (; ";")) (} "}"))) (while_statement "while( true ) {\n      if (iVar1 == 0) goto LAB_0045ce00;\n      if (*(int *)(iVar1 + 0x10) == iVar4) break;\n      iVar1 = *(int *)(iVar1 + 0x1c);\n    }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n      if (iVar1 == 0) goto LAB_0045ce00;\n      if (*(int *)(iVar1 + 0x10) == iVar4) break;\n      iVar1 = *(int *)(iVar1 + 0x1c);\n    }" ({ "{") (if_statement "if (iVar1 == 0) goto LAB_0045ce00;" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_0045ce00;" (goto "goto") (statement_identifier "LAB_0045ce00") (; ";"))) (if_statement "if (*(int *)(iVar1 + 0x10) == iVar4) break;" (if "if") (parenthesized_expression "(*(int *)(iVar1 + 0x10) == iVar4)" (( "(") (binary_expression "*(int *)(iVar1 + 0x10) == iVar4" (pointer_expression "*(int *)(iVar1 + 0x10)" (* "*") (cast_expression "(int *)(iVar1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x10)" (( "(") (binary_expression "iVar1 + 0x10" (identifier "iVar1") (+ "+") (number_literal "0x10")) () ")")))) (== "==") (identifier "iVar4")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar1 = *(int *)(iVar1 + 0x1c);" (assignment_expression "iVar1 = *(int *)(iVar1 + 0x1c)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(iVar1 + 0x1c)" (* "*") (cast_expression "(int *)(iVar1 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x1c)" (( "(") (binary_expression "iVar1 + 0x1c" (identifier "iVar1") (+ "+") (number_literal "0x1c")) () ")"))))) (; ";")) (} "}"))) (expression_statement "*(undefined4 *)(iVar1 + 0x10) = 0xffffffff;" (assignment_expression "*(undefined4 *)(iVar1 + 0x10) = 0xffffffff" (pointer_expression "*(undefined4 *)(iVar1 + 0x10)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x10)" (( "(") (binary_expression "iVar1 + 0x10" (identifier "iVar1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (number_literal "0xffffffff")) (; ";")) (expression_statement "*(undefined4 *)(iVar1 + 0x14) = local_128;" (assignment_expression "*(undefined4 *)(iVar1 + 0x14) = local_128" (pointer_expression "*(undefined4 *)(iVar1 + 0x14)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x14)" (( "(") (binary_expression "iVar1 + 0x14" (identifier "iVar1") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (identifier "local_128")) (; ";")) (expression_statement "iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0);" (assignment_expression "iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0)" (identifier "iVar4") (= "=") (call_expression "(*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0)" (parenthesized_expression "(*(code *)puVar2)" (( "(") (pointer_expression "*(code *)puVar2" (* "*") (cast_expression "(code *)puVar2" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar2"))) () ")")) (argument_list "(0xffffffff,&local_128,param_1 == 0)" (( "(") (number_literal "0xffffffff") (, ",") (pointer_expression "&local_128" (& "&") (identifier "local_128")) (, ",") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

int function_1(int var_1)

{
  type_1 *var_4;
  type_2 *puVar2;
  type_2 *puVar3;
  int var_3;
  int var_2;
  int *piVar6;
  int status;
  type_3 set;
  type_3 oldset;
  
  puVar3 = PTR___stack_chk_guard_004b238c;
  status = 0;
  var_3 = *(int *)PTR___stack_chk_guard_004b238c;
  (*(type_4 *)PTR_sigemptyset_004b2208)(&set);
  (*(type_4 *)PTR_sigaddset_004b2270)(&set,2);
  (*(type_4 *)PTR_sigaddset_004b2270)(&set,1);
  (*(type_4 *)PTR_sigaddset_004b2270)(&set,3);
  (*(type_4 *)PTR_sigprocmask_004b23ac)(1,&set,&oldset);
LAB_0045ce00:
  var_2 = (*(type_4 *)PTR_waitpid_004b2308)(0xffffffff,&status,var_1 == 0);
  do {
    puVar2 = PTR_waitpid_004b2308;
    if ((var_2 == 0) || ((var_1 != 0 && (var_1 == var_2)))) {
LAB_0045ce84:
      (*(type_4 *)PTR_sigprocmask_004b23ac)(3,&oldset,0);
      if (var_3 == *(int *)puVar3) {
        return status;
      }
      (*(type_4 *)PTR___stack_chk_fail_004b2348)();
      var_3 = (*(type_4 *)PTR_fclose_004b21e0)();
      return var_3;
    }
    var_4 = red_head;
    if (var_2 == -1) {
      piVar6 = (int *)(*(type_4 *)PTR___errno_location_004b2250)();
      if (*piVar6 == 10) goto LAB_0045ce84;
      goto LAB_0045ce00;
    }
    while( true ) {
      if (var_4 == (type_1 *)0x0) goto LAB_0045ce00;
      if (var_4->pid == var_2) break;
      var_4 = var_4->next;
    }
    var_4->pid = -1;
    var_4->status = status;
    var_2 = (*(type_4 *)puVar2)(0xffffffff,&status,var_1 == 0);
  } while( true );
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (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: (identifier))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (number_literal)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (number_literal)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (number_literal)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (number_literal) (identifier) (identifier)))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (number_literal) (pointer_expression argument: (identifier)) (binary_expression left: (identifier) right: (number_literal))))))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (number_literal) (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list)))) (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (goto_statement label: (statement_identifier)))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (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))))) right: (identifier))) consequence: (break_statement)) (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))))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (number_literal) (pointer_expression argument: (identifier)) (binary_expression left: (identifier) right: (number_literal))))))) condition: (parenthesized_expression (true))))))

undefined4 MASKED(int param_1)

{
  int iVar1;
  undefined *puVar2;
  undefined *puVar3;
  int iVar4;
  int *piVar5;
  undefined4 uVar6;
  undefined4 local_128;
  undefined1 auStack_124 [128];
  undefined1 auStack_a4 [128];
  int local_24;
  
  puVar3 = PTR___stack_chk_guard_004b238c;
  local_128 = 0;
  local_24 = *(int *)PTR___stack_chk_guard_004b238c;
  (*(code *)PTR_sigemptyset_004b2208)(auStack_124);
  (*(code *)PTR_sigaddset_004b2270)(auStack_124,2);
  (*(code *)PTR_sigaddset_004b2270)(auStack_124,1);
  (*(code *)PTR_sigaddset_004b2270)(auStack_124,3);
  (*(code *)PTR_sigprocmask_004b23ac)(1,auStack_124,auStack_a4);
LAB_0045ce00:
  iVar4 = (*(code *)PTR_waitpid_004b2308)(0xffffffff,&local_128,param_1 == 0);
  do {
    puVar2 = PTR_waitpid_004b2308;
    if ((iVar4 == 0) || ((param_1 != 0 && (param_1 == iVar4)))) {
LAB_0045ce84:
      (*(code *)PTR_sigprocmask_004b23ac)(3,auStack_a4,0);
      if (local_24 == *(int *)puVar3) {
        return local_128;
      }
      (*(code *)PTR___stack_chk_fail_004b2348)();
                    /* WARNING: Could not recover jumptable at 0x0045cf04. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      uVar6 = (*(code *)PTR_fclose_004b21e0)();
      return uVar6;
    }
    iVar1 = DAT_004b6068;
    if (iVar4 == -1) {
      piVar5 = (int *)(*(code *)PTR___errno_location_004b2250)();
      if (*piVar5 == 10) goto LAB_0045ce84;
      goto LAB_0045ce00;
    }
    while( true ) {
      if (iVar1 == 0) goto LAB_0045ce00;
      if (*(int *)(iVar1 + 0x10) == iVar4) break;
      iVar1 = *(int *)(iVar1 + 0x1c);
    }
    *(undefined4 *)(iVar1 + 0x10) = 0xffffffff;
    *(undefined4 *)(iVar1 + 0x14) = local_128;
    iVar4 = (*(code *)puVar2)(0xffffffff,&local_128,param_1 == 0);
  } while( true );
}

