
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "DT": Some values do not have unique names */
/* DWARF original prototype: Task * find_runnable_or_wait(Workqueue * this, int thread_number) */

Task * __thiscall gold::Workqueue::find_runnable_or_wait(Workqueue *this,int thread_number)

{
  Condvar_impl *pCVar1;
  _func_int_varargs *p_Var2;
  Task *pTVar3;
  int iVar4;
  
  pTVar3 = find_runnable(this);
  while( true ) {
    if (pTVar3 != (Task *)0x0) {
      return pTVar3;
    }
    if (((this->running_ == 0) && ((this->first_tasks_).head_ == (Task *)0x0)) &&
       ((this->tasks_).head_ == (Task *)0x0)) break;
    p_Var2 = this->threader_->_vptr_Workqueue_threader[3];
    if ((p_Var2 != Workqueue_threader_single::should_cancel_thread) &&
       (iVar4 = (*p_Var2)(this->threader_,thread_number), (char)iVar4 != '\0')) {
      return (Task *)0x0;
    }
    if ((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 1) != 0)) {
      Errors::debug(parameters->errors_,"%3d sleeping",thread_number);
    }
    pCVar1 = (this->condvar_).condvar_;
    (*pCVar1->_vptr_Condvar_impl[2])(pCVar1,((this->condvar_).lock_)->lock_);
    if ((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 1) != 0)) {
      Errors::debug(parameters->errors_,"%3d awake",thread_number);
    }
    pTVar3 = find_runnable(this);
  }
  pCVar1 = (this->condvar_).condvar_;
  (*pCVar1->_vptr_Condvar_impl[4])(pCVar1);
  if (this->waiting_ == 0) {
    return (Task *)0x0;
  }
                    /* WARNING: Subroutine does not return */
  do_gold_unreachable("../../gold/workqueue.cc",0x107,"find_runnable_or_wait");
}



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

int FUN_001908c0(int param_1,undefined4 param_2)

