
int map_over_jobs(sh_job_map_func_t *func,int arg1,int arg2)

{
  int *piVar1;
  undefined *puVar2;
  undefined *puVar3;
  int *piVar4;
  int iVar5;
  int iVar6;
  int *piVar7;
  JOB *job;
  int *piVar8;
  int job_index;
  undefined *puVar9;
  sigset_t set;
  sigset_t oset;
  
  puVar3 = PTR___stack_chk_guard_001464dc;
  puVar9 = PTR_js_00144e58;
  iVar5 = *(int *)PTR___stack_chk_guard_001464dc;
  (*(code *)PTR_sigemptyset_001462d4)(&set);
  (*(code *)PTR_sigaddset_00146364)(&set,0x12);
  (*(code *)PTR_sigemptyset_001462d4)(&oset);
  (*(code *)PTR_sigprocmask_00146514)(1,&set,&oset);
  puVar2 = PTR_jobs_00144e5c;
  if (0 < *(int *)(puVar9 + 0x18)) {
    job_index = 0;
    do {
      job = *(JOB **)(*(int *)puVar2 + job_index * 4);
      if ((job != (JOB *)0x0) && (iVar6 = print_job(job,(int)func,arg1,job_index), iVar6 != 0))
      goto LAB_00065a08;
      job_index = job_index + 1;
    } while (job_index < *(int *)(puVar9 + 0x18));
  }
  iVar6 = 0;
LAB_00065a08:
  (*(code *)PTR_sigprocmask_00146514)(3,&oset,0);
  if (iVar5 == *(int *)puVar3) {
    return iVar6;
  }
  puVar9 = PTR___stack_chk_fail_00146488;
  (*(code *)PTR___stack_chk_fail_00146488)();
  piVar8 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + iVar5 * 4) + 4);
  piVar7 = (int *)0x0;
  if (piVar8 != (int *)0x0) {
    piVar4 = (int *)*piVar8;
    piVar1 = (int *)*piVar8;
    while( true ) {
      piVar7 = piVar4;
      if (piVar8 == piVar7) {
        return (int)piVar1;
      }
      if (piVar7 == (int *)0x0) break;
      piVar4 = (int *)*piVar7;
      piVar1 = piVar7;
    }
  }
  return (int)piVar7;
}



int * FUN_000658f8(undefined4 param_1,undefined4 param_2)

{
  int *piVar1;
  undefined *puVar2;
  undefined *puVar3;
  int *piVar4;
  int *piVar5;
  int iVar6;
  int *piVar7;
  int iVar8;
  undefined *puVar9;
  undefined1 auStack_12c [128];
  undefined1 auStack_ac [128];
  int local_2c;
  
  puVar3 = PTR___stack_chk_guard_001464dc;
  puVar9 = PTR_js_00144e58;
  local_2c = *(int *)PTR___stack_chk_guard_001464dc;
  (*(code *)PTR_sigemptyset_001462d4)(auStack_12c);
  (*(code *)PTR_sigaddset_00146364)(auStack_12c,0x12);
  (*(code *)PTR_sigemptyset_001462d4)(auStack_ac);
  (*(code *)PTR_sigprocmask_00146514)(1,auStack_12c,auStack_ac);
  puVar2 = PTR_jobs_00144e5c;
  if (0 < *(int *)(puVar9 + 0x18)) {
    iVar8 = 0;
    do {
      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);
      if ((iVar6 != 0) &&
         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))
      goto LAB_00065a08;
      iVar8 = iVar8 + 1;
    } while (iVar8 < *(int *)(puVar9 + 0x18));
  }
  piVar5 = (int *)0x0;
LAB_00065a08:
  (*(code *)PTR_sigprocmask_00146514)(3,auStack_ac,0);
  if (local_2c == *(int *)puVar3) {
    return piVar5;
  }
  puVar9 = PTR___stack_chk_fail_00146488;
  (*(code *)PTR___stack_chk_fail_00146488)();
  piVar7 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4);
  piVar5 = (int *)0x0;
  if (piVar7 != (int *)0x0) {
    piVar4 = (int *)*piVar7;
    piVar1 = (int *)*piVar7;
    while( true ) {
      piVar5 = piVar4;
      if (piVar7 == piVar5) {
        return piVar1;
      }
      if (piVar5 == (int *)0x0) break;
      piVar4 = (int *)*piVar5;
      piVar1 = piVar5;
    }
  }
  return piVar5;
}


