
/* WARNING: Function: __x86.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */

PROCESS * __regparm3 find_last_proc(int job,int block)

{
  PROCESS *pPVar1;
  PROCESS *pPVar2;
  PROCESS *pPVar3;
  
  pPVar1 = jobs[job]->pipe;
  if (pPVar1 == (PROCESS *)0x0) {
    pPVar3 = (PROCESS *)0x0;
  }
  else {
    pPVar2 = pPVar1->next;
    if (pPVar1 == pPVar2) {
      return pPVar2;
    }
    do {
      pPVar3 = pPVar2;
      if (pPVar3 == (PROCESS *)0x0) {
        return (PROCESS *)0x0;
      }
      pPVar2 = pPVar3->next;
    } while (pPVar1 != pPVar3->next);
  }
  return pPVar3;
}



/* WARNING: Function: __i686.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */

int * __regparm3 FUN_0005dde0(int param_1)

{
  int *piVar1;
  int *piVar2;
  int *piVar3;
  
  piVar1 = *(int **)(*(int *)(jobs + param_1 * 4) + 4);
  if (piVar1 == (int *)0x0) {
    piVar3 = (int *)0x0;
  }
  else {
    piVar2 = (int *)*piVar1;
    if (piVar1 == piVar2) {
      return piVar2;
    }
    do {
      piVar3 = piVar2;
      if (piVar3 == (int *)0x0) {
        return (int *)0x0;
      }
      piVar2 = (int *)*piVar3;
    } while (piVar1 != (int *)*piVar3);
  }
  return piVar3;
}