{
  code *pcVar1;
  char cVar2;
  int iVar3;
  
  iVar3 = FUN_00190880(param_1);
  while( true ) {
    if (iVar3 != 0) {
      return iVar3;
    }
    if (((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&
       (*(int *)(param_1 + 0xc) == 0)) break;
    pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc);
    if ((pcVar1 != FUN_00191640) &&
       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')) {
      return 0;
    }
    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {
      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);
    }
    (**(code **)(**(int **)(param_1 + 0x20) + 8))
              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c));
    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {
      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);
    }
    iVar3 = FUN_00190880(param_1);
  }
  (**(code **)(**(int **)(param_1 + 0x20) + 0x10))(*(int **)(param_1 + 0x20));
  if (*(int *)(param_1 + 0x18) == 0) {
    return 0;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00069d00("../../gold/workqueue.cc",0x107,"find_runnable_or_wait",param_1);
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00035840
ADD EBX,0x1fe737
SUB ESP,0x18
MOV ESI,dword ptr [ESP + 0x2c]
PUSH ESI
CALL 0x00190880
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0019099f
LEA EBP,[EBX + 0xffe02640]
LEA EDI,[EBX + 0x378]
JMP 0x0019096a
MOV EAX,dword ptr [EDI]
MOV ECX,dword ptr [EAX + 0x8]
TEST ECX,ECX
JZ 0x0019091f
TEST byte ptr [EAX + 0x14],0x1
JZ 0x0019091f
SUB ESP,0x4
LEA EDX,[EBX + 0xfff0b6a6]
PUSH dword ptr [ESP + 0x28]
PUSH EDX
PUSH dword ptr [EAX]
CALL 0x000653f0
ADD ESP,0x10
MOV EAX,dword ptr [ESI + 0x20]
MOV ECX,dword ptr [ESI + 0x1c]
SUB ESP,0x8
MOV EDX,dword ptr [EAX]
PUSH dword ptr [ECX]
PUSH EAX
CALL dword ptr [EDX + 0x8]
MOV EAX,dword ptr [EDI]
MOV EDX,dword ptr [EAX + 0x8]
ADD ESP,0x10
TEST EDX,EDX
JZ 0x0019095a
TEST byte ptr [EAX + 0x14],0x1
JZ 0x0019095a
SUB ESP,0x4
LEA EDX,[EBX + 0xfff0b6b3]
PUSH dword ptr [ESP + 0x28]
PUSH EDX
PUSH dword ptr [EAX]
CALL 0x000653f0
ADD ESP,0x10
SUB ESP,0xc
PUSH ESI
CALL 0x00190880
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0019099f
MOV EAX,dword ptr [ESI + 0x14]
TEST EAX,EAX
JNZ 0x00190978
MOV EAX,dword ptr [ESI + 0x4]
TEST EAX,EAX
JZ 0x001909b0
MOV EDX,dword ptr [ESI + 0x24]
MOV EAX,dword ptr [EDX]
MOV EAX,dword ptr [EAX + 0xc]
CMP EAX,EBP
JZ 0x001908f8
SUB ESP,0x8
PUSH dword ptr [ESP + 0x2c]
PUSH EDX
CALL EAX
ADD ESP,0x10
TEST AL,AL
JZ 0x001908f8
XOR EAX,EAX
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [ESI + 0xc]
TEST EAX,EAX
JNZ 0x00190978
MOV EAX,dword ptr [ESI + 0x20]
SUB ESP,0xc
MOV EDX,dword ptr [EAX]
PUSH EAX
CALL dword ptr [EDX + 0x10]
MOV EDI,dword ptr [ESI + 0x18]
ADD ESP,0x10
TEST EDI,EDI
JZ 0x0019099d
LEA EAX,[EBX + 0xfff0b754]
PUSH ESI
PUSH EAX
LEA EAX,[EBX + 0xfff0b68e]
PUSH 0x107
PUSH EAX
CALL 0x00069d00
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_001908c0(int param_1,undefined4 param_2)\n\n{\n  code *pcVar1;\n  char cVar2;\n  int iVar3;\n  \n  iVar3 = FUN_00190880(param_1);\n  while( true ) {\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    if (((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0)) break;\n    pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc);\n    if ((pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')) {\n      return 0;\n    }\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);\n    }\n    (**(code **)(**(int **)(param_1 + 0x20) + 8))\n              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c));\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);\n    }\n    iVar3 = FUN_00190880(param_1);\n  }\n  (**(code **)(**(int **)(param_1 + 0x20) + 0x10))(*(int **)(param_1 + 0x20));\n  if (*(int *)(param_1 + 0x18) == 0) {\n    return 0;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00069d00("../../gold/workqueue.cc",0x107,"find_runnable_or_wait",param_1);\n}\n\n" comment (function_definition "int FUN_001908c0(int param_1,undefined4 param_2)\n\n{\n  code *pcVar1;\n  char cVar2;\n  int iVar3;\n  \n  iVar3 = FUN_00190880(param_1);\n  while( true ) {\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    if (((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0)) break;\n    pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc);\n    if ((pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')) {\n      return 0;\n    }\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);\n    }\n    (**(code **)(**(int **)(param_1 + 0x20) + 8))\n              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c));\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);\n    }\n    iVar3 = FUN_00190880(param_1);\n  }\n  (**(code **)(**(int **)(param_1 + 0x20) + 0x10))(*(int **)(param_1 + 0x20));\n  if (*(int *)(param_1 + 0x18) == 0) {\n    return 0;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00069d00("../../gold/workqueue.cc",0x107,"find_runnable_or_wait",param_1);\n}" primitive_type (function_declarator "FUN_001908c0(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  code *pcVar1;\n  char cVar2;\n  int iVar3;\n  \n  iVar3 = FUN_00190880(param_1);\n  while( true ) {\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    if (((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0)) break;\n    pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc);\n    if ((pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')) {\n      return 0;\n    }\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);\n    }\n    (**(code **)(**(int **)(param_1 + 0x20) + 8))\n              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c));\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);\n    }\n    iVar3 = FUN_00190880(param_1);\n  }\n  (**(code **)(**(int **)(param_1 + 0x20) + 0x10))(*(int **)(param_1 + 0x20));\n  if (*(int *)(param_1 + 0x18) == 0) {\n    return 0;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00069d00("../../gold/workqueue.cc",0x107,"find_runnable_or_wait",param_1);\n}" { (declaration "code *pcVar1;" type_identifier (pointer_declarator "*pcVar1" * identifier) ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar3 = FUN_00190880(param_1);" (assignment_expression "iVar3 = FUN_00190880(param_1)" identifier = (call_expression "FUN_00190880(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (while_statement "while( true ) {\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    if (((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0)) break;\n    pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc);\n    if ((pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')) {\n      return 0;\n    }\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);\n    }\n    (**(code **)(**(int **)(param_1 + 0x20) + 8))\n              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c));\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);\n    }\n    iVar3 = FUN_00190880(param_1);\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    if (((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0)) break;\n    pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc);\n    if ((pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')) {\n      return 0;\n    }\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);\n    }\n    (**(code **)(**(int **)(param_1 + 0x20) + 8))\n              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c));\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);\n    }\n    iVar3 = FUN_00190880(param_1);\n  }" { (if_statement "if (iVar3 != 0) {\n      return iVar3;\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      return iVar3;\n    }" { (return_statement "return iVar3;" return identifier ;) })) (if_statement "if (((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0)) break;" if (parenthesized_expression "(((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0))" ( (binary_expression "((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0)" (parenthesized_expression "((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0))" ( (binary_expression "(*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)" (parenthesized_expression "(*(int *)(param_1 + 0x14) == 0)" ( (binary_expression "*(int *)(param_1 + 0x14) == 0" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) == number_literal) )) && (parenthesized_expression "(*(int *)(param_1 + 4) == 0)" ( (binary_expression "*(int *)(param_1 + 4) == 0" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) == number_literal) ))) )) && (parenthesized_expression "(*(int *)(param_1 + 0xc) == 0)" ( (binary_expression "*(int *)(param_1 + 0xc) == 0" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) == number_literal) ))) )) (break_statement "break;" break ;)) (expression_statement "pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc);" (assignment_expression "pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc)" identifier = (pointer_expression "*(code **)(**(int **)(param_1 + 0x24) + 0xc)" * (cast_expression "(code **)(**(int **)(param_1 + 0x24) + 0xc)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 0x24) + 0xc)" ( (binary_expression "**(int **)(param_1 + 0x24) + 0xc" (pointer_expression "**(int **)(param_1 + 0x24)" * (pointer_expression "*(int **)(param_1 + 0x24)" * (cast_expression "(int **)(param_1 + 0x24)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) ))))) + number_literal) ))))) ;) (if_statement "if ((pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')) {\n      return 0;\n    }" if (parenthesized_expression "((pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0'))" ( (binary_expression "(pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')" (parenthesized_expression "(pcVar1 != FUN_00191640)" ( (binary_expression "pcVar1 != FUN_00191640" identifier != identifier) )) && (parenthesized_expression "(cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')" ( (comma_expression "cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0'" (assignment_expression "cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2)" identifier = (call_expression "(*pcVar1)(*(int **)(param_1 + 0x24),param_2)" (parenthesized_expression "(*pcVar1)" ( (pointer_expression "*pcVar1" * identifier) )) (argument_list "(*(int **)(param_1 + 0x24),param_2)" ( (pointer_expression "*(int **)(param_1 + 0x24)" * (cast_expression "(int **)(param_1 + 0x24)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) , identifier )))) , (binary_expression "cVar2 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence '))) ))) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);\n    }" if (parenthesized_expression "((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0))" ( (binary_expression "(DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)" (parenthesized_expression "(DAT_0038f378[2] != 0)" ( (binary_expression "DAT_0038f378[2] != 0" (subscript_expression "DAT_0038f378[2]" identifier [ number_literal ]) != number_literal) )) && (parenthesized_expression "((*(byte *)(DAT_0038f378 + 5) & 1) != 0)" ( (binary_expression "(*(byte *)(DAT_0038f378 + 5) & 1) != 0" (parenthesized_expression "(*(byte *)(DAT_0038f378 + 5) & 1)" ( (binary_expression "*(byte *)(DAT_0038f378 + 5) & 1" (pointer_expression "*(byte *)(DAT_0038f378 + 5)" * (cast_expression "(byte *)(DAT_0038f378 + 5)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(DAT_0038f378 + 5)" ( (binary_expression "DAT_0038f378 + 5" identifier + number_literal) )))) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);\n    }" { (expression_statement "FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);" (call_expression "FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2)" identifier (argument_list "(*DAT_0038f378,"%3d sleeping",param_2)" ( (pointer_expression "*DAT_0038f378" * identifier) , (string_literal ""%3d sleeping"" " string_content ") , identifier ))) ;) })) (expression_statement "(**(code **)(**(int **)(param_1 + 0x20) + 8))\n              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c));" (call_expression "(**(code **)(**(int **)(param_1 + 0x20) + 8))\n              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c))" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0x20) + 8))" ( (pointer_expression "**(code **)(**(int **)(param_1 + 0x20) + 8)" * (pointer_expression "*(code **)(**(int **)(param_1 + 0x20) + 8)" * (cast_expression "(code **)(**(int **)(param_1 + 0x20) + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 0x20) + 8)" ( (binary_expression "**(int **)(param_1 + 0x20) + 8" (pointer_expression "**(int **)(param_1 + 0x20)" * (pointer_expression "*(int **)(param_1 + 0x20)" * (cast_expression "(int **)(param_1 + 0x20)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c))" ( (pointer_expression "*(int **)(param_1 + 0x20)" * (cast_expression "(int **)(param_1 + 0x20)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) , (pointer_expression "**(undefined4 **)(param_1 + 0x1c)" * (pointer_expression "*(undefined4 **)(param_1 + 0x1c)" * (cast_expression "(undefined4 **)(param_1 + 0x1c)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) ))))) ))) ;) (if_statement "if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);\n    }" if (parenthesized_expression "((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0))" ( (binary_expression "(DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)" (parenthesized_expression "(DAT_0038f378[2] != 0)" ( (binary_expression "DAT_0038f378[2] != 0" (subscript_expression "DAT_0038f378[2]" identifier [ number_literal ]) != number_literal) )) && (parenthesized_expression "((*(byte *)(DAT_0038f378 + 5) & 1) != 0)" ( (binary_expression "(*(byte *)(DAT_0038f378 + 5) & 1) != 0" (parenthesized_expression "(*(byte *)(DAT_0038f378 + 5) & 1)" ( (binary_expression "*(byte *)(DAT_0038f378 + 5) & 1" (pointer_expression "*(byte *)(DAT_0038f378 + 5)" * (cast_expression "(byte *)(DAT_0038f378 + 5)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(DAT_0038f378 + 5)" ( (binary_expression "DAT_0038f378 + 5" identifier + number_literal) )))) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);\n    }" { (expression_statement "FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);" (call_expression "FUN_000653f0(*DAT_0038f378,"%3d awake",param_2)" identifier (argument_list "(*DAT_0038f378,"%3d awake",param_2)" ( (pointer_expression "*DAT_0038f378" * identifier) , (string_literal ""%3d awake"" " string_content ") , identifier ))) ;) })) (expression_statement "iVar3 = FUN_00190880(param_1);" (assignment_expression "iVar3 = FUN_00190880(param_1)" identifier = (call_expression "FUN_00190880(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) })) (expression_statement "(**(code **)(**(int **)(param_1 + 0x20) + 0x10))(*(int **)(param_1 + 0x20));" (call_expression "(**(code **)(**(int **)(param_1 + 0x20) + 0x10))(*(int **)(param_1 + 0x20))" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0x20) + 0x10))" ( (pointer_expression "**(code **)(**(int **)(param_1 + 0x20) + 0x10)" * (pointer_expression "*(code **)(**(int **)(param_1 + 0x20) + 0x10)" * (cast_expression "(code **)(**(int **)(param_1 + 0x20) + 0x10)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 0x20) + 0x10)" ( (binary_expression "**(int **)(param_1 + 0x20) + 0x10" (pointer_expression "**(int **)(param_1 + 0x20)" * (pointer_expression "*(int **)(param_1 + 0x20)" * (cast_expression "(int **)(param_1 + 0x20)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 0x20))" ( (pointer_expression "*(int **)(param_1 + 0x20)" * (cast_expression "(int **)(param_1 + 0x20)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) ))) ;) (if_statement "if (*(int *)(param_1 + 0x18) == 0) {\n    return 0;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x18) == 0)" ( (binary_expression "*(int *)(param_1 + 0x18) == 0" (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) comment (expression_statement "FUN_00069d00("../../gold/workqueue.cc",0x107,"find_runnable_or_wait",param_1);" (call_expression "FUN_00069d00("../../gold/workqueue.cc",0x107,"find_runnable_or_wait",param_1)" identifier (argument_list "("../../gold/workqueue.cc",0x107,"find_runnable_or_wait",param_1)" ( (string_literal ""../../gold/workqueue.cc"" " string_content ") , number_literal , (string_literal ""find_runnable_or_wait"" " string_content ") , identifier ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Enum "DT": Some values do not have unique names */\n/* DWARF original prototype: Task * find_runnable_or_wait(Workqueue * this, int thread_number) */\n\nTask * __thiscall gold::Workqueue::find_runnable_or_wait(Workqueue *this,int thread_number)\n\n{\n  Condvar_impl *pCVar1;\n  _func_int_varargs *p_Var2;\n  Task *pTVar3;\n  int iVar4;\n  \n  pTVar3 = find_runnable(this);\n  while( true ) {\n    if (pTVar3 != (Task *)0x0) {\n      return pTVar3;\n    }\n    if (((this->running_ == 0) && ((this->first_tasks_).head_ == (Task *)0x0)) &&\n       ((this->tasks_).head_ == (Task *)0x0)) break;\n    p_Var2 = this->threader_->_vptr_Workqueue_threader[3];\n    if ((p_Var2 != Workqueue_threader_single::should_cancel_thread) &&\n       (iVar4 = (*p_Var2)(this->threader_,thread_number), (char)iVar4 != '\0')) {\n      return (Task *)0x0;\n    }\n    if ((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 1) != 0)) {\n      Errors::debug(parameters->errors_,"%3d sleeping",thread_number);\n    }\n    pCVar1 = (this->condvar_).condvar_;\n    (*pCVar1->_vptr_Condvar_impl[2])(pCVar1,((this->condvar_).lock_)->lock_);\n    if ((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 1) != 0)) {\n      Errors::debug(parameters->errors_,"%3d awake",thread_number);\n    }\n    pTVar3 = find_runnable(this);\n  }\n  pCVar1 = (this->condvar_).condvar_;\n  (*pCVar1->_vptr_Condvar_impl[4])(pCVar1);\n  if (this->waiting_ == 0) {\n    return (Task *)0x0;\n  }\n                    /* WARNING: Subroutine does not return */\n  do_gold_unreachable("../../gold/workqueue.cc",0x107,"find_runnable_or_wait");\n}\n\n" comment comment comment (ERROR "Task * __thiscall gold::Workqueue::find_runnable_or_wait(Workqueue *this," (binary_expression "Task * __thiscall gold::Workqueue::find_runnable_or_wait(Workqueue *this" (binary_expression "Task * __thiscall" identifier * identifier) (ERROR "gold::Workqueue::find_runnable_or_wait(Workqueue" identifier : : identifier : : identifier ( identifier) * identifier) ,) (function_definition "int thread_number)\n\n{\n  Condvar_impl *pCVar1;\n  _func_int_varargs *p_Var2;\n  Task *pTVar3;\n  int iVar4;\n  \n  pTVar3 = find_runnable(this);\n  while( true ) {\n    if (pTVar3 != (Task *)0x0) {\n      return pTVar3;\n    }\n    if (((this->running_ == 0) && ((this->first_tasks_).head_ == (Task *)0x0)) &&\n       ((this->tasks_).head_ == (Task *)0x0)) break;\n    p_Var2 = this->threader_->_vptr_Workqueue_threader[3];\n    if ((p_Var2 != Workqueue_threader_single::should_cancel_thread) &&\n       (iVar4 = (*p_Var2)(this->threader_,thread_number), (char)iVar4 != '\0')) {\n      return (Task *)0x0;\n    }\n    if ((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 1) != 0)) {\n      Errors::debug(parameters->errors_,"%3d sleeping",thread_number);\n    }\n    pCVar1 = (this->condvar_).condvar_;\n    (*pCVar1->_vptr_Condvar_impl[2])(pCVar1,((this->condvar_).lock_)->lock_);\n    if ((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 1) != 0)) {\n      Errors::debug(parameters->errors_,"%3d awake",thread_number);\n    }\n    pTVar3 = find_runnable(this);\n  }\n  pCVar1 = (this->condvar_).condvar_;\n  (*pCVar1->_vptr_Condvar_impl[4])(pCVar1);\n  if (this->waiting_ == 0) {\n    return (Task *)0x0;\n  }\n                    /* WARNING: Subroutine does not return */\n  do_gold_unreachable("../../gold/workqueue.cc",0x107,"find_runnable_or_wait");\n}" primitive_type identifier (ERROR ")" )) (compound_statement "{\n  Condvar_impl *pCVar1;\n  _func_int_varargs *p_Var2;\n  Task *pTVar3;\n  int iVar4;\n  \n  pTVar3 = find_runnable(this);\n  while( true ) {\n    if (pTVar3 != (Task *)0x0) {\n      return pTVar3;\n    }\n    if (((this->running_ == 0) && ((this->first_tasks_).head_ == (Task *)0x0)) &&\n       ((this->tasks_).head_ == (Task *)0x0)) break;\n    p_Var2 = this->threader_->_vptr_Workqueue_threader[3];\n    if ((p_Var2 != Workqueue_threader_single::should_cancel_thread) &&\n       (iVar4 = (*p_Var2)(this->threader_,thread_number), (char)iVar4 != '\0')) {\n      return (Task *)0x0;\n    }\n    if ((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 1) != 0)) {\n      Errors::debug(parameters->errors_,"%3d sleeping",thread_number);\n    }\n    pCVar1 = (this->condvar_).condvar_;\n    (*pCVar1->_vptr_Condvar_impl[2])(pCVar1,((this->condvar_).lock_)->lock_);\n    if ((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 1) != 0)) {\n      Errors::debug(parameters->errors_,"%3d awake",thread_number);\n    }\n    pTVar3 = find_runnable(this);\n  }\n  pCVar1 = (this->condvar_).condvar_;\n  (*pCVar1->_vptr_Condvar_impl[4])(pCVar1);\n  if (this->waiting_ == 0) {\n    return (Task *)0x0;\n  }\n                    /* WARNING: Subroutine does not return */\n  do_gold_unreachable("../../gold/workqueue.cc",0x107,"find_runnable_or_wait");\n}" { (declaration "Condvar_impl *pCVar1;" type_identifier (pointer_declarator "*pCVar1" * identifier) ;) (declaration "_func_int_varargs *p_Var2;" type_identifier (pointer_declarator "*p_Var2" * identifier) ;) (declaration "Task *pTVar3;" type_identifier (pointer_declarator "*pTVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "pTVar3 = find_runnable(this);" (assignment_expression "pTVar3 = find_runnable(this)" identifier = (call_expression "find_runnable(this)" identifier (argument_list "(this)" ( identifier )))) ;) (while_statement "while( true ) {\n    if (pTVar3 != (Task *)0x0) {\n      return pTVar3;\n    }\n    if (((this->running_ == 0) && ((this->first_tasks_).head_ == (Task *)0x0)) &&\n       ((this->tasks_).head_ == (Task *)0x0)) break;\n    p_Var2 = this->threader_->_vptr_Workqueue_threader[3];\n    if ((p_Var2 != Workqueue_threader_single::should_cancel_thread) &&\n       (iVar4 = (*p_Var2)(this->threader_,thread_number), (char)iVar4 != '\0')) {\n      return (Task *)0x0;\n    }\n    if ((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 1) != 0)) {\n      Errors::debug(parameters->errors_,"%3d sleeping",thread_number);\n    }\n    pCVar1 = (this->condvar_).condvar_;\n    (*pCVar1->_vptr_Condvar_impl[2])(pCVar1,((this->condvar_).lock_)->lock_);\n    if ((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 1) != 0)) {\n      Errors::debug(parameters->errors_,"%3d awake",thread_number);\n    }\n    pTVar3 = find_runnable(this);\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (pTVar3 != (Task *)0x0) {\n      return pTVar3;\n    }\n    if (((this->running_ == 0) && ((this->first_tasks_).head_ == (Task *)0x0)) &&\n       ((this->tasks_).head_ == (Task *)0x0)) break;\n    p_Var2 = this->threader_->_vptr_Workqueue_threader[3];\n    if ((p_Var2 != Workqueue_threader_single::should_cancel_thread) &&\n       (iVar4 = (*p_Var2)(this->threader_,thread_number), (char)iVar4 != '\0')) {\n      return (Task *)0x0;\n    }\n    if ((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 1) != 0)) {\n      Errors::debug(parameters->errors_,"%3d sleeping",thread_number);\n    }\n    pCVar1 = (this->condvar_).condvar_;\n    (*pCVar1->_vptr_Condvar_impl[2])(pCVar1,((this->condvar_).lock_)->lock_);\n    if ((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 1) != 0)) {\n      Errors::debug(parameters->errors_,"%3d awake",thread_number);\n    }\n    pTVar3 = find_runnable(this);\n  }" { (if_statement "if (pTVar3 != (Task *)0x0) {\n      return pTVar3;\n    }" if (parenthesized_expression "(pTVar3 != (Task *)0x0)" ( (binary_expression "pTVar3 != (Task *)0x0" identifier != (cast_expression "(Task *)0x0" ( (type_descriptor "Task *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return pTVar3;\n    }" { (return_statement "return pTVar3;" return identifier ;) })) (if_statement "if (((this->running_ == 0) && ((this->first_tasks_).head_ == (Task *)0x0)) &&\n       ((this->tasks_).head_ == (Task *)0x0)) break;" if (parenthesized_expression "(((this->running_ == 0) && ((this->first_tasks_).head_ == (Task *)0x0)) &&\n       ((this->tasks_).head_ == (Task *)0x0))" ( (binary_expression "((this->running_ == 0) && ((this->first_tasks_).head_ == (Task *)0x0)) &&\n       ((this->tasks_).head_ == (Task *)0x0)" (parenthesized_expression "((this->running_ == 0) && ((this->first_tasks_).head_ == (Task *)0x0))" ( (binary_expression "(this->running_ == 0) && ((this->first_tasks_).head_ == (Task *)0x0)" (parenthesized_expression "(this->running_ == 0)" ( (binary_expression "this->running_ == 0" (field_expression "this->running_" identifier -> field_identifier) == number_literal) )) && (parenthesized_expression "((this->first_tasks_).head_ == (Task *)0x0)" ( (binary_expression "(this->first_tasks_).head_ == (Task *)0x0" (field_expression "(this->first_tasks_).head_" (parenthesized_expression "(this->first_tasks_)" ( (field_expression "this->first_tasks_" identifier -> field_identifier) )) . field_identifier) == (cast_expression "(Task *)0x0" ( (type_descriptor "Task *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) && (parenthesized_expression "((this->tasks_).head_ == (Task *)0x0)" ( (binary_expression "(this->tasks_).head_ == (Task *)0x0" (field_expression "(this->tasks_).head_" (parenthesized_expression "(this->tasks_)" ( (field_expression "this->tasks_" identifier -> field_identifier) )) . field_identifier) == (cast_expression "(Task *)0x0" ( (type_descriptor "Task *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (break_statement "break;" break ;)) (expression_statement "p_Var2 = this->threader_->_vptr_Workqueue_threader[3];" (assignment_expression "p_Var2 = this->threader_->_vptr_Workqueue_threader[3]" identifier = (subscript_expression "this->threader_->_vptr_Workqueue_threader[3]" (field_expression "this->threader_->_vptr_Workqueue_threader" (field_expression "this->threader_" identifier -> field_identifier) -> field_identifier) [ number_literal ])) ;) (if_statement "if ((p_Var2 != Workqueue_threader_single::should_cancel_thread) &&\n       (iVar4 = (*p_Var2)(this->threader_,thread_number), (char)iVar4 != '\0')) {\n      return (Task *)0x0;\n    }" if (parenthesized_expression "((p_Var2 != Workqueue_threader_single::should_cancel_thread) &&\n       (iVar4 = (*p_Var2)(this->threader_,thread_number), (char)iVar4 != '\0'))" ( (binary_expression "(p_Var2 != Workqueue_threader_single::should_cancel_thread) &&\n       (iVar4 = (*p_Var2)(this->threader_,thread_number), (char)iVar4 != '\0')" (parenthesized_expression "(p_Var2 != Workqueue_threader_single::should_cancel_thread)" ( (binary_expression "p_Var2 != Workqueue_threader_single" identifier != identifier) (ERROR "::should_cancel_thread" : : identifier) )) && (parenthesized_expression "(iVar4 = (*p_Var2)(this->threader_,thread_number), (char)iVar4 != '\0')" ( (comma_expression "iVar4 = (*p_Var2)(this->threader_,thread_number), (char)iVar4 != '\0'" (assignment_expression "iVar4 = (*p_Var2)(this->threader_,thread_number)" identifier = (call_expression "(*p_Var2)(this->threader_,thread_number)" (parenthesized_expression "(*p_Var2)" ( (pointer_expression "*p_Var2" * identifier) )) (argument_list "(this->threader_,thread_number)" ( (field_expression "this->threader_" identifier -> field_identifier) , identifier )))) , (binary_expression "(char)iVar4 != '\0'" (cast_expression "(char)iVar4" ( (type_descriptor "char" primitive_type) ) identifier) != (char_literal "'\0'" ' escape_sequence '))) ))) )) (compound_statement "{\n      return (Task *)0x0;\n    }" { (return_statement "return (Task *)0x0;" return (cast_expression "(Task *)0x0" ( (type_descriptor "Task *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (if_statement "if ((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 1) != 0)) {\n      Errors::debug(parameters->errors_,"%3d sleeping",thread_number);\n    }" if (parenthesized_expression "((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 1) != 0))" ( (binary_expression "(parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 1) != 0)" (parenthesized_expression "(parameters->options_ != (General_options *)0x0)" ( (binary_expression "parameters->options_ != (General_options *)0x0" (field_expression "parameters->options_" identifier -> field_identifier) != (cast_expression "(General_options *)0x0" ( (type_descriptor "General_options *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "((parameters->debug_ & 1) != 0)" ( (binary_expression "(parameters->debug_ & 1) != 0" (parenthesized_expression "(parameters->debug_ & 1)" ( (binary_expression "parameters->debug_ & 1" (field_expression "parameters->debug_" identifier -> field_identifier) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n      Errors::debug(parameters->errors_,"%3d sleeping",thread_number);\n    }" { (labeled_statement "Errors::debug(parameters->errors_,"%3d sleeping",thread_number);" statement_identifier : (ERROR ":" :) (expression_statement "debug(parameters->errors_,"%3d sleeping",thread_number);" (call_expression "debug(parameters->errors_,"%3d sleeping",thread_number)" identifier (argument_list "(parameters->errors_,"%3d sleeping",thread_number)" ( (field_expression "parameters->errors_" identifier -> field_identifier) , (string_literal ""%3d sleeping"" " string_content ") , identifier ))) ;)) })) (expression_statement "pCVar1 = (this->condvar_).condvar_;" (assignment_expression "pCVar1 = (this->condvar_).condvar_" identifier = (field_expression "(this->condvar_).condvar_" (parenthesized_expression "(this->condvar_)" ( (field_expression "this->condvar_" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "(*pCVar1->_vptr_Condvar_impl[2])(pCVar1,((this->condvar_).lock_)->lock_);" (call_expression "(*pCVar1->_vptr_Condvar_impl[2])(pCVar1,((this->condvar_).lock_)->lock_)" (parenthesized_expression "(*pCVar1->_vptr_Condvar_impl[2])" ( (pointer_expression "*pCVar1->_vptr_Condvar_impl[2]" * (subscript_expression "pCVar1->_vptr_Condvar_impl[2]" (field_expression "pCVar1->_vptr_Condvar_impl" identifier -> field_identifier) [ number_literal ])) )) (argument_list "(pCVar1,((this->condvar_).lock_)->lock_)" ( identifier , (field_expression "((this->condvar_).lock_)->lock_" (parenthesized_expression "((this->condvar_).lock_)" ( (field_expression "(this->condvar_).lock_" (parenthesized_expression "(this->condvar_)" ( (field_expression "this->condvar_" identifier -> field_identifier) )) . field_identifier) )) -> field_identifier) ))) ;) (if_statement "if ((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 1) != 0)) {\n      Errors::debug(parameters->errors_,"%3d awake",thread_number);\n    }" if (parenthesized_expression "((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 1) != 0))" ( (binary_expression "(parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 1) != 0)" (parenthesized_expression "(parameters->options_ != (General_options *)0x0)" ( (binary_expression "parameters->options_ != (General_options *)0x0" (field_expression "parameters->options_" identifier -> field_identifier) != (cast_expression "(General_options *)0x0" ( (type_descriptor "General_options *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "((parameters->debug_ & 1) != 0)" ( (binary_expression "(parameters->debug_ & 1) != 0" (parenthesized_expression "(parameters->debug_ & 1)" ( (binary_expression "parameters->debug_ & 1" (field_expression "parameters->debug_" identifier -> field_identifier) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n      Errors::debug(parameters->errors_,"%3d awake",thread_number);\n    }" { (labeled_statement "Errors::debug(parameters->errors_,"%3d awake",thread_number);" statement_identifier : (ERROR ":" :) (expression_statement "debug(parameters->errors_,"%3d awake",thread_number);" (call_expression "debug(parameters->errors_,"%3d awake",thread_number)" identifier (argument_list "(parameters->errors_,"%3d awake",thread_number)" ( (field_expression "parameters->errors_" identifier -> field_identifier) , (string_literal ""%3d awake"" " string_content ") , identifier ))) ;)) })) (expression_statement "pTVar3 = find_runnable(this);" (assignment_expression "pTVar3 = find_runnable(this)" identifier = (call_expression "find_runnable(this)" identifier (argument_list "(this)" ( identifier )))) ;) })) (expression_statement "pCVar1 = (this->condvar_).condvar_;" (assignment_expression "pCVar1 = (this->condvar_).condvar_" identifier = (field_expression "(this->condvar_).condvar_" (parenthesized_expression "(this->condvar_)" ( (field_expression "this->condvar_" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "(*pCVar1->_vptr_Condvar_impl[4])(pCVar1);" (call_expression "(*pCVar1->_vptr_Condvar_impl[4])(pCVar1)" (parenthesized_expression "(*pCVar1->_vptr_Condvar_impl[4])" ( (pointer_expression "*pCVar1->_vptr_Condvar_impl[4]" * (subscript_expression "pCVar1->_vptr_Condvar_impl[4]" (field_expression "pCVar1->_vptr_Condvar_impl" identifier -> field_identifier) [ number_literal ])) )) (argument_list "(pCVar1)" ( identifier ))) ;) (if_statement "if (this->waiting_ == 0) {\n    return (Task *)0x0;\n  }" if (parenthesized_expression "(this->waiting_ == 0)" ( (binary_expression "this->waiting_ == 0" (field_expression "this->waiting_" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n    return (Task *)0x0;\n  }" { (return_statement "return (Task *)0x0;" return (cast_expression "(Task *)0x0" ( (type_descriptor "Task *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) comment (expression_statement "do_gold_unreachable("../../gold/workqueue.cc",0x107,"find_runnable_or_wait");" (call_expression "do_gold_unreachable("../../gold/workqueue.cc",0x107,"find_runnable_or_wait")" identifier (argument_list "("../../gold/workqueue.cc",0x107,"find_runnable_or_wait")" ( (string_literal ""../../gold/workqueue.cc"" " string_content ") , number_literal , (string_literal ""find_runnable_or_wait"" " string_content ") ))) ;) })))
(translation_unit "int FUN_001908c0(int param_1,undefined4 param_2)\n\n{\n  code *pcVar1;\n  char cVar2;\n  int iVar3;\n  \n  iVar3 = FUN_00190880(param_1);\n  while( true ) {\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    if (((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0)) break;\n    pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc);\n    if ((pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')) {\n      return 0;\n    }\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);\n    }\n    (**(code **)(**(int **)(param_1 + 0x20) + 8))\n              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c));\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);\n    }\n    iVar3 = FUN_00190880(param_1);\n  }\n  (**(code **)(**(int **)(param_1 + 0x20) + 0x10))(*(int **)(param_1 + 0x20));\n  if (*(int *)(param_1 + 0x18) == 0) {\n    return 0;\n  }\n                    \n  FUN_00069d00("../../gold/workqueue.cc",0x107,"find_runnable_or_wait",param_1);\n}\n\n" (function_definition "int FUN_001908c0(int param_1,undefined4 param_2)\n\n{\n  code *pcVar1;\n  char cVar2;\n  int iVar3;\n  \n  iVar3 = FUN_00190880(param_1);\n  while( true ) {\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    if (((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0)) break;\n    pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc);\n    if ((pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')) {\n      return 0;\n    }\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);\n    }\n    (**(code **)(**(int **)(param_1 + 0x20) + 8))\n              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c));\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);\n    }\n    iVar3 = FUN_00190880(param_1);\n  }\n  (**(code **)(**(int **)(param_1 + 0x20) + 0x10))(*(int **)(param_1 + 0x20));\n  if (*(int *)(param_1 + 0x18) == 0) {\n    return 0;\n  }\n                    \n  FUN_00069d00("../../gold/workqueue.cc",0x107,"find_runnable_or_wait",param_1);\n}" primitive_type (function_declarator "FUN_001908c0(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  code *pcVar1;\n  char cVar2;\n  int iVar3;\n  \n  iVar3 = FUN_00190880(param_1);\n  while( true ) {\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    if (((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0)) break;\n    pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc);\n    if ((pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')) {\n      return 0;\n    }\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);\n    }\n    (**(code **)(**(int **)(param_1 + 0x20) + 8))\n              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c));\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);\n    }\n    iVar3 = FUN_00190880(param_1);\n  }\n  (**(code **)(**(int **)(param_1 + 0x20) + 0x10))(*(int **)(param_1 + 0x20));\n  if (*(int *)(param_1 + 0x18) == 0) {\n    return 0;\n  }\n                    \n  FUN_00069d00("../../gold/workqueue.cc",0x107,"find_runnable_or_wait",param_1);\n}" { (declaration "code *pcVar1;" type_identifier (pointer_declarator "*pcVar1" * identifier) ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar3 = FUN_00190880(param_1);" (assignment_expression "iVar3 = FUN_00190880(param_1)" identifier = (call_expression "FUN_00190880(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (while_statement "while( true ) {\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    if (((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0)) break;\n    pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc);\n    if ((pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')) {\n      return 0;\n    }\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);\n    }\n    (**(code **)(**(int **)(param_1 + 0x20) + 8))\n              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c));\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);\n    }\n    iVar3 = FUN_00190880(param_1);\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    if (((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0)) break;\n    pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc);\n    if ((pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')) {\n      return 0;\n    }\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);\n    }\n    (**(code **)(**(int **)(param_1 + 0x20) + 8))\n              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c));\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);\n    }\n    iVar3 = FUN_00190880(param_1);\n  }" { (if_statement "if (iVar3 != 0) {\n      return iVar3;\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      return iVar3;\n    }" { (return_statement "return iVar3;" return identifier ;) })) (if_statement "if (((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0)) break;" if (parenthesized_expression "(((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0))" ( (binary_expression "((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0)" (parenthesized_expression "((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0))" ( (binary_expression "(*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)" (parenthesized_expression "(*(int *)(param_1 + 0x14) == 0)" ( (binary_expression "*(int *)(param_1 + 0x14) == 0" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) == number_literal) )) && (parenthesized_expression "(*(int *)(param_1 + 4) == 0)" ( (binary_expression "*(int *)(param_1 + 4) == 0" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) == number_literal) ))) )) && (parenthesized_expression "(*(int *)(param_1 + 0xc) == 0)" ( (binary_expression "*(int *)(param_1 + 0xc) == 0" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) == number_literal) ))) )) (break_statement "break;" break ;)) (expression_statement "pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc);" (assignment_expression "pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc)" identifier = (pointer_expression "*(code **)(**(int **)(param_1 + 0x24) + 0xc)" * (cast_expression "(code **)(**(int **)(param_1 + 0x24) + 0xc)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 0x24) + 0xc)" ( (binary_expression "**(int **)(param_1 + 0x24) + 0xc" (pointer_expression "**(int **)(param_1 + 0x24)" * (pointer_expression "*(int **)(param_1 + 0x24)" * (cast_expression "(int **)(param_1 + 0x24)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) ))))) + number_literal) ))))) ;) (if_statement "if ((pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')) {\n      return 0;\n    }" if (parenthesized_expression "((pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0'))" ( (binary_expression "(pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')" (parenthesized_expression "(pcVar1 != FUN_00191640)" ( (binary_expression "pcVar1 != FUN_00191640" identifier != identifier) )) && (parenthesized_expression "(cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')" ( (comma_expression "cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0'" (assignment_expression "cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2)" identifier = (call_expression "(*pcVar1)(*(int **)(param_1 + 0x24),param_2)" (parenthesized_expression "(*pcVar1)" ( (pointer_expression "*pcVar1" * identifier) )) (argument_list "(*(int **)(param_1 + 0x24),param_2)" ( (pointer_expression "*(int **)(param_1 + 0x24)" * (cast_expression "(int **)(param_1 + 0x24)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) , identifier )))) , (binary_expression "cVar2 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence '))) ))) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);\n    }" if (parenthesized_expression "((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0))" ( (binary_expression "(DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)" (parenthesized_expression "(DAT_0038f378[2] != 0)" ( (binary_expression "DAT_0038f378[2] != 0" (subscript_expression "DAT_0038f378[2]" identifier [ number_literal ]) != number_literal) )) && (parenthesized_expression "((*(byte *)(DAT_0038f378 + 5) & 1) != 0)" ( (binary_expression "(*(byte *)(DAT_0038f378 + 5) & 1) != 0" (parenthesized_expression "(*(byte *)(DAT_0038f378 + 5) & 1)" ( (binary_expression "*(byte *)(DAT_0038f378 + 5) & 1" (pointer_expression "*(byte *)(DAT_0038f378 + 5)" * (cast_expression "(byte *)(DAT_0038f378 + 5)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(DAT_0038f378 + 5)" ( (binary_expression "DAT_0038f378 + 5" identifier + number_literal) )))) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);\n    }" { (expression_statement "FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);" (call_expression "FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2)" identifier (argument_list "(*DAT_0038f378,"%3d sleeping",param_2)" ( (pointer_expression "*DAT_0038f378" * identifier) , (string_literal ""%3d sleeping"" " string_content ") , identifier ))) ;) })) (expression_statement "(**(code **)(**(int **)(param_1 + 0x20) + 8))\n              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c));" (call_expression "(**(code **)(**(int **)(param_1 + 0x20) + 8))\n              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c))" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0x20) + 8))" ( (pointer_expression "**(code **)(**(int **)(param_1 + 0x20) + 8)" * (pointer_expression "*(code **)(**(int **)(param_1 + 0x20) + 8)" * (cast_expression "(code **)(**(int **)(param_1 + 0x20) + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 0x20) + 8)" ( (binary_expression "**(int **)(param_1 + 0x20) + 8" (pointer_expression "**(int **)(param_1 + 0x20)" * (pointer_expression "*(int **)(param_1 + 0x20)" * (cast_expression "(int **)(param_1 + 0x20)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c))" ( (pointer_expression "*(int **)(param_1 + 0x20)" * (cast_expression "(int **)(param_1 + 0x20)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) , (pointer_expression "**(undefined4 **)(param_1 + 0x1c)" * (pointer_expression "*(undefined4 **)(param_1 + 0x1c)" * (cast_expression "(undefined4 **)(param_1 + 0x1c)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) ))))) ))) ;) (if_statement "if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);\n    }" if (parenthesized_expression "((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0))" ( (binary_expression "(DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)" (parenthesized_expression "(DAT_0038f378[2] != 0)" ( (binary_expression "DAT_0038f378[2] != 0" (subscript_expression "DAT_0038f378[2]" identifier [ number_literal ]) != number_literal) )) && (parenthesized_expression "((*(byte *)(DAT_0038f378 + 5) & 1) != 0)" ( (binary_expression "(*(byte *)(DAT_0038f378 + 5) & 1) != 0" (parenthesized_expression "(*(byte *)(DAT_0038f378 + 5) & 1)" ( (binary_expression "*(byte *)(DAT_0038f378 + 5) & 1" (pointer_expression "*(byte *)(DAT_0038f378 + 5)" * (cast_expression "(byte *)(DAT_0038f378 + 5)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(DAT_0038f378 + 5)" ( (binary_expression "DAT_0038f378 + 5" identifier + number_literal) )))) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);\n    }" { (expression_statement "FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);" (call_expression "FUN_000653f0(*DAT_0038f378,"%3d awake",param_2)" identifier (argument_list "(*DAT_0038f378,"%3d awake",param_2)" ( (pointer_expression "*DAT_0038f378" * identifier) , (string_literal ""%3d awake"" " string_content ") , identifier ))) ;) })) (expression_statement "iVar3 = FUN_00190880(param_1);" (assignment_expression "iVar3 = FUN_00190880(param_1)" identifier = (call_expression "FUN_00190880(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) })) (expression_statement "(**(code **)(**(int **)(param_1 + 0x20) + 0x10))(*(int **)(param_1 + 0x20));" (call_expression "(**(code **)(**(int **)(param_1 + 0x20) + 0x10))(*(int **)(param_1 + 0x20))" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0x20) + 0x10))" ( (pointer_expression "**(code **)(**(int **)(param_1 + 0x20) + 0x10)" * (pointer_expression "*(code **)(**(int **)(param_1 + 0x20) + 0x10)" * (cast_expression "(code **)(**(int **)(param_1 + 0x20) + 0x10)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 0x20) + 0x10)" ( (binary_expression "**(int **)(param_1 + 0x20) + 0x10" (pointer_expression "**(int **)(param_1 + 0x20)" * (pointer_expression "*(int **)(param_1 + 0x20)" * (cast_expression "(int **)(param_1 + 0x20)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 0x20))" ( (pointer_expression "*(int **)(param_1 + 0x20)" * (cast_expression "(int **)(param_1 + 0x20)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) ))) ;) (if_statement "if (*(int *)(param_1 + 0x18) == 0) {\n    return 0;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x18) == 0)" ( (binary_expression "*(int *)(param_1 + 0x18) == 0" (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "FUN_00069d00("../../gold/workqueue.cc",0x107,"find_runnable_or_wait",param_1);" (call_expression "FUN_00069d00("../../gold/workqueue.cc",0x107,"find_runnable_or_wait",param_1)" identifier (argument_list "("../../gold/workqueue.cc",0x107,"find_runnable_or_wait",param_1)" ( (string_literal ""../../gold/workqueue.cc"" " string_content ") , number_literal , (string_literal ""find_runnable_or_wait"" " string_content ") , identifier ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (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) )) && (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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) ))) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != IDENT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT )))) , (binary_expression IDENT != (char_literal ' escape_sequence '))) ))) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_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 (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , (string_literal " string_content ") , IDENT ))) ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) + LIT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_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 (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , (string_literal " string_content ") , IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) + LIT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , LIT , (string_literal " string_content ") , IDENT ))) ;) })))
(function_definition "int FUN_001908c0(int param_1,undefined4 param_2)\n\n{\n  code *pcVar1;\n  char cVar2;\n  int iVar3;\n  \n  iVar3 = FUN_00190880(param_1);\n  while( true ) {\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    if (((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0)) break;\n    pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc);\n    if ((pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')) {\n      return 0;\n    }\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);\n    }\n    (**(code **)(**(int **)(param_1 + 0x20) + 8))\n              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c));\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);\n    }\n    iVar3 = FUN_00190880(param_1);\n  }\n  (**(code **)(**(int **)(param_1 + 0x20) + 0x10))(*(int **)(param_1 + 0x20));\n  if (*(int *)(param_1 + 0x18) == 0) {\n    return 0;\n  }\n                    \n  FUN_00069d00("../../gold/workqueue.cc",0x107,"find_runnable_or_wait",param_1);\n}" (primitive_type "int") (function_declarator "FUN_001908c0(int param_1,undefined4 param_2)" (identifier "FUN_001908c0") (parameter_list "(int param_1,undefined4 param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  code *pcVar1;\n  char cVar2;\n  int iVar3;\n  \n  iVar3 = FUN_00190880(param_1);\n  while( true ) {\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    if (((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0)) break;\n    pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc);\n    if ((pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')) {\n      return 0;\n    }\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);\n    }\n    (**(code **)(**(int **)(param_1 + 0x20) + 8))\n              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c));\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);\n    }\n    iVar3 = FUN_00190880(param_1);\n  }\n  (**(code **)(**(int **)(param_1 + 0x20) + 0x10))(*(int **)(param_1 + 0x20));\n  if (*(int *)(param_1 + 0x18) == 0) {\n    return 0;\n  }\n                    \n  FUN_00069d00("../../gold/workqueue.cc",0x107,"find_runnable_or_wait",param_1);\n}" ({ "{") (declaration "code *pcVar1;" (type_identifier "code") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "char cVar2;" (primitive_type "char") (identifier "cVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (expression_statement "iVar3 = FUN_00190880(param_1);" (assignment_expression "iVar3 = FUN_00190880(param_1)" (identifier "iVar3") (= "=") (call_expression "FUN_00190880(param_1)" (identifier "FUN_00190880") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (while_statement "while( true ) {\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    if (((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0)) break;\n    pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc);\n    if ((pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')) {\n      return 0;\n    }\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);\n    }\n    (**(code **)(**(int **)(param_1 + 0x20) + 8))\n              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c));\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);\n    }\n    iVar3 = FUN_00190880(param_1);\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    if (((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0)) break;\n    pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc);\n    if ((pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')) {\n      return 0;\n    }\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);\n    }\n    (**(code **)(**(int **)(param_1 + 0x20) + 8))\n              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c));\n    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);\n    }\n    iVar3 = FUN_00190880(param_1);\n  }" ({ "{") (if_statement "if (iVar3 != 0) {\n      return iVar3;\n    }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      return iVar3;\n    }" ({ "{") (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}"))) (if_statement "if (((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0)) break;" (if "if") (parenthesized_expression "(((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0))" (( "(") (binary_expression "((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&\n       (*(int *)(param_1 + 0xc) == 0)" (parenthesized_expression "((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0))" (( "(") (binary_expression "(*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)" (parenthesized_expression "(*(int *)(param_1 + 0x14) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x14) == 0" (pointer_expression "*(int *)(param_1 + 0x14)" (* "*") (cast_expression "(int *)(param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(*(int *)(param_1 + 4) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 4) == 0" (pointer_expression "*(int *)(param_1 + 4)" (* "*") (cast_expression "(int *)(param_1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (== "==") (number_literal "0")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(*(int *)(param_1 + 0xc) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 0xc) == 0" (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (== "==") (number_literal "0")) () ")"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc);" (assignment_expression "pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc)" (identifier "pcVar1") (= "=") (pointer_expression "*(code **)(**(int **)(param_1 + 0x24) + 0xc)" (* "*") (cast_expression "(code **)(**(int **)(param_1 + 0x24) + 0xc)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(**(int **)(param_1 + 0x24) + 0xc)" (( "(") (binary_expression "**(int **)(param_1 + 0x24) + 0xc" (pointer_expression "**(int **)(param_1 + 0x24)" (* "*") (pointer_expression "*(int **)(param_1 + 0x24)" (* "*") (cast_expression "(int **)(param_1 + 0x24)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")"))))) (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (if_statement "if ((pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')) {\n      return 0;\n    }" (if "if") (parenthesized_expression "((pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0'))" (( "(") (binary_expression "(pcVar1 != FUN_00191640) &&\n       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')" (parenthesized_expression "(pcVar1 != FUN_00191640)" (( "(") (binary_expression "pcVar1 != FUN_00191640" (identifier "pcVar1") (!= "!=") (identifier "FUN_00191640")) () ")")) (&& "&&") (parenthesized_expression "(cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')" (( "(") (comma_expression "cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0'" (assignment_expression "cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2)" (identifier "cVar2") (= "=") (call_expression "(*pcVar1)(*(int **)(param_1 + 0x24),param_2)" (parenthesized_expression "(*pcVar1)" (( "(") (pointer_expression "*pcVar1" (* "*") (identifier "pcVar1")) () ")")) (argument_list "(*(int **)(param_1 + 0x24),param_2)" (( "(") (pointer_expression "*(int **)(param_1 + 0x24)" (* "*") (cast_expression "(int **)(param_1 + 0x24)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")")))) (, ",") (identifier "param_2") () ")")))) (, ",") (binary_expression "cVar2 != '\0'" (identifier "cVar2") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'")))) () ")"))) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);\n    }" (if "if") (parenthesized_expression "((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0))" (( "(") (binary_expression "(DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)" (parenthesized_expression "(DAT_0038f378[2] != 0)" (( "(") (binary_expression "DAT_0038f378[2] != 0" (subscript_expression "DAT_0038f378[2]" (identifier "DAT_0038f378") ([ "[") (number_literal "2") (] "]")) (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "((*(byte *)(DAT_0038f378 + 5) & 1) != 0)" (( "(") (binary_expression "(*(byte *)(DAT_0038f378 + 5) & 1) != 0" (parenthesized_expression "(*(byte *)(DAT_0038f378 + 5) & 1)" (( "(") (binary_expression "*(byte *)(DAT_0038f378 + 5) & 1" (pointer_expression "*(byte *)(DAT_0038f378 + 5)" (* "*") (cast_expression "(byte *)(DAT_0038f378 + 5)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(DAT_0038f378 + 5)" (( "(") (binary_expression "DAT_0038f378 + 5" (identifier "DAT_0038f378") (+ "+") (number_literal "5")) () ")")))) (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);\n    }" ({ "{") (expression_statement "FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);" (call_expression "FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2)" (identifier "FUN_000653f0") (argument_list "(*DAT_0038f378,"%3d sleeping",param_2)" (( "(") (pointer_expression "*DAT_0038f378" (* "*") (identifier "DAT_0038f378")) (, ",") (string_literal ""%3d sleeping"" (" """) (string_content "%3d sleeping") (" """)) (, ",") (identifier "param_2") () ")"))) (; ";")) (} "}"))) (expression_statement "(**(code **)(**(int **)(param_1 + 0x20) + 8))\n              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c));" (call_expression "(**(code **)(**(int **)(param_1 + 0x20) + 8))\n              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c))" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0x20) + 8))" (( "(") (pointer_expression "**(code **)(**(int **)(param_1 + 0x20) + 8)" (* "*") (pointer_expression "*(code **)(**(int **)(param_1 + 0x20) + 8)" (* "*") (cast_expression "(code **)(**(int **)(param_1 + 0x20) + 8)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(**(int **)(param_1 + 0x20) + 8)" (( "(") (binary_expression "**(int **)(param_1 + 0x20) + 8" (pointer_expression "**(int **)(param_1 + 0x20)" (* "*") (pointer_expression "*(int **)(param_1 + 0x20)" (* "*") (cast_expression "(int **)(param_1 + 0x20)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")"))))) (+ "+") (number_literal "8")) () ")"))))) () ")")) (argument_list "(*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c))" (( "(") (pointer_expression "*(int **)(param_1 + 0x20)" (* "*") (cast_expression "(int **)(param_1 + 0x20)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (, ",") (pointer_expression "**(undefined4 **)(param_1 + 0x1c)" (* "*") (pointer_expression "*(undefined4 **)(param_1 + 0x1c)" (* "*") (cast_expression "(undefined4 **)(param_1 + 0x1c)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x1c)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) () ")"))))) () ")"))) (; ";")) (if_statement "if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {\n      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);\n    }" (if "if") (parenthesized_expression "((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0))" (( "(") (binary_expression "(DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)" (parenthesized_expression "(DAT_0038f378[2] != 0)" (( "(") (binary_expression "DAT_0038f378[2] != 0" (subscript_expression "DAT_0038f378[2]" (identifier "DAT_0038f378") ([ "[") (number_literal "2") (] "]")) (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "((*(byte *)(DAT_0038f378 + 5) & 1) != 0)" (( "(") (binary_expression "(*(byte *)(DAT_0038f378 + 5) & 1) != 0" (parenthesized_expression "(*(byte *)(DAT_0038f378 + 5) & 1)" (( "(") (binary_expression "*(byte *)(DAT_0038f378 + 5) & 1" (pointer_expression "*(byte *)(DAT_0038f378 + 5)" (* "*") (cast_expression "(byte *)(DAT_0038f378 + 5)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(DAT_0038f378 + 5)" (( "(") (binary_expression "DAT_0038f378 + 5" (identifier "DAT_0038f378") (+ "+") (number_literal "5")) () ")")))) (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);\n    }" ({ "{") (expression_statement "FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);" (call_expression "FUN_000653f0(*DAT_0038f378,"%3d awake",param_2)" (identifier "FUN_000653f0") (argument_list "(*DAT_0038f378,"%3d awake",param_2)" (( "(") (pointer_expression "*DAT_0038f378" (* "*") (identifier "DAT_0038f378")) (, ",") (string_literal ""%3d awake"" (" """) (string_content "%3d awake") (" """)) (, ",") (identifier "param_2") () ")"))) (; ";")) (} "}"))) (expression_statement "iVar3 = FUN_00190880(param_1);" (assignment_expression "iVar3 = FUN_00190880(param_1)" (identifier "iVar3") (= "=") (call_expression "FUN_00190880(param_1)" (identifier "FUN_00190880") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (} "}"))) (expression_statement "(**(code **)(**(int **)(param_1 + 0x20) + 0x10))(*(int **)(param_1 + 0x20));" (call_expression "(**(code **)(**(int **)(param_1 + 0x20) + 0x10))(*(int **)(param_1 + 0x20))" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0x20) + 0x10))" (( "(") (pointer_expression "**(code **)(**(int **)(param_1 + 0x20) + 0x10)" (* "*") (pointer_expression "*(code **)(**(int **)(param_1 + 0x20) + 0x10)" (* "*") (cast_expression "(code **)(**(int **)(param_1 + 0x20) + 0x10)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(**(int **)(param_1 + 0x20) + 0x10)" (( "(") (binary_expression "**(int **)(param_1 + 0x20) + 0x10" (pointer_expression "**(int **)(param_1 + 0x20)" (* "*") (pointer_expression "*(int **)(param_1 + 0x20)" (* "*") (cast_expression "(int **)(param_1 + 0x20)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")"))))) (+ "+") (number_literal "0x10")) () ")"))))) () ")")) (argument_list "(*(int **)(param_1 + 0x20))" (( "(") (pointer_expression "*(int **)(param_1 + 0x20)" (* "*") (cast_expression "(int **)(param_1 + 0x20)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) () ")"))) (; ";")) (if_statement "if (*(int *)(param_1 + 0x18) == 0) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x18) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x18) == 0" (pointer_expression "*(int *)(param_1 + 0x18)" (* "*") (cast_expression "(int *)(param_1 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "FUN_00069d00("../../gold/workqueue.cc",0x107,"find_runnable_or_wait",param_1);" (call_expression "FUN_00069d00("../../gold/workqueue.cc",0x107,"find_runnable_or_wait",param_1)" (identifier "FUN_00069d00") (argument_list "("../../gold/workqueue.cc",0x107,"find_runnable_or_wait",param_1)" (( "(") (string_literal ""../../gold/workqueue.cc"" (" """) (string_content "../../gold/workqueue.cc") (" """)) (, ",") (number_literal "0x107") (, ",") (string_literal ""find_runnable_or_wait"" (" """) (string_content "find_runnable_or_wait") (" """)) (, ",") (identifier "param_1") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "DT": Some values do not have unique names */
/* DWARF original prototype: Task * find_runnable_or_wait(Workqueue * this, int thread_number) */

type_3 * __thiscall gold::Workqueue::find_runnable_or_wait(Workqueue *this,int function_1)

{
  type_1 *pCVar1;
  type_2 *var_3;
  type_3 *var_2;
  int iVar4;
  
  var_2 = var_1(this);
  while( true ) {
    if (var_2 != (type_3 *)0x0) {
      return var_2;
    }
    if (((this->running_ == 0) && ((this->first_tasks_).head_ == (type_3 *)0x0)) &&
       ((this->tasks_).head_ == (type_3 *)0x0)) break;
    var_3 = this->threader_->_vptr_Workqueue_threader[3];
    if ((var_3 != var_4::should_cancel_thread) &&
       (iVar4 = (*var_3)(this->threader_,function_1), (char)iVar4 != '\0')) {
      return (type_3 *)0x0;
    }
    if ((parameters->options_ != (type_4 *)0x0) && ((parameters->debug_ & 1) != 0)) {
      Errors::var_5(parameters->errors_,"%3d sleeping",function_1);
    }
    pCVar1 = (this->condvar_).condvar_;
    (*pCVar1->_vptr_Condvar_impl[2])(pCVar1,((this->condvar_).lock_)->lock_);
    if ((parameters->options_ != (type_4 *)0x0) && ((parameters->debug_ & 1) != 0)) {
      Errors::var_5(parameters->errors_,"%3d awake",function_1);
    }
    var_2 = var_1(this);
  }
  pCVar1 = (this->condvar_).condvar_;
  (*pCVar1->_vptr_Condvar_impl[4])(pCVar1);
  if (this->waiting_ == 0) {
    return (type_3 *)0x0;
  }
                    /* WARNING: Subroutine does not return */
  var_6("../../gold/workqueue.cc",0x107,"find_runnable_or_wait");
}


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

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

int MASKED(int param_1,undefined4 param_2)

{
  code *pcVar1;
  char cVar2;
  int iVar3;
  
  iVar3 = FUN_00190880(param_1);
  while( true ) {
    if (iVar3 != 0) {
      return iVar3;
    }
    if (((*(int *)(param_1 + 0x14) == 0) && (*(int *)(param_1 + 4) == 0)) &&
       (*(int *)(param_1 + 0xc) == 0)) break;
    pcVar1 = *(code **)(**(int **)(param_1 + 0x24) + 0xc);
    if ((pcVar1 != FUN_00191640) &&
       (cVar2 = (*pcVar1)(*(int **)(param_1 + 0x24),param_2), cVar2 != '\0')) {
      return 0;
    }
    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {
      FUN_000653f0(*DAT_0038f378,"%3d sleeping",param_2);
    }
    (**(code **)(**(int **)(param_1 + 0x20) + 8))
              (*(int **)(param_1 + 0x20),**(undefined4 **)(param_1 + 0x1c));
    if ((DAT_0038f378[2] != 0) && ((*(byte *)(DAT_0038f378 + 5) & 1) != 0)) {
      FUN_000653f0(*DAT_0038f378,"%3d awake",param_2);
    }
    iVar3 = FUN_00190880(param_1);
  }
  (**(code **)(**(int **)(param_1 + 0x20) + 0x10))(*(int **)(param_1 + 0x20));
  if (*(int *)(param_1 + 0x18) == 0) {
    return 0;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00069d00("../../gold/workqueue.cc",0x107,"find_runnable_or_wait",param_1);
}