lui gp,0xe
addiu gp,gp,0x6c48
addu gp,gp,t9
addiu sp,sp,-0x148
lw t9,-0x626c(gp)
sw s5,0x134(sp)
lw s5,-0x6064(gp)
sw s0,0x120(sp)
addiu s0,sp,0x1c
sw ra,0x144(sp)
sw gp,0x10(sp)
sw s7,0x13c(sp)
sw s4,0x130(sp)
addiu s4,sp,0x9c
sw s3,0x12c(sp)
or s3,a1,zero
sw s2,0x128(sp)
or s2,a0,zero
sw s8,0x140(sp)
or a0,s0,zero
sw s6,0x138(sp)
sw s1,0x124(sp)
lw v0,0x0(s5)
lw s7,-0x76e8(gp)
sw v0,0x11c(sp)
jalr t9
_nop
li a1,0x12
lw gp,0x10(sp)
lw t9,-0x61dc(gp)
jalr t9
_or a0,s0,zero
lw gp,0x10(sp)
lw t9,-0x626c(gp)
jalr t9
_or a0,s4,zero
li a0,0x1
lw gp,0x10(sp)
or a2,s4,zero
lw t9,-0x602c(gp)
jalr t9
_or a1,s0,zero
lw v0,0x18(s7)
blez v0,0x00065a04
_lw gp,0x10(sp)
lw s1,-0x7550(gp)
or s0,zero,zero
lw s8,-0x76e4(gp)
addiu s1,s1,0x585c
lw v0,0x0(s8)
sll v1,s0,0x2
addu v0,v0,v1
lw a0,0x0(v0)
beq a0,zero,0x000659f0
_or a3,s0,zero
or a2,s3,zero
or t9,s1,zero
bal 0x0006585c
_or a1,s2,zero
lw gp,0x10(sp)
bne v0,zero,0x00065a08
_or s6,v0,zero
lw v0,0x18(s7)
addiu s0,s0,0x1
slt v0,s0,v0
bne v0,zero,0x000659bc
_nop
or s6,zero,zero
lw t9,-0x602c(gp)
li a0,0x3
or a2,zero,zero
jalr t9
_or a1,s4,zero
or v0,s6,zero
lw a0,0x11c(sp)
lw v1,0x0(s5)
bne a0,v1,0x00065a60
_lw gp,0x10(sp)
lw ra,0x144(sp)
lw s8,0x140(sp)
lw s7,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,0x148
lw t9,-0x60b8(gp)
jalr t9
_nop
(translation_unit "int * FUN_000658f8(undefined4 param_1,undefined4 param_2)\n\n{\n  int *piVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int *piVar4;\n  int *piVar5;\n  int iVar6;\n  int *piVar7;\n  int iVar8;\n  undefined *puVar9;\n  undefined1 auStack_12c [128];\n  undefined1 auStack_ac [128];\n  int local_2c;\n  \n  puVar3 = PTR___stack_chk_guard_001464dc;\n  puVar9 = PTR_js_00144e58;\n  local_2c = *(int *)PTR___stack_chk_guard_001464dc;\n  (*(code *)PTR_sigemptyset_001462d4)(auStack_12c);\n  (*(code *)PTR_sigaddset_00146364)(auStack_12c,0x12);\n  (*(code *)PTR_sigemptyset_001462d4)(auStack_ac);\n  (*(code *)PTR_sigprocmask_00146514)(1,auStack_12c,auStack_ac);\n  puVar2 = PTR_jobs_00144e5c;\n  if (0 < *(int *)(puVar9 + 0x18)) {\n    iVar8 = 0;\n    do {\n      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);\n      if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;\n      iVar8 = iVar8 + 1;\n    } while (iVar8 < *(int *)(puVar9 + 0x18));\n  }\n  piVar5 = (int *)0x0;\nLAB_00065a08:\n  (*(code *)PTR_sigprocmask_00146514)(3,auStack_ac,0);\n  if (local_2c == *(int *)puVar3) {\n    return piVar5;\n  }\n  puVar9 = PTR___stack_chk_fail_00146488;\n  (*(code *)PTR___stack_chk_fail_00146488)();\n  piVar7 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4);\n  piVar5 = (int *)0x0;\n  if (piVar7 != (int *)0x0) {\n    piVar4 = (int *)*piVar7;\n    piVar1 = (int *)*piVar7;\n    while( true ) {\n      piVar5 = piVar4;\n      if (piVar7 == piVar5) {\n        return piVar1;\n      }\n      if (piVar5 == (int *)0x0) break;\n      piVar4 = (int *)*piVar5;\n      piVar1 = piVar5;\n    }\n  }\n  return piVar5;\n}\n\n" (function_definition "int * FUN_000658f8(undefined4 param_1,undefined4 param_2)\n\n{\n  int *piVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int *piVar4;\n  int *piVar5;\n  int iVar6;\n  int *piVar7;\n  int iVar8;\n  undefined *puVar9;\n  undefined1 auStack_12c [128];\n  undefined1 auStack_ac [128];\n  int local_2c;\n  \n  puVar3 = PTR___stack_chk_guard_001464dc;\n  puVar9 = PTR_js_00144e58;\n  local_2c = *(int *)PTR___stack_chk_guard_001464dc;\n  (*(code *)PTR_sigemptyset_001462d4)(auStack_12c);\n  (*(code *)PTR_sigaddset_00146364)(auStack_12c,0x12);\n  (*(code *)PTR_sigemptyset_001462d4)(auStack_ac);\n  (*(code *)PTR_sigprocmask_00146514)(1,auStack_12c,auStack_ac);\n  puVar2 = PTR_jobs_00144e5c;\n  if (0 < *(int *)(puVar9 + 0x18)) {\n    iVar8 = 0;\n    do {\n      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);\n      if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;\n      iVar8 = iVar8 + 1;\n    } while (iVar8 < *(int *)(puVar9 + 0x18));\n  }\n  piVar5 = (int *)0x0;\nLAB_00065a08:\n  (*(code *)PTR_sigprocmask_00146514)(3,auStack_ac,0);\n  if (local_2c == *(int *)puVar3) {\n    return piVar5;\n  }\n  puVar9 = PTR___stack_chk_fail_00146488;\n  (*(code *)PTR___stack_chk_fail_00146488)();\n  piVar7 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4);\n  piVar5 = (int *)0x0;\n  if (piVar7 != (int *)0x0) {\n    piVar4 = (int *)*piVar7;\n    piVar1 = (int *)*piVar7;\n    while( true ) {\n      piVar5 = piVar4;\n      if (piVar7 == piVar5) {\n        return piVar1;\n      }\n      if (piVar5 == (int *)0x0) break;\n      piVar4 = (int *)*piVar5;\n      piVar1 = piVar5;\n    }\n  }\n  return piVar5;\n}" primitive_type (pointer_declarator "* FUN_000658f8(undefined4 param_1,undefined4 param_2)" * (function_declarator "FUN_000658f8(undefined4 param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) )))) (compound_statement "{\n  int *piVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int *piVar4;\n  int *piVar5;\n  int iVar6;\n  int *piVar7;\n  int iVar8;\n  undefined *puVar9;\n  undefined1 auStack_12c [128];\n  undefined1 auStack_ac [128];\n  int local_2c;\n  \n  puVar3 = PTR___stack_chk_guard_001464dc;\n  puVar9 = PTR_js_00144e58;\n  local_2c = *(int *)PTR___stack_chk_guard_001464dc;\n  (*(code *)PTR_sigemptyset_001462d4)(auStack_12c);\n  (*(code *)PTR_sigaddset_00146364)(auStack_12c,0x12);\n  (*(code *)PTR_sigemptyset_001462d4)(auStack_ac);\n  (*(code *)PTR_sigprocmask_00146514)(1,auStack_12c,auStack_ac);\n  puVar2 = PTR_jobs_00144e5c;\n  if (0 < *(int *)(puVar9 + 0x18)) {\n    iVar8 = 0;\n    do {\n      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);\n      if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;\n      iVar8 = iVar8 + 1;\n    } while (iVar8 < *(int *)(puVar9 + 0x18));\n  }\n  piVar5 = (int *)0x0;\nLAB_00065a08:\n  (*(code *)PTR_sigprocmask_00146514)(3,auStack_ac,0);\n  if (local_2c == *(int *)puVar3) {\n    return piVar5;\n  }\n  puVar9 = PTR___stack_chk_fail_00146488;\n  (*(code *)PTR___stack_chk_fail_00146488)();\n  piVar7 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4);\n  piVar5 = (int *)0x0;\n  if (piVar7 != (int *)0x0) {\n    piVar4 = (int *)*piVar7;\n    piVar1 = (int *)*piVar7;\n    while( true ) {\n      piVar5 = piVar4;\n      if (piVar7 == piVar5) {\n        return piVar1;\n      }\n      if (piVar5 == (int *)0x0) break;\n      piVar4 = (int *)*piVar5;\n      piVar1 = piVar5;\n    }\n  }\n  return piVar5;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "undefined *puVar9;" type_identifier (pointer_declarator "*puVar9" * identifier) ;) (declaration "undefined1 auStack_12c [128];" type_identifier (array_declarator "auStack_12c [128]" identifier [ number_literal ]) ;) (declaration "undefined1 auStack_ac [128];" type_identifier (array_declarator "auStack_ac [128]" identifier [ number_literal ]) ;) (declaration "int local_2c;" primitive_type identifier ;) (expression_statement "puVar3 = PTR___stack_chk_guard_001464dc;" (assignment_expression "puVar3 = PTR___stack_chk_guard_001464dc" identifier = identifier) ;) (expression_statement "puVar9 = PTR_js_00144e58;" (assignment_expression "puVar9 = PTR_js_00144e58" identifier = identifier) ;) (expression_statement "local_2c = *(int *)PTR___stack_chk_guard_001464dc;" (assignment_expression "local_2c = *(int *)PTR___stack_chk_guard_001464dc" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_001464dc" * (cast_expression "(int *)PTR___stack_chk_guard_001464dc" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "(*(code *)PTR_sigemptyset_001462d4)(auStack_12c);" (call_expression "(*(code *)PTR_sigemptyset_001462d4)(auStack_12c)" (parenthesized_expression "(*(code *)PTR_sigemptyset_001462d4)" ( (pointer_expression "*(code *)PTR_sigemptyset_001462d4" * (cast_expression "(code *)PTR_sigemptyset_001462d4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_12c)" ( identifier ))) ;) (expression_statement "(*(code *)PTR_sigaddset_00146364)(auStack_12c,0x12);" (call_expression "(*(code *)PTR_sigaddset_00146364)(auStack_12c,0x12)" (parenthesized_expression "(*(code *)PTR_sigaddset_00146364)" ( (pointer_expression "*(code *)PTR_sigaddset_00146364" * (cast_expression "(code *)PTR_sigaddset_00146364" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_12c,0x12)" ( identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_sigemptyset_001462d4)(auStack_ac);" (call_expression "(*(code *)PTR_sigemptyset_001462d4)(auStack_ac)" (parenthesized_expression "(*(code *)PTR_sigemptyset_001462d4)" ( (pointer_expression "*(code *)PTR_sigemptyset_001462d4" * (cast_expression "(code *)PTR_sigemptyset_001462d4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_ac)" ( identifier ))) ;) (expression_statement "(*(code *)PTR_sigprocmask_00146514)(1,auStack_12c,auStack_ac);" (call_expression "(*(code *)PTR_sigprocmask_00146514)(1,auStack_12c,auStack_ac)" (parenthesized_expression "(*(code *)PTR_sigprocmask_00146514)" ( (pointer_expression "*(code *)PTR_sigprocmask_00146514" * (cast_expression "(code *)PTR_sigprocmask_00146514" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(1,auStack_12c,auStack_ac)" ( number_literal , identifier , identifier ))) ;) (expression_statement "puVar2 = PTR_jobs_00144e5c;" (assignment_expression "puVar2 = PTR_jobs_00144e5c" identifier = identifier) ;) (if_statement "if (0 < *(int *)(puVar9 + 0x18)) {\n    iVar8 = 0;\n    do {\n      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);\n      if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;\n      iVar8 = iVar8 + 1;\n    } while (iVar8 < *(int *)(puVar9 + 0x18));\n  }" if (parenthesized_expression "(0 < *(int *)(puVar9 + 0x18))" ( (binary_expression "0 < *(int *)(puVar9 + 0x18)" number_literal < (pointer_expression "*(int *)(puVar9 + 0x18)" * (cast_expression "(int *)(puVar9 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar9 + 0x18)" ( (binary_expression "puVar9 + 0x18" identifier + number_literal) ))))) )) (compound_statement "{\n    iVar8 = 0;\n    do {\n      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);\n      if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;\n      iVar8 = iVar8 + 1;\n    } while (iVar8 < *(int *)(puVar9 + 0x18));\n  }" { (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);\n      if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;\n      iVar8 = iVar8 + 1;\n    } while (iVar8 < *(int *)(puVar9 + 0x18));" do (compound_statement "{\n      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);\n      if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;\n      iVar8 = iVar8 + 1;\n    }" { (expression_statement "iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);" (assignment_expression "iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4)" identifier = (pointer_expression "*(int *)(*(int *)puVar2 + iVar8 * 4)" * (cast_expression "(int *)(*(int *)puVar2 + iVar8 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)puVar2 + iVar8 * 4)" ( (binary_expression "*(int *)puVar2 + iVar8 * 4" (pointer_expression "*(int *)puVar2" * (cast_expression "(int *)puVar2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + (binary_expression "iVar8 * 4" identifier * number_literal)) ))))) ;) (if_statement "if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;" if (parenthesized_expression "((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))" ( (binary_expression "(iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0)" (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) && (parenthesized_expression "(piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0)" ( (comma_expression "piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0" (assignment_expression "piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8)" identifier = (cast_expression "(int *)FUN_0006585c(iVar6,param_1,param_2,iVar8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0006585c(iVar6,param_1,param_2,iVar8)" identifier (argument_list "(iVar6,param_1,param_2,iVar8)" ( identifier , identifier , identifier , identifier ))))) , (binary_expression "piVar5 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) (goto_statement "goto LAB_00065a08;" goto statement_identifier ;)) (expression_statement "iVar8 = iVar8 + 1;" (assignment_expression "iVar8 = iVar8 + 1" identifier = (binary_expression "iVar8 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar8 < *(int *)(puVar9 + 0x18))" ( (binary_expression "iVar8 < *(int *)(puVar9 + 0x18)" identifier < (pointer_expression "*(int *)(puVar9 + 0x18)" * (cast_expression "(int *)(puVar9 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar9 + 0x18)" ( (binary_expression "puVar9 + 0x18" identifier + number_literal) ))))) )) ;) })) (expression_statement "piVar5 = (int *)0x0;" (assignment_expression "piVar5 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (labeled_statement "LAB_00065a08:\n  (*(code *)PTR_sigprocmask_00146514)(3,auStack_ac,0);" statement_identifier : (expression_statement "(*(code *)PTR_sigprocmask_00146514)(3,auStack_ac,0);" (call_expression "(*(code *)PTR_sigprocmask_00146514)(3,auStack_ac,0)" (parenthesized_expression "(*(code *)PTR_sigprocmask_00146514)" ( (pointer_expression "*(code *)PTR_sigprocmask_00146514" * (cast_expression "(code *)PTR_sigprocmask_00146514" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(3,auStack_ac,0)" ( number_literal , identifier , number_literal ))) ;)) (if_statement "if (local_2c == *(int *)puVar3) {\n    return piVar5;\n  }" if (parenthesized_expression "(local_2c == *(int *)puVar3)" ( (binary_expression "local_2c == *(int *)puVar3" identifier == (pointer_expression "*(int *)puVar3" * (cast_expression "(int *)puVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return piVar5;\n  }" { (return_statement "return piVar5;" return identifier ;) })) (expression_statement "puVar9 = PTR___stack_chk_fail_00146488;" (assignment_expression "puVar9 = PTR___stack_chk_fail_00146488" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_00146488)();" (call_expression "(*(code *)PTR___stack_chk_fail_00146488)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00146488)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00146488" * (cast_expression "(code *)PTR___stack_chk_fail_00146488" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "piVar7 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4);" (assignment_expression "piVar7 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4)" identifier = (pointer_expression "*(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4)" * (cast_expression "(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4)" ( (binary_expression "*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4" (pointer_expression "*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4)" * (cast_expression "(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4)" ( (binary_expression "**(int **)(puVar9 + 0xdf3f0) + local_2c * 4" (pointer_expression "**(int **)(puVar9 + 0xdf3f0)" * (pointer_expression "*(int **)(puVar9 + 0xdf3f0)" * (cast_expression "(int **)(puVar9 + 0xdf3f0)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar9 + 0xdf3f0)" ( (binary_expression "puVar9 + 0xdf3f0" identifier + number_literal) ))))) + (binary_expression "local_2c * 4" identifier * number_literal)) )))) + number_literal) ))))) ;) (expression_statement "piVar5 = (int *)0x0;" (assignment_expression "piVar5 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (piVar7 != (int *)0x0) {\n    piVar4 = (int *)*piVar7;\n    piVar1 = (int *)*piVar7;\n    while( true ) {\n      piVar5 = piVar4;\n      if (piVar7 == piVar5) {\n        return piVar1;\n      }\n      if (piVar5 == (int *)0x0) break;\n      piVar4 = (int *)*piVar5;\n      piVar1 = piVar5;\n    }\n  }" if (parenthesized_expression "(piVar7 != (int *)0x0)" ( (binary_expression "piVar7 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    piVar4 = (int *)*piVar7;\n    piVar1 = (int *)*piVar7;\n    while( true ) {\n      piVar5 = piVar4;\n      if (piVar7 == piVar5) {\n        return piVar1;\n      }\n      if (piVar5 == (int *)0x0) break;\n      piVar4 = (int *)*piVar5;\n      piVar1 = piVar5;\n    }\n  }" { (expression_statement "piVar4 = (int *)*piVar7;" (assignment_expression "piVar4 = (int *)*piVar7" identifier = (cast_expression "(int *)*piVar7" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar7" * identifier))) ;) (expression_statement "piVar1 = (int *)*piVar7;" (assignment_expression "piVar1 = (int *)*piVar7" identifier = (cast_expression "(int *)*piVar7" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar7" * identifier))) ;) (while_statement "while( true ) {\n      piVar5 = piVar4;\n      if (piVar7 == piVar5) {\n        return piVar1;\n      }\n      if (piVar5 == (int *)0x0) break;\n      piVar4 = (int *)*piVar5;\n      piVar1 = piVar5;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      piVar5 = piVar4;\n      if (piVar7 == piVar5) {\n        return piVar1;\n      }\n      if (piVar5 == (int *)0x0) break;\n      piVar4 = (int *)*piVar5;\n      piVar1 = piVar5;\n    }" { (expression_statement "piVar5 = piVar4;" (assignment_expression "piVar5 = piVar4" identifier = identifier) ;) (if_statement "if (piVar7 == piVar5) {\n        return piVar1;\n      }" if (parenthesized_expression "(piVar7 == piVar5)" ( (binary_expression "piVar7 == piVar5" identifier == identifier) )) (compound_statement "{\n        return piVar1;\n      }" { (return_statement "return piVar1;" return identifier ;) })) (if_statement "if (piVar5 == (int *)0x0) break;" if (parenthesized_expression "(piVar5 == (int *)0x0)" ( (binary_expression "piVar5 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (break_statement "break;" break ;)) (expression_statement "piVar4 = (int *)*piVar5;" (assignment_expression "piVar4 = (int *)*piVar5" identifier = (cast_expression "(int *)*piVar5" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar5" * identifier))) ;) (expression_statement "piVar1 = piVar5;" (assignment_expression "piVar1 = piVar5" identifier = identifier) ;) })) })) (return_statement "return piVar5;" return identifier ;) })))
(translation_unit "int map_over_jobs(sh_job_map_func_t *func,int arg1,int arg2)\n\n{\n  int *piVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  JOB *job;\n  int *piVar8;\n  int job_index;\n  undefined *puVar9;\n  sigset_t set;\n  sigset_t oset;\n  \n  puVar3 = PTR___stack_chk_guard_001464dc;\n  puVar9 = PTR_js_00144e58;\n  iVar5 = *(int *)PTR___stack_chk_guard_001464dc;\n  (*(code *)PTR_sigemptyset_001462d4)(&set);\n  (*(code *)PTR_sigaddset_00146364)(&set,0x12);\n  (*(code *)PTR_sigemptyset_001462d4)(&oset);\n  (*(code *)PTR_sigprocmask_00146514)(1,&set,&oset);\n  puVar2 = PTR_jobs_00144e5c;\n  if (0 < *(int *)(puVar9 + 0x18)) {\n    job_index = 0;\n    do {\n      job = *(JOB **)(*(int *)puVar2 + job_index * 4);\n      if ((job != (JOB *)0x0) && (iVar6 = print_job(job,(int)func,arg1,job_index), iVar6 != 0))\n      goto LAB_00065a08;\n      job_index = job_index + 1;\n    } while (job_index < *(int *)(puVar9 + 0x18));\n  }\n  iVar6 = 0;\nLAB_00065a08:\n  (*(code *)PTR_sigprocmask_00146514)(3,&oset,0);\n  if (iVar5 == *(int *)puVar3) {\n    return iVar6;\n  }\n  puVar9 = PTR___stack_chk_fail_00146488;\n  (*(code *)PTR___stack_chk_fail_00146488)();\n  piVar8 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + iVar5 * 4) + 4);\n  piVar7 = (int *)0x0;\n  if (piVar8 != (int *)0x0) {\n    piVar4 = (int *)*piVar8;\n    piVar1 = (int *)*piVar8;\n    while( true ) {\n      piVar7 = piVar4;\n      if (piVar8 == piVar7) {\n        return (int)piVar1;\n      }\n      if (piVar7 == (int *)0x0) break;\n      piVar4 = (int *)*piVar7;\n      piVar1 = piVar7;\n    }\n  }\n  return (int)piVar7;\n}\n\n" (function_definition "int map_over_jobs(sh_job_map_func_t *func,int arg1,int arg2)\n\n{\n  int *piVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  JOB *job;\n  int *piVar8;\n  int job_index;\n  undefined *puVar9;\n  sigset_t set;\n  sigset_t oset;\n  \n  puVar3 = PTR___stack_chk_guard_001464dc;\n  puVar9 = PTR_js_00144e58;\n  iVar5 = *(int *)PTR___stack_chk_guard_001464dc;\n  (*(code *)PTR_sigemptyset_001462d4)(&set);\n  (*(code *)PTR_sigaddset_00146364)(&set,0x12);\n  (*(code *)PTR_sigemptyset_001462d4)(&oset);\n  (*(code *)PTR_sigprocmask_00146514)(1,&set,&oset);\n  puVar2 = PTR_jobs_00144e5c;\n  if (0 < *(int *)(puVar9 + 0x18)) {\n    job_index = 0;\n    do {\n      job = *(JOB **)(*(int *)puVar2 + job_index * 4);\n      if ((job != (JOB *)0x0) && (iVar6 = print_job(job,(int)func,arg1,job_index), iVar6 != 0))\n      goto LAB_00065a08;\n      job_index = job_index + 1;\n    } while (job_index < *(int *)(puVar9 + 0x18));\n  }\n  iVar6 = 0;\nLAB_00065a08:\n  (*(code *)PTR_sigprocmask_00146514)(3,&oset,0);\n  if (iVar5 == *(int *)puVar3) {\n    return iVar6;\n  }\n  puVar9 = PTR___stack_chk_fail_00146488;\n  (*(code *)PTR___stack_chk_fail_00146488)();\n  piVar8 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + iVar5 * 4) + 4);\n  piVar7 = (int *)0x0;\n  if (piVar8 != (int *)0x0) {\n    piVar4 = (int *)*piVar8;\n    piVar1 = (int *)*piVar8;\n    while( true ) {\n      piVar7 = piVar4;\n      if (piVar8 == piVar7) {\n        return (int)piVar1;\n      }\n      if (piVar7 == (int *)0x0) break;\n      piVar4 = (int *)*piVar7;\n      piVar1 = piVar7;\n    }\n  }\n  return (int)piVar7;\n}" primitive_type (function_declarator "map_over_jobs(sh_job_map_func_t *func,int arg1,int arg2)" identifier (parameter_list "(sh_job_map_func_t *func,int arg1,int arg2)" ( (parameter_declaration "sh_job_map_func_t *func" type_identifier (pointer_declarator "*func" * identifier)) , (parameter_declaration "int arg1" primitive_type identifier) , (parameter_declaration "int arg2" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  JOB *job;\n  int *piVar8;\n  int job_index;\n  undefined *puVar9;\n  sigset_t set;\n  sigset_t oset;\n  \n  puVar3 = PTR___stack_chk_guard_001464dc;\n  puVar9 = PTR_js_00144e58;\n  iVar5 = *(int *)PTR___stack_chk_guard_001464dc;\n  (*(code *)PTR_sigemptyset_001462d4)(&set);\n  (*(code *)PTR_sigaddset_00146364)(&set,0x12);\n  (*(code *)PTR_sigemptyset_001462d4)(&oset);\n  (*(code *)PTR_sigprocmask_00146514)(1,&set,&oset);\n  puVar2 = PTR_jobs_00144e5c;\n  if (0 < *(int *)(puVar9 + 0x18)) {\n    job_index = 0;\n    do {\n      job = *(JOB **)(*(int *)puVar2 + job_index * 4);\n      if ((job != (JOB *)0x0) && (iVar6 = print_job(job,(int)func,arg1,job_index), iVar6 != 0))\n      goto LAB_00065a08;\n      job_index = job_index + 1;\n    } while (job_index < *(int *)(puVar9 + 0x18));\n  }\n  iVar6 = 0;\nLAB_00065a08:\n  (*(code *)PTR_sigprocmask_00146514)(3,&oset,0);\n  if (iVar5 == *(int *)puVar3) {\n    return iVar6;\n  }\n  puVar9 = PTR___stack_chk_fail_00146488;\n  (*(code *)PTR___stack_chk_fail_00146488)();\n  piVar8 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + iVar5 * 4) + 4);\n  piVar7 = (int *)0x0;\n  if (piVar8 != (int *)0x0) {\n    piVar4 = (int *)*piVar8;\n    piVar1 = (int *)*piVar8;\n    while( true ) {\n      piVar7 = piVar4;\n      if (piVar8 == piVar7) {\n        return (int)piVar1;\n      }\n      if (piVar7 == (int *)0x0) break;\n      piVar4 = (int *)*piVar7;\n      piVar1 = piVar7;\n    }\n  }\n  return (int)piVar7;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (declaration "JOB *job;" type_identifier (pointer_declarator "*job" * identifier) ;) (declaration "int *piVar8;" primitive_type (pointer_declarator "*piVar8" * identifier) ;) (declaration "int job_index;" primitive_type identifier ;) (declaration "undefined *puVar9;" type_identifier (pointer_declarator "*puVar9" * identifier) ;) (declaration "sigset_t set;" type_identifier identifier ;) (declaration "sigset_t oset;" type_identifier identifier ;) (expression_statement "puVar3 = PTR___stack_chk_guard_001464dc;" (assignment_expression "puVar3 = PTR___stack_chk_guard_001464dc" identifier = identifier) ;) (expression_statement "puVar9 = PTR_js_00144e58;" (assignment_expression "puVar9 = PTR_js_00144e58" identifier = identifier) ;) (expression_statement "iVar5 = *(int *)PTR___stack_chk_guard_001464dc;" (assignment_expression "iVar5 = *(int *)PTR___stack_chk_guard_001464dc" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_001464dc" * (cast_expression "(int *)PTR___stack_chk_guard_001464dc" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "(*(code *)PTR_sigemptyset_001462d4)(&set);" (call_expression "(*(code *)PTR_sigemptyset_001462d4)(&set)" (parenthesized_expression "(*(code *)PTR_sigemptyset_001462d4)" ( (pointer_expression "*(code *)PTR_sigemptyset_001462d4" * (cast_expression "(code *)PTR_sigemptyset_001462d4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(&set)" ( (pointer_expression "&set" & identifier) ))) ;) (expression_statement "(*(code *)PTR_sigaddset_00146364)(&set,0x12);" (call_expression "(*(code *)PTR_sigaddset_00146364)(&set,0x12)" (parenthesized_expression "(*(code *)PTR_sigaddset_00146364)" ( (pointer_expression "*(code *)PTR_sigaddset_00146364" * (cast_expression "(code *)PTR_sigaddset_00146364" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(&set,0x12)" ( (pointer_expression "&set" & identifier) , number_literal ))) ;) (expression_statement "(*(code *)PTR_sigemptyset_001462d4)(&oset);" (call_expression "(*(code *)PTR_sigemptyset_001462d4)(&oset)" (parenthesized_expression "(*(code *)PTR_sigemptyset_001462d4)" ( (pointer_expression "*(code *)PTR_sigemptyset_001462d4" * (cast_expression "(code *)PTR_sigemptyset_001462d4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(&oset)" ( (pointer_expression "&oset" & identifier) ))) ;) (expression_statement "(*(code *)PTR_sigprocmask_00146514)(1,&set,&oset);" (call_expression "(*(code *)PTR_sigprocmask_00146514)(1,&set,&oset)" (parenthesized_expression "(*(code *)PTR_sigprocmask_00146514)" ( (pointer_expression "*(code *)PTR_sigprocmask_00146514" * (cast_expression "(code *)PTR_sigprocmask_00146514" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(1,&set,&oset)" ( number_literal , (pointer_expression "&set" & identifier) , (pointer_expression "&oset" & identifier) ))) ;) (expression_statement "puVar2 = PTR_jobs_00144e5c;" (assignment_expression "puVar2 = PTR_jobs_00144e5c" identifier = identifier) ;) (if_statement "if (0 < *(int *)(puVar9 + 0x18)) {\n    job_index = 0;\n    do {\n      job = *(JOB **)(*(int *)puVar2 + job_index * 4);\n      if ((job != (JOB *)0x0) && (iVar6 = print_job(job,(int)func,arg1,job_index), iVar6 != 0))\n      goto LAB_00065a08;\n      job_index = job_index + 1;\n    } while (job_index < *(int *)(puVar9 + 0x18));\n  }" if (parenthesized_expression "(0 < *(int *)(puVar9 + 0x18))" ( (binary_expression "0 < *(int *)(puVar9 + 0x18)" number_literal < (pointer_expression "*(int *)(puVar9 + 0x18)" * (cast_expression "(int *)(puVar9 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar9 + 0x18)" ( (binary_expression "puVar9 + 0x18" identifier + number_literal) ))))) )) (compound_statement "{\n    job_index = 0;\n    do {\n      job = *(JOB **)(*(int *)puVar2 + job_index * 4);\n      if ((job != (JOB *)0x0) && (iVar6 = print_job(job,(int)func,arg1,job_index), iVar6 != 0))\n      goto LAB_00065a08;\n      job_index = job_index + 1;\n    } while (job_index < *(int *)(puVar9 + 0x18));\n  }" { (expression_statement "job_index = 0;" (assignment_expression "job_index = 0" identifier = number_literal) ;) (do_statement "do {\n      job = *(JOB **)(*(int *)puVar2 + job_index * 4);\n      if ((job != (JOB *)0x0) && (iVar6 = print_job(job,(int)func,arg1,job_index), iVar6 != 0))\n      goto LAB_00065a08;\n      job_index = job_index + 1;\n    } while (job_index < *(int *)(puVar9 + 0x18));" do (compound_statement "{\n      job = *(JOB **)(*(int *)puVar2 + job_index * 4);\n      if ((job != (JOB *)0x0) && (iVar6 = print_job(job,(int)func,arg1,job_index), iVar6 != 0))\n      goto LAB_00065a08;\n      job_index = job_index + 1;\n    }" { (expression_statement "job = *(JOB **)(*(int *)puVar2 + job_index * 4);" (assignment_expression "job = *(JOB **)(*(int *)puVar2 + job_index * 4)" identifier = (pointer_expression "*(JOB **)(*(int *)puVar2 + job_index * 4)" * (cast_expression "(JOB **)(*(int *)puVar2 + job_index * 4)" ( (type_descriptor "JOB **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)puVar2 + job_index * 4)" ( (binary_expression "*(int *)puVar2 + job_index * 4" (pointer_expression "*(int *)puVar2" * (cast_expression "(int *)puVar2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + (binary_expression "job_index * 4" identifier * number_literal)) ))))) ;) (if_statement "if ((job != (JOB *)0x0) && (iVar6 = print_job(job,(int)func,arg1,job_index), iVar6 != 0))\n      goto LAB_00065a08;" if (parenthesized_expression "((job != (JOB *)0x0) && (iVar6 = print_job(job,(int)func,arg1,job_index), iVar6 != 0))" ( (binary_expression "(job != (JOB *)0x0) && (iVar6 = print_job(job,(int)func,arg1,job_index), iVar6 != 0)" (parenthesized_expression "(job != (JOB *)0x0)" ( (binary_expression "job != (JOB *)0x0" identifier != (cast_expression "(JOB *)0x0" ( (type_descriptor "JOB *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar6 = print_job(job,(int)func,arg1,job_index), iVar6 != 0)" ( (comma_expression "iVar6 = print_job(job,(int)func,arg1,job_index), iVar6 != 0" (assignment_expression "iVar6 = print_job(job,(int)func,arg1,job_index)" identifier = (call_expression "print_job(job,(int)func,arg1,job_index)" identifier (argument_list "(job,(int)func,arg1,job_index)" ( identifier , (cast_expression "(int)func" ( (type_descriptor "int" primitive_type) ) identifier) , identifier , identifier )))) , (binary_expression "iVar6 != 0" identifier != number_literal)) ))) )) (goto_statement "goto LAB_00065a08;" goto statement_identifier ;)) (expression_statement "job_index = job_index + 1;" (assignment_expression "job_index = job_index + 1" identifier = (binary_expression "job_index + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(job_index < *(int *)(puVar9 + 0x18))" ( (binary_expression "job_index < *(int *)(puVar9 + 0x18)" identifier < (pointer_expression "*(int *)(puVar9 + 0x18)" * (cast_expression "(int *)(puVar9 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar9 + 0x18)" ( (binary_expression "puVar9 + 0x18" identifier + number_literal) ))))) )) ;) })) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (labeled_statement "LAB_00065a08:\n  (*(code *)PTR_sigprocmask_00146514)(3,&oset,0);" statement_identifier : (expression_statement "(*(code *)PTR_sigprocmask_00146514)(3,&oset,0);" (call_expression "(*(code *)PTR_sigprocmask_00146514)(3,&oset,0)" (parenthesized_expression "(*(code *)PTR_sigprocmask_00146514)" ( (pointer_expression "*(code *)PTR_sigprocmask_00146514" * (cast_expression "(code *)PTR_sigprocmask_00146514" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(3,&oset,0)" ( number_literal , (pointer_expression "&oset" & identifier) , number_literal ))) ;)) (if_statement "if (iVar5 == *(int *)puVar3) {\n    return iVar6;\n  }" if (parenthesized_expression "(iVar5 == *(int *)puVar3)" ( (binary_expression "iVar5 == *(int *)puVar3" identifier == (pointer_expression "*(int *)puVar3" * (cast_expression "(int *)puVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return iVar6;\n  }" { (return_statement "return iVar6;" return identifier ;) })) (expression_statement "puVar9 = PTR___stack_chk_fail_00146488;" (assignment_expression "puVar9 = PTR___stack_chk_fail_00146488" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_00146488)();" (call_expression "(*(code *)PTR___stack_chk_fail_00146488)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00146488)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00146488" * (cast_expression "(code *)PTR___stack_chk_fail_00146488" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "piVar8 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + iVar5 * 4) + 4);" (assignment_expression "piVar8 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + iVar5 * 4) + 4)" identifier = (pointer_expression "*(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + iVar5 * 4) + 4)" * (cast_expression "(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + iVar5 * 4) + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(**(int **)(puVar9 + 0xdf3f0) + iVar5 * 4) + 4)" ( (binary_expression "*(int *)(**(int **)(puVar9 + 0xdf3f0) + iVar5 * 4) + 4" (pointer_expression "*(int *)(**(int **)(puVar9 + 0xdf3f0) + iVar5 * 4)" * (cast_expression "(int *)(**(int **)(puVar9 + 0xdf3f0) + iVar5 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(**(int **)(puVar9 + 0xdf3f0) + iVar5 * 4)" ( (binary_expression "**(int **)(puVar9 + 0xdf3f0) + iVar5 * 4" (pointer_expression "**(int **)(puVar9 + 0xdf3f0)" * (pointer_expression "*(int **)(puVar9 + 0xdf3f0)" * (cast_expression "(int **)(puVar9 + 0xdf3f0)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar9 + 0xdf3f0)" ( (binary_expression "puVar9 + 0xdf3f0" identifier + number_literal) ))))) + (binary_expression "iVar5 * 4" identifier * number_literal)) )))) + number_literal) ))))) ;) (expression_statement "piVar7 = (int *)0x0;" (assignment_expression "piVar7 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (piVar8 != (int *)0x0) {\n    piVar4 = (int *)*piVar8;\n    piVar1 = (int *)*piVar8;\n    while( true ) {\n      piVar7 = piVar4;\n      if (piVar8 == piVar7) {\n        return (int)piVar1;\n      }\n      if (piVar7 == (int *)0x0) break;\n      piVar4 = (int *)*piVar7;\n      piVar1 = piVar7;\n    }\n  }" if (parenthesized_expression "(piVar8 != (int *)0x0)" ( (binary_expression "piVar8 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    piVar4 = (int *)*piVar8;\n    piVar1 = (int *)*piVar8;\n    while( true ) {\n      piVar7 = piVar4;\n      if (piVar8 == piVar7) {\n        return (int)piVar1;\n      }\n      if (piVar7 == (int *)0x0) break;\n      piVar4 = (int *)*piVar7;\n      piVar1 = piVar7;\n    }\n  }" { (expression_statement "piVar4 = (int *)*piVar8;" (assignment_expression "piVar4 = (int *)*piVar8" identifier = (cast_expression "(int *)*piVar8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar8" * identifier))) ;) (expression_statement "piVar1 = (int *)*piVar8;" (assignment_expression "piVar1 = (int *)*piVar8" identifier = (cast_expression "(int *)*piVar8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar8" * identifier))) ;) (while_statement "while( true ) {\n      piVar7 = piVar4;\n      if (piVar8 == piVar7) {\n        return (int)piVar1;\n      }\n      if (piVar7 == (int *)0x0) break;\n      piVar4 = (int *)*piVar7;\n      piVar1 = piVar7;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      piVar7 = piVar4;\n      if (piVar8 == piVar7) {\n        return (int)piVar1;\n      }\n      if (piVar7 == (int *)0x0) break;\n      piVar4 = (int *)*piVar7;\n      piVar1 = piVar7;\n    }" { (expression_statement "piVar7 = piVar4;" (assignment_expression "piVar7 = piVar4" identifier = identifier) ;) (if_statement "if (piVar8 == piVar7) {\n        return (int)piVar1;\n      }" if (parenthesized_expression "(piVar8 == piVar7)" ( (binary_expression "piVar8 == piVar7" identifier == identifier) )) (compound_statement "{\n        return (int)piVar1;\n      }" { (return_statement "return (int)piVar1;" return (cast_expression "(int)piVar1" ( (type_descriptor "int" primitive_type) ) identifier) ;) })) (if_statement "if (piVar7 == (int *)0x0) break;" if (parenthesized_expression "(piVar7 == (int *)0x0)" ( (binary_expression "piVar7 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (break_statement "break;" break ;)) (expression_statement "piVar4 = (int *)*piVar7;" (assignment_expression "piVar4 = (int *)*piVar7" identifier = (cast_expression "(int *)*piVar7" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar7" * identifier))) ;) (expression_statement "piVar1 = piVar7;" (assignment_expression "piVar1 = piVar7" identifier = identifier) ;) })) })) (return_statement "return (int)piVar7;" return (cast_expression "(int)piVar7" ( (type_descriptor "int" primitive_type) ) identifier) ;) })))
(translation_unit "int * FUN_000658f8(undefined4 param_1,undefined4 param_2)\n\n{\n  int *piVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int *piVar4;\n  int *piVar5;\n  int iVar6;\n  int *piVar7;\n  int iVar8;\n  undefined *puVar9;\n  undefined1 auStack_12c [128];\n  undefined1 auStack_ac [128];\n  int local_2c;\n  \n  puVar3 = PTR___stack_chk_guard_001464dc;\n  puVar9 = PTR_js_00144e58;\n  local_2c = *(int *)PTR___stack_chk_guard_001464dc;\n  (*(code *)PTR_sigemptyset_001462d4)(auStack_12c);\n  (*(code *)PTR_sigaddset_00146364)(auStack_12c,0x12);\n  (*(code *)PTR_sigemptyset_001462d4)(auStack_ac);\n  (*(code *)PTR_sigprocmask_00146514)(1,auStack_12c,auStack_ac);\n  puVar2 = PTR_jobs_00144e5c;\n  if (0 < *(int *)(puVar9 + 0x18)) {\n    iVar8 = 0;\n    do {\n      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);\n      if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;\n      iVar8 = iVar8 + 1;\n    } while (iVar8 < *(int *)(puVar9 + 0x18));\n  }\n  piVar5 = (int *)0x0;\nLAB_00065a08:\n  (*(code *)PTR_sigprocmask_00146514)(3,auStack_ac,0);\n  if (local_2c == *(int *)puVar3) {\n    return piVar5;\n  }\n  puVar9 = PTR___stack_chk_fail_00146488;\n  (*(code *)PTR___stack_chk_fail_00146488)();\n  piVar7 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4);\n  piVar5 = (int *)0x0;\n  if (piVar7 != (int *)0x0) {\n    piVar4 = (int *)*piVar7;\n    piVar1 = (int *)*piVar7;\n    while( true ) {\n      piVar5 = piVar4;\n      if (piVar7 == piVar5) {\n        return piVar1;\n      }\n      if (piVar5 == (int *)0x0) break;\n      piVar4 = (int *)*piVar5;\n      piVar1 = piVar5;\n    }\n  }\n  return piVar5;\n}\n\n" (function_definition "int * FUN_000658f8(undefined4 param_1,undefined4 param_2)\n\n{\n  int *piVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int *piVar4;\n  int *piVar5;\n  int iVar6;\n  int *piVar7;\n  int iVar8;\n  undefined *puVar9;\n  undefined1 auStack_12c [128];\n  undefined1 auStack_ac [128];\n  int local_2c;\n  \n  puVar3 = PTR___stack_chk_guard_001464dc;\n  puVar9 = PTR_js_00144e58;\n  local_2c = *(int *)PTR___stack_chk_guard_001464dc;\n  (*(code *)PTR_sigemptyset_001462d4)(auStack_12c);\n  (*(code *)PTR_sigaddset_00146364)(auStack_12c,0x12);\n  (*(code *)PTR_sigemptyset_001462d4)(auStack_ac);\n  (*(code *)PTR_sigprocmask_00146514)(1,auStack_12c,auStack_ac);\n  puVar2 = PTR_jobs_00144e5c;\n  if (0 < *(int *)(puVar9 + 0x18)) {\n    iVar8 = 0;\n    do {\n      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);\n      if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;\n      iVar8 = iVar8 + 1;\n    } while (iVar8 < *(int *)(puVar9 + 0x18));\n  }\n  piVar5 = (int *)0x0;\nLAB_00065a08:\n  (*(code *)PTR_sigprocmask_00146514)(3,auStack_ac,0);\n  if (local_2c == *(int *)puVar3) {\n    return piVar5;\n  }\n  puVar9 = PTR___stack_chk_fail_00146488;\n  (*(code *)PTR___stack_chk_fail_00146488)();\n  piVar7 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4);\n  piVar5 = (int *)0x0;\n  if (piVar7 != (int *)0x0) {\n    piVar4 = (int *)*piVar7;\n    piVar1 = (int *)*piVar7;\n    while( true ) {\n      piVar5 = piVar4;\n      if (piVar7 == piVar5) {\n        return piVar1;\n      }\n      if (piVar5 == (int *)0x0) break;\n      piVar4 = (int *)*piVar5;\n      piVar1 = piVar5;\n    }\n  }\n  return piVar5;\n}" primitive_type (pointer_declarator "* FUN_000658f8(undefined4 param_1,undefined4 param_2)" * (function_declarator "FUN_000658f8(undefined4 param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) )))) (compound_statement "{\n  int *piVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int *piVar4;\n  int *piVar5;\n  int iVar6;\n  int *piVar7;\n  int iVar8;\n  undefined *puVar9;\n  undefined1 auStack_12c [128];\n  undefined1 auStack_ac [128];\n  int local_2c;\n  \n  puVar3 = PTR___stack_chk_guard_001464dc;\n  puVar9 = PTR_js_00144e58;\n  local_2c = *(int *)PTR___stack_chk_guard_001464dc;\n  (*(code *)PTR_sigemptyset_001462d4)(auStack_12c);\n  (*(code *)PTR_sigaddset_00146364)(auStack_12c,0x12);\n  (*(code *)PTR_sigemptyset_001462d4)(auStack_ac);\n  (*(code *)PTR_sigprocmask_00146514)(1,auStack_12c,auStack_ac);\n  puVar2 = PTR_jobs_00144e5c;\n  if (0 < *(int *)(puVar9 + 0x18)) {\n    iVar8 = 0;\n    do {\n      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);\n      if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;\n      iVar8 = iVar8 + 1;\n    } while (iVar8 < *(int *)(puVar9 + 0x18));\n  }\n  piVar5 = (int *)0x0;\nLAB_00065a08:\n  (*(code *)PTR_sigprocmask_00146514)(3,auStack_ac,0);\n  if (local_2c == *(int *)puVar3) {\n    return piVar5;\n  }\n  puVar9 = PTR___stack_chk_fail_00146488;\n  (*(code *)PTR___stack_chk_fail_00146488)();\n  piVar7 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4);\n  piVar5 = (int *)0x0;\n  if (piVar7 != (int *)0x0) {\n    piVar4 = (int *)*piVar7;\n    piVar1 = (int *)*piVar7;\n    while( true ) {\n      piVar5 = piVar4;\n      if (piVar7 == piVar5) {\n        return piVar1;\n      }\n      if (piVar5 == (int *)0x0) break;\n      piVar4 = (int *)*piVar5;\n      piVar1 = piVar5;\n    }\n  }\n  return piVar5;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "undefined *puVar9;" type_identifier (pointer_declarator "*puVar9" * identifier) ;) (declaration "undefined1 auStack_12c [128];" type_identifier (array_declarator "auStack_12c [128]" identifier [ number_literal ]) ;) (declaration "undefined1 auStack_ac [128];" type_identifier (array_declarator "auStack_ac [128]" identifier [ number_literal ]) ;) (declaration "int local_2c;" primitive_type identifier ;) (expression_statement "puVar3 = PTR___stack_chk_guard_001464dc;" (assignment_expression "puVar3 = PTR___stack_chk_guard_001464dc" identifier = identifier) ;) (expression_statement "puVar9 = PTR_js_00144e58;" (assignment_expression "puVar9 = PTR_js_00144e58" identifier = identifier) ;) (expression_statement "local_2c = *(int *)PTR___stack_chk_guard_001464dc;" (assignment_expression "local_2c = *(int *)PTR___stack_chk_guard_001464dc" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_001464dc" * (cast_expression "(int *)PTR___stack_chk_guard_001464dc" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "(*(code *)PTR_sigemptyset_001462d4)(auStack_12c);" (call_expression "(*(code *)PTR_sigemptyset_001462d4)(auStack_12c)" (parenthesized_expression "(*(code *)PTR_sigemptyset_001462d4)" ( (pointer_expression "*(code *)PTR_sigemptyset_001462d4" * (cast_expression "(code *)PTR_sigemptyset_001462d4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_12c)" ( identifier ))) ;) (expression_statement "(*(code *)PTR_sigaddset_00146364)(auStack_12c,0x12);" (call_expression "(*(code *)PTR_sigaddset_00146364)(auStack_12c,0x12)" (parenthesized_expression "(*(code *)PTR_sigaddset_00146364)" ( (pointer_expression "*(code *)PTR_sigaddset_00146364" * (cast_expression "(code *)PTR_sigaddset_00146364" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_12c,0x12)" ( identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_sigemptyset_001462d4)(auStack_ac);" (call_expression "(*(code *)PTR_sigemptyset_001462d4)(auStack_ac)" (parenthesized_expression "(*(code *)PTR_sigemptyset_001462d4)" ( (pointer_expression "*(code *)PTR_sigemptyset_001462d4" * (cast_expression "(code *)PTR_sigemptyset_001462d4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_ac)" ( identifier ))) ;) (expression_statement "(*(code *)PTR_sigprocmask_00146514)(1,auStack_12c,auStack_ac);" (call_expression "(*(code *)PTR_sigprocmask_00146514)(1,auStack_12c,auStack_ac)" (parenthesized_expression "(*(code *)PTR_sigprocmask_00146514)" ( (pointer_expression "*(code *)PTR_sigprocmask_00146514" * (cast_expression "(code *)PTR_sigprocmask_00146514" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(1,auStack_12c,auStack_ac)" ( number_literal , identifier , identifier ))) ;) (expression_statement "puVar2 = PTR_jobs_00144e5c;" (assignment_expression "puVar2 = PTR_jobs_00144e5c" identifier = identifier) ;) (if_statement "if (0 < *(int *)(puVar9 + 0x18)) {\n    iVar8 = 0;\n    do {\n      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);\n      if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;\n      iVar8 = iVar8 + 1;\n    } while (iVar8 < *(int *)(puVar9 + 0x18));\n  }" if (parenthesized_expression "(0 < *(int *)(puVar9 + 0x18))" ( (binary_expression "0 < *(int *)(puVar9 + 0x18)" number_literal < (pointer_expression "*(int *)(puVar9 + 0x18)" * (cast_expression "(int *)(puVar9 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar9 + 0x18)" ( (binary_expression "puVar9 + 0x18" identifier + number_literal) ))))) )) (compound_statement "{\n    iVar8 = 0;\n    do {\n      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);\n      if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;\n      iVar8 = iVar8 + 1;\n    } while (iVar8 < *(int *)(puVar9 + 0x18));\n  }" { (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);\n      if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;\n      iVar8 = iVar8 + 1;\n    } while (iVar8 < *(int *)(puVar9 + 0x18));" do (compound_statement "{\n      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);\n      if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;\n      iVar8 = iVar8 + 1;\n    }" { (expression_statement "iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);" (assignment_expression "iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4)" identifier = (pointer_expression "*(int *)(*(int *)puVar2 + iVar8 * 4)" * (cast_expression "(int *)(*(int *)puVar2 + iVar8 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)puVar2 + iVar8 * 4)" ( (binary_expression "*(int *)puVar2 + iVar8 * 4" (pointer_expression "*(int *)puVar2" * (cast_expression "(int *)puVar2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + (binary_expression "iVar8 * 4" identifier * number_literal)) ))))) ;) (if_statement "if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;" if (parenthesized_expression "((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))" ( (binary_expression "(iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0)" (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) && (parenthesized_expression "(piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0)" ( (comma_expression "piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0" (assignment_expression "piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8)" identifier = (cast_expression "(int *)FUN_0006585c(iVar6,param_1,param_2,iVar8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0006585c(iVar6,param_1,param_2,iVar8)" identifier (argument_list "(iVar6,param_1,param_2,iVar8)" ( identifier , identifier , identifier , identifier ))))) , (binary_expression "piVar5 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) (goto_statement "goto LAB_00065a08;" goto statement_identifier ;)) (expression_statement "iVar8 = iVar8 + 1;" (assignment_expression "iVar8 = iVar8 + 1" identifier = (binary_expression "iVar8 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar8 < *(int *)(puVar9 + 0x18))" ( (binary_expression "iVar8 < *(int *)(puVar9 + 0x18)" identifier < (pointer_expression "*(int *)(puVar9 + 0x18)" * (cast_expression "(int *)(puVar9 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar9 + 0x18)" ( (binary_expression "puVar9 + 0x18" identifier + number_literal) ))))) )) ;) })) (expression_statement "piVar5 = (int *)0x0;" (assignment_expression "piVar5 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (labeled_statement "LAB_00065a08:\n  (*(code *)PTR_sigprocmask_00146514)(3,auStack_ac,0);" statement_identifier : (expression_statement "(*(code *)PTR_sigprocmask_00146514)(3,auStack_ac,0);" (call_expression "(*(code *)PTR_sigprocmask_00146514)(3,auStack_ac,0)" (parenthesized_expression "(*(code *)PTR_sigprocmask_00146514)" ( (pointer_expression "*(code *)PTR_sigprocmask_00146514" * (cast_expression "(code *)PTR_sigprocmask_00146514" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(3,auStack_ac,0)" ( number_literal , identifier , number_literal ))) ;)) (if_statement "if (local_2c == *(int *)puVar3) {\n    return piVar5;\n  }" if (parenthesized_expression "(local_2c == *(int *)puVar3)" ( (binary_expression "local_2c == *(int *)puVar3" identifier == (pointer_expression "*(int *)puVar3" * (cast_expression "(int *)puVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return piVar5;\n  }" { (return_statement "return piVar5;" return identifier ;) })) (expression_statement "puVar9 = PTR___stack_chk_fail_00146488;" (assignment_expression "puVar9 = PTR___stack_chk_fail_00146488" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_00146488)();" (call_expression "(*(code *)PTR___stack_chk_fail_00146488)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00146488)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00146488" * (cast_expression "(code *)PTR___stack_chk_fail_00146488" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "piVar7 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4);" (assignment_expression "piVar7 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4)" identifier = (pointer_expression "*(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4)" * (cast_expression "(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4)" ( (binary_expression "*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4" (pointer_expression "*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4)" * (cast_expression "(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4)" ( (binary_expression "**(int **)(puVar9 + 0xdf3f0) + local_2c * 4" (pointer_expression "**(int **)(puVar9 + 0xdf3f0)" * (pointer_expression "*(int **)(puVar9 + 0xdf3f0)" * (cast_expression "(int **)(puVar9 + 0xdf3f0)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar9 + 0xdf3f0)" ( (binary_expression "puVar9 + 0xdf3f0" identifier + number_literal) ))))) + (binary_expression "local_2c * 4" identifier * number_literal)) )))) + number_literal) ))))) ;) (expression_statement "piVar5 = (int *)0x0;" (assignment_expression "piVar5 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (piVar7 != (int *)0x0) {\n    piVar4 = (int *)*piVar7;\n    piVar1 = (int *)*piVar7;\n    while( true ) {\n      piVar5 = piVar4;\n      if (piVar7 == piVar5) {\n        return piVar1;\n      }\n      if (piVar5 == (int *)0x0) break;\n      piVar4 = (int *)*piVar5;\n      piVar1 = piVar5;\n    }\n  }" if (parenthesized_expression "(piVar7 != (int *)0x0)" ( (binary_expression "piVar7 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    piVar4 = (int *)*piVar7;\n    piVar1 = (int *)*piVar7;\n    while( true ) {\n      piVar5 = piVar4;\n      if (piVar7 == piVar5) {\n        return piVar1;\n      }\n      if (piVar5 == (int *)0x0) break;\n      piVar4 = (int *)*piVar5;\n      piVar1 = piVar5;\n    }\n  }" { (expression_statement "piVar4 = (int *)*piVar7;" (assignment_expression "piVar4 = (int *)*piVar7" identifier = (cast_expression "(int *)*piVar7" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar7" * identifier))) ;) (expression_statement "piVar1 = (int *)*piVar7;" (assignment_expression "piVar1 = (int *)*piVar7" identifier = (cast_expression "(int *)*piVar7" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar7" * identifier))) ;) (while_statement "while( true ) {\n      piVar5 = piVar4;\n      if (piVar7 == piVar5) {\n        return piVar1;\n      }\n      if (piVar5 == (int *)0x0) break;\n      piVar4 = (int *)*piVar5;\n      piVar1 = piVar5;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      piVar5 = piVar4;\n      if (piVar7 == piVar5) {\n        return piVar1;\n      }\n      if (piVar5 == (int *)0x0) break;\n      piVar4 = (int *)*piVar5;\n      piVar1 = piVar5;\n    }" { (expression_statement "piVar5 = piVar4;" (assignment_expression "piVar5 = piVar4" identifier = identifier) ;) (if_statement "if (piVar7 == piVar5) {\n        return piVar1;\n      }" if (parenthesized_expression "(piVar7 == piVar5)" ( (binary_expression "piVar7 == piVar5" identifier == identifier) )) (compound_statement "{\n        return piVar1;\n      }" { (return_statement "return piVar1;" return identifier ;) })) (if_statement "if (piVar5 == (int *)0x0) break;" if (parenthesized_expression "(piVar5 == (int *)0x0)" ( (binary_expression "piVar5 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (break_statement "break;" break ;)) (expression_statement "piVar4 = (int *)*piVar5;" (assignment_expression "piVar4 = (int *)*piVar5" identifier = (cast_expression "(int *)*piVar5" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar5" * identifier))) ;) (expression_statement "piVar1 = piVar5;" (assignment_expression "piVar1 = piVar5" identifier = identifier) ;) })) })) (return_statement "return piVar5;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * 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 = IDENT) ;) (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 ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) + (binary_expression IDENT * LIT)) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT ))))) , (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT))) ))) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (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 (assignment_expression IDENT = 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 = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) + (binary_expression IDENT * LIT)) )))) + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) })) (return_statement return IDENT ;) })))
(function_definition "int * FUN_000658f8(undefined4 param_1,undefined4 param_2)\n\n{\n  int *piVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int *piVar4;\n  int *piVar5;\n  int iVar6;\n  int *piVar7;\n  int iVar8;\n  undefined *puVar9;\n  undefined1 auStack_12c [128];\n  undefined1 auStack_ac [128];\n  int local_2c;\n  \n  puVar3 = PTR___stack_chk_guard_001464dc;\n  puVar9 = PTR_js_00144e58;\n  local_2c = *(int *)PTR___stack_chk_guard_001464dc;\n  (*(code *)PTR_sigemptyset_001462d4)(auStack_12c);\n  (*(code *)PTR_sigaddset_00146364)(auStack_12c,0x12);\n  (*(code *)PTR_sigemptyset_001462d4)(auStack_ac);\n  (*(code *)PTR_sigprocmask_00146514)(1,auStack_12c,auStack_ac);\n  puVar2 = PTR_jobs_00144e5c;\n  if (0 < *(int *)(puVar9 + 0x18)) {\n    iVar8 = 0;\n    do {\n      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);\n      if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;\n      iVar8 = iVar8 + 1;\n    } while (iVar8 < *(int *)(puVar9 + 0x18));\n  }\n  piVar5 = (int *)0x0;\nLAB_00065a08:\n  (*(code *)PTR_sigprocmask_00146514)(3,auStack_ac,0);\n  if (local_2c == *(int *)puVar3) {\n    return piVar5;\n  }\n  puVar9 = PTR___stack_chk_fail_00146488;\n  (*(code *)PTR___stack_chk_fail_00146488)();\n  piVar7 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4);\n  piVar5 = (int *)0x0;\n  if (piVar7 != (int *)0x0) {\n    piVar4 = (int *)*piVar7;\n    piVar1 = (int *)*piVar7;\n    while( true ) {\n      piVar5 = piVar4;\n      if (piVar7 == piVar5) {\n        return piVar1;\n      }\n      if (piVar5 == (int *)0x0) break;\n      piVar4 = (int *)*piVar5;\n      piVar1 = piVar5;\n    }\n  }\n  return piVar5;\n}" (primitive_type "int") (pointer_declarator "* FUN_000658f8(undefined4 param_1,undefined4 param_2)" (* "*") (function_declarator "FUN_000658f8(undefined4 param_1,undefined4 param_2)" (identifier "FUN_000658f8") (parameter_list "(undefined4 param_1,undefined4 param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")")))) (compound_statement "{\n  int *piVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  int *piVar4;\n  int *piVar5;\n  int iVar6;\n  int *piVar7;\n  int iVar8;\n  undefined *puVar9;\n  undefined1 auStack_12c [128];\n  undefined1 auStack_ac [128];\n  int local_2c;\n  \n  puVar3 = PTR___stack_chk_guard_001464dc;\n  puVar9 = PTR_js_00144e58;\n  local_2c = *(int *)PTR___stack_chk_guard_001464dc;\n  (*(code *)PTR_sigemptyset_001462d4)(auStack_12c);\n  (*(code *)PTR_sigaddset_00146364)(auStack_12c,0x12);\n  (*(code *)PTR_sigemptyset_001462d4)(auStack_ac);\n  (*(code *)PTR_sigprocmask_00146514)(1,auStack_12c,auStack_ac);\n  puVar2 = PTR_jobs_00144e5c;\n  if (0 < *(int *)(puVar9 + 0x18)) {\n    iVar8 = 0;\n    do {\n      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);\n      if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;\n      iVar8 = iVar8 + 1;\n    } while (iVar8 < *(int *)(puVar9 + 0x18));\n  }\n  piVar5 = (int *)0x0;\nLAB_00065a08:\n  (*(code *)PTR_sigprocmask_00146514)(3,auStack_ac,0);\n  if (local_2c == *(int *)puVar3) {\n    return piVar5;\n  }\n  puVar9 = PTR___stack_chk_fail_00146488;\n  (*(code *)PTR___stack_chk_fail_00146488)();\n  piVar7 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4);\n  piVar5 = (int *)0x0;\n  if (piVar7 != (int *)0x0) {\n    piVar4 = (int *)*piVar7;\n    piVar1 = (int *)*piVar7;\n    while( true ) {\n      piVar5 = piVar4;\n      if (piVar7 == piVar5) {\n        return piVar1;\n      }\n      if (piVar5 == (int *)0x0) break;\n      piVar4 = (int *)*piVar5;\n      piVar1 = piVar5;\n    }\n  }\n  return piVar5;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "undefined *puVar2;" (type_identifier "undefined") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined *puVar3;" (type_identifier "undefined") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "int *piVar5;" (primitive_type "int") (pointer_declarator "*piVar5" (* "*") (identifier "piVar5")) (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "int *piVar7;" (primitive_type "int") (pointer_declarator "*piVar7" (* "*") (identifier "piVar7")) (; ";")) (declaration "int iVar8;" (primitive_type "int") (identifier "iVar8") (; ";")) (declaration "undefined *puVar9;" (type_identifier "undefined") (pointer_declarator "*puVar9" (* "*") (identifier "puVar9")) (; ";")) (declaration "undefined1 auStack_12c [128];" (type_identifier "undefined1") (array_declarator "auStack_12c [128]" (identifier "auStack_12c") ([ "[") (number_literal "128") (] "]")) (; ";")) (declaration "undefined1 auStack_ac [128];" (type_identifier "undefined1") (array_declarator "auStack_ac [128]" (identifier "auStack_ac") ([ "[") (number_literal "128") (] "]")) (; ";")) (declaration "int local_2c;" (primitive_type "int") (identifier "local_2c") (; ";")) (expression_statement "puVar3 = PTR___stack_chk_guard_001464dc;" (assignment_expression "puVar3 = PTR___stack_chk_guard_001464dc" (identifier "puVar3") (= "=") (identifier "PTR___stack_chk_guard_001464dc")) (; ";")) (expression_statement "puVar9 = PTR_js_00144e58;" (assignment_expression "puVar9 = PTR_js_00144e58" (identifier "puVar9") (= "=") (identifier "PTR_js_00144e58")) (; ";")) (expression_statement "local_2c = *(int *)PTR___stack_chk_guard_001464dc;" (assignment_expression "local_2c = *(int *)PTR___stack_chk_guard_001464dc" (identifier "local_2c") (= "=") (pointer_expression "*(int *)PTR___stack_chk_guard_001464dc" (* "*") (cast_expression "(int *)PTR___stack_chk_guard_001464dc" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_guard_001464dc")))) (; ";")) (expression_statement "(*(code *)PTR_sigemptyset_001462d4)(auStack_12c);" (call_expression "(*(code *)PTR_sigemptyset_001462d4)(auStack_12c)" (parenthesized_expression "(*(code *)PTR_sigemptyset_001462d4)" (( "(") (pointer_expression "*(code *)PTR_sigemptyset_001462d4" (* "*") (cast_expression "(code *)PTR_sigemptyset_001462d4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sigemptyset_001462d4"))) () ")")) (argument_list "(auStack_12c)" (( "(") (identifier "auStack_12c") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_sigaddset_00146364)(auStack_12c,0x12);" (call_expression "(*(code *)PTR_sigaddset_00146364)(auStack_12c,0x12)" (parenthesized_expression "(*(code *)PTR_sigaddset_00146364)" (( "(") (pointer_expression "*(code *)PTR_sigaddset_00146364" (* "*") (cast_expression "(code *)PTR_sigaddset_00146364" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sigaddset_00146364"))) () ")")) (argument_list "(auStack_12c,0x12)" (( "(") (identifier "auStack_12c") (, ",") (number_literal "0x12") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_sigemptyset_001462d4)(auStack_ac);" (call_expression "(*(code *)PTR_sigemptyset_001462d4)(auStack_ac)" (parenthesized_expression "(*(code *)PTR_sigemptyset_001462d4)" (( "(") (pointer_expression "*(code *)PTR_sigemptyset_001462d4" (* "*") (cast_expression "(code *)PTR_sigemptyset_001462d4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sigemptyset_001462d4"))) () ")")) (argument_list "(auStack_ac)" (( "(") (identifier "auStack_ac") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_sigprocmask_00146514)(1,auStack_12c,auStack_ac);" (call_expression "(*(code *)PTR_sigprocmask_00146514)(1,auStack_12c,auStack_ac)" (parenthesized_expression "(*(code *)PTR_sigprocmask_00146514)" (( "(") (pointer_expression "*(code *)PTR_sigprocmask_00146514" (* "*") (cast_expression "(code *)PTR_sigprocmask_00146514" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sigprocmask_00146514"))) () ")")) (argument_list "(1,auStack_12c,auStack_ac)" (( "(") (number_literal "1") (, ",") (identifier "auStack_12c") (, ",") (identifier "auStack_ac") () ")"))) (; ";")) (expression_statement "puVar2 = PTR_jobs_00144e5c;" (assignment_expression "puVar2 = PTR_jobs_00144e5c" (identifier "puVar2") (= "=") (identifier "PTR_jobs_00144e5c")) (; ";")) (if_statement "if (0 < *(int *)(puVar9 + 0x18)) {\n    iVar8 = 0;\n    do {\n      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);\n      if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;\n      iVar8 = iVar8 + 1;\n    } while (iVar8 < *(int *)(puVar9 + 0x18));\n  }" (if "if") (parenthesized_expression "(0 < *(int *)(puVar9 + 0x18))" (( "(") (binary_expression "0 < *(int *)(puVar9 + 0x18)" (number_literal "0") (< "<") (pointer_expression "*(int *)(puVar9 + 0x18)" (* "*") (cast_expression "(int *)(puVar9 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar9 + 0x18)" (( "(") (binary_expression "puVar9 + 0x18" (identifier "puVar9") (+ "+") (number_literal "0x18")) () ")"))))) () ")")) (compound_statement "{\n    iVar8 = 0;\n    do {\n      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);\n      if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;\n      iVar8 = iVar8 + 1;\n    } while (iVar8 < *(int *)(puVar9 + 0x18));\n  }" ({ "{") (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" (identifier "iVar8") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);\n      if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;\n      iVar8 = iVar8 + 1;\n    } while (iVar8 < *(int *)(puVar9 + 0x18));" (do "do") (compound_statement "{\n      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);\n      if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;\n      iVar8 = iVar8 + 1;\n    }" ({ "{") (expression_statement "iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);" (assignment_expression "iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4)" (identifier "iVar6") (= "=") (pointer_expression "*(int *)(*(int *)puVar2 + iVar8 * 4)" (* "*") (cast_expression "(int *)(*(int *)puVar2 + iVar8 * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)puVar2 + iVar8 * 4)" (( "(") (binary_expression "*(int *)puVar2 + iVar8 * 4" (pointer_expression "*(int *)puVar2" (* "*") (cast_expression "(int *)puVar2" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar2"))) (+ "+") (binary_expression "iVar8 * 4" (identifier "iVar8") (* "*") (number_literal "4"))) () ")"))))) (; ";")) (if_statement "if ((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))\n      goto LAB_00065a08;" (if "if") (parenthesized_expression "((iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))" (( "(") (binary_expression "(iVar6 != 0) &&\n         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0)" (parenthesized_expression "(iVar6 != 0)" (( "(") (binary_expression "iVar6 != 0" (identifier "iVar6") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0)" (( "(") (comma_expression "piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0" (assignment_expression "piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8)" (identifier "piVar5") (= "=") (cast_expression "(int *)FUN_0006585c(iVar6,param_1,param_2,iVar8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0006585c(iVar6,param_1,param_2,iVar8)" (identifier "FUN_0006585c") (argument_list "(iVar6,param_1,param_2,iVar8)" (( "(") (identifier "iVar6") (, ",") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "iVar8") () ")"))))) (, ",") (binary_expression "piVar5 != (int *)0x0" (identifier "piVar5") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")))) () ")"))) () ")")) (goto_statement "goto LAB_00065a08;" (goto "goto") (statement_identifier "LAB_00065a08") (; ";"))) (expression_statement "iVar8 = iVar8 + 1;" (assignment_expression "iVar8 = iVar8 + 1" (identifier "iVar8") (= "=") (binary_expression "iVar8 + 1" (identifier "iVar8") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar8 < *(int *)(puVar9 + 0x18))" (( "(") (binary_expression "iVar8 < *(int *)(puVar9 + 0x18)" (identifier "iVar8") (< "<") (pointer_expression "*(int *)(puVar9 + 0x18)" (* "*") (cast_expression "(int *)(puVar9 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar9 + 0x18)" (( "(") (binary_expression "puVar9 + 0x18" (identifier "puVar9") (+ "+") (number_literal "0x18")) () ")"))))) () ")")) (; ";")) (} "}"))) (expression_statement "piVar5 = (int *)0x0;" (assignment_expression "piVar5 = (int *)0x0" (identifier "piVar5") (= "=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (labeled_statement "LAB_00065a08:\n  (*(code *)PTR_sigprocmask_00146514)(3,auStack_ac,0);" (statement_identifier "LAB_00065a08") (: ":") (expression_statement "(*(code *)PTR_sigprocmask_00146514)(3,auStack_ac,0);" (call_expression "(*(code *)PTR_sigprocmask_00146514)(3,auStack_ac,0)" (parenthesized_expression "(*(code *)PTR_sigprocmask_00146514)" (( "(") (pointer_expression "*(code *)PTR_sigprocmask_00146514" (* "*") (cast_expression "(code *)PTR_sigprocmask_00146514" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sigprocmask_00146514"))) () ")")) (argument_list "(3,auStack_ac,0)" (( "(") (number_literal "3") (, ",") (identifier "auStack_ac") (, ",") (number_literal "0") () ")"))) (; ";"))) (if_statement "if (local_2c == *(int *)puVar3) {\n    return piVar5;\n  }" (if "if") (parenthesized_expression "(local_2c == *(int *)puVar3)" (( "(") (binary_expression "local_2c == *(int *)puVar3" (identifier "local_2c") (== "==") (pointer_expression "*(int *)puVar3" (* "*") (cast_expression "(int *)puVar3" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar3")))) () ")")) (compound_statement "{\n    return piVar5;\n  }" ({ "{") (return_statement "return piVar5;" (return "return") (identifier "piVar5") (; ";")) (} "}"))) (expression_statement "puVar9 = PTR___stack_chk_fail_00146488;" (assignment_expression "puVar9 = PTR___stack_chk_fail_00146488" (identifier "puVar9") (= "=") (identifier "PTR___stack_chk_fail_00146488")) (; ";")) (expression_statement "(*(code *)PTR___stack_chk_fail_00146488)();" (call_expression "(*(code *)PTR___stack_chk_fail_00146488)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00146488)" (( "(") (pointer_expression "*(code *)PTR___stack_chk_fail_00146488" (* "*") (cast_expression "(code *)PTR___stack_chk_fail_00146488" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_fail_00146488"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "piVar7 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4);" (assignment_expression "piVar7 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4)" (identifier "piVar7") (= "=") (pointer_expression "*(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4)" (* "*") (cast_expression "(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4)" (( "(") (binary_expression "*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4" (pointer_expression "*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4)" (* "*") (cast_expression "(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4)" (( "(") (binary_expression "**(int **)(puVar9 + 0xdf3f0) + local_2c * 4" (pointer_expression "**(int **)(puVar9 + 0xdf3f0)" (* "*") (pointer_expression "*(int **)(puVar9 + 0xdf3f0)" (* "*") (cast_expression "(int **)(puVar9 + 0xdf3f0)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar9 + 0xdf3f0)" (( "(") (binary_expression "puVar9 + 0xdf3f0" (identifier "puVar9") (+ "+") (number_literal "0xdf3f0")) () ")"))))) (+ "+") (binary_expression "local_2c * 4" (identifier "local_2c") (* "*") (number_literal "4"))) () ")")))) (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "piVar5 = (int *)0x0;" (assignment_expression "piVar5 = (int *)0x0" (identifier "piVar5") (= "=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (if_statement "if (piVar7 != (int *)0x0) {\n    piVar4 = (int *)*piVar7;\n    piVar1 = (int *)*piVar7;\n    while( true ) {\n      piVar5 = piVar4;\n      if (piVar7 == piVar5) {\n        return piVar1;\n      }\n      if (piVar5 == (int *)0x0) break;\n      piVar4 = (int *)*piVar5;\n      piVar1 = piVar5;\n    }\n  }" (if "if") (parenthesized_expression "(piVar7 != (int *)0x0)" (( "(") (binary_expression "piVar7 != (int *)0x0" (identifier "piVar7") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    piVar4 = (int *)*piVar7;\n    piVar1 = (int *)*piVar7;\n    while( true ) {\n      piVar5 = piVar4;\n      if (piVar7 == piVar5) {\n        return piVar1;\n      }\n      if (piVar5 == (int *)0x0) break;\n      piVar4 = (int *)*piVar5;\n      piVar1 = piVar5;\n    }\n  }" ({ "{") (expression_statement "piVar4 = (int *)*piVar7;" (assignment_expression "piVar4 = (int *)*piVar7" (identifier "piVar4") (= "=") (cast_expression "(int *)*piVar7" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar7" (* "*") (identifier "piVar7")))) (; ";")) (expression_statement "piVar1 = (int *)*piVar7;" (assignment_expression "piVar1 = (int *)*piVar7" (identifier "piVar1") (= "=") (cast_expression "(int *)*piVar7" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar7" (* "*") (identifier "piVar7")))) (; ";")) (while_statement "while( true ) {\n      piVar5 = piVar4;\n      if (piVar7 == piVar5) {\n        return piVar1;\n      }\n      if (piVar5 == (int *)0x0) break;\n      piVar4 = (int *)*piVar5;\n      piVar1 = piVar5;\n    }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n      piVar5 = piVar4;\n      if (piVar7 == piVar5) {\n        return piVar1;\n      }\n      if (piVar5 == (int *)0x0) break;\n      piVar4 = (int *)*piVar5;\n      piVar1 = piVar5;\n    }" ({ "{") (expression_statement "piVar5 = piVar4;" (assignment_expression "piVar5 = piVar4" (identifier "piVar5") (= "=") (identifier "piVar4")) (; ";")) (if_statement "if (piVar7 == piVar5) {\n        return piVar1;\n      }" (if "if") (parenthesized_expression "(piVar7 == piVar5)" (( "(") (binary_expression "piVar7 == piVar5" (identifier "piVar7") (== "==") (identifier "piVar5")) () ")")) (compound_statement "{\n        return piVar1;\n      }" ({ "{") (return_statement "return piVar1;" (return "return") (identifier "piVar1") (; ";")) (} "}"))) (if_statement "if (piVar5 == (int *)0x0) break;" (if "if") (parenthesized_expression "(piVar5 == (int *)0x0)" (( "(") (binary_expression "piVar5 == (int *)0x0" (identifier "piVar5") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "piVar4 = (int *)*piVar5;" (assignment_expression "piVar4 = (int *)*piVar5" (identifier "piVar4") (= "=") (cast_expression "(int *)*piVar5" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar5" (* "*") (identifier "piVar5")))) (; ";")) (expression_statement "piVar1 = piVar5;" (assignment_expression "piVar1 = piVar5" (identifier "piVar1") (= "=") (identifier "piVar5")) (; ";")) (} "}"))) (} "}"))) (return_statement "return piVar5;" (return "return") (identifier "piVar5") (; ";")) (} "}")))

