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

int wait_for_any_job(int flags)

{
  int iVar1;
  JOB *pJVar2;
  int iVar3;
  int *piVar4;
  int iVar5;
  int in_GS_OFFSET;
  sigset_t set;
  sigset_t oset;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (jobs_list_frozen == 0) {
    sigemptyset((sigset_t *)&set);
    sigaddset((sigset_t *)&set,0x11);
    sigemptyset((sigset_t *)&oset);
    sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);
    if (0 < js.j_jobslots) {
      iVar5 = 0;
      do {
        pJVar2 = jobs[iVar5];
        if (((pJVar2 != (JOB *)0x0) && (pJVar2->state == JDEAD)) && ((pJVar2->flags & 2) == 0))
        goto LAB_000625d0;
        iVar5 = iVar5 + 1;
      } while (iVar5 != js.j_jobslots);
    }
    sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);
    do {
      sigemptyset((sigset_t *)&set);
      sigaddset((sigset_t *)&set,0x11);
      sigemptyset((sigset_t *)&oset);
      sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);
      if (js.j_jobslots < 1) {
        if (js.j_jobslots == 0) {
LAB_000627f0:
          iVar3 = -1;
          sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);
          goto LAB_0006261f;
        }
      }
      else {
        iVar5 = 0;
        while (((pJVar2 = jobs[iVar5], pJVar2 == (JOB *)0x0 || (pJVar2->state != JRUNNING)) ||
               ((pJVar2->flags & 1) != 0))) {
          iVar5 = iVar5 + 1;
          if (iVar5 == js.j_jobslots) goto LAB_000627f0;
        }
      }
      sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);
      if (terminating_signal != 0) {
        termsig_handler(terminating_signal);
      }
      if (interrupt_state != 0) {
        throw_to_top_level();
      }
      if (terminating_signal != 0) {
        termsig_handler(terminating_signal);
      }
      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&
         ((this_shell_builtin == (sh_builtin_func_t *)PTR_wait_builtin_00149ee8 &&
          (this_shell_builtin != (sh_builtin_func_t *)0x0)))) {
                    /* WARNING: Subroutine does not return */
        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);
      }
      piVar4 = __errno_location();
      *piVar4 = 0;
      iVar5 = wait_for(-1);
      if (((iVar5 == -1) && (*piVar4 == 10)) && (js.j_jobslots != 0)) {
        mark_all_jobs_as_dead();
      }
      sigemptyset((sigset_t *)&set);
      sigaddset((sigset_t *)&set,0x11);
      sigemptyset((sigset_t *)&oset);
      sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);
      if (0 < js.j_jobslots) {
        iVar5 = 0;
        do {
          if ((jobs[iVar5] != (JOB *)0x0) && (jobs[iVar5]->state == JDEAD)) goto LAB_000625d0;
          iVar5 = iVar5 + 1;
        } while (iVar5 != js.j_jobslots);
      }
      sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);
    } while( true );
  }
  iVar3 = -1;
LAB_0006261f:
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar3;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
LAB_000625d0:
  iVar3 = job_exit_status(iVar5);
  if ((js.j_jobslots != 0) &&
     ((notify_of_job_status(), js.j_jobslots != 0 && (jobs_list_frozen == 0)))) {
    delete_job(iVar5,0);
  }
  coproc_reap();
  sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);
  goto LAB_0006261f;
}



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

undefined4 wait_for_any_job(void)

{
  int iVar1;
  undefined4 uVar2;
  int *piVar3;
  int iVar4;
  int in_GS_OFFSET;
  sigset_t local_120;
  sigset_t local_a0;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x62539;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (DAT_00151020 == 0) {
    sigemptyset(&local_120);
    sigaddset(&local_120,0x11);
    sigemptyset(&local_a0);
    sigprocmask(0,&local_120,&local_a0);
    if (0 < DAT_0014a7d8) {
      iVar4 = 0;
      do {
        iVar1 = *(int *)(jobs + iVar4 * 4);
        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))
        goto LAB_000625d0;
        iVar4 = iVar4 + 1;
      } while (iVar4 != DAT_0014a7d8);
    }
    sigprocmask(2,&local_a0,(sigset_t *)0x0);
    do {
      sigemptyset(&local_120);
      sigaddset(&local_120,0x11);
      sigemptyset(&local_a0);
      sigprocmask(0,&local_120,&local_a0);
      if (DAT_0014a7d8 < 1) {
        if (DAT_0014a7d8 == 0) {
LAB_000627f0:
          uVar2 = 0xffffffff;
          sigprocmask(2,&local_a0,(sigset_t *)0x0);
          goto LAB_0006261f;
        }
      }
      else {
        iVar4 = 0;
        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||
               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {
          iVar4 = iVar4 + 1;
          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;
        }
      }
      sigprocmask(2,&local_a0,(sigset_t *)0x0);
      if (terminating_signal != 0) {
        termsig_handler(terminating_signal);
      }
      if (interrupt_state != 0) {
        throw_to_top_level();
      }
      if (terminating_signal != 0) {
        termsig_handler(terminating_signal);
      }
      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&
         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&
          (this_shell_builtin != (undefined *)0x0)))) {
                    /* WARNING: Subroutine does not return */
        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);
      }
      piVar3 = __errno_location();
      *piVar3 = 0;
      iVar4 = wait_for(0xffffffff);
      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {
        FUN_0005d3a0();
      }
      sigemptyset(&local_120);
      sigaddset(&local_120,0x11);
      sigemptyset(&local_a0);
      sigprocmask(0,&local_120,&local_a0);
      if (0 < DAT_0014a7d8) {
        iVar4 = 0;
        do {
          iVar1 = *(int *)(jobs + iVar4 * 4);
          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;
          iVar4 = iVar4 + 1;
        } while (iVar4 != DAT_0014a7d8);
      }
      sigprocmask(2,&local_a0,(sigset_t *)0x0);
    } while( true );
  }
  uVar2 = 0xffffffff;
LAB_0006261f:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000ecc40();
LAB_000625d0:
  uVar2 = job_exit_status(iVar4);
  if ((DAT_0014a7d8 != 0) && ((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)))) {
    FUN_0005ec70();
  }
  coproc_reap();
  sigprocmask(2,&local_a0,(sigset_t *)0x0);
  goto LAB_0006261f;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00031ed0