CALL 0x00032005
ADD EDX,0xec21b
MOV EDX,dword ptr [EDX + 0x5ef4]
MOV EAX,dword ptr [EDX + EAX*0x4]
MOV ECX,dword ptr [EAX + 0x4]
TEST ECX,ECX
JZ 0x0005de15
MOV EAX,dword ptr [ECX]
CMP ECX,EAX
JNZ 0x0005de10
JMP 0x0005de18
MOV EDX,dword ptr [EAX]
CMP ECX,EDX
JZ 0x0005de17
MOV EAX,EDX
TEST EAX,EAX
JNZ 0x0005de08
RET
XOR EAX,EAX
RET
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */\n\nint * __regparm3 FUN_0005dde0(int param_1)\n\n{\n  int *piVar1;\n  int *piVar2;\n  int *piVar3;\n  \n  piVar1 = *(int **)(*(int *)(jobs + param_1 * 4) + 4);\n  if (piVar1 == (int *)0x0) {\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar2 = (int *)*piVar1;\n    if (piVar1 == piVar2) {\n      return piVar2;\n    }\n    do {\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    } while (piVar1 != (int *)*piVar3);\n  }\n  return piVar3;\n}\n\n" comment (function_definition "int * __regparm3 FUN_0005dde0(int param_1)\n\n{\n  int *piVar1;\n  int *piVar2;\n  int *piVar3;\n  \n  piVar1 = *(int **)(*(int *)(jobs + param_1 * 4) + 4);\n  if (piVar1 == (int *)0x0) {\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar2 = (int *)*piVar1;\n    if (piVar1 == piVar2) {\n      return piVar2;\n    }\n    do {\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    } while (piVar1 != (int *)*piVar3);\n  }\n  return piVar3;\n}" primitive_type (pointer_declarator "* __regparm3 FUN_0005dde0(int param_1)" * (ERROR "__regparm3" identifier) (function_declarator "FUN_0005dde0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) )))) (compound_statement "{\n  int *piVar1;\n  int *piVar2;\n  int *piVar3;\n  \n  piVar1 = *(int **)(*(int *)(jobs + param_1 * 4) + 4);\n  if (piVar1 == (int *)0x0) {\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar2 = (int *)*piVar1;\n    if (piVar1 == piVar2) {\n      return piVar2;\n    }\n    do {\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    } while (piVar1 != (int *)*piVar3);\n  }\n  return piVar3;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (expression_statement "piVar1 = *(int **)(*(int *)(jobs + param_1 * 4) + 4);" (assignment_expression "piVar1 = *(int **)(*(int *)(jobs + param_1 * 4) + 4)" identifier = (pointer_expression "*(int **)(*(int *)(jobs + param_1 * 4) + 4)" * (cast_expression "(int **)(*(int *)(jobs + param_1 * 4) + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(jobs + param_1 * 4) + 4)" ( (binary_expression "*(int *)(jobs + param_1 * 4) + 4" (pointer_expression "*(int *)(jobs + param_1 * 4)" * (cast_expression "(int *)(jobs + param_1 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(jobs + param_1 * 4)" ( (binary_expression "jobs + param_1 * 4" identifier + (binary_expression "param_1 * 4" identifier * number_literal)) )))) + number_literal) ))))) ;) (if_statement "if (piVar1 == (int *)0x0) {\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar2 = (int *)*piVar1;\n    if (piVar1 == piVar2) {\n      return piVar2;\n    }\n    do {\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    } while (piVar1 != (int *)*piVar3);\n  }" if (parenthesized_expression "(piVar1 == (int *)0x0)" ( (binary_expression "piVar1 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    piVar3 = (int *)0x0;\n  }" { (expression_statement "piVar3 = (int *)0x0;" (assignment_expression "piVar3 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    piVar2 = (int *)*piVar1;\n    if (piVar1 == piVar2) {\n      return piVar2;\n    }\n    do {\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    } while (piVar1 != (int *)*piVar3);\n  }" else (compound_statement "{\n    piVar2 = (int *)*piVar1;\n    if (piVar1 == piVar2) {\n      return piVar2;\n    }\n    do {\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    } while (piVar1 != (int *)*piVar3);\n  }" { (expression_statement "piVar2 = (int *)*piVar1;" (assignment_expression "piVar2 = (int *)*piVar1" identifier = (cast_expression "(int *)*piVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar1" * identifier))) ;) (if_statement "if (piVar1 == piVar2) {\n      return piVar2;\n    }" if (parenthesized_expression "(piVar1 == piVar2)" ( (binary_expression "piVar1 == piVar2" identifier == identifier) )) (compound_statement "{\n      return piVar2;\n    }" { (return_statement "return piVar2;" return identifier ;) })) (do_statement "do {\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    } while (piVar1 != (int *)*piVar3);" do (compound_statement "{\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    }" { (expression_statement "piVar3 = piVar2;" (assignment_expression "piVar3 = piVar2" identifier = identifier) ;) (if_statement "if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }" if (parenthesized_expression "(piVar3 == (int *)0x0)" ( (binary_expression "piVar3 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return (int *)0x0;\n      }" { (return_statement "return (int *)0x0;" return (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "piVar2 = (int *)*piVar3;" (assignment_expression "piVar2 = (int *)*piVar3" identifier = (cast_expression "(int *)*piVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar3" * identifier))) ;) }) while (parenthesized_expression "(piVar1 != (int *)*piVar3)" ( (binary_expression "piVar1 != (int *)*piVar3" identifier != (cast_expression "(int *)*piVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar3" * identifier))) )) ;) }))) (return_statement "return piVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */\n\nPROCESS * __regparm3 find_last_proc(int job,int block)\n\n{\n  PROCESS *pPVar1;\n  PROCESS *pPVar2;\n  PROCESS *pPVar3;\n  \n  pPVar1 = jobs[job]->pipe;\n  if (pPVar1 == (PROCESS *)0x0) {\n    pPVar3 = (PROCESS *)0x0;\n  }\n  else {\n    pPVar2 = pPVar1->next;\n    if (pPVar1 == pPVar2) {\n      return pPVar2;\n    }\n    do {\n      pPVar3 = pPVar2;\n      if (pPVar3 == (PROCESS *)0x0) {\n        return (PROCESS *)0x0;\n      }\n      pPVar2 = pPVar3->next;\n    } while (pPVar1 != pPVar3->next);\n  }\n  return pPVar3;\n}\n\n" comment (ERROR "PROCESS * __regparm3 find_last_proc(int job,int block)" (binary_expression "PROCESS * __regparm3 find_last_proc(int job,int block)" identifier * (ERROR "__regparm3" identifier) (call_expression "find_last_proc(int job,int block)" identifier (argument_list "(int job,int block)" ( identifier (ERROR "job" identifier) , (ERROR "int" identifier) identifier ))))) (compound_statement "{\n  PROCESS *pPVar1;\n  PROCESS *pPVar2;\n  PROCESS *pPVar3;\n  \n  pPVar1 = jobs[job]->pipe;\n  if (pPVar1 == (PROCESS *)0x0) {\n    pPVar3 = (PROCESS *)0x0;\n  }\n  else {\n    pPVar2 = pPVar1->next;\n    if (pPVar1 == pPVar2) {\n      return pPVar2;\n    }\n    do {\n      pPVar3 = pPVar2;\n      if (pPVar3 == (PROCESS *)0x0) {\n        return (PROCESS *)0x0;\n      }\n      pPVar2 = pPVar3->next;\n    } while (pPVar1 != pPVar3->next);\n  }\n  return pPVar3;\n}" { (declaration "PROCESS *pPVar1;" type_identifier (pointer_declarator "*pPVar1" * identifier) ;) (declaration "PROCESS *pPVar2;" type_identifier (pointer_declarator "*pPVar2" * identifier) ;) (declaration "PROCESS *pPVar3;" type_identifier (pointer_declarator "*pPVar3" * identifier) ;) (expression_statement "pPVar1 = jobs[job]->pipe;" (assignment_expression "pPVar1 = jobs[job]->pipe" identifier = (field_expression "jobs[job]->pipe" (subscript_expression "jobs[job]" identifier [ identifier ]) -> field_identifier)) ;) (if_statement "if (pPVar1 == (PROCESS *)0x0) {\n    pPVar3 = (PROCESS *)0x0;\n  }\n  else {\n    pPVar2 = pPVar1->next;\n    if (pPVar1 == pPVar2) {\n      return pPVar2;\n    }\n    do {\n      pPVar3 = pPVar2;\n      if (pPVar3 == (PROCESS *)0x0) {\n        return (PROCESS *)0x0;\n      }\n      pPVar2 = pPVar3->next;\n    } while (pPVar1 != pPVar3->next);\n  }" if (parenthesized_expression "(pPVar1 == (PROCESS *)0x0)" ( (binary_expression "pPVar1 == (PROCESS *)0x0" identifier == (cast_expression "(PROCESS *)0x0" ( (type_descriptor "PROCESS *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pPVar3 = (PROCESS *)0x0;\n  }" { (expression_statement "pPVar3 = (PROCESS *)0x0;" (assignment_expression "pPVar3 = (PROCESS *)0x0" identifier = (cast_expression "(PROCESS *)0x0" ( (type_descriptor "PROCESS *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    pPVar2 = pPVar1->next;\n    if (pPVar1 == pPVar2) {\n      return pPVar2;\n    }\n    do {\n      pPVar3 = pPVar2;\n      if (pPVar3 == (PROCESS *)0x0) {\n        return (PROCESS *)0x0;\n      }\n      pPVar2 = pPVar3->next;\n    } while (pPVar1 != pPVar3->next);\n  }" else (compound_statement "{\n    pPVar2 = pPVar1->next;\n    if (pPVar1 == pPVar2) {\n      return pPVar2;\n    }\n    do {\n      pPVar3 = pPVar2;\n      if (pPVar3 == (PROCESS *)0x0) {\n        return (PROCESS *)0x0;\n      }\n      pPVar2 = pPVar3->next;\n    } while (pPVar1 != pPVar3->next);\n  }" { (expression_statement "pPVar2 = pPVar1->next;" (assignment_expression "pPVar2 = pPVar1->next" identifier = (field_expression "pPVar1->next" identifier -> field_identifier)) ;) (if_statement "if (pPVar1 == pPVar2) {\n      return pPVar2;\n    }" if (parenthesized_expression "(pPVar1 == pPVar2)" ( (binary_expression "pPVar1 == pPVar2" identifier == identifier) )) (compound_statement "{\n      return pPVar2;\n    }" { (return_statement "return pPVar2;" return identifier ;) })) (do_statement "do {\n      pPVar3 = pPVar2;\n      if (pPVar3 == (PROCESS *)0x0) {\n        return (PROCESS *)0x0;\n      }\n      pPVar2 = pPVar3->next;\n    } while (pPVar1 != pPVar3->next);" do (compound_statement "{\n      pPVar3 = pPVar2;\n      if (pPVar3 == (PROCESS *)0x0) {\n        return (PROCESS *)0x0;\n      }\n      pPVar2 = pPVar3->next;\n    }" { (expression_statement "pPVar3 = pPVar2;" (assignment_expression "pPVar3 = pPVar2" identifier = identifier) ;) (if_statement "if (pPVar3 == (PROCESS *)0x0) {\n        return (PROCESS *)0x0;\n      }" if (parenthesized_expression "(pPVar3 == (PROCESS *)0x0)" ( (binary_expression "pPVar3 == (PROCESS *)0x0" identifier == (cast_expression "(PROCESS *)0x0" ( (type_descriptor "PROCESS *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return (PROCESS *)0x0;\n      }" { (return_statement "return (PROCESS *)0x0;" return (cast_expression "(PROCESS *)0x0" ( (type_descriptor "PROCESS *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pPVar2 = pPVar3->next;" (assignment_expression "pPVar2 = pPVar3->next" identifier = (field_expression "pPVar3->next" identifier -> field_identifier)) ;) }) while (parenthesized_expression "(pPVar1 != pPVar3->next)" ( (binary_expression "pPVar1 != pPVar3->next" identifier != (field_expression "pPVar3->next" identifier -> field_identifier)) )) ;) }))) (return_statement "return pPVar3;" return identifier ;) }))
(translation_unit "int * __regparm3 FUN_0005dde0(int param_1)\n\n{\n  int *piVar1;\n  int *piVar2;\n  int *piVar3;\n  \n  piVar1 = *(int **)(*(int *)(jobs + param_1 * 4) + 4);\n  if (piVar1 == (int *)0x0) {\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar2 = (int *)*piVar1;\n    if (piVar1 == piVar2) {\n      return piVar2;\n    }\n    do {\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    } while (piVar1 != (int *)*piVar3);\n  }\n  return piVar3;\n}\n\n" (function_definition "int * __regparm3 FUN_0005dde0(int param_1)\n\n{\n  int *piVar1;\n  int *piVar2;\n  int *piVar3;\n  \n  piVar1 = *(int **)(*(int *)(jobs + param_1 * 4) + 4);\n  if (piVar1 == (int *)0x0) {\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar2 = (int *)*piVar1;\n    if (piVar1 == piVar2) {\n      return piVar2;\n    }\n    do {\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    } while (piVar1 != (int *)*piVar3);\n  }\n  return piVar3;\n}" primitive_type (pointer_declarator "* __regparm3 FUN_0005dde0(int param_1)" * (ERROR "__regparm3" identifier) (function_declarator "FUN_0005dde0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) )))) (compound_statement "{\n  int *piVar1;\n  int *piVar2;\n  int *piVar3;\n  \n  piVar1 = *(int **)(*(int *)(jobs + param_1 * 4) + 4);\n  if (piVar1 == (int *)0x0) {\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar2 = (int *)*piVar1;\n    if (piVar1 == piVar2) {\n      return piVar2;\n    }\n    do {\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    } while (piVar1 != (int *)*piVar3);\n  }\n  return piVar3;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (expression_statement "piVar1 = *(int **)(*(int *)(jobs + param_1 * 4) + 4);" (assignment_expression "piVar1 = *(int **)(*(int *)(jobs + param_1 * 4) + 4)" identifier = (pointer_expression "*(int **)(*(int *)(jobs + param_1 * 4) + 4)" * (cast_expression "(int **)(*(int *)(jobs + param_1 * 4) + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(jobs + param_1 * 4) + 4)" ( (binary_expression "*(int *)(jobs + param_1 * 4) + 4" (pointer_expression "*(int *)(jobs + param_1 * 4)" * (cast_expression "(int *)(jobs + param_1 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(jobs + param_1 * 4)" ( (binary_expression "jobs + param_1 * 4" identifier + (binary_expression "param_1 * 4" identifier * number_literal)) )))) + number_literal) ))))) ;) (if_statement "if (piVar1 == (int *)0x0) {\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar2 = (int *)*piVar1;\n    if (piVar1 == piVar2) {\n      return piVar2;\n    }\n    do {\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    } while (piVar1 != (int *)*piVar3);\n  }" if (parenthesized_expression "(piVar1 == (int *)0x0)" ( (binary_expression "piVar1 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    piVar3 = (int *)0x0;\n  }" { (expression_statement "piVar3 = (int *)0x0;" (assignment_expression "piVar3 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    piVar2 = (int *)*piVar1;\n    if (piVar1 == piVar2) {\n      return piVar2;\n    }\n    do {\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    } while (piVar1 != (int *)*piVar3);\n  }" else (compound_statement "{\n    piVar2 = (int *)*piVar1;\n    if (piVar1 == piVar2) {\n      return piVar2;\n    }\n    do {\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    } while (piVar1 != (int *)*piVar3);\n  }" { (expression_statement "piVar2 = (int *)*piVar1;" (assignment_expression "piVar2 = (int *)*piVar1" identifier = (cast_expression "(int *)*piVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar1" * identifier))) ;) (if_statement "if (piVar1 == piVar2) {\n      return piVar2;\n    }" if (parenthesized_expression "(piVar1 == piVar2)" ( (binary_expression "piVar1 == piVar2" identifier == identifier) )) (compound_statement "{\n      return piVar2;\n    }" { (return_statement "return piVar2;" return identifier ;) })) (do_statement "do {\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    } while (piVar1 != (int *)*piVar3);" do (compound_statement "{\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    }" { (expression_statement "piVar3 = piVar2;" (assignment_expression "piVar3 = piVar2" identifier = identifier) ;) (if_statement "if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }" if (parenthesized_expression "(piVar3 == (int *)0x0)" ( (binary_expression "piVar3 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return (int *)0x0;\n      }" { (return_statement "return (int *)0x0;" return (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "piVar2 = (int *)*piVar3;" (assignment_expression "piVar2 = (int *)*piVar3" identifier = (cast_expression "(int *)*piVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar3" * identifier))) ;) }) while (parenthesized_expression "(piVar1 != (int *)*piVar3)" ( (binary_expression "piVar1 != (int *)*piVar3" identifier != (cast_expression "(int *)*piVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar3" * identifier))) )) ;) }))) (return_statement "return piVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (return_statement return IDENT ;) })) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) )) ;) }))) (return_statement return IDENT ;) })))
(function_definition "int * __regparm3 FUN_0005dde0(int param_1)\n\n{\n  int *piVar1;\n  int *piVar2;\n  int *piVar3;\n  \n  piVar1 = *(int **)(*(int *)(jobs + param_1 * 4) + 4);\n  if (piVar1 == (int *)0x0) {\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar2 = (int *)*piVar1;\n    if (piVar1 == piVar2) {\n      return piVar2;\n    }\n    do {\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    } while (piVar1 != (int *)*piVar3);\n  }\n  return piVar3;\n}" (primitive_type "int") (pointer_declarator "* __regparm3 FUN_0005dde0(int param_1)" (* "*") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0005dde0(int param_1)" (identifier "FUN_0005dde0") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")")))) (compound_statement "{\n  int *piVar1;\n  int *piVar2;\n  int *piVar3;\n  \n  piVar1 = *(int **)(*(int *)(jobs + param_1 * 4) + 4);\n  if (piVar1 == (int *)0x0) {\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar2 = (int *)*piVar1;\n    if (piVar1 == piVar2) {\n      return piVar2;\n    }\n    do {\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    } while (piVar1 != (int *)*piVar3);\n  }\n  return piVar3;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (expression_statement "piVar1 = *(int **)(*(int *)(jobs + param_1 * 4) + 4);" (assignment_expression "piVar1 = *(int **)(*(int *)(jobs + param_1 * 4) + 4)" (identifier "piVar1") (= "=") (pointer_expression "*(int **)(*(int *)(jobs + param_1 * 4) + 4)" (* "*") (cast_expression "(int **)(*(int *)(jobs + param_1 * 4) + 4)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(int *)(jobs + param_1 * 4) + 4)" (( "(") (binary_expression "*(int *)(jobs + param_1 * 4) + 4" (pointer_expression "*(int *)(jobs + param_1 * 4)" (* "*") (cast_expression "(int *)(jobs + param_1 * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(jobs + param_1 * 4)" (( "(") (binary_expression "jobs + param_1 * 4" (identifier "jobs") (+ "+") (binary_expression "param_1 * 4" (identifier "param_1") (* "*") (number_literal "4"))) () ")")))) (+ "+") (number_literal "4")) () ")"))))) (; ";")) (if_statement "if (piVar1 == (int *)0x0) {\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar2 = (int *)*piVar1;\n    if (piVar1 == piVar2) {\n      return piVar2;\n    }\n    do {\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    } while (piVar1 != (int *)*piVar3);\n  }" (if "if") (parenthesized_expression "(piVar1 == (int *)0x0)" (( "(") (binary_expression "piVar1 == (int *)0x0" (identifier "piVar1") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    piVar3 = (int *)0x0;\n  }" ({ "{") (expression_statement "piVar3 = (int *)0x0;" (assignment_expression "piVar3 = (int *)0x0" (identifier "piVar3") (= "=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (} "}")) (else_clause "else {\n    piVar2 = (int *)*piVar1;\n    if (piVar1 == piVar2) {\n      return piVar2;\n    }\n    do {\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    } while (piVar1 != (int *)*piVar3);\n  }" (else "else") (compound_statement "{\n    piVar2 = (int *)*piVar1;\n    if (piVar1 == piVar2) {\n      return piVar2;\n    }\n    do {\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    } while (piVar1 != (int *)*piVar3);\n  }" ({ "{") (expression_statement "piVar2 = (int *)*piVar1;" (assignment_expression "piVar2 = (int *)*piVar1" (identifier "piVar2") (= "=") (cast_expression "(int *)*piVar1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar1" (* "*") (identifier "piVar1")))) (; ";")) (if_statement "if (piVar1 == piVar2) {\n      return piVar2;\n    }" (if "if") (parenthesized_expression "(piVar1 == piVar2)" (( "(") (binary_expression "piVar1 == piVar2" (identifier "piVar1") (== "==") (identifier "piVar2")) () ")")) (compound_statement "{\n      return piVar2;\n    }" ({ "{") (return_statement "return piVar2;" (return "return") (identifier "piVar2") (; ";")) (} "}"))) (do_statement "do {\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    } while (piVar1 != (int *)*piVar3);" (do "do") (compound_statement "{\n      piVar3 = piVar2;\n      if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }\n      piVar2 = (int *)*piVar3;\n    }" ({ "{") (expression_statement "piVar3 = piVar2;" (assignment_expression "piVar3 = piVar2" (identifier "piVar3") (= "=") (identifier "piVar2")) (; ";")) (if_statement "if (piVar3 == (int *)0x0) {\n        return (int *)0x0;\n      }" (if "if") (parenthesized_expression "(piVar3 == (int *)0x0)" (( "(") (binary_expression "piVar3 == (int *)0x0" (identifier "piVar3") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        return (int *)0x0;\n      }" ({ "{") (return_statement "return (int *)0x0;" (return "return") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (expression_statement "piVar2 = (int *)*piVar3;" (assignment_expression "piVar2 = (int *)*piVar3" (identifier "piVar2") (= "=") (cast_expression "(int *)*piVar3" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar3" (* "*") (identifier "piVar3")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(piVar1 != (int *)*piVar3)" (( "(") (binary_expression "piVar1 != (int *)*piVar3" (identifier "piVar1") (!= "!=") (cast_expression "(int *)*piVar3" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar3" (* "*") (identifier "piVar3")))) () ")")) (; ";")) (} "}")))) (return_statement "return piVar3;" (return "return") (identifier "piVar3") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */

type_1 * __regparm3 find_last_proc(int job,int block)

{
  type_1 *var_1;
  type_1 *var_2;
  type_1 *var_3;
  
  var_1 = jobs[job]->pipe;
  if (var_1 == (type_1 *)0x0) {
    var_3 = (type_1 *)0x0;
  }
  else {
    var_2 = var_1->next;
    if (var_1 == var_2) {
      return var_2;
    }
    do {
      var_3 = var_2;
      if (var_3 == (type_1 *)0x0) {
        return (type_1 *)0x0;
      }
      var_2 = var_3->next;
    } while (var_1 != var_3->next);
  }
  return var_3;
}


(translation_unit (function_definition type: (primitive_type) declarator: (pointer_declarator (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (identifier)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (return_statement (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier)))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))))))) (return_statement (identifier)))))

/* WARNING: Function: __i686.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */

int * __regparm3 MASKED(int param_1)

{
  int *piVar1;
  int *piVar2;
  int *piVar3;
  
  piVar1 = *(int **)(*(int *)(jobs + param_1 * 4) + 4);
  if (piVar1 == (int *)0x0) {
    piVar3 = (int *)0x0;
  }
  else {
    piVar2 = (int *)*piVar1;
    if (piVar1 == piVar2) {
      return piVar2;
    }
    do {
      piVar3 = piVar2;
      if (piVar3 == (int *)0x0) {
        return (int *)0x0;
      }
      piVar2 = (int *)*piVar3;
    } while (piVar1 != (int *)*piVar3);
  }
  return piVar3;
}