int function_1(type_1 *func,int arg1,int arg2)

{
  int *piVar1;
  type_2 *puVar2;
  type_2 *puVar3;
  int *piVar4;
  int var_6;
  int var_5;
  int *var_8;
  type_3 *var_3;
  int *var_7;
  int var_2;
  type_2 *var_1;
  type_4 set;
  type_4 oset;
  
  puVar3 = PTR___stack_chk_guard_001464dc;
  var_1 = PTR_js_00144e58;
  var_6 = *(int *)PTR___stack_chk_guard_001464dc;
  (*(type_5 *)PTR_sigemptyset_001462d4)(&set);
  (*(type_5 *)PTR_sigaddset_00146364)(&set,0x12);
  (*(type_5 *)PTR_sigemptyset_001462d4)(&oset);
  (*(type_5 *)PTR_sigprocmask_00146514)(1,&set,&oset);
  puVar2 = PTR_jobs_00144e5c;
  if (0 < *(int *)(var_1 + 0x18)) {
    var_2 = 0;
    do {
      var_3 = *(type_3 **)(*(int *)puVar2 + var_2 * 4);
      if ((var_3 != (type_3 *)0x0) && (var_5 = var_4(var_3,(int)func,arg1,var_2), var_5 != 0))
      goto LAB_00065a08;
      var_2 = var_2 + 1;
    } while (var_2 < *(int *)(var_1 + 0x18));
  }
  var_5 = 0;
LAB_00065a08:
  (*(type_5 *)PTR_sigprocmask_00146514)(3,&oset,0);
  if (var_6 == *(int *)puVar3) {
    return var_5;
  }
  var_1 = PTR___stack_chk_fail_00146488;
  (*(type_5 *)PTR___stack_chk_fail_00146488)();
  var_7 = *(int **)(*(int *)(**(int **)(var_1 + 0xdf3f0) + var_6 * 4) + 4);
  var_8 = (int *)0x0;
  if (var_7 != (int *)0x0) {
    piVar4 = (int *)*var_7;
    piVar1 = (int *)*var_7;
    while( true ) {
      var_8 = piVar4;
      if (var_7 == var_8) {
        return (int)piVar1;
      }
      if (var_8 == (int *)0x0) break;
      piVar4 = (int *)*var_8;
      piVar1 = var_8;
    }
  }
  return (int)var_8;
}


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