ADD EBX,0xe7ac7
SUB ESP,0x12c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x11c],EAX
XOR EAX,EAX
MOV ESI,dword ptr [EBX + 0x7020]
TEST ESI,ESI
JNZ 0x00062882
SUB ESP,0xc
LEA EDI,[ESP + 0x28]
PUSH EDI
CALL 0x0002fa40
POP EAX
POP EDX
PUSH 0x11
PUSH EDI
CALL 0x0002f810
POP ECX
LEA ESI,[ESP + 0xa8]
PUSH ESI
CALL 0x0002fa40
ADD ESP,0xc
PUSH ESI
PUSH EDI
PUSH 0x0
CALL 0x0002f1a0
MOV EDX,dword ptr [EBX + 0x7d8]
ADD ESP,0x10
TEST EDX,EDX
JLE 0x00062640
MOV ECX,dword ptr [EBX + 0x5ef4]
XOR EBP,EBP
JMP 0x000625bb
ADD EBP,0x1
CMP EBP,EDX
JZ 0x00062640
MOV EAX,dword ptr [ECX + EBP*0x4]
TEST EAX,EAX
JZ 0x000625b0
CMP dword ptr [EAX + 0xc],0x4
JNZ 0x000625b0
TEST byte ptr [EAX + 0x10],0x2
JNZ 0x000625b0
NOP
SUB ESP,0xc
PUSH EBP
CALL 0x0005f7c0
ADD ESP,0x10
MOV EDI,EAX
MOV EAX,dword ptr [EBX + 0x7d8]
TEST EAX,EAX
JZ 0x0006260a
CALL 0x0005e090
MOV EAX,dword ptr [EBX + 0x7d8]
TEST EAX,EAX
JZ 0x0006260a
MOV ECX,dword ptr [EBX + 0x7020]
TEST ECX,ECX
JNZ 0x0006260a
XOR EDX,EDX
MOV EAX,EBP
CALL 0x0005ec70
CALL 0x00048a70
SUB ESP,0x4
PUSH 0x0
PUSH ESI
PUSH 0x2
CALL 0x0002f1a0
ADD ESP,0x10
MOV EAX,EDI
MOV EDI,dword ptr [ESP + 0x11c]
XOR EDI,dword ptr GS:[0x14]
JNZ 0x0006288c
ADD ESP,0x12c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
PUSH 0x0
PUSH ESI
PUSH 0x2
CALL 0x0002f1a0
ADD ESP,0x10
LEA EAX,[0x7c0]
MOV dword ptr [ESP + 0x8],EAX
LEA EAX,[EBX + 0x72c0]
MOV dword ptr [ESP + 0x4],EAX
LEA EAX,[EBX + 0x72cc]
MOV dword ptr [ESP + 0xc],EAX
SUB ESP,0xc
PUSH EDI
CALL 0x0002fa40
POP EAX
POP EDX
PUSH 0x11
PUSH EDI
CALL 0x0002f810
MOV dword ptr [ESP],ESI
CALL 0x0002fa40
ADD ESP,0xc
PUSH ESI
PUSH EDI
PUSH 0x0
CALL 0x0002f1a0
MOV EAX,dword ptr [ESP + 0x18]
ADD ESP,0x10
MOV ECX,dword ptr [EAX + EBX*0x1 + 0x18]
TEST ECX,ECX
JLE 0x000627e5
MOV EBP,dword ptr [EBX + 0x5ef4]
XOR EAX,EAX
JMP 0x000626c3
ADD EAX,0x1
CMP EAX,ECX
JZ 0x000627f0
MOV EDX,dword ptr [EBP + EAX*0x4]
TEST EDX,EDX
JZ 0x000626b8
CMP dword ptr [EDX + 0xc],0x1
JNZ 0x000626b8
TEST byte ptr [EDX + 0x10],0x1
JNZ 0x000626b8
LEA ESI,[ESI]
NOP
SUB ESP,0x4
PUSH 0x0
PUSH ESI
PUSH 0x2
CALL 0x0002f1a0
MOV EAX,dword ptr [ESP + 0x14]
ADD ESP,0x10
MOV EAX,dword ptr [EAX]
TEST EAX,EAX
JNZ 0x00062838
MOV EAX,dword ptr [ESP + 0xc]
MOV EAX,dword ptr [EAX]
TEST EAX,EAX
JNZ 0x00062858
MOV EAX,dword ptr [ESP + 0x4]
MOV EAX,dword ptr [EAX]
TEST EAX,EAX
JNZ 0x0006286b
LEA EAX,[EBX + 0xd7e0]
MOV EAX,dword ptr [EAX]
TEST EAX,EAX
JZ 0x00062750
LEA EAX,[EBX + 0xd10c]
MOV EAX,dword ptr [EAX]
TEST EAX,EAX
JZ 0x00062750
LEA EAX,[EBX + 0x7660]
MOV EAX,dword ptr [EAX]
CMP EAX,dword ptr [EBX + 0xfffffee8]
JNZ 0x00062750
TEST EAX,EAX
JNZ 0x00062891
LEA ESI,[ESI]
CALL 0x0002f8b0
SUB ESP,0xc
MOV dword ptr [EAX],0x0
MOV EBP,EAX
PUSH -0x1
CALL 0x00061120
ADD ESP,0x10
CMP EAX,-0x1
JZ 0x00062810
SUB ESP,0xc
PUSH EDI
CALL 0x0002fa40
POP EDX
POP ECX
PUSH 0x11
PUSH EDI
CALL 0x0002f810
MOV dword ptr [ESP],ESI
CALL 0x0002fa40
ADD ESP,0xc
PUSH ESI
PUSH EDI
PUSH 0x0
CALL 0x0002f1a0
MOV EAX,dword ptr [ESP + 0x18]
ADD ESP,0x10
MOV EDX,dword ptr [EAX + EBX*0x1 + 0x18]
TEST EDX,EDX
JLE 0x000627d0
MOV ECX,dword ptr [EBX + 0x5ef4]
XOR EBP,EBP
LEA ESI,[ESI]
MOV EAX,dword ptr [ECX + EBP*0x4]
TEST EAX,EAX
JZ 0x000627c9
CMP dword ptr [EAX + 0xc],0x4
JZ 0x000625d0
ADD EBP,0x1
CMP EBP,EDX
JNZ 0x000627b8
SUB ESP,0x4
PUSH 0x0
PUSH ESI
PUSH 0x2
CALL 0x0002f1a0
ADD ESP,0x10
JMP 0x0006266e
JNZ 0x000626e0
LEA ESI,[ESI]
NOP
SUB ESP,0x4
MOV EDI,0xffffffff
PUSH 0x0
PUSH ESI
PUSH 0x2
CALL 0x0002f1a0
ADD ESP,0x10
JMP 0x0006261f
CMP dword ptr [EBP],0xa
JNZ 0x00062773
MOV EAX,dword ptr [ESP + 0x8]
MOV EBP,dword ptr [EAX + EBX*0x1 + 0x18]
TEST EBP,EBP
JZ 0x00062773
CALL 0x0005d3a0
JMP 0x00062773
MOV EAX,dword ptr [ESP + 0x4]
SUB ESP,0xc
MOV EAX,dword ptr [EAX]
PUSH EAX
CALL 0x0007f650
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0xc]
MOV EAX,dword ptr [EAX]
TEST EAX,EAX
JZ 0x0006270c
CALL 0x0007efc0
MOV EAX,dword ptr [ESP + 0x4]
MOV EAX,dword ptr [EAX]
TEST EAX,EAX
JZ 0x0006271a
MOV EAX,dword ptr [ESP + 0x4]
SUB ESP,0xc
MOV EAX,dword ptr [EAX]
PUSH EAX
CALL 0x0007f650
ADD ESP,0x10
JMP 0x0006271a
MOV EDI,0xffffffff
JMP 0x0006261f
CALL 0x000ecc40
PUSH EAX
PUSH EAX
PUSH 0x1
PUSH dword ptr [EBX + 0xffffffac]
CALL 0x0002fa00
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 wait_for_any_job(void)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  sigset_t local_120;\n  sigset_t local_a0;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x62539;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (DAT_00151020 == 0) {\n    sigemptyset(&local_120);\n    sigaddset(&local_120,0x11);\n    sigemptyset(&local_a0);\n    sigprocmask(0,&local_120,&local_a0);\n    if (0 < DAT_0014a7d8) {\n      iVar4 = 0;\n      do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);\n    }\n    sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    do {\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    /* WARNING: Subroutine does not return */\n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar3 = __errno_location();\n      *piVar3 = 0;\n      iVar4 = wait_for(0xffffffff);\n      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    } while( true );\n  }\n  uVar2 = 0xffffffff;\nLAB_0006261f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000ecc40();\nLAB_000625d0:\n  uVar2 = job_exit_status(iVar4);\n  if ((DAT_0014a7d8 != 0) && ((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)))) {\n    FUN_0005ec70();\n  }\n  coproc_reap();\n  sigprocmask(2,&local_a0,(sigset_t *)0x0);\n  goto LAB_0006261f;\n}\n\n" comment (function_definition "undefined4 wait_for_any_job(void)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  sigset_t local_120;\n  sigset_t local_a0;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x62539;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (DAT_00151020 == 0) {\n    sigemptyset(&local_120);\n    sigaddset(&local_120,0x11);\n    sigemptyset(&local_a0);\n    sigprocmask(0,&local_120,&local_a0);\n    if (0 < DAT_0014a7d8) {\n      iVar4 = 0;\n      do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);\n    }\n    sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    do {\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    /* WARNING: Subroutine does not return */\n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar3 = __errno_location();\n      *piVar3 = 0;\n      iVar4 = wait_for(0xffffffff);\n      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    } while( true );\n  }\n  uVar2 = 0xffffffff;\nLAB_0006261f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000ecc40();\nLAB_000625d0:\n  uVar2 = job_exit_status(iVar4);\n  if ((DAT_0014a7d8 != 0) && ((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)))) {\n    FUN_0005ec70();\n  }\n  coproc_reap();\n  sigprocmask(2,&local_a0,(sigset_t *)0x0);\n  goto LAB_0006261f;\n}" type_identifier (function_declarator "wait_for_any_job(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  sigset_t local_120;\n  sigset_t local_a0;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x62539;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (DAT_00151020 == 0) {\n    sigemptyset(&local_120);\n    sigaddset(&local_120,0x11);\n    sigemptyset(&local_a0);\n    sigprocmask(0,&local_120,&local_a0);\n    if (0 < DAT_0014a7d8) {\n      iVar4 = 0;\n      do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);\n    }\n    sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    do {\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    /* WARNING: Subroutine does not return */\n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar3 = __errno_location();\n      *piVar3 = 0;\n      iVar4 = wait_for(0xffffffff);\n      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    } while( true );\n  }\n  uVar2 = 0xffffffff;\nLAB_0006261f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000ecc40();\nLAB_000625d0:\n  uVar2 = job_exit_status(iVar4);\n  if ((DAT_0014a7d8 != 0) && ((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)))) {\n    FUN_0005ec70();\n  }\n  coproc_reap();\n  sigprocmask(2,&local_a0,(sigset_t *)0x0);\n  goto LAB_0006261f;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "sigset_t local_120;" type_identifier identifier ;) (declaration "sigset_t local_a0;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x62539;" (assignment_expression "uStack_14 = 0x62539" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (DAT_00151020 == 0) {\n    sigemptyset(&local_120);\n    sigaddset(&local_120,0x11);\n    sigemptyset(&local_a0);\n    sigprocmask(0,&local_120,&local_a0);\n    if (0 < DAT_0014a7d8) {\n      iVar4 = 0;\n      do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);\n    }\n    sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    do {\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    /* WARNING: Subroutine does not return */\n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar3 = __errno_location();\n      *piVar3 = 0;\n      iVar4 = wait_for(0xffffffff);\n      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    } while( true );\n  }" if (parenthesized_expression "(DAT_00151020 == 0)" ( (binary_expression "DAT_00151020 == 0" identifier == number_literal) )) (compound_statement "{\n    sigemptyset(&local_120);\n    sigaddset(&local_120,0x11);\n    sigemptyset(&local_a0);\n    sigprocmask(0,&local_120,&local_a0);\n    if (0 < DAT_0014a7d8) {\n      iVar4 = 0;\n      do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);\n    }\n    sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    do {\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    /* WARNING: Subroutine does not return */\n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar3 = __errno_location();\n      *piVar3 = 0;\n      iVar4 = wait_for(0xffffffff);\n      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    } while( true );\n  }" { (expression_statement "sigemptyset(&local_120);" (call_expression "sigemptyset(&local_120)" identifier (argument_list "(&local_120)" ( (pointer_expression "&local_120" & identifier) ))) ;) (expression_statement "sigaddset(&local_120,0x11);" (call_expression "sigaddset(&local_120,0x11)" identifier (argument_list "(&local_120,0x11)" ( (pointer_expression "&local_120" & identifier) , number_literal ))) ;) (expression_statement "sigemptyset(&local_a0);" (call_expression "sigemptyset(&local_a0)" identifier (argument_list "(&local_a0)" ( (pointer_expression "&local_a0" & identifier) ))) ;) (expression_statement "sigprocmask(0,&local_120,&local_a0);" (call_expression "sigprocmask(0,&local_120,&local_a0)" identifier (argument_list "(0,&local_120,&local_a0)" ( number_literal , (pointer_expression "&local_120" & identifier) , (pointer_expression "&local_a0" & identifier) ))) ;) (if_statement "if (0 < DAT_0014a7d8) {\n      iVar4 = 0;\n      do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);\n    }" if (parenthesized_expression "(0 < DAT_0014a7d8)" ( (binary_expression "0 < DAT_0014a7d8" number_literal < identifier) )) (compound_statement "{\n      iVar4 = 0;\n      do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);\n    }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);" do (compound_statement "{\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      }" { (expression_statement "iVar1 = *(int *)(jobs + iVar4 * 4);" (assignment_expression "iVar1 = *(int *)(jobs + iVar4 * 4)" identifier = (pointer_expression "*(int *)(jobs + iVar4 * 4)" * (cast_expression "(int *)(jobs + iVar4 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(jobs + iVar4 * 4)" ( (binary_expression "jobs + iVar4 * 4" identifier + (binary_expression "iVar4 * 4" identifier * number_literal)) ))))) ;) (if_statement "if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;" if (parenthesized_expression "(((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))" ( (binary_expression "((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0)" (parenthesized_expression "((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4))" ( (binary_expression "(iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) && (parenthesized_expression "(*(int *)(iVar1 + 0xc) == 4)" ( (binary_expression "*(int *)(iVar1 + 0xc) == 4" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) == number_literal) ))) )) && (parenthesized_expression "((*(byte *)(iVar1 + 0x10) & 2) == 0)" ( (binary_expression "(*(byte *)(iVar1 + 0x10) & 2) == 0" (parenthesized_expression "(*(byte *)(iVar1 + 0x10) & 2)" ( (binary_expression "*(byte *)(iVar1 + 0x10) & 2" (pointer_expression "*(byte *)(iVar1 + 0x10)" * (cast_expression "(byte *)(iVar1 + 0x10)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) )))) & number_literal) )) == number_literal) ))) )) (goto_statement "goto LAB_000625d0;" goto statement_identifier ;)) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 != DAT_0014a7d8)" ( (binary_expression "iVar4 != DAT_0014a7d8" identifier != identifier) )) ;) })) (expression_statement "sigprocmask(2,&local_a0,(sigset_t *)0x0);" (call_expression "sigprocmask(2,&local_a0,(sigset_t *)0x0)" identifier (argument_list "(2,&local_a0,(sigset_t *)0x0)" ( number_literal , (pointer_expression "&local_a0" & identifier) , (cast_expression "(sigset_t *)0x0" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) (do_statement "do {\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    /* WARNING: Subroutine does not return */\n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar3 = __errno_location();\n      *piVar3 = 0;\n      iVar4 = wait_for(0xffffffff);\n      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    } while( true );" do (compound_statement "{\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    /* WARNING: Subroutine does not return */\n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar3 = __errno_location();\n      *piVar3 = 0;\n      iVar4 = wait_for(0xffffffff);\n      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    }" { (expression_statement "sigemptyset(&local_120);" (call_expression "sigemptyset(&local_120)" identifier (argument_list "(&local_120)" ( (pointer_expression "&local_120" & identifier) ))) ;) (expression_statement "sigaddset(&local_120,0x11);" (call_expression "sigaddset(&local_120,0x11)" identifier (argument_list "(&local_120,0x11)" ( (pointer_expression "&local_120" & identifier) , number_literal ))) ;) (expression_statement "sigemptyset(&local_a0);" (call_expression "sigemptyset(&local_a0)" identifier (argument_list "(&local_a0)" ( (pointer_expression "&local_a0" & identifier) ))) ;) (expression_statement "sigprocmask(0,&local_120,&local_a0);" (call_expression "sigprocmask(0,&local_120,&local_a0)" identifier (argument_list "(0,&local_120,&local_a0)" ( number_literal , (pointer_expression "&local_120" & identifier) , (pointer_expression "&local_a0" & identifier) ))) ;) (if_statement "if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }" if (parenthesized_expression "(DAT_0014a7d8 < 1)" ( (binary_expression "DAT_0014a7d8 < 1" identifier < number_literal) )) (compound_statement "{\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }" { (if_statement "if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }" if (parenthesized_expression "(DAT_0014a7d8 == 0)" ( (binary_expression "DAT_0014a7d8 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }" { (labeled_statement "LAB_000627f0:\n          uVar2 = 0xffffffff;" statement_identifier : (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" identifier = number_literal) ;)) (expression_statement "sigprocmask(2,&local_a0,(sigset_t *)0x0);" (call_expression "sigprocmask(2,&local_a0,(sigset_t *)0x0)" identifier (argument_list "(2,&local_a0,(sigset_t *)0x0)" ( number_literal , (pointer_expression "&local_a0" & identifier) , (cast_expression "(sigset_t *)0x0" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) (goto_statement "goto LAB_0006261f;" goto statement_identifier ;) })) }) (else_clause "else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }" else (compound_statement "{\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (while_statement "while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }" while (parenthesized_expression "(((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0)))" ( (parenthesized_expression "((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))" ( (binary_expression "(iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0)" (parenthesized_expression "(iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1))" ( (comma_expression "iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)" (assignment_expression "iVar1 = *(int *)(jobs + iVar4 * 4)" identifier = (pointer_expression "*(int *)(jobs + iVar4 * 4)" * (cast_expression "(int *)(jobs + iVar4 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(jobs + iVar4 * 4)" ( (binary_expression "jobs + iVar4 * 4" identifier + (binary_expression "iVar4 * 4" identifier * number_literal)) ))))) , (binary_expression "iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)" (binary_expression "iVar1 == 0" identifier == number_literal) || (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 1)" ( (binary_expression "*(int *)(iVar1 + 0xc) != 1" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) != number_literal) )))) )) || (parenthesized_expression "((*(byte *)(iVar1 + 0x10) & 1) != 0)" ( (binary_expression "(*(byte *)(iVar1 + 0x10) & 1) != 0" (parenthesized_expression "(*(byte *)(iVar1 + 0x10) & 1)" ( (binary_expression "*(byte *)(iVar1 + 0x10) & 1" (pointer_expression "*(byte *)(iVar1 + 0x10)" * (cast_expression "(byte *)(iVar1 + 0x10)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) )))) & number_literal) )) != number_literal) ))) )) )) (compound_statement "{\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }" { (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (if_statement "if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;" if (parenthesized_expression "(iVar4 == DAT_0014a7d8)" ( (binary_expression "iVar4 == DAT_0014a7d8" identifier == identifier) )) (goto_statement "goto LAB_000627f0;" goto statement_identifier ;)) })) }))) (expression_statement "sigprocmask(2,&local_a0,(sigset_t *)0x0);" (call_expression "sigprocmask(2,&local_a0,(sigset_t *)0x0)" identifier (argument_list "(2,&local_a0,(sigset_t *)0x0)" ( number_literal , (pointer_expression "&local_a0" & identifier) , (cast_expression "(sigset_t *)0x0" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) (if_statement "if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }" if (parenthesized_expression "(terminating_signal != 0)" ( (binary_expression "terminating_signal != 0" identifier != number_literal) )) (compound_statement "{\n        termsig_handler(terminating_signal);\n      }" { (expression_statement "termsig_handler(terminating_signal);" (call_expression "termsig_handler(terminating_signal)" identifier (argument_list "(terminating_signal)" ( identifier ))) ;) })) (if_statement "if (interrupt_state != 0) {\n        throw_to_top_level();\n      }" if (parenthesized_expression "(interrupt_state != 0)" ( (binary_expression "interrupt_state != 0" identifier != number_literal) )) (compound_statement "{\n        throw_to_top_level();\n      }" { (expression_statement "throw_to_top_level();" (call_expression "throw_to_top_level()" identifier (argument_list "()" ( ))) ;) })) (if_statement "if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }" if (parenthesized_expression "(terminating_signal != 0)" ( (binary_expression "terminating_signal != 0" identifier != number_literal) )) (compound_statement "{\n        termsig_handler(terminating_signal);\n      }" { (expression_statement "termsig_handler(terminating_signal);" (call_expression "termsig_handler(terminating_signal)" identifier (argument_list "(terminating_signal)" ( identifier ))) ;) })) (if_statement "if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    /* WARNING: Subroutine does not return */\n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }" if (parenthesized_expression "(((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0))))" ( (binary_expression "((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))" (parenthesized_expression "((wait_intr_flag != 0) && (wait_signal_received != 0))" ( (binary_expression "(wait_intr_flag != 0) && (wait_signal_received != 0)" (parenthesized_expression "(wait_intr_flag != 0)" ( (binary_expression "wait_intr_flag != 0" identifier != number_literal) )) && (parenthesized_expression "(wait_signal_received != 0)" ( (binary_expression "wait_signal_received != 0" identifier != number_literal) ))) )) && (parenthesized_expression "((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))" ( (parenthesized_expression "(this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0))" ( (binary_expression "this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)" (binary_expression "this_shell_builtin == PTR_wait_builtin_00149ee8" identifier == identifier) && (parenthesized_expression "(this_shell_builtin != (undefined *)0x0)" ( (binary_expression "this_shell_builtin != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) ))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }" { comment (expression_statement "__longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);" (call_expression "__longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin)" identifier (argument_list "(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin)" ( identifier , number_literal , identifier , identifier ))) ;) })) (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar3 = 0;" (assignment_expression "*piVar3 = 0" (pointer_expression "*piVar3" * identifier) = number_literal) ;) (expression_statement "iVar4 = wait_for(0xffffffff);" (assignment_expression "iVar4 = wait_for(0xffffffff)" identifier = (call_expression "wait_for(0xffffffff)" identifier (argument_list "(0xffffffff)" ( number_literal )))) ;) (if_statement "if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }" if (parenthesized_expression "(((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0))" ( (binary_expression "((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)" (parenthesized_expression "((iVar4 == -1) && (*piVar3 == 10))" ( (binary_expression "(iVar4 == -1) && (*piVar3 == 10)" (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) && (parenthesized_expression "(*piVar3 == 10)" ( (binary_expression "*piVar3 == 10" (pointer_expression "*piVar3" * identifier) == number_literal) ))) )) && (parenthesized_expression "(DAT_0014a7d8 != 0)" ( (binary_expression "DAT_0014a7d8 != 0" identifier != number_literal) ))) )) (compound_statement "{\n        FUN_0005d3a0();\n      }" { (expression_statement "FUN_0005d3a0();" (call_expression "FUN_0005d3a0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "sigemptyset(&local_120);" (call_expression "sigemptyset(&local_120)" identifier (argument_list "(&local_120)" ( (pointer_expression "&local_120" & identifier) ))) ;) (expression_statement "sigaddset(&local_120,0x11);" (call_expression "sigaddset(&local_120,0x11)" identifier (argument_list "(&local_120,0x11)" ( (pointer_expression "&local_120" & identifier) , number_literal ))) ;) (expression_statement "sigemptyset(&local_a0);" (call_expression "sigemptyset(&local_a0)" identifier (argument_list "(&local_a0)" ( (pointer_expression "&local_a0" & identifier) ))) ;) (expression_statement "sigprocmask(0,&local_120,&local_a0);" (call_expression "sigprocmask(0,&local_120,&local_a0)" identifier (argument_list "(0,&local_120,&local_a0)" ( number_literal , (pointer_expression "&local_120" & identifier) , (pointer_expression "&local_a0" & identifier) ))) ;) (if_statement "if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }" if (parenthesized_expression "(0 < DAT_0014a7d8)" ( (binary_expression "0 < DAT_0014a7d8" number_literal < identifier) )) (compound_statement "{\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);" do (compound_statement "{\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        }" { (expression_statement "iVar1 = *(int *)(jobs + iVar4 * 4);" (assignment_expression "iVar1 = *(int *)(jobs + iVar4 * 4)" identifier = (pointer_expression "*(int *)(jobs + iVar4 * 4)" * (cast_expression "(int *)(jobs + iVar4 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(jobs + iVar4 * 4)" ( (binary_expression "jobs + iVar4 * 4" identifier + (binary_expression "iVar4 * 4" identifier * number_literal)) ))))) ;) (if_statement "if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;" if (parenthesized_expression "((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4))" ( (binary_expression "(iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) && (parenthesized_expression "(*(int *)(iVar1 + 0xc) == 4)" ( (binary_expression "*(int *)(iVar1 + 0xc) == 4" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) == number_literal) ))) )) (goto_statement "goto LAB_000625d0;" goto statement_identifier ;)) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 != DAT_0014a7d8)" ( (binary_expression "iVar4 != DAT_0014a7d8" identifier != identifier) )) ;) })) (expression_statement "sigprocmask(2,&local_a0,(sigset_t *)0x0);" (call_expression "sigprocmask(2,&local_a0,(sigset_t *)0x0)" identifier (argument_list "(2,&local_a0,(sigset_t *)0x0)" ( number_literal , (pointer_expression "&local_a0" & identifier) , (cast_expression "(sigset_t *)0x0" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })) (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" identifier = number_literal) ;) (labeled_statement "LAB_0006261f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) }))) comment (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" identifier (argument_list "()" ( ))) ;) (labeled_statement "LAB_000625d0:\n  uVar2 = job_exit_status(iVar4);" statement_identifier : (expression_statement "uVar2 = job_exit_status(iVar4);" (assignment_expression "uVar2 = job_exit_status(iVar4)" identifier = (call_expression "job_exit_status(iVar4)" identifier (argument_list "(iVar4)" ( identifier )))) ;)) (if_statement "if ((DAT_0014a7d8 != 0) && ((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)))) {\n    FUN_0005ec70();\n  }" if (parenthesized_expression "((DAT_0014a7d8 != 0) && ((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0))))" ( (binary_expression "(DAT_0014a7d8 != 0) && ((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)))" (parenthesized_expression "(DAT_0014a7d8 != 0)" ( (binary_expression "DAT_0014a7d8 != 0" identifier != number_literal) )) && (parenthesized_expression "((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)))" ( (parenthesized_expression "(FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0))" ( (comma_expression "FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)" (call_expression "FUN_0005e090()" identifier (argument_list "()" ( ))) , (binary_expression "DAT_0014a7d8 != 0 && (DAT_00151020 == 0)" (binary_expression "DAT_0014a7d8 != 0" identifier != number_literal) && (parenthesized_expression "(DAT_00151020 == 0)" ( (binary_expression "DAT_00151020 == 0" identifier == number_literal) )))) )) ))) )) (compound_statement "{\n    FUN_0005ec70();\n  }" { (expression_statement "FUN_0005ec70();" (call_expression "FUN_0005ec70()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "coproc_reap();" (call_expression "coproc_reap()" identifier (argument_list "()" ( ))) ;) (expression_statement "sigprocmask(2,&local_a0,(sigset_t *)0x0);" (call_expression "sigprocmask(2,&local_a0,(sigset_t *)0x0)" identifier (argument_list "(2,&local_a0,(sigset_t *)0x0)" ( number_literal , (pointer_expression "&local_a0" & identifier) , (cast_expression "(sigset_t *)0x0" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) (goto_statement "goto LAB_0006261f;" goto statement_identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint wait_for_any_job(int flags)\n\n{\n  int iVar1;\n  JOB *pJVar2;\n  int iVar3;\n  int *piVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  sigset_t set;\n  sigset_t oset;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (jobs_list_frozen == 0) {\n    sigemptyset((sigset_t *)&set);\n    sigaddset((sigset_t *)&set,0x11);\n    sigemptyset((sigset_t *)&oset);\n    sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);\n    if (0 < js.j_jobslots) {\n      iVar5 = 0;\n      do {\n        pJVar2 = jobs[iVar5];\n        if (((pJVar2 != (JOB *)0x0) && (pJVar2->state == JDEAD)) && ((pJVar2->flags & 2) == 0))\n        goto LAB_000625d0;\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != js.j_jobslots);\n    }\n    sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n    do {\n      sigemptyset((sigset_t *)&set);\n      sigaddset((sigset_t *)&set,0x11);\n      sigemptyset((sigset_t *)&oset);\n      sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);\n      if (js.j_jobslots < 1) {\n        if (js.j_jobslots == 0) {\nLAB_000627f0:\n          iVar3 = -1;\n          sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar5 = 0;\n        while (((pJVar2 = jobs[iVar5], pJVar2 == (JOB *)0x0 || (pJVar2->state != JRUNNING)) ||\n               ((pJVar2->flags & 1) != 0))) {\n          iVar5 = iVar5 + 1;\n          if (iVar5 == js.j_jobslots) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == (sh_builtin_func_t *)PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (sh_builtin_func_t *)0x0)))) {\n                    /* WARNING: Subroutine does not return */\n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar4 = __errno_location();\n      *piVar4 = 0;\n      iVar5 = wait_for(-1);\n      if (((iVar5 == -1) && (*piVar4 == 10)) && (js.j_jobslots != 0)) {\n        mark_all_jobs_as_dead();\n      }\n      sigemptyset((sigset_t *)&set);\n      sigaddset((sigset_t *)&set,0x11);\n      sigemptyset((sigset_t *)&oset);\n      sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);\n      if (0 < js.j_jobslots) {\n        iVar5 = 0;\n        do {\n          if ((jobs[iVar5] != (JOB *)0x0) && (jobs[iVar5]->state == JDEAD)) goto LAB_000625d0;\n          iVar5 = iVar5 + 1;\n        } while (iVar5 != js.j_jobslots);\n      }\n      sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n    } while( true );\n  }\n  iVar3 = -1;\nLAB_0006261f:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\nLAB_000625d0:\n  iVar3 = job_exit_status(iVar5);\n  if ((js.j_jobslots != 0) &&\n     ((notify_of_job_status(), js.j_jobslots != 0 && (jobs_list_frozen == 0)))) {\n    delete_job(iVar5,0);\n  }\n  coproc_reap();\n  sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n  goto LAB_0006261f;\n}\n\n" comment comment (function_definition "int wait_for_any_job(int flags)\n\n{\n  int iVar1;\n  JOB *pJVar2;\n  int iVar3;\n  int *piVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  sigset_t set;\n  sigset_t oset;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (jobs_list_frozen == 0) {\n    sigemptyset((sigset_t *)&set);\n    sigaddset((sigset_t *)&set,0x11);\n    sigemptyset((sigset_t *)&oset);\n    sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);\n    if (0 < js.j_jobslots) {\n      iVar5 = 0;\n      do {\n        pJVar2 = jobs[iVar5];\n        if (((pJVar2 != (JOB *)0x0) && (pJVar2->state == JDEAD)) && ((pJVar2->flags & 2) == 0))\n        goto LAB_000625d0;\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != js.j_jobslots);\n    }\n    sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n    do {\n      sigemptyset((sigset_t *)&set);\n      sigaddset((sigset_t *)&set,0x11);\n      sigemptyset((sigset_t *)&oset);\n      sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);\n      if (js.j_jobslots < 1) {\n        if (js.j_jobslots == 0) {\nLAB_000627f0:\n          iVar3 = -1;\n          sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar5 = 0;\n        while (((pJVar2 = jobs[iVar5], pJVar2 == (JOB *)0x0 || (pJVar2->state != JRUNNING)) ||\n               ((pJVar2->flags & 1) != 0))) {\n          iVar5 = iVar5 + 1;\n          if (iVar5 == js.j_jobslots) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == (sh_builtin_func_t *)PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (sh_builtin_func_t *)0x0)))) {\n                    /* WARNING: Subroutine does not return */\n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar4 = __errno_location();\n      *piVar4 = 0;\n      iVar5 = wait_for(-1);\n      if (((iVar5 == -1) && (*piVar4 == 10)) && (js.j_jobslots != 0)) {\n        mark_all_jobs_as_dead();\n      }\n      sigemptyset((sigset_t *)&set);\n      sigaddset((sigset_t *)&set,0x11);\n      sigemptyset((sigset_t *)&oset);\n      sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);\n      if (0 < js.j_jobslots) {\n        iVar5 = 0;\n        do {\n          if ((jobs[iVar5] != (JOB *)0x0) && (jobs[iVar5]->state == JDEAD)) goto LAB_000625d0;\n          iVar5 = iVar5 + 1;\n        } while (iVar5 != js.j_jobslots);\n      }\n      sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n    } while( true );\n  }\n  iVar3 = -1;\nLAB_0006261f:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\nLAB_000625d0:\n  iVar3 = job_exit_status(iVar5);\n  if ((js.j_jobslots != 0) &&\n     ((notify_of_job_status(), js.j_jobslots != 0 && (jobs_list_frozen == 0)))) {\n    delete_job(iVar5,0);\n  }\n  coproc_reap();\n  sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n  goto LAB_0006261f;\n}" primitive_type (function_declarator "wait_for_any_job(int flags)" identifier (parameter_list "(int flags)" ( (parameter_declaration "int flags" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  JOB *pJVar2;\n  int iVar3;\n  int *piVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  sigset_t set;\n  sigset_t oset;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (jobs_list_frozen == 0) {\n    sigemptyset((sigset_t *)&set);\n    sigaddset((sigset_t *)&set,0x11);\n    sigemptyset((sigset_t *)&oset);\n    sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);\n    if (0 < js.j_jobslots) {\n      iVar5 = 0;\n      do {\n        pJVar2 = jobs[iVar5];\n        if (((pJVar2 != (JOB *)0x0) && (pJVar2->state == JDEAD)) && ((pJVar2->flags & 2) == 0))\n        goto LAB_000625d0;\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != js.j_jobslots);\n    }\n    sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n    do {\n      sigemptyset((sigset_t *)&set);\n      sigaddset((sigset_t *)&set,0x11);\n      sigemptyset((sigset_t *)&oset);\n      sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);\n      if (js.j_jobslots < 1) {\n        if (js.j_jobslots == 0) {\nLAB_000627f0:\n          iVar3 = -1;\n          sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar5 = 0;\n        while (((pJVar2 = jobs[iVar5], pJVar2 == (JOB *)0x0 || (pJVar2->state != JRUNNING)) ||\n               ((pJVar2->flags & 1) != 0))) {\n          iVar5 = iVar5 + 1;\n          if (iVar5 == js.j_jobslots) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == (sh_builtin_func_t *)PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (sh_builtin_func_t *)0x0)))) {\n                    /* WARNING: Subroutine does not return */\n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar4 = __errno_location();\n      *piVar4 = 0;\n      iVar5 = wait_for(-1);\n      if (((iVar5 == -1) && (*piVar4 == 10)) && (js.j_jobslots != 0)) {\n        mark_all_jobs_as_dead();\n      }\n      sigemptyset((sigset_t *)&set);\n      sigaddset((sigset_t *)&set,0x11);\n      sigemptyset((sigset_t *)&oset);\n      sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);\n      if (0 < js.j_jobslots) {\n        iVar5 = 0;\n        do {\n          if ((jobs[iVar5] != (JOB *)0x0) && (jobs[iVar5]->state == JDEAD)) goto LAB_000625d0;\n          iVar5 = iVar5 + 1;\n        } while (iVar5 != js.j_jobslots);\n      }\n      sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n    } while( true );\n  }\n  iVar3 = -1;\nLAB_0006261f:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\nLAB_000625d0:\n  iVar3 = job_exit_status(iVar5);\n  if ((js.j_jobslots != 0) &&\n     ((notify_of_job_status(), js.j_jobslots != 0 && (jobs_list_frozen == 0)))) {\n    delete_job(iVar5,0);\n  }\n  coproc_reap();\n  sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n  goto LAB_0006261f;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "JOB *pJVar2;" type_identifier (pointer_declarator "*pJVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "sigset_t set;" type_identifier identifier ;) (declaration "sigset_t oset;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (jobs_list_frozen == 0) {\n    sigemptyset((sigset_t *)&set);\n    sigaddset((sigset_t *)&set,0x11);\n    sigemptyset((sigset_t *)&oset);\n    sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);\n    if (0 < js.j_jobslots) {\n      iVar5 = 0;\n      do {\n        pJVar2 = jobs[iVar5];\n        if (((pJVar2 != (JOB *)0x0) && (pJVar2->state == JDEAD)) && ((pJVar2->flags & 2) == 0))\n        goto LAB_000625d0;\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != js.j_jobslots);\n    }\n    sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n    do {\n      sigemptyset((sigset_t *)&set);\n      sigaddset((sigset_t *)&set,0x11);\n      sigemptyset((sigset_t *)&oset);\n      sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);\n      if (js.j_jobslots < 1) {\n        if (js.j_jobslots == 0) {\nLAB_000627f0:\n          iVar3 = -1;\n          sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar5 = 0;\n        while (((pJVar2 = jobs[iVar5], pJVar2 == (JOB *)0x0 || (pJVar2->state != JRUNNING)) ||\n               ((pJVar2->flags & 1) != 0))) {\n          iVar5 = iVar5 + 1;\n          if (iVar5 == js.j_jobslots) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == (sh_builtin_func_t *)PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (sh_builtin_func_t *)0x0)))) {\n                    /* WARNING: Subroutine does not return */\n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar4 = __errno_location();\n      *piVar4 = 0;\n      iVar5 = wait_for(-1);\n      if (((iVar5 == -1) && (*piVar4 == 10)) && (js.j_jobslots != 0)) {\n        mark_all_jobs_as_dead();\n      }\n      sigemptyset((sigset_t *)&set);\n      sigaddset((sigset_t *)&set,0x11);\n      sigemptyset((sigset_t *)&oset);\n      sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);\n      if (0 < js.j_jobslots) {\n        iVar5 = 0;\n        do {\n          if ((jobs[iVar5] != (JOB *)0x0) && (jobs[iVar5]->state == JDEAD)) goto LAB_000625d0;\n          iVar5 = iVar5 + 1;\n        } while (iVar5 != js.j_jobslots);\n      }\n      sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n    } while( true );\n  }" if (parenthesized_expression "(jobs_list_frozen == 0)" ( (binary_expression "jobs_list_frozen == 0" identifier == number_literal) )) (compound_statement "{\n    sigemptyset((sigset_t *)&set);\n    sigaddset((sigset_t *)&set,0x11);\n    sigemptyset((sigset_t *)&oset);\n    sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);\n    if (0 < js.j_jobslots) {\n      iVar5 = 0;\n      do {\n        pJVar2 = jobs[iVar5];\n        if (((pJVar2 != (JOB *)0x0) && (pJVar2->state == JDEAD)) && ((pJVar2->flags & 2) == 0))\n        goto LAB_000625d0;\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != js.j_jobslots);\n    }\n    sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n    do {\n      sigemptyset((sigset_t *)&set);\n      sigaddset((sigset_t *)&set,0x11);\n      sigemptyset((sigset_t *)&oset);\n      sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);\n      if (js.j_jobslots < 1) {\n        if (js.j_jobslots == 0) {\nLAB_000627f0:\n          iVar3 = -1;\n          sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar5 = 0;\n        while (((pJVar2 = jobs[iVar5], pJVar2 == (JOB *)0x0 || (pJVar2->state != JRUNNING)) ||\n               ((pJVar2->flags & 1) != 0))) {\n          iVar5 = iVar5 + 1;\n          if (iVar5 == js.j_jobslots) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == (sh_builtin_func_t *)PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (sh_builtin_func_t *)0x0)))) {\n                    /* WARNING: Subroutine does not return */\n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar4 = __errno_location();\n      *piVar4 = 0;\n      iVar5 = wait_for(-1);\n      if (((iVar5 == -1) && (*piVar4 == 10)) && (js.j_jobslots != 0)) {\n        mark_all_jobs_as_dead();\n      }\n      sigemptyset((sigset_t *)&set);\n      sigaddset((sigset_t *)&set,0x11);\n      sigemptyset((sigset_t *)&oset);\n      sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);\n      if (0 < js.j_jobslots) {\n        iVar5 = 0;\n        do {\n          if ((jobs[iVar5] != (JOB *)0x0) && (jobs[iVar5]->state == JDEAD)) goto LAB_000625d0;\n          iVar5 = iVar5 + 1;\n        } while (iVar5 != js.j_jobslots);\n      }\n      sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n    } while( true );\n  }" { (expression_statement "sigemptyset((sigset_t *)&set);" (call_expression "sigemptyset((sigset_t *)&set)" identifier (argument_list "((sigset_t *)&set)" ( (cast_expression "(sigset_t *)&set" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&set" & identifier)) ))) ;) (expression_statement "sigaddset((sigset_t *)&set,0x11);" (call_expression "sigaddset((sigset_t *)&set,0x11)" identifier (argument_list "((sigset_t *)&set,0x11)" ( (cast_expression "(sigset_t *)&set" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&set" & identifier)) , number_literal ))) ;) (expression_statement "sigemptyset((sigset_t *)&oset);" (call_expression "sigemptyset((sigset_t *)&oset)" identifier (argument_list "((sigset_t *)&oset)" ( (cast_expression "(sigset_t *)&oset" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&oset" & identifier)) ))) ;) (expression_statement "sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);" (call_expression "sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset)" identifier (argument_list "(0,(sigset_t *)&set,(sigset_t *)&oset)" ( number_literal , (cast_expression "(sigset_t *)&set" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&set" & identifier)) , (cast_expression "(sigset_t *)&oset" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&oset" & identifier)) ))) ;) (if_statement "if (0 < js.j_jobslots) {\n      iVar5 = 0;\n      do {\n        pJVar2 = jobs[iVar5];\n        if (((pJVar2 != (JOB *)0x0) && (pJVar2->state == JDEAD)) && ((pJVar2->flags & 2) == 0))\n        goto LAB_000625d0;\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != js.j_jobslots);\n    }" if (parenthesized_expression "(0 < js.j_jobslots)" ( (binary_expression "0 < js.j_jobslots" number_literal < (field_expression "js.j_jobslots" identifier . field_identifier)) )) (compound_statement "{\n      iVar5 = 0;\n      do {\n        pJVar2 = jobs[iVar5];\n        if (((pJVar2 != (JOB *)0x0) && (pJVar2->state == JDEAD)) && ((pJVar2->flags & 2) == 0))\n        goto LAB_000625d0;\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != js.j_jobslots);\n    }" { (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n        pJVar2 = jobs[iVar5];\n        if (((pJVar2 != (JOB *)0x0) && (pJVar2->state == JDEAD)) && ((pJVar2->flags & 2) == 0))\n        goto LAB_000625d0;\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != js.j_jobslots);" do (compound_statement "{\n        pJVar2 = jobs[iVar5];\n        if (((pJVar2 != (JOB *)0x0) && (pJVar2->state == JDEAD)) && ((pJVar2->flags & 2) == 0))\n        goto LAB_000625d0;\n        iVar5 = iVar5 + 1;\n      }" { (expression_statement "pJVar2 = jobs[iVar5];" (assignment_expression "pJVar2 = jobs[iVar5]" identifier = (subscript_expression "jobs[iVar5]" identifier [ identifier ])) ;) (if_statement "if (((pJVar2 != (JOB *)0x0) && (pJVar2->state == JDEAD)) && ((pJVar2->flags & 2) == 0))\n        goto LAB_000625d0;" if (parenthesized_expression "(((pJVar2 != (JOB *)0x0) && (pJVar2->state == JDEAD)) && ((pJVar2->flags & 2) == 0))" ( (binary_expression "((pJVar2 != (JOB *)0x0) && (pJVar2->state == JDEAD)) && ((pJVar2->flags & 2) == 0)" (parenthesized_expression "((pJVar2 != (JOB *)0x0) && (pJVar2->state == JDEAD))" ( (binary_expression "(pJVar2 != (JOB *)0x0) && (pJVar2->state == JDEAD)" (parenthesized_expression "(pJVar2 != (JOB *)0x0)" ( (binary_expression "pJVar2 != (JOB *)0x0" identifier != (cast_expression "(JOB *)0x0" ( (type_descriptor "JOB *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(pJVar2->state == JDEAD)" ( (binary_expression "pJVar2->state == JDEAD" (field_expression "pJVar2->state" identifier -> field_identifier) == identifier) ))) )) && (parenthesized_expression "((pJVar2->flags & 2) == 0)" ( (binary_expression "(pJVar2->flags & 2) == 0" (parenthesized_expression "(pJVar2->flags & 2)" ( (binary_expression "pJVar2->flags & 2" (field_expression "pJVar2->flags" identifier -> field_identifier) & number_literal) )) == number_literal) ))) )) (goto_statement "goto LAB_000625d0;" goto statement_identifier ;)) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar5 != js.j_jobslots)" ( (binary_expression "iVar5 != js.j_jobslots" identifier != (field_expression "js.j_jobslots" identifier . field_identifier)) )) ;) })) (expression_statement "sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);" (call_expression "sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0)" identifier (argument_list "(2,(sigset_t *)&oset,(sigset_t *)0x0)" ( number_literal , (cast_expression "(sigset_t *)&oset" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&oset" & identifier)) , (cast_expression "(sigset_t *)0x0" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) (do_statement "do {\n      sigemptyset((sigset_t *)&set);\n      sigaddset((sigset_t *)&set,0x11);\n      sigemptyset((sigset_t *)&oset);\n      sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);\n      if (js.j_jobslots < 1) {\n        if (js.j_jobslots == 0) {\nLAB_000627f0:\n          iVar3 = -1;\n          sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar5 = 0;\n        while (((pJVar2 = jobs[iVar5], pJVar2 == (JOB *)0x0 || (pJVar2->state != JRUNNING)) ||\n               ((pJVar2->flags & 1) != 0))) {\n          iVar5 = iVar5 + 1;\n          if (iVar5 == js.j_jobslots) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == (sh_builtin_func_t *)PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (sh_builtin_func_t *)0x0)))) {\n                    /* WARNING: Subroutine does not return */\n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar4 = __errno_location();\n      *piVar4 = 0;\n      iVar5 = wait_for(-1);\n      if (((iVar5 == -1) && (*piVar4 == 10)) && (js.j_jobslots != 0)) {\n        mark_all_jobs_as_dead();\n      }\n      sigemptyset((sigset_t *)&set);\n      sigaddset((sigset_t *)&set,0x11);\n      sigemptyset((sigset_t *)&oset);\n      sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);\n      if (0 < js.j_jobslots) {\n        iVar5 = 0;\n        do {\n          if ((jobs[iVar5] != (JOB *)0x0) && (jobs[iVar5]->state == JDEAD)) goto LAB_000625d0;\n          iVar5 = iVar5 + 1;\n        } while (iVar5 != js.j_jobslots);\n      }\n      sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n    } while( true );" do (compound_statement "{\n      sigemptyset((sigset_t *)&set);\n      sigaddset((sigset_t *)&set,0x11);\n      sigemptyset((sigset_t *)&oset);\n      sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);\n      if (js.j_jobslots < 1) {\n        if (js.j_jobslots == 0) {\nLAB_000627f0:\n          iVar3 = -1;\n          sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar5 = 0;\n        while (((pJVar2 = jobs[iVar5], pJVar2 == (JOB *)0x0 || (pJVar2->state != JRUNNING)) ||\n               ((pJVar2->flags & 1) != 0))) {\n          iVar5 = iVar5 + 1;\n          if (iVar5 == js.j_jobslots) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == (sh_builtin_func_t *)PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (sh_builtin_func_t *)0x0)))) {\n                    /* WARNING: Subroutine does not return */\n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar4 = __errno_location();\n      *piVar4 = 0;\n      iVar5 = wait_for(-1);\n      if (((iVar5 == -1) && (*piVar4 == 10)) && (js.j_jobslots != 0)) {\n        mark_all_jobs_as_dead();\n      }\n      sigemptyset((sigset_t *)&set);\n      sigaddset((sigset_t *)&set,0x11);\n      sigemptyset((sigset_t *)&oset);\n      sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);\n      if (0 < js.j_jobslots) {\n        iVar5 = 0;\n        do {\n          if ((jobs[iVar5] != (JOB *)0x0) && (jobs[iVar5]->state == JDEAD)) goto LAB_000625d0;\n          iVar5 = iVar5 + 1;\n        } while (iVar5 != js.j_jobslots);\n      }\n      sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n    }" { (expression_statement "sigemptyset((sigset_t *)&set);" (call_expression "sigemptyset((sigset_t *)&set)" identifier (argument_list "((sigset_t *)&set)" ( (cast_expression "(sigset_t *)&set" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&set" & identifier)) ))) ;) (expression_statement "sigaddset((sigset_t *)&set,0x11);" (call_expression "sigaddset((sigset_t *)&set,0x11)" identifier (argument_list "((sigset_t *)&set,0x11)" ( (cast_expression "(sigset_t *)&set" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&set" & identifier)) , number_literal ))) ;) (expression_statement "sigemptyset((sigset_t *)&oset);" (call_expression "sigemptyset((sigset_t *)&oset)" identifier (argument_list "((sigset_t *)&oset)" ( (cast_expression "(sigset_t *)&oset" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&oset" & identifier)) ))) ;) (expression_statement "sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);" (call_expression "sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset)" identifier (argument_list "(0,(sigset_t *)&set,(sigset_t *)&oset)" ( number_literal , (cast_expression "(sigset_t *)&set" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&set" & identifier)) , (cast_expression "(sigset_t *)&oset" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&oset" & identifier)) ))) ;) (if_statement "if (js.j_jobslots < 1) {\n        if (js.j_jobslots == 0) {\nLAB_000627f0:\n          iVar3 = -1;\n          sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar5 = 0;\n        while (((pJVar2 = jobs[iVar5], pJVar2 == (JOB *)0x0 || (pJVar2->state != JRUNNING)) ||\n               ((pJVar2->flags & 1) != 0))) {\n          iVar5 = iVar5 + 1;\n          if (iVar5 == js.j_jobslots) goto LAB_000627f0;\n        }\n      }" if (parenthesized_expression "(js.j_jobslots < 1)" ( (binary_expression "js.j_jobslots < 1" (field_expression "js.j_jobslots" identifier . field_identifier) < number_literal) )) (compound_statement "{\n        if (js.j_jobslots == 0) {\nLAB_000627f0:\n          iVar3 = -1;\n          sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }" { (if_statement "if (js.j_jobslots == 0) {\nLAB_000627f0:\n          iVar3 = -1;\n          sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }" if (parenthesized_expression "(js.j_jobslots == 0)" ( (binary_expression "js.j_jobslots == 0" (field_expression "js.j_jobslots" identifier . field_identifier) == number_literal) )) (compound_statement "{\nLAB_000627f0:\n          iVar3 = -1;\n          sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }" { (labeled_statement "LAB_000627f0:\n          iVar3 = -1;" statement_identifier : (expression_statement "iVar3 = -1;" (assignment_expression "iVar3 = -1" identifier = number_literal) ;)) (expression_statement "sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);" (call_expression "sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0)" identifier (argument_list "(2,(sigset_t *)&oset,(sigset_t *)0x0)" ( number_literal , (cast_expression "(sigset_t *)&oset" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&oset" & identifier)) , (cast_expression "(sigset_t *)0x0" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) (goto_statement "goto LAB_0006261f;" goto statement_identifier ;) })) }) (else_clause "else {\n        iVar5 = 0;\n        while (((pJVar2 = jobs[iVar5], pJVar2 == (JOB *)0x0 || (pJVar2->state != JRUNNING)) ||\n               ((pJVar2->flags & 1) != 0))) {\n          iVar5 = iVar5 + 1;\n          if (iVar5 == js.j_jobslots) goto LAB_000627f0;\n        }\n      }" else (compound_statement "{\n        iVar5 = 0;\n        while (((pJVar2 = jobs[iVar5], pJVar2 == (JOB *)0x0 || (pJVar2->state != JRUNNING)) ||\n               ((pJVar2->flags & 1) != 0))) {\n          iVar5 = iVar5 + 1;\n          if (iVar5 == js.j_jobslots) goto LAB_000627f0;\n        }\n      }" { (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (while_statement "while (((pJVar2 = jobs[iVar5], pJVar2 == (JOB *)0x0 || (pJVar2->state != JRUNNING)) ||\n               ((pJVar2->flags & 1) != 0))) {\n          iVar5 = iVar5 + 1;\n          if (iVar5 == js.j_jobslots) goto LAB_000627f0;\n        }" while (parenthesized_expression "(((pJVar2 = jobs[iVar5], pJVar2 == (JOB *)0x0 || (pJVar2->state != JRUNNING)) ||\n               ((pJVar2->flags & 1) != 0)))" ( (parenthesized_expression "((pJVar2 = jobs[iVar5], pJVar2 == (JOB *)0x0 || (pJVar2->state != JRUNNING)) ||\n               ((pJVar2->flags & 1) != 0))" ( (binary_expression "(pJVar2 = jobs[iVar5], pJVar2 == (JOB *)0x0 || (pJVar2->state != JRUNNING)) ||\n               ((pJVar2->flags & 1) != 0)" (parenthesized_expression "(pJVar2 = jobs[iVar5], pJVar2 == (JOB *)0x0 || (pJVar2->state != JRUNNING))" ( (comma_expression "pJVar2 = jobs[iVar5], pJVar2 == (JOB *)0x0 || (pJVar2->state != JRUNNING)" (assignment_expression "pJVar2 = jobs[iVar5]" identifier = (subscript_expression "jobs[iVar5]" identifier [ identifier ])) , (binary_expression "pJVar2 == (JOB *)0x0 || (pJVar2->state != JRUNNING)" (binary_expression "pJVar2 == (JOB *)0x0" identifier == (cast_expression "(JOB *)0x0" ( (type_descriptor "JOB *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) || (parenthesized_expression "(pJVar2->state != JRUNNING)" ( (binary_expression "pJVar2->state != JRUNNING" (field_expression "pJVar2->state" identifier -> field_identifier) != identifier) )))) )) || (parenthesized_expression "((pJVar2->flags & 1) != 0)" ( (binary_expression "(pJVar2->flags & 1) != 0" (parenthesized_expression "(pJVar2->flags & 1)" ( (binary_expression "pJVar2->flags & 1" (field_expression "pJVar2->flags" identifier -> field_identifier) & number_literal) )) != number_literal) ))) )) )) (compound_statement "{\n          iVar5 = iVar5 + 1;\n          if (iVar5 == js.j_jobslots) goto LAB_000627f0;\n        }" { (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (if_statement "if (iVar5 == js.j_jobslots) goto LAB_000627f0;" if (parenthesized_expression "(iVar5 == js.j_jobslots)" ( (binary_expression "iVar5 == js.j_jobslots" identifier == (field_expression "js.j_jobslots" identifier . field_identifier)) )) (goto_statement "goto LAB_000627f0;" goto statement_identifier ;)) })) }))) (expression_statement "sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);" (call_expression "sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0)" identifier (argument_list "(2,(sigset_t *)&oset,(sigset_t *)0x0)" ( number_literal , (cast_expression "(sigset_t *)&oset" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&oset" & identifier)) , (cast_expression "(sigset_t *)0x0" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) (if_statement "if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }" if (parenthesized_expression "(terminating_signal != 0)" ( (binary_expression "terminating_signal != 0" identifier != number_literal) )) (compound_statement "{\n        termsig_handler(terminating_signal);\n      }" { (expression_statement "termsig_handler(terminating_signal);" (call_expression "termsig_handler(terminating_signal)" identifier (argument_list "(terminating_signal)" ( identifier ))) ;) })) (if_statement "if (interrupt_state != 0) {\n        throw_to_top_level();\n      }" if (parenthesized_expression "(interrupt_state != 0)" ( (binary_expression "interrupt_state != 0" identifier != number_literal) )) (compound_statement "{\n        throw_to_top_level();\n      }" { (expression_statement "throw_to_top_level();" (call_expression "throw_to_top_level()" identifier (argument_list "()" ( ))) ;) })) (if_statement "if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }" if (parenthesized_expression "(terminating_signal != 0)" ( (binary_expression "terminating_signal != 0" identifier != number_literal) )) (compound_statement "{\n        termsig_handler(terminating_signal);\n      }" { (expression_statement "termsig_handler(terminating_signal);" (call_expression "termsig_handler(terminating_signal)" identifier (argument_list "(terminating_signal)" ( identifier ))) ;) })) (if_statement "if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == (sh_builtin_func_t *)PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (sh_builtin_func_t *)0x0)))) {\n                    /* WARNING: Subroutine does not return */\n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }" if (parenthesized_expression "(((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == (sh_builtin_func_t *)PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (sh_builtin_func_t *)0x0))))" ( (binary_expression "((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == (sh_builtin_func_t *)PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (sh_builtin_func_t *)0x0)))" (parenthesized_expression "((wait_intr_flag != 0) && (wait_signal_received != 0))" ( (binary_expression "(wait_intr_flag != 0) && (wait_signal_received != 0)" (parenthesized_expression "(wait_intr_flag != 0)" ( (binary_expression "wait_intr_flag != 0" identifier != number_literal) )) && (parenthesized_expression "(wait_signal_received != 0)" ( (binary_expression "wait_signal_received != 0" identifier != number_literal) ))) )) && (parenthesized_expression "((this_shell_builtin == (sh_builtin_func_t *)PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (sh_builtin_func_t *)0x0)))" ( (parenthesized_expression "(this_shell_builtin == (sh_builtin_func_t *)PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (sh_builtin_func_t *)0x0))" ( (binary_expression "this_shell_builtin == (sh_builtin_func_t *)PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (sh_builtin_func_t *)0x0)" (binary_expression "this_shell_builtin == (sh_builtin_func_t *)PTR_wait_builtin_00149ee8" identifier == (cast_expression "(sh_builtin_func_t *)PTR_wait_builtin_00149ee8" ( (type_descriptor "sh_builtin_func_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) && (parenthesized_expression "(this_shell_builtin != (sh_builtin_func_t *)0x0)" ( (binary_expression "this_shell_builtin != (sh_builtin_func_t *)0x0" identifier != (cast_expression "(sh_builtin_func_t *)0x0" ( (type_descriptor "sh_builtin_func_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) ))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }" { comment (expression_statement "__longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);" (call_expression "__longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin)" identifier (argument_list "(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin)" ( identifier , number_literal , identifier , identifier ))) ;) })) (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar4 = 0;" (assignment_expression "*piVar4 = 0" (pointer_expression "*piVar4" * identifier) = number_literal) ;) (expression_statement "iVar5 = wait_for(-1);" (assignment_expression "iVar5 = wait_for(-1)" identifier = (call_expression "wait_for(-1)" identifier (argument_list "(-1)" ( number_literal )))) ;) (if_statement "if (((iVar5 == -1) && (*piVar4 == 10)) && (js.j_jobslots != 0)) {\n        mark_all_jobs_as_dead();\n      }" if (parenthesized_expression "(((iVar5 == -1) && (*piVar4 == 10)) && (js.j_jobslots != 0))" ( (binary_expression "((iVar5 == -1) && (*piVar4 == 10)) && (js.j_jobslots != 0)" (parenthesized_expression "((iVar5 == -1) && (*piVar4 == 10))" ( (binary_expression "(iVar5 == -1) && (*piVar4 == 10)" (parenthesized_expression "(iVar5 == -1)" ( (binary_expression "iVar5 == -1" identifier == number_literal) )) && (parenthesized_expression "(*piVar4 == 10)" ( (binary_expression "*piVar4 == 10" (pointer_expression "*piVar4" * identifier) == number_literal) ))) )) && (parenthesized_expression "(js.j_jobslots != 0)" ( (binary_expression "js.j_jobslots != 0" (field_expression "js.j_jobslots" identifier . field_identifier) != number_literal) ))) )) (compound_statement "{\n        mark_all_jobs_as_dead();\n      }" { (expression_statement "mark_all_jobs_as_dead();" (call_expression "mark_all_jobs_as_dead()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "sigemptyset((sigset_t *)&set);" (call_expression "sigemptyset((sigset_t *)&set)" identifier (argument_list "((sigset_t *)&set)" ( (cast_expression "(sigset_t *)&set" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&set" & identifier)) ))) ;) (expression_statement "sigaddset((sigset_t *)&set,0x11);" (call_expression "sigaddset((sigset_t *)&set,0x11)" identifier (argument_list "((sigset_t *)&set,0x11)" ( (cast_expression "(sigset_t *)&set" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&set" & identifier)) , number_literal ))) ;) (expression_statement "sigemptyset((sigset_t *)&oset);" (call_expression "sigemptyset((sigset_t *)&oset)" identifier (argument_list "((sigset_t *)&oset)" ( (cast_expression "(sigset_t *)&oset" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&oset" & identifier)) ))) ;) (expression_statement "sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset);" (call_expression "sigprocmask(0,(sigset_t *)&set,(sigset_t *)&oset)" identifier (argument_list "(0,(sigset_t *)&set,(sigset_t *)&oset)" ( number_literal , (cast_expression "(sigset_t *)&set" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&set" & identifier)) , (cast_expression "(sigset_t *)&oset" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&oset" & identifier)) ))) ;) (if_statement "if (0 < js.j_jobslots) {\n        iVar5 = 0;\n        do {\n          if ((jobs[iVar5] != (JOB *)0x0) && (jobs[iVar5]->state == JDEAD)) goto LAB_000625d0;\n          iVar5 = iVar5 + 1;\n        } while (iVar5 != js.j_jobslots);\n      }" if (parenthesized_expression "(0 < js.j_jobslots)" ( (binary_expression "0 < js.j_jobslots" number_literal < (field_expression "js.j_jobslots" identifier . field_identifier)) )) (compound_statement "{\n        iVar5 = 0;\n        do {\n          if ((jobs[iVar5] != (JOB *)0x0) && (jobs[iVar5]->state == JDEAD)) goto LAB_000625d0;\n          iVar5 = iVar5 + 1;\n        } while (iVar5 != js.j_jobslots);\n      }" { (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n          if ((jobs[iVar5] != (JOB *)0x0) && (jobs[iVar5]->state == JDEAD)) goto LAB_000625d0;\n          iVar5 = iVar5 + 1;\n        } while (iVar5 != js.j_jobslots);" do (compound_statement "{\n          if ((jobs[iVar5] != (JOB *)0x0) && (jobs[iVar5]->state == JDEAD)) goto LAB_000625d0;\n          iVar5 = iVar5 + 1;\n        }" { (if_statement "if ((jobs[iVar5] != (JOB *)0x0) && (jobs[iVar5]->state == JDEAD)) goto LAB_000625d0;" if (parenthesized_expression "((jobs[iVar5] != (JOB *)0x0) && (jobs[iVar5]->state == JDEAD))" ( (binary_expression "(jobs[iVar5] != (JOB *)0x0) && (jobs[iVar5]->state == JDEAD)" (parenthesized_expression "(jobs[iVar5] != (JOB *)0x0)" ( (binary_expression "jobs[iVar5] != (JOB *)0x0" (subscript_expression "jobs[iVar5]" identifier [ identifier ]) != (cast_expression "(JOB *)0x0" ( (type_descriptor "JOB *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(jobs[iVar5]->state == JDEAD)" ( (binary_expression "jobs[iVar5]->state == JDEAD" (field_expression "jobs[iVar5]->state" (subscript_expression "jobs[iVar5]" identifier [ identifier ]) -> field_identifier) == identifier) ))) )) (goto_statement "goto LAB_000625d0;" goto statement_identifier ;)) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar5 != js.j_jobslots)" ( (binary_expression "iVar5 != js.j_jobslots" identifier != (field_expression "js.j_jobslots" identifier . field_identifier)) )) ;) })) (expression_statement "sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);" (call_expression "sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0)" identifier (argument_list "(2,(sigset_t *)&oset,(sigset_t *)0x0)" ( number_literal , (cast_expression "(sigset_t *)&oset" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&oset" & identifier)) , (cast_expression "(sigset_t *)0x0" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })) (expression_statement "iVar3 = -1;" (assignment_expression "iVar3 = -1" identifier = number_literal) ;) (labeled_statement "LAB_0006261f:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }" statement_identifier : (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar3;\n  }" { (return_statement "return iVar3;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) (labeled_statement "LAB_000625d0:\n  iVar3 = job_exit_status(iVar5);" statement_identifier : (expression_statement "iVar3 = job_exit_status(iVar5);" (assignment_expression "iVar3 = job_exit_status(iVar5)" identifier = (call_expression "job_exit_status(iVar5)" identifier (argument_list "(iVar5)" ( identifier )))) ;)) (if_statement "if ((js.j_jobslots != 0) &&\n     ((notify_of_job_status(), js.j_jobslots != 0 && (jobs_list_frozen == 0)))) {\n    delete_job(iVar5,0);\n  }" if (parenthesized_expression "((js.j_jobslots != 0) &&\n     ((notify_of_job_status(), js.j_jobslots != 0 && (jobs_list_frozen == 0))))" ( (binary_expression "(js.j_jobslots != 0) &&\n     ((notify_of_job_status(), js.j_jobslots != 0 && (jobs_list_frozen == 0)))" (parenthesized_expression "(js.j_jobslots != 0)" ( (binary_expression "js.j_jobslots != 0" (field_expression "js.j_jobslots" identifier . field_identifier) != number_literal) )) && (parenthesized_expression "((notify_of_job_status(), js.j_jobslots != 0 && (jobs_list_frozen == 0)))" ( (parenthesized_expression "(notify_of_job_status(), js.j_jobslots != 0 && (jobs_list_frozen == 0))" ( (comma_expression "notify_of_job_status(), js.j_jobslots != 0 && (jobs_list_frozen == 0)" (call_expression "notify_of_job_status()" identifier (argument_list "()" ( ))) , (binary_expression "js.j_jobslots != 0 && (jobs_list_frozen == 0)" (binary_expression "js.j_jobslots != 0" (field_expression "js.j_jobslots" identifier . field_identifier) != number_literal) && (parenthesized_expression "(jobs_list_frozen == 0)" ( (binary_expression "jobs_list_frozen == 0" identifier == number_literal) )))) )) ))) )) (compound_statement "{\n    delete_job(iVar5,0);\n  }" { (expression_statement "delete_job(iVar5,0);" (call_expression "delete_job(iVar5,0)" identifier (argument_list "(iVar5,0)" ( identifier , number_literal ))) ;) })) (expression_statement "coproc_reap();" (call_expression "coproc_reap()" identifier (argument_list "()" ( ))) ;) (expression_statement "sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0);" (call_expression "sigprocmask(2,(sigset_t *)&oset,(sigset_t *)0x0)" identifier (argument_list "(2,(sigset_t *)&oset,(sigset_t *)0x0)" ( number_literal , (cast_expression "(sigset_t *)&oset" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&oset" & identifier)) , (cast_expression "(sigset_t *)0x0" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) (goto_statement "goto LAB_0006261f;" goto statement_identifier ;) })))
(translation_unit "undefined4 wait_for_any_job(void)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  sigset_t local_120;\n  sigset_t local_a0;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x62539;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (DAT_00151020 == 0) {\n    sigemptyset(&local_120);\n    sigaddset(&local_120,0x11);\n    sigemptyset(&local_a0);\n    sigprocmask(0,&local_120,&local_a0);\n    if (0 < DAT_0014a7d8) {\n      iVar4 = 0;\n      do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);\n    }\n    sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    do {\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    \n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar3 = __errno_location();\n      *piVar3 = 0;\n      iVar4 = wait_for(0xffffffff);\n      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    } while( true );\n  }\n  uVar2 = 0xffffffff;\nLAB_0006261f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_000ecc40();\nLAB_000625d0:\n  uVar2 = job_exit_status(iVar4);\n  if ((DAT_0014a7d8 != 0) && ((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)))) {\n    FUN_0005ec70();\n  }\n  coproc_reap();\n  sigprocmask(2,&local_a0,(sigset_t *)0x0);\n  goto LAB_0006261f;\n}\n\n" (function_definition "undefined4 wait_for_any_job(void)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  sigset_t local_120;\n  sigset_t local_a0;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x62539;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (DAT_00151020 == 0) {\n    sigemptyset(&local_120);\n    sigaddset(&local_120,0x11);\n    sigemptyset(&local_a0);\n    sigprocmask(0,&local_120,&local_a0);\n    if (0 < DAT_0014a7d8) {\n      iVar4 = 0;\n      do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);\n    }\n    sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    do {\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    \n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar3 = __errno_location();\n      *piVar3 = 0;\n      iVar4 = wait_for(0xffffffff);\n      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    } while( true );\n  }\n  uVar2 = 0xffffffff;\nLAB_0006261f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_000ecc40();\nLAB_000625d0:\n  uVar2 = job_exit_status(iVar4);\n  if ((DAT_0014a7d8 != 0) && ((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)))) {\n    FUN_0005ec70();\n  }\n  coproc_reap();\n  sigprocmask(2,&local_a0,(sigset_t *)0x0);\n  goto LAB_0006261f;\n}" type_identifier (function_declarator "wait_for_any_job(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  sigset_t local_120;\n  sigset_t local_a0;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x62539;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (DAT_00151020 == 0) {\n    sigemptyset(&local_120);\n    sigaddset(&local_120,0x11);\n    sigemptyset(&local_a0);\n    sigprocmask(0,&local_120,&local_a0);\n    if (0 < DAT_0014a7d8) {\n      iVar4 = 0;\n      do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);\n    }\n    sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    do {\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    \n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar3 = __errno_location();\n      *piVar3 = 0;\n      iVar4 = wait_for(0xffffffff);\n      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    } while( true );\n  }\n  uVar2 = 0xffffffff;\nLAB_0006261f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_000ecc40();\nLAB_000625d0:\n  uVar2 = job_exit_status(iVar4);\n  if ((DAT_0014a7d8 != 0) && ((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)))) {\n    FUN_0005ec70();\n  }\n  coproc_reap();\n  sigprocmask(2,&local_a0,(sigset_t *)0x0);\n  goto LAB_0006261f;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "sigset_t local_120;" type_identifier identifier ;) (declaration "sigset_t local_a0;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x62539;" (assignment_expression "uStack_14 = 0x62539" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (DAT_00151020 == 0) {\n    sigemptyset(&local_120);\n    sigaddset(&local_120,0x11);\n    sigemptyset(&local_a0);\n    sigprocmask(0,&local_120,&local_a0);\n    if (0 < DAT_0014a7d8) {\n      iVar4 = 0;\n      do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);\n    }\n    sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    do {\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    \n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar3 = __errno_location();\n      *piVar3 = 0;\n      iVar4 = wait_for(0xffffffff);\n      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    } while( true );\n  }" if (parenthesized_expression "(DAT_00151020 == 0)" ( (binary_expression "DAT_00151020 == 0" identifier == number_literal) )) (compound_statement "{\n    sigemptyset(&local_120);\n    sigaddset(&local_120,0x11);\n    sigemptyset(&local_a0);\n    sigprocmask(0,&local_120,&local_a0);\n    if (0 < DAT_0014a7d8) {\n      iVar4 = 0;\n      do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);\n    }\n    sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    do {\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    \n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar3 = __errno_location();\n      *piVar3 = 0;\n      iVar4 = wait_for(0xffffffff);\n      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    } while( true );\n  }" { (expression_statement "sigemptyset(&local_120);" (call_expression "sigemptyset(&local_120)" identifier (argument_list "(&local_120)" ( (pointer_expression "&local_120" & identifier) ))) ;) (expression_statement "sigaddset(&local_120,0x11);" (call_expression "sigaddset(&local_120,0x11)" identifier (argument_list "(&local_120,0x11)" ( (pointer_expression "&local_120" & identifier) , number_literal ))) ;) (expression_statement "sigemptyset(&local_a0);" (call_expression "sigemptyset(&local_a0)" identifier (argument_list "(&local_a0)" ( (pointer_expression "&local_a0" & identifier) ))) ;) (expression_statement "sigprocmask(0,&local_120,&local_a0);" (call_expression "sigprocmask(0,&local_120,&local_a0)" identifier (argument_list "(0,&local_120,&local_a0)" ( number_literal , (pointer_expression "&local_120" & identifier) , (pointer_expression "&local_a0" & identifier) ))) ;) (if_statement "if (0 < DAT_0014a7d8) {\n      iVar4 = 0;\n      do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);\n    }" if (parenthesized_expression "(0 < DAT_0014a7d8)" ( (binary_expression "0 < DAT_0014a7d8" number_literal < identifier) )) (compound_statement "{\n      iVar4 = 0;\n      do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);\n    }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);" do (compound_statement "{\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      }" { (expression_statement "iVar1 = *(int *)(jobs + iVar4 * 4);" (assignment_expression "iVar1 = *(int *)(jobs + iVar4 * 4)" identifier = (pointer_expression "*(int *)(jobs + iVar4 * 4)" * (cast_expression "(int *)(jobs + iVar4 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(jobs + iVar4 * 4)" ( (binary_expression "jobs + iVar4 * 4" identifier + (binary_expression "iVar4 * 4" identifier * number_literal)) ))))) ;) (if_statement "if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;" if (parenthesized_expression "(((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))" ( (binary_expression "((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0)" (parenthesized_expression "((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4))" ( (binary_expression "(iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) && (parenthesized_expression "(*(int *)(iVar1 + 0xc) == 4)" ( (binary_expression "*(int *)(iVar1 + 0xc) == 4" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) == number_literal) ))) )) && (parenthesized_expression "((*(byte *)(iVar1 + 0x10) & 2) == 0)" ( (binary_expression "(*(byte *)(iVar1 + 0x10) & 2) == 0" (parenthesized_expression "(*(byte *)(iVar1 + 0x10) & 2)" ( (binary_expression "*(byte *)(iVar1 + 0x10) & 2" (pointer_expression "*(byte *)(iVar1 + 0x10)" * (cast_expression "(byte *)(iVar1 + 0x10)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) )))) & number_literal) )) == number_literal) ))) )) (goto_statement "goto LAB_000625d0;" goto statement_identifier ;)) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 != DAT_0014a7d8)" ( (binary_expression "iVar4 != DAT_0014a7d8" identifier != identifier) )) ;) })) (expression_statement "sigprocmask(2,&local_a0,(sigset_t *)0x0);" (call_expression "sigprocmask(2,&local_a0,(sigset_t *)0x0)" identifier (argument_list "(2,&local_a0,(sigset_t *)0x0)" ( number_literal , (pointer_expression "&local_a0" & identifier) , (cast_expression "(sigset_t *)0x0" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) (do_statement "do {\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    \n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar3 = __errno_location();\n      *piVar3 = 0;\n      iVar4 = wait_for(0xffffffff);\n      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    } while( true );" do (compound_statement "{\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    \n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar3 = __errno_location();\n      *piVar3 = 0;\n      iVar4 = wait_for(0xffffffff);\n      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    }" { (expression_statement "sigemptyset(&local_120);" (call_expression "sigemptyset(&local_120)" identifier (argument_list "(&local_120)" ( (pointer_expression "&local_120" & identifier) ))) ;) (expression_statement "sigaddset(&local_120,0x11);" (call_expression "sigaddset(&local_120,0x11)" identifier (argument_list "(&local_120,0x11)" ( (pointer_expression "&local_120" & identifier) , number_literal ))) ;) (expression_statement "sigemptyset(&local_a0);" (call_expression "sigemptyset(&local_a0)" identifier (argument_list "(&local_a0)" ( (pointer_expression "&local_a0" & identifier) ))) ;) (expression_statement "sigprocmask(0,&local_120,&local_a0);" (call_expression "sigprocmask(0,&local_120,&local_a0)" identifier (argument_list "(0,&local_120,&local_a0)" ( number_literal , (pointer_expression "&local_120" & identifier) , (pointer_expression "&local_a0" & identifier) ))) ;) (if_statement "if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }" if (parenthesized_expression "(DAT_0014a7d8 < 1)" ( (binary_expression "DAT_0014a7d8 < 1" identifier < number_literal) )) (compound_statement "{\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }" { (if_statement "if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }" if (parenthesized_expression "(DAT_0014a7d8 == 0)" ( (binary_expression "DAT_0014a7d8 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }" { (labeled_statement "LAB_000627f0:\n          uVar2 = 0xffffffff;" statement_identifier : (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" identifier = number_literal) ;)) (expression_statement "sigprocmask(2,&local_a0,(sigset_t *)0x0);" (call_expression "sigprocmask(2,&local_a0,(sigset_t *)0x0)" identifier (argument_list "(2,&local_a0,(sigset_t *)0x0)" ( number_literal , (pointer_expression "&local_a0" & identifier) , (cast_expression "(sigset_t *)0x0" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) (goto_statement "goto LAB_0006261f;" goto statement_identifier ;) })) }) (else_clause "else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }" else (compound_statement "{\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (while_statement "while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }" while (parenthesized_expression "(((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0)))" ( (parenthesized_expression "((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))" ( (binary_expression "(iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0)" (parenthesized_expression "(iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1))" ( (comma_expression "iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)" (assignment_expression "iVar1 = *(int *)(jobs + iVar4 * 4)" identifier = (pointer_expression "*(int *)(jobs + iVar4 * 4)" * (cast_expression "(int *)(jobs + iVar4 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(jobs + iVar4 * 4)" ( (binary_expression "jobs + iVar4 * 4" identifier + (binary_expression "iVar4 * 4" identifier * number_literal)) ))))) , (binary_expression "iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)" (binary_expression "iVar1 == 0" identifier == number_literal) || (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 1)" ( (binary_expression "*(int *)(iVar1 + 0xc) != 1" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) != number_literal) )))) )) || (parenthesized_expression "((*(byte *)(iVar1 + 0x10) & 1) != 0)" ( (binary_expression "(*(byte *)(iVar1 + 0x10) & 1) != 0" (parenthesized_expression "(*(byte *)(iVar1 + 0x10) & 1)" ( (binary_expression "*(byte *)(iVar1 + 0x10) & 1" (pointer_expression "*(byte *)(iVar1 + 0x10)" * (cast_expression "(byte *)(iVar1 + 0x10)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) )))) & number_literal) )) != number_literal) ))) )) )) (compound_statement "{\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }" { (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (if_statement "if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;" if (parenthesized_expression "(iVar4 == DAT_0014a7d8)" ( (binary_expression "iVar4 == DAT_0014a7d8" identifier == identifier) )) (goto_statement "goto LAB_000627f0;" goto statement_identifier ;)) })) }))) (expression_statement "sigprocmask(2,&local_a0,(sigset_t *)0x0);" (call_expression "sigprocmask(2,&local_a0,(sigset_t *)0x0)" identifier (argument_list "(2,&local_a0,(sigset_t *)0x0)" ( number_literal , (pointer_expression "&local_a0" & identifier) , (cast_expression "(sigset_t *)0x0" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) (if_statement "if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }" if (parenthesized_expression "(terminating_signal != 0)" ( (binary_expression "terminating_signal != 0" identifier != number_literal) )) (compound_statement "{\n        termsig_handler(terminating_signal);\n      }" { (expression_statement "termsig_handler(terminating_signal);" (call_expression "termsig_handler(terminating_signal)" identifier (argument_list "(terminating_signal)" ( identifier ))) ;) })) (if_statement "if (interrupt_state != 0) {\n        throw_to_top_level();\n      }" if (parenthesized_expression "(interrupt_state != 0)" ( (binary_expression "interrupt_state != 0" identifier != number_literal) )) (compound_statement "{\n        throw_to_top_level();\n      }" { (expression_statement "throw_to_top_level();" (call_expression "throw_to_top_level()" identifier (argument_list "()" ( ))) ;) })) (if_statement "if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }" if (parenthesized_expression "(terminating_signal != 0)" ( (binary_expression "terminating_signal != 0" identifier != number_literal) )) (compound_statement "{\n        termsig_handler(terminating_signal);\n      }" { (expression_statement "termsig_handler(terminating_signal);" (call_expression "termsig_handler(terminating_signal)" identifier (argument_list "(terminating_signal)" ( identifier ))) ;) })) (if_statement "if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    \n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }" if (parenthesized_expression "(((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0))))" ( (binary_expression "((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))" (parenthesized_expression "((wait_intr_flag != 0) && (wait_signal_received != 0))" ( (binary_expression "(wait_intr_flag != 0) && (wait_signal_received != 0)" (parenthesized_expression "(wait_intr_flag != 0)" ( (binary_expression "wait_intr_flag != 0" identifier != number_literal) )) && (parenthesized_expression "(wait_signal_received != 0)" ( (binary_expression "wait_signal_received != 0" identifier != number_literal) ))) )) && (parenthesized_expression "((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))" ( (parenthesized_expression "(this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0))" ( (binary_expression "this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)" (binary_expression "this_shell_builtin == PTR_wait_builtin_00149ee8" identifier == identifier) && (parenthesized_expression "(this_shell_builtin != (undefined *)0x0)" ( (binary_expression "this_shell_builtin != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) ))) )) (compound_statement "{\n                    \n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }" { (expression_statement "__longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);" (call_expression "__longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin)" identifier (argument_list "(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin)" ( identifier , number_literal , identifier , identifier ))) ;) })) (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar3 = 0;" (assignment_expression "*piVar3 = 0" (pointer_expression "*piVar3" * identifier) = number_literal) ;) (expression_statement "iVar4 = wait_for(0xffffffff);" (assignment_expression "iVar4 = wait_for(0xffffffff)" identifier = (call_expression "wait_for(0xffffffff)" identifier (argument_list "(0xffffffff)" ( number_literal )))) ;) (if_statement "if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }" if (parenthesized_expression "(((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0))" ( (binary_expression "((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)" (parenthesized_expression "((iVar4 == -1) && (*piVar3 == 10))" ( (binary_expression "(iVar4 == -1) && (*piVar3 == 10)" (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) && (parenthesized_expression "(*piVar3 == 10)" ( (binary_expression "*piVar3 == 10" (pointer_expression "*piVar3" * identifier) == number_literal) ))) )) && (parenthesized_expression "(DAT_0014a7d8 != 0)" ( (binary_expression "DAT_0014a7d8 != 0" identifier != number_literal) ))) )) (compound_statement "{\n        FUN_0005d3a0();\n      }" { (expression_statement "FUN_0005d3a0();" (call_expression "FUN_0005d3a0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "sigemptyset(&local_120);" (call_expression "sigemptyset(&local_120)" identifier (argument_list "(&local_120)" ( (pointer_expression "&local_120" & identifier) ))) ;) (expression_statement "sigaddset(&local_120,0x11);" (call_expression "sigaddset(&local_120,0x11)" identifier (argument_list "(&local_120,0x11)" ( (pointer_expression "&local_120" & identifier) , number_literal ))) ;) (expression_statement "sigemptyset(&local_a0);" (call_expression "sigemptyset(&local_a0)" identifier (argument_list "(&local_a0)" ( (pointer_expression "&local_a0" & identifier) ))) ;) (expression_statement "sigprocmask(0,&local_120,&local_a0);" (call_expression "sigprocmask(0,&local_120,&local_a0)" identifier (argument_list "(0,&local_120,&local_a0)" ( number_literal , (pointer_expression "&local_120" & identifier) , (pointer_expression "&local_a0" & identifier) ))) ;) (if_statement "if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }" if (parenthesized_expression "(0 < DAT_0014a7d8)" ( (binary_expression "0 < DAT_0014a7d8" number_literal < identifier) )) (compound_statement "{\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);" do (compound_statement "{\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        }" { (expression_statement "iVar1 = *(int *)(jobs + iVar4 * 4);" (assignment_expression "iVar1 = *(int *)(jobs + iVar4 * 4)" identifier = (pointer_expression "*(int *)(jobs + iVar4 * 4)" * (cast_expression "(int *)(jobs + iVar4 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(jobs + iVar4 * 4)" ( (binary_expression "jobs + iVar4 * 4" identifier + (binary_expression "iVar4 * 4" identifier * number_literal)) ))))) ;) (if_statement "if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;" if (parenthesized_expression "((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4))" ( (binary_expression "(iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) && (parenthesized_expression "(*(int *)(iVar1 + 0xc) == 4)" ( (binary_expression "*(int *)(iVar1 + 0xc) == 4" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) == number_literal) ))) )) (goto_statement "goto LAB_000625d0;" goto statement_identifier ;)) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 != DAT_0014a7d8)" ( (binary_expression "iVar4 != DAT_0014a7d8" identifier != identifier) )) ;) })) (expression_statement "sigprocmask(2,&local_a0,(sigset_t *)0x0);" (call_expression "sigprocmask(2,&local_a0,(sigset_t *)0x0)" identifier (argument_list "(2,&local_a0,(sigset_t *)0x0)" ( number_literal , (pointer_expression "&local_a0" & identifier) , (cast_expression "(sigset_t *)0x0" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })) (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" identifier = number_literal) ;) (labeled_statement "LAB_0006261f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) }))) (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" identifier (argument_list "()" ( ))) ;) (labeled_statement "LAB_000625d0:\n  uVar2 = job_exit_status(iVar4);" statement_identifier : (expression_statement "uVar2 = job_exit_status(iVar4);" (assignment_expression "uVar2 = job_exit_status(iVar4)" identifier = (call_expression "job_exit_status(iVar4)" identifier (argument_list "(iVar4)" ( identifier )))) ;)) (if_statement "if ((DAT_0014a7d8 != 0) && ((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)))) {\n    FUN_0005ec70();\n  }" if (parenthesized_expression "((DAT_0014a7d8 != 0) && ((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0))))" ( (binary_expression "(DAT_0014a7d8 != 0) && ((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)))" (parenthesized_expression "(DAT_0014a7d8 != 0)" ( (binary_expression "DAT_0014a7d8 != 0" identifier != number_literal) )) && (parenthesized_expression "((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)))" ( (parenthesized_expression "(FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0))" ( (comma_expression "FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)" (call_expression "FUN_0005e090()" identifier (argument_list "()" ( ))) , (binary_expression "DAT_0014a7d8 != 0 && (DAT_00151020 == 0)" (binary_expression "DAT_0014a7d8 != 0" identifier != number_literal) && (parenthesized_expression "(DAT_00151020 == 0)" ( (binary_expression "DAT_00151020 == 0" identifier == number_literal) )))) )) ))) )) (compound_statement "{\n    FUN_0005ec70();\n  }" { (expression_statement "FUN_0005ec70();" (call_expression "FUN_0005ec70()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "coproc_reap();" (call_expression "coproc_reap()" identifier (argument_list "()" ( ))) ;) (expression_statement "sigprocmask(2,&local_a0,(sigset_t *)0x0);" (call_expression "sigprocmask(2,&local_a0,(sigset_t *)0x0)" identifier (argument_list "(2,&local_a0,(sigset_t *)0x0)" ( number_literal , (pointer_expression "&local_a0" & identifier) , (cast_expression "(sigset_t *)0x0" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) (goto_statement "goto LAB_0006261f;" goto statement_identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT , (pointer_expression & IDENT) , (pointer_expression & IDENT) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (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 IDENT + (binary_expression IDENT * LIT)) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) ))) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) ))) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) })) (expression_statement (call_expression IDENT (argument_list ( LIT , (pointer_expression & IDENT) , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ))) ;) (do_statement do (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT , (pointer_expression & IDENT) , (pointer_expression & IDENT) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (expression_statement (call_expression IDENT (argument_list ( LIT , (pointer_expression & IDENT) , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ))) ;) (goto_statement goto statement_identifier ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (while_statement while (parenthesized_expression ( (parenthesized_expression ( (binary_expression (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) ))))) , (binary_expression (binary_expression IDENT == LIT) || (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )))) )) || (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) != LIT) ))) )) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (goto_statement goto statement_identifier ;)) })) }))) (expression_statement (call_expression IDENT (argument_list ( LIT , (pointer_expression & IDENT) , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) && (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression IDENT == IDENT) && (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ))) )) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , IDENT , IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) ))) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT , (pointer_expression & IDENT) , (pointer_expression & IDENT) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (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 IDENT + (binary_expression IDENT * LIT)) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) ))) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) })) (expression_statement (call_expression IDENT (argument_list ( LIT , (pointer_expression & IDENT) , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ))) ;) }) while (parenthesized_expression ( BOOL )) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;)) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (parenthesized_expression ( (comma_expression (call_expression IDENT (argument_list ( ))) , (binary_expression (binary_expression IDENT != LIT) && (parenthesized_expression ( (binary_expression IDENT == LIT) )))) )) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT , (pointer_expression & IDENT) , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ))) ;) (goto_statement goto statement_identifier ;) })))
(function_definition "undefined4 wait_for_any_job(void)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  sigset_t local_120;\n  sigset_t local_a0;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x62539;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (DAT_00151020 == 0) {\n    sigemptyset(&local_120);\n    sigaddset(&local_120,0x11);\n    sigemptyset(&local_a0);\n    sigprocmask(0,&local_120,&local_a0);\n    if (0 < DAT_0014a7d8) {\n      iVar4 = 0;\n      do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);\n    }\n    sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    do {\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    \n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar3 = __errno_location();\n      *piVar3 = 0;\n      iVar4 = wait_for(0xffffffff);\n      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    } while( true );\n  }\n  uVar2 = 0xffffffff;\nLAB_0006261f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_000ecc40();\nLAB_000625d0:\n  uVar2 = job_exit_status(iVar4);\n  if ((DAT_0014a7d8 != 0) && ((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)))) {\n    FUN_0005ec70();\n  }\n  coproc_reap();\n  sigprocmask(2,&local_a0,(sigset_t *)0x0);\n  goto LAB_0006261f;\n}" (type_identifier "undefined4") (function_declarator "wait_for_any_job(void)" (identifier "wait_for_any_job") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  sigset_t local_120;\n  sigset_t local_a0;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x62539;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (DAT_00151020 == 0) {\n    sigemptyset(&local_120);\n    sigaddset(&local_120,0x11);\n    sigemptyset(&local_a0);\n    sigprocmask(0,&local_120,&local_a0);\n    if (0 < DAT_0014a7d8) {\n      iVar4 = 0;\n      do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);\n    }\n    sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    do {\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    \n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar3 = __errno_location();\n      *piVar3 = 0;\n      iVar4 = wait_for(0xffffffff);\n      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    } while( true );\n  }\n  uVar2 = 0xffffffff;\nLAB_0006261f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_000ecc40();\nLAB_000625d0:\n  uVar2 = job_exit_status(iVar4);\n  if ((DAT_0014a7d8 != 0) && ((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)))) {\n    FUN_0005ec70();\n  }\n  coproc_reap();\n  sigprocmask(2,&local_a0,(sigset_t *)0x0);\n  goto LAB_0006261f;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "sigset_t local_120;" (type_identifier "sigset_t") (identifier "local_120") (; ";")) (declaration "sigset_t local_a0;" (type_identifier "sigset_t") (identifier "local_a0") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x62539;" (assignment_expression "uStack_14 = 0x62539" (identifier "uStack_14") (= "=") (number_literal "0x62539")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if (DAT_00151020 == 0) {\n    sigemptyset(&local_120);\n    sigaddset(&local_120,0x11);\n    sigemptyset(&local_a0);\n    sigprocmask(0,&local_120,&local_a0);\n    if (0 < DAT_0014a7d8) {\n      iVar4 = 0;\n      do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);\n    }\n    sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    do {\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    \n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar3 = __errno_location();\n      *piVar3 = 0;\n      iVar4 = wait_for(0xffffffff);\n      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    } while( true );\n  }" (if "if") (parenthesized_expression "(DAT_00151020 == 0)" (( "(") (binary_expression "DAT_00151020 == 0" (identifier "DAT_00151020") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    sigemptyset(&local_120);\n    sigaddset(&local_120,0x11);\n    sigemptyset(&local_a0);\n    sigprocmask(0,&local_120,&local_a0);\n    if (0 < DAT_0014a7d8) {\n      iVar4 = 0;\n      do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);\n    }\n    sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    do {\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    \n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar3 = __errno_location();\n      *piVar3 = 0;\n      iVar4 = wait_for(0xffffffff);\n      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    } while( true );\n  }" ({ "{") (expression_statement "sigemptyset(&local_120);" (call_expression "sigemptyset(&local_120)" (identifier "sigemptyset") (argument_list "(&local_120)" (( "(") (pointer_expression "&local_120" (& "&") (identifier "local_120")) () ")"))) (; ";")) (expression_statement "sigaddset(&local_120,0x11);" (call_expression "sigaddset(&local_120,0x11)" (identifier "sigaddset") (argument_list "(&local_120,0x11)" (( "(") (pointer_expression "&local_120" (& "&") (identifier "local_120")) (, ",") (number_literal "0x11") () ")"))) (; ";")) (expression_statement "sigemptyset(&local_a0);" (call_expression "sigemptyset(&local_a0)" (identifier "sigemptyset") (argument_list "(&local_a0)" (( "(") (pointer_expression "&local_a0" (& "&") (identifier "local_a0")) () ")"))) (; ";")) (expression_statement "sigprocmask(0,&local_120,&local_a0);" (call_expression "sigprocmask(0,&local_120,&local_a0)" (identifier "sigprocmask") (argument_list "(0,&local_120,&local_a0)" (( "(") (number_literal "0") (, ",") (pointer_expression "&local_120" (& "&") (identifier "local_120")) (, ",") (pointer_expression "&local_a0" (& "&") (identifier "local_a0")) () ")"))) (; ";")) (if_statement "if (0 < DAT_0014a7d8) {\n      iVar4 = 0;\n      do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);\n    }" (if "if") (parenthesized_expression "(0 < DAT_0014a7d8)" (( "(") (binary_expression "0 < DAT_0014a7d8" (number_literal "0") (< "<") (identifier "DAT_0014a7d8")) () ")")) (compound_statement "{\n      iVar4 = 0;\n      do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);\n    }" ({ "{") (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      } while (iVar4 != DAT_0014a7d8);" (do "do") (compound_statement "{\n        iVar1 = *(int *)(jobs + iVar4 * 4);\n        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;\n        iVar4 = iVar4 + 1;\n      }" ({ "{") (expression_statement "iVar1 = *(int *)(jobs + iVar4 * 4);" (assignment_expression "iVar1 = *(int *)(jobs + iVar4 * 4)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(jobs + iVar4 * 4)" (* "*") (cast_expression "(int *)(jobs + iVar4 * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(jobs + iVar4 * 4)" (( "(") (binary_expression "jobs + iVar4 * 4" (identifier "jobs") (+ "+") (binary_expression "iVar4 * 4" (identifier "iVar4") (* "*") (number_literal "4"))) () ")"))))) (; ";")) (if_statement "if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))\n        goto LAB_000625d0;" (if "if") (parenthesized_expression "(((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))" (( "(") (binary_expression "((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0)" (parenthesized_expression "((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4))" (( "(") (binary_expression "(iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)" (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(*(int *)(iVar1 + 0xc) == 4)" (( "(") (binary_expression "*(int *)(iVar1 + 0xc) == 4" (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) (== "==") (number_literal "4")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "((*(byte *)(iVar1 + 0x10) & 2) == 0)" (( "(") (binary_expression "(*(byte *)(iVar1 + 0x10) & 2) == 0" (parenthesized_expression "(*(byte *)(iVar1 + 0x10) & 2)" (( "(") (binary_expression "*(byte *)(iVar1 + 0x10) & 2" (pointer_expression "*(byte *)(iVar1 + 0x10)" (* "*") (cast_expression "(byte *)(iVar1 + 0x10)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x10)" (( "(") (binary_expression "iVar1 + 0x10" (identifier "iVar1") (+ "+") (number_literal "0x10")) () ")")))) (& "&") (number_literal "2")) () ")")) (== "==") (number_literal "0")) () ")"))) () ")")) (goto_statement "goto LAB_000625d0;" (goto "goto") (statement_identifier "LAB_000625d0") (; ";"))) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar4 != DAT_0014a7d8)" (( "(") (binary_expression "iVar4 != DAT_0014a7d8" (identifier "iVar4") (!= "!=") (identifier "DAT_0014a7d8")) () ")")) (; ";")) (} "}"))) (expression_statement "sigprocmask(2,&local_a0,(sigset_t *)0x0);" (call_expression "sigprocmask(2,&local_a0,(sigset_t *)0x0)" (identifier "sigprocmask") (argument_list "(2,&local_a0,(sigset_t *)0x0)" (( "(") (number_literal "2") (, ",") (pointer_expression "&local_a0" (& "&") (identifier "local_a0")) (, ",") (cast_expression "(sigset_t *)0x0" (( "(") (type_descriptor "sigset_t *" (type_identifier "sigset_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) () ")"))) (; ";")) (do_statement "do {\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    \n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar3 = __errno_location();\n      *piVar3 = 0;\n      iVar4 = wait_for(0xffffffff);\n      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    } while( true );" (do "do") (compound_statement "{\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (interrupt_state != 0) {\n        throw_to_top_level();\n      }\n      if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }\n      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    \n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }\n      piVar3 = __errno_location();\n      *piVar3 = 0;\n      iVar4 = wait_for(0xffffffff);\n      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }\n      sigemptyset(&local_120);\n      sigaddset(&local_120,0x11);\n      sigemptyset(&local_a0);\n      sigprocmask(0,&local_120,&local_a0);\n      if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }\n      sigprocmask(2,&local_a0,(sigset_t *)0x0);\n    }" ({ "{") (expression_statement "sigemptyset(&local_120);" (call_expression "sigemptyset(&local_120)" (identifier "sigemptyset") (argument_list "(&local_120)" (( "(") (pointer_expression "&local_120" (& "&") (identifier "local_120")) () ")"))) (; ";")) (expression_statement "sigaddset(&local_120,0x11);" (call_expression "sigaddset(&local_120,0x11)" (identifier "sigaddset") (argument_list "(&local_120,0x11)" (( "(") (pointer_expression "&local_120" (& "&") (identifier "local_120")) (, ",") (number_literal "0x11") () ")"))) (; ";")) (expression_statement "sigemptyset(&local_a0);" (call_expression "sigemptyset(&local_a0)" (identifier "sigemptyset") (argument_list "(&local_a0)" (( "(") (pointer_expression "&local_a0" (& "&") (identifier "local_a0")) () ")"))) (; ";")) (expression_statement "sigprocmask(0,&local_120,&local_a0);" (call_expression "sigprocmask(0,&local_120,&local_a0)" (identifier "sigprocmask") (argument_list "(0,&local_120,&local_a0)" (( "(") (number_literal "0") (, ",") (pointer_expression "&local_120" (& "&") (identifier "local_120")) (, ",") (pointer_expression "&local_a0" (& "&") (identifier "local_a0")) () ")"))) (; ";")) (if_statement "if (DAT_0014a7d8 < 1) {\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }\n      else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }" (if "if") (parenthesized_expression "(DAT_0014a7d8 < 1)" (( "(") (binary_expression "DAT_0014a7d8 < 1" (identifier "DAT_0014a7d8") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n        if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }\n      }" ({ "{") (if_statement "if (DAT_0014a7d8 == 0) {\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }" (if "if") (parenthesized_expression "(DAT_0014a7d8 == 0)" (( "(") (binary_expression "DAT_0014a7d8 == 0" (identifier "DAT_0014a7d8") (== "==") (number_literal "0")) () ")")) (compound_statement "{\nLAB_000627f0:\n          uVar2 = 0xffffffff;\n          sigprocmask(2,&local_a0,(sigset_t *)0x0);\n          goto LAB_0006261f;\n        }" ({ "{") (labeled_statement "LAB_000627f0:\n          uVar2 = 0xffffffff;" (statement_identifier "LAB_000627f0") (: ":") (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" (identifier "uVar2") (= "=") (number_literal "0xffffffff")) (; ";"))) (expression_statement "sigprocmask(2,&local_a0,(sigset_t *)0x0);" (call_expression "sigprocmask(2,&local_a0,(sigset_t *)0x0)" (identifier "sigprocmask") (argument_list "(2,&local_a0,(sigset_t *)0x0)" (( "(") (number_literal "2") (, ",") (pointer_expression "&local_a0" (& "&") (identifier "local_a0")) (, ",") (cast_expression "(sigset_t *)0x0" (( "(") (type_descriptor "sigset_t *" (type_identifier "sigset_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) () ")"))) (; ";")) (goto_statement "goto LAB_0006261f;" (goto "goto") (statement_identifier "LAB_0006261f") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }" (else "else") (compound_statement "{\n        iVar4 = 0;\n        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }\n      }" ({ "{") (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (while_statement "while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }" (while "while") (parenthesized_expression "(((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0)))" (( "(") (parenthesized_expression "((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0))" (( "(") (binary_expression "(iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||\n               ((*(byte *)(iVar1 + 0x10) & 1) != 0)" (parenthesized_expression "(iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1))" (( "(") (comma_expression "iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)" (assignment_expression "iVar1 = *(int *)(jobs + iVar4 * 4)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(jobs + iVar4 * 4)" (* "*") (cast_expression "(int *)(jobs + iVar4 * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(jobs + iVar4 * 4)" (( "(") (binary_expression "jobs + iVar4 * 4" (identifier "jobs") (+ "+") (binary_expression "iVar4 * 4" (identifier "iVar4") (* "*") (number_literal "4"))) () ")"))))) (, ",") (binary_expression "iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)" (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) (|| "||") (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 1)" (( "(") (binary_expression "*(int *)(iVar1 + 0xc) != 1" (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) (!= "!=") (number_literal "1")) () ")")))) () ")")) (|| "||") (parenthesized_expression "((*(byte *)(iVar1 + 0x10) & 1) != 0)" (( "(") (binary_expression "(*(byte *)(iVar1 + 0x10) & 1) != 0" (parenthesized_expression "(*(byte *)(iVar1 + 0x10) & 1)" (( "(") (binary_expression "*(byte *)(iVar1 + 0x10) & 1" (pointer_expression "*(byte *)(iVar1 + 0x10)" (* "*") (cast_expression "(byte *)(iVar1 + 0x10)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x10)" (( "(") (binary_expression "iVar1 + 0x10" (identifier "iVar1") (+ "+") (number_literal "0x10")) () ")")))) (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")"))) () ")")) () ")")) (compound_statement "{\n          iVar4 = iVar4 + 1;\n          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;\n        }" ({ "{") (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;" (if "if") (parenthesized_expression "(iVar4 == DAT_0014a7d8)" (( "(") (binary_expression "iVar4 == DAT_0014a7d8" (identifier "iVar4") (== "==") (identifier "DAT_0014a7d8")) () ")")) (goto_statement "goto LAB_000627f0;" (goto "goto") (statement_identifier "LAB_000627f0") (; ";"))) (} "}"))) (} "}")))) (expression_statement "sigprocmask(2,&local_a0,(sigset_t *)0x0);" (call_expression "sigprocmask(2,&local_a0,(sigset_t *)0x0)" (identifier "sigprocmask") (argument_list "(2,&local_a0,(sigset_t *)0x0)" (( "(") (number_literal "2") (, ",") (pointer_expression "&local_a0" (& "&") (identifier "local_a0")) (, ",") (cast_expression "(sigset_t *)0x0" (( "(") (type_descriptor "sigset_t *" (type_identifier "sigset_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) () ")"))) (; ";")) (if_statement "if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }" (if "if") (parenthesized_expression "(terminating_signal != 0)" (( "(") (binary_expression "terminating_signal != 0" (identifier "terminating_signal") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        termsig_handler(terminating_signal);\n      }" ({ "{") (expression_statement "termsig_handler(terminating_signal);" (call_expression "termsig_handler(terminating_signal)" (identifier "termsig_handler") (argument_list "(terminating_signal)" (( "(") (identifier "terminating_signal") () ")"))) (; ";")) (} "}"))) (if_statement "if (interrupt_state != 0) {\n        throw_to_top_level();\n      }" (if "if") (parenthesized_expression "(interrupt_state != 0)" (( "(") (binary_expression "interrupt_state != 0" (identifier "interrupt_state") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        throw_to_top_level();\n      }" ({ "{") (expression_statement "throw_to_top_level();" (call_expression "throw_to_top_level()" (identifier "throw_to_top_level") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (if_statement "if (terminating_signal != 0) {\n        termsig_handler(terminating_signal);\n      }" (if "if") (parenthesized_expression "(terminating_signal != 0)" (( "(") (binary_expression "terminating_signal != 0" (identifier "terminating_signal") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        termsig_handler(terminating_signal);\n      }" ({ "{") (expression_statement "termsig_handler(terminating_signal);" (call_expression "termsig_handler(terminating_signal)" (identifier "termsig_handler") (argument_list "(terminating_signal)" (( "(") (identifier "terminating_signal") () ")"))) (; ";")) (} "}"))) (if_statement "if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))) {\n                    \n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }" (if "if") (parenthesized_expression "(((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0))))" (( "(") (binary_expression "((wait_intr_flag != 0) && (wait_signal_received != 0)) &&\n         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))" (parenthesized_expression "((wait_intr_flag != 0) && (wait_signal_received != 0))" (( "(") (binary_expression "(wait_intr_flag != 0) && (wait_signal_received != 0)" (parenthesized_expression "(wait_intr_flag != 0)" (( "(") (binary_expression "wait_intr_flag != 0" (identifier "wait_intr_flag") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(wait_signal_received != 0)" (( "(") (binary_expression "wait_signal_received != 0" (identifier "wait_signal_received") (!= "!=") (number_literal "0")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "((this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)))" (( "(") (parenthesized_expression "(this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0))" (( "(") (binary_expression "this_shell_builtin == PTR_wait_builtin_00149ee8 &&\n          (this_shell_builtin != (undefined *)0x0)" (binary_expression "this_shell_builtin == PTR_wait_builtin_00149ee8" (identifier "this_shell_builtin") (== "==") (identifier "PTR_wait_builtin_00149ee8")) (&& "&&") (parenthesized_expression "(this_shell_builtin != (undefined *)0x0)" (( "(") (binary_expression "this_shell_builtin != (undefined *)0x0" (identifier "this_shell_builtin") (!= "!=") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\n                    \n        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);\n      }" ({ "{") (expression_statement "__longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);" (call_expression "__longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin)" (identifier "__longjmp_chk") (argument_list "(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin)" (( "(") (identifier "PTR_wait_intr_buf_00149fac") (, ",") (number_literal "1") (, ",") (identifier "this_shell_builtin") (, ",") (identifier "this_shell_builtin") () ")"))) (; ";")) (} "}"))) (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" (identifier "piVar3") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "*piVar3 = 0;" (assignment_expression "*piVar3 = 0" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar4 = wait_for(0xffffffff);" (assignment_expression "iVar4 = wait_for(0xffffffff)" (identifier "iVar4") (= "=") (call_expression "wait_for(0xffffffff)" (identifier "wait_for") (argument_list "(0xffffffff)" (( "(") (number_literal "0xffffffff") () ")")))) (; ";")) (if_statement "if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {\n        FUN_0005d3a0();\n      }" (if "if") (parenthesized_expression "(((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0))" (( "(") (binary_expression "((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)" (parenthesized_expression "((iVar4 == -1) && (*piVar3 == 10))" (( "(") (binary_expression "(iVar4 == -1) && (*piVar3 == 10)" (parenthesized_expression "(iVar4 == -1)" (( "(") (binary_expression "iVar4 == -1" (identifier "iVar4") (== "==") (number_literal "-1")) () ")")) (&& "&&") (parenthesized_expression "(*piVar3 == 10)" (( "(") (binary_expression "*piVar3 == 10" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (== "==") (number_literal "10")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(DAT_0014a7d8 != 0)" (( "(") (binary_expression "DAT_0014a7d8 != 0" (identifier "DAT_0014a7d8") (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n        FUN_0005d3a0();\n      }" ({ "{") (expression_statement "FUN_0005d3a0();" (call_expression "FUN_0005d3a0()" (identifier "FUN_0005d3a0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "sigemptyset(&local_120);" (call_expression "sigemptyset(&local_120)" (identifier "sigemptyset") (argument_list "(&local_120)" (( "(") (pointer_expression "&local_120" (& "&") (identifier "local_120")) () ")"))) (; ";")) (expression_statement "sigaddset(&local_120,0x11);" (call_expression "sigaddset(&local_120,0x11)" (identifier "sigaddset") (argument_list "(&local_120,0x11)" (( "(") (pointer_expression "&local_120" (& "&") (identifier "local_120")) (, ",") (number_literal "0x11") () ")"))) (; ";")) (expression_statement "sigemptyset(&local_a0);" (call_expression "sigemptyset(&local_a0)" (identifier "sigemptyset") (argument_list "(&local_a0)" (( "(") (pointer_expression "&local_a0" (& "&") (identifier "local_a0")) () ")"))) (; ";")) (expression_statement "sigprocmask(0,&local_120,&local_a0);" (call_expression "sigprocmask(0,&local_120,&local_a0)" (identifier "sigprocmask") (argument_list "(0,&local_120,&local_a0)" (( "(") (number_literal "0") (, ",") (pointer_expression "&local_120" (& "&") (identifier "local_120")) (, ",") (pointer_expression "&local_a0" (& "&") (identifier "local_a0")) () ")"))) (; ";")) (if_statement "if (0 < DAT_0014a7d8) {\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }" (if "if") (parenthesized_expression "(0 < DAT_0014a7d8)" (( "(") (binary_expression "0 < DAT_0014a7d8" (number_literal "0") (< "<") (identifier "DAT_0014a7d8")) () ")")) (compound_statement "{\n        iVar4 = 0;\n        do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);\n      }" ({ "{") (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        } while (iVar4 != DAT_0014a7d8);" (do "do") (compound_statement "{\n          iVar1 = *(int *)(jobs + iVar4 * 4);\n          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;\n          iVar4 = iVar4 + 1;\n        }" ({ "{") (expression_statement "iVar1 = *(int *)(jobs + iVar4 * 4);" (assignment_expression "iVar1 = *(int *)(jobs + iVar4 * 4)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(jobs + iVar4 * 4)" (* "*") (cast_expression "(int *)(jobs + iVar4 * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(jobs + iVar4 * 4)" (( "(") (binary_expression "jobs + iVar4 * 4" (identifier "jobs") (+ "+") (binary_expression "iVar4 * 4" (identifier "iVar4") (* "*") (number_literal "4"))) () ")"))))) (; ";")) (if_statement "if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;" (if "if") (parenthesized_expression "((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4))" (( "(") (binary_expression "(iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)" (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(*(int *)(iVar1 + 0xc) == 4)" (( "(") (binary_expression "*(int *)(iVar1 + 0xc) == 4" (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) (== "==") (number_literal "4")) () ")"))) () ")")) (goto_statement "goto LAB_000625d0;" (goto "goto") (statement_identifier "LAB_000625d0") (; ";"))) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar4 != DAT_0014a7d8)" (( "(") (binary_expression "iVar4 != DAT_0014a7d8" (identifier "iVar4") (!= "!=") (identifier "DAT_0014a7d8")) () ")")) (; ";")) (} "}"))) (expression_statement "sigprocmask(2,&local_a0,(sigset_t *)0x0);" (call_expression "sigprocmask(2,&local_a0,(sigset_t *)0x0)" (identifier "sigprocmask") (argument_list "(2,&local_a0,(sigset_t *)0x0)" (( "(") (number_literal "2") (, ",") (pointer_expression "&local_a0" (& "&") (identifier "local_a0")) (, ",") (cast_expression "(sigset_t *)0x0" (( "(") (type_descriptor "sigset_t *" (type_identifier "sigset_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) () ")"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (} "}"))) (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" (identifier "uVar2") (= "=") (number_literal "0xffffffff")) (; ";")) (labeled_statement "LAB_0006261f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" (statement_identifier "LAB_0006261f") (: ":") (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return uVar2;\n  }" ({ "{") (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))) (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" (identifier "FUN_000ecc40") (argument_list "()" (( "(") () ")"))) (; ";")) (labeled_statement "LAB_000625d0:\n  uVar2 = job_exit_status(iVar4);" (statement_identifier "LAB_000625d0") (: ":") (expression_statement "uVar2 = job_exit_status(iVar4);" (assignment_expression "uVar2 = job_exit_status(iVar4)" (identifier "uVar2") (= "=") (call_expression "job_exit_status(iVar4)" (identifier "job_exit_status") (argument_list "(iVar4)" (( "(") (identifier "iVar4") () ")")))) (; ";"))) (if_statement "if ((DAT_0014a7d8 != 0) && ((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)))) {\n    FUN_0005ec70();\n  }" (if "if") (parenthesized_expression "((DAT_0014a7d8 != 0) && ((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0))))" (( "(") (binary_expression "(DAT_0014a7d8 != 0) && ((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)))" (parenthesized_expression "(DAT_0014a7d8 != 0)" (( "(") (binary_expression "DAT_0014a7d8 != 0" (identifier "DAT_0014a7d8") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)))" (( "(") (parenthesized_expression "(FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0))" (( "(") (comma_expression "FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)" (call_expression "FUN_0005e090()" (identifier "FUN_0005e090") (argument_list "()" (( "(") () ")"))) (, ",") (binary_expression "DAT_0014a7d8 != 0 && (DAT_00151020 == 0)" (binary_expression "DAT_0014a7d8 != 0" (identifier "DAT_0014a7d8") (!= "!=") (number_literal "0")) (&& "&&") (parenthesized_expression "(DAT_00151020 == 0)" (( "(") (binary_expression "DAT_00151020 == 0" (identifier "DAT_00151020") (== "==") (number_literal "0")) () ")")))) () ")")) () ")"))) () ")")) (compound_statement "{\n    FUN_0005ec70();\n  }" ({ "{") (expression_statement "FUN_0005ec70();" (call_expression "FUN_0005ec70()" (identifier "FUN_0005ec70") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "coproc_reap();" (call_expression "coproc_reap()" (identifier "coproc_reap") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "sigprocmask(2,&local_a0,(sigset_t *)0x0);" (call_expression "sigprocmask(2,&local_a0,(sigset_t *)0x0)" (identifier "sigprocmask") (argument_list "(2,&local_a0,(sigset_t *)0x0)" (( "(") (number_literal "2") (, ",") (pointer_expression "&local_a0" (& "&") (identifier "local_a0")) (, ",") (cast_expression "(sigset_t *)0x0" (( "(") (type_descriptor "sigset_t *" (type_identifier "sigset_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) () ")"))) (; ";")) (goto_statement "goto LAB_0006261f;" (goto "goto") (statement_identifier "LAB_0006261f") (; ";")) (} "}")))

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

int function_1(int flags)

{
  int var_21;
  type_1 *var_6;
  int iVar3;
  int *piVar4;
  int var_8;
  int var_1;
  type_2 set;
  type_2 oset;
  
  var_21 = *(int *)(var_1 + 0x14);
  if (var_2 == 0) {
    var_3((type_2 *)&set);
    var_4((type_2 *)&set,0x11);
    var_3((type_2 *)&oset);
    var_5(0,(type_2 *)&set,(type_2 *)&oset);
    if (0 < js.j_jobslots) {
      var_8 = 0;
      do {
        var_6 = jobs[var_8];
        if (((var_6 != (type_1 *)0x0) && (var_6->state == var_7)) && ((var_6->flags & 2) == 0))
        goto LAB_000625d0;
        var_8 = var_8 + 1;
      } while (var_8 != js.j_jobslots);
    }
    var_5(2,(type_2 *)&oset,(type_2 *)0x0);
    do {
      var_3((type_2 *)&set);
      var_4((type_2 *)&set,0x11);
      var_3((type_2 *)&oset);
      var_5(0,(type_2 *)&set,(type_2 *)&oset);
      if (js.j_jobslots < 1) {
        if (js.j_jobslots == 0) {
LAB_000627f0:
          iVar3 = -1;
          var_5(2,(type_2 *)&oset,(type_2 *)0x0);
          goto LAB_0006261f;
        }
      }
      else {
        var_8 = 0;
        while (((var_6 = jobs[var_8], var_6 == (type_1 *)0x0 || (var_6->state != var_9)) ||
               ((var_6->flags & 1) != 0))) {
          var_8 = var_8 + 1;
          if (var_8 == js.j_jobslots) goto LAB_000627f0;
        }
      }
      var_5(2,(type_2 *)&oset,(type_2 *)0x0);
      if (var_10 != 0) {
        var_11(var_10);
      }
      if (var_12 != 0) {
        var_13();
      }
      if (var_10 != 0) {
        var_11(var_10);
      }
      if (((var_14 != 0) && (var_15 != 0)) &&
         ((var_16 == (type_3 *)PTR_wait_builtin_00149ee8 &&
          (var_16 != (type_3 *)0x0)))) {
                    /* WARNING: Subroutine does not return */
        var_17(PTR_wait_intr_buf_00149fac,1,var_16,var_16);
      }
      piVar4 = var_18();
      *piVar4 = 0;
      var_8 = var_19(-1);
      if (((var_8 == -1) && (*piVar4 == 10)) && (js.j_jobslots != 0)) {
        var_20();
      }
      var_3((type_2 *)&set);
      var_4((type_2 *)&set,0x11);
      var_3((type_2 *)&oset);
      var_5(0,(type_2 *)&set,(type_2 *)&oset);
      if (0 < js.j_jobslots) {
        var_8 = 0;
        do {
          if ((jobs[var_8] != (type_1 *)0x0) && (jobs[var_8]->state == var_7)) goto LAB_000625d0;
          var_8 = var_8 + 1;
        } while (var_8 != js.j_jobslots);
      }
      var_5(2,(type_2 *)&oset,(type_2 *)0x0);
    } while( true );
  }
  iVar3 = -1;
LAB_0006261f:
  if (var_21 == *(int *)(var_1 + 0x14)) {
    return iVar3;
  }
                    /* WARNING: Subroutine does not return */
  var_22();
LAB_000625d0:
  iVar3 = var_23(var_8);
  if ((js.j_jobslots != 0) &&
     ((var_24(), js.j_jobslots != 0 && (var_2 == 0)))) {
    var_25(var_8,0);
  }
  var_26();
  var_5(2,(type_2 *)&oset,(type_2 *)0x0);
  goto LAB_0006261f;
}


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

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

undefined4 MASKED(void)

{
  int iVar1;
  undefined4 uVar2;
  int *piVar3;
  int iVar4;
  int in_GS_OFFSET;
  sigset_t local_120;
  sigset_t local_a0;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x62539;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (DAT_00151020 == 0) {
    sigemptyset(&local_120);
    sigaddset(&local_120,0x11);
    sigemptyset(&local_a0);
    sigprocmask(0,&local_120,&local_a0);
    if (0 < DAT_0014a7d8) {
      iVar4 = 0;
      do {
        iVar1 = *(int *)(jobs + iVar4 * 4);
        if (((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) && ((*(byte *)(iVar1 + 0x10) & 2) == 0))
        goto LAB_000625d0;
        iVar4 = iVar4 + 1;
      } while (iVar4 != DAT_0014a7d8);
    }
    sigprocmask(2,&local_a0,(sigset_t *)0x0);
    do {
      sigemptyset(&local_120);
      sigaddset(&local_120,0x11);
      sigemptyset(&local_a0);
      sigprocmask(0,&local_120,&local_a0);
      if (DAT_0014a7d8 < 1) {
        if (DAT_0014a7d8 == 0) {
LAB_000627f0:
          uVar2 = 0xffffffff;
          sigprocmask(2,&local_a0,(sigset_t *)0x0);
          goto LAB_0006261f;
        }
      }
      else {
        iVar4 = 0;
        while (((iVar1 = *(int *)(jobs + iVar4 * 4), iVar1 == 0 || (*(int *)(iVar1 + 0xc) != 1)) ||
               ((*(byte *)(iVar1 + 0x10) & 1) != 0))) {
          iVar4 = iVar4 + 1;
          if (iVar4 == DAT_0014a7d8) goto LAB_000627f0;
        }
      }
      sigprocmask(2,&local_a0,(sigset_t *)0x0);
      if (terminating_signal != 0) {
        termsig_handler(terminating_signal);
      }
      if (interrupt_state != 0) {
        throw_to_top_level();
      }
      if (terminating_signal != 0) {
        termsig_handler(terminating_signal);
      }
      if (((wait_intr_flag != 0) && (wait_signal_received != 0)) &&
         ((this_shell_builtin == PTR_wait_builtin_00149ee8 &&
          (this_shell_builtin != (undefined *)0x0)))) {
                    /* WARNING: Subroutine does not return */
        __longjmp_chk(PTR_wait_intr_buf_00149fac,1,this_shell_builtin,this_shell_builtin);
      }
      piVar3 = __errno_location();
      *piVar3 = 0;
      iVar4 = wait_for(0xffffffff);
      if (((iVar4 == -1) && (*piVar3 == 10)) && (DAT_0014a7d8 != 0)) {
        FUN_0005d3a0();
      }
      sigemptyset(&local_120);
      sigaddset(&local_120,0x11);
      sigemptyset(&local_a0);
      sigprocmask(0,&local_120,&local_a0);
      if (0 < DAT_0014a7d8) {
        iVar4 = 0;
        do {
          iVar1 = *(int *)(jobs + iVar4 * 4);
          if ((iVar1 != 0) && (*(int *)(iVar1 + 0xc) == 4)) goto LAB_000625d0;
          iVar4 = iVar4 + 1;
        } while (iVar4 != DAT_0014a7d8);
      }
      sigprocmask(2,&local_a0,(sigset_t *)0x0);
    } while( true );
  }
  uVar2 = 0xffffffff;
LAB_0006261f:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000ecc40();
LAB_000625d0:
  uVar2 = job_exit_status(iVar4);
  if ((DAT_0014a7d8 != 0) && ((FUN_0005e090(), DAT_0014a7d8 != 0 && (DAT_00151020 == 0)))) {
    FUN_0005ec70();
  }
  coproc_reap();
  sigprocmask(2,&local_a0,(sigset_t *)0x0);
  goto LAB_0006261f;
}