int * MASKED(undefined4 param_1,undefined4 param_2)

{
  int *piVar1;
  undefined *puVar2;
  undefined *puVar3;
  int *piVar4;
  int *piVar5;
  int iVar6;
  int *piVar7;
  int iVar8;
  undefined *puVar9;
  undefined1 auStack_12c [128];
  undefined1 auStack_ac [128];
  int local_2c;
  
  puVar3 = PTR___stack_chk_guard_001464dc;
  puVar9 = PTR_js_00144e58;
  local_2c = *(int *)PTR___stack_chk_guard_001464dc;
  (*(code *)PTR_sigemptyset_001462d4)(auStack_12c);
  (*(code *)PTR_sigaddset_00146364)(auStack_12c,0x12);
  (*(code *)PTR_sigemptyset_001462d4)(auStack_ac);
  (*(code *)PTR_sigprocmask_00146514)(1,auStack_12c,auStack_ac);
  puVar2 = PTR_jobs_00144e5c;
  if (0 < *(int *)(puVar9 + 0x18)) {
    iVar8 = 0;
    do {
      iVar6 = *(int *)(*(int *)puVar2 + iVar8 * 4);
      if ((iVar6 != 0) &&
         (piVar5 = (int *)FUN_0006585c(iVar6,param_1,param_2,iVar8), piVar5 != (int *)0x0))
      goto LAB_00065a08;
      iVar8 = iVar8 + 1;
    } while (iVar8 < *(int *)(puVar9 + 0x18));
  }
  piVar5 = (int *)0x0;
LAB_00065a08:
  (*(code *)PTR_sigprocmask_00146514)(3,auStack_ac,0);
  if (local_2c == *(int *)puVar3) {
    return piVar5;
  }
  puVar9 = PTR___stack_chk_fail_00146488;
  (*(code *)PTR___stack_chk_fail_00146488)();
  piVar7 = *(int **)(*(int *)(**(int **)(puVar9 + 0xdf3f0) + local_2c * 4) + 4);
  piVar5 = (int *)0x0;
  if (piVar7 != (int *)0x0) {
    piVar4 = (int *)*piVar7;
    piVar1 = (int *)*piVar7;
    while( true ) {
      piVar5 = piVar4;
      if (piVar7 == piVar5) {
        return piVar1;
      }
      if (piVar5 == (int *)0x0) break;
      piVar4 = (int *)*piVar5;
      piVar1 = piVar5;
    }
  }
  return piVar5;
}

