
/* WARNING: Enum "DT": Some values do not have unique names */
/* WARNING: Enum "PT": Some values do not have unique names */
/* DWARF original prototype: Output_segment * find_output_segment(Layout * this, PT type, Elf_Word
   set, Elf_Word clear) */

Output_segment * __thiscall
gold::Layout::find_output_segment(Layout *this,PT type,Elf_Word set,Elf_Word clear)

{
  Output_segment *pOVar1;
  pointer ppOVar2;
  
  ppOVar2 = (this->segment_list_).
            super__Vector_base<gold::Output_segment*,_std::allocator<gold::Output_segment*>_>.
            _M_impl._M_start;
  while( true ) {
    if (ppOVar2 ==
        (this->segment_list_).
        super__Vector_base<gold::Output_segment*,_std::allocator<gold::Output_segment*>_>._M_impl.
        _M_finish) {
      return (Output_segment *)0x0;
    }
    pOVar1 = *ppOVar2;
    if (((type == pOVar1->type_) && ((set & pOVar1->flags_) == set)) &&
       ((clear & pOVar1->flags_) == 0)) break;
    ppOVar2 = ppOVar2 + 1;
  }
  return pOVar1;
}



int FUN_00096f60(int param_1,int param_2,uint param_3,uint param_4)

{
  int iVar1;
  int *piVar2;
  
  piVar2 = *(int **)(param_1 + 0x124);
  while( true ) {
    if (piVar2 == *(int **)(param_1 + 0x128)) {
      return 0;
    }
    iVar1 = *piVar2;
    if (((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))
       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)) break;
    piVar2 = piVar2 + 1;
  }
  return iVar1;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
MOV EAX,dword ptr [ESP + 0x14]
MOV EBX,dword ptr [ESP + 0x18]
MOV EDI,dword ptr [ESP + 0x1c]
MOV EDX,dword ptr [EAX + 0x124]
MOV ECX,dword ptr [EAX + 0x128]
CMP EDX,ECX
JNZ 0x00096f8f
JMP 0x00096fb8
ADD EDX,0x4
CMP ECX,EDX
JZ 0x00096fb8
MOV EAX,dword ptr [EDX]
CMP EBX,dword ptr [EAX + 0x194]
JNZ 0x00096f88
MOV ESI,dword ptr [EAX + 0x198]
MOV EBP,EDI
AND EBP,ESI
CMP EBP,EDI
JNZ 0x00096f88
TEST dword ptr [ESP + 0x20],ESI
JNZ 0x00096f88
POP EBX
POP ESI
POP EDI
POP EBP
RET
POP EBX
XOR EAX,EAX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "int FUN_00096f60(int param_1,int param_2,uint param_3,uint param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  \n  piVar2 = *(int **)(param_1 + 0x124);\n  while( true ) {\n    if (piVar2 == *(int **)(param_1 + 0x128)) {\n      return 0;\n    }\n    iVar1 = *piVar2;\n    if (((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)) break;\n    piVar2 = piVar2 + 1;\n  }\n  return iVar1;\n}\n\n" (function_definition "int FUN_00096f60(int param_1,int param_2,uint param_3,uint param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  \n  piVar2 = *(int **)(param_1 + 0x124);\n  while( true ) {\n    if (piVar2 == *(int **)(param_1 + 0x128)) {\n      return 0;\n    }\n    iVar1 = *piVar2;\n    if (((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)) break;\n    piVar2 = piVar2 + 1;\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_00096f60(int param_1,int param_2,uint param_3,uint param_4)" identifier (parameter_list "(int param_1,int param_2,uint param_3,uint param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  \n  piVar2 = *(int **)(param_1 + 0x124);\n  while( true ) {\n    if (piVar2 == *(int **)(param_1 + 0x128)) {\n      return 0;\n    }\n    iVar1 = *piVar2;\n    if (((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)) break;\n    piVar2 = piVar2 + 1;\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (expression_statement "piVar2 = *(int **)(param_1 + 0x124);" (assignment_expression "piVar2 = *(int **)(param_1 + 0x124)" identifier = (pointer_expression "*(int **)(param_1 + 0x124)" * (cast_expression "(int **)(param_1 + 0x124)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x124)" ( (binary_expression "param_1 + 0x124" identifier + number_literal) ))))) ;) (while_statement "while( true ) {\n    if (piVar2 == *(int **)(param_1 + 0x128)) {\n      return 0;\n    }\n    iVar1 = *piVar2;\n    if (((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)) break;\n    piVar2 = piVar2 + 1;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (piVar2 == *(int **)(param_1 + 0x128)) {\n      return 0;\n    }\n    iVar1 = *piVar2;\n    if (((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)) break;\n    piVar2 = piVar2 + 1;\n  }" { (if_statement "if (piVar2 == *(int **)(param_1 + 0x128)) {\n      return 0;\n    }" if (parenthesized_expression "(piVar2 == *(int **)(param_1 + 0x128))" ( (binary_expression "piVar2 == *(int **)(param_1 + 0x128)" identifier == (pointer_expression "*(int **)(param_1 + 0x128)" * (cast_expression "(int **)(param_1 + 0x128)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x128)" ( (binary_expression "param_1 + 0x128" identifier + number_literal) ))))) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (if_statement "if (((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)) break;" if (parenthesized_expression "(((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0))" ( (binary_expression "((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)" (parenthesized_expression "((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))" ( (binary_expression "(param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3)" (parenthesized_expression "(param_2 == *(int *)(iVar1 + 0x194))" ( (binary_expression "param_2 == *(int *)(iVar1 + 0x194)" identifier == (pointer_expression "*(int *)(iVar1 + 0x194)" * (cast_expression "(int *)(iVar1 + 0x194)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x194)" ( (binary_expression "iVar1 + 0x194" identifier + number_literal) ))))) )) && (parenthesized_expression "((param_3 & *(uint *)(iVar1 + 0x198)) == param_3)" ( (binary_expression "(param_3 & *(uint *)(iVar1 + 0x198)) == param_3" (parenthesized_expression "(param_3 & *(uint *)(iVar1 + 0x198))" ( (binary_expression "param_3 & *(uint *)(iVar1 + 0x198)" identifier & (pointer_expression "*(uint *)(iVar1 + 0x198)" * (cast_expression "(uint *)(iVar1 + 0x198)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x198)" ( (binary_expression "iVar1 + 0x198" identifier + number_literal) ))))) )) == identifier) ))) )) && (parenthesized_expression "((param_4 & *(uint *)(iVar1 + 0x198)) == 0)" ( (binary_expression "(param_4 & *(uint *)(iVar1 + 0x198)) == 0" (parenthesized_expression "(param_4 & *(uint *)(iVar1 + 0x198))" ( (binary_expression "param_4 & *(uint *)(iVar1 + 0x198)" identifier & (pointer_expression "*(uint *)(iVar1 + 0x198)" * (cast_expression "(uint *)(iVar1 + 0x198)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x198)" ( (binary_expression "iVar1 + 0x198" identifier + number_literal) ))))) )) == number_literal) ))) )) (break_statement "break;" break ;)) (expression_statement "piVar2 = piVar2 + 1;" (assignment_expression "piVar2 = piVar2 + 1" identifier = (binary_expression "piVar2 + 1" identifier + number_literal)) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Enum "DT": Some values do not have unique names */\n/* WARNING: Enum "PT": Some values do not have unique names */\n/* DWARF original prototype: Output_segment * find_output_segment(Layout * this, PT type, Elf_Word\n   set, Elf_Word clear) */\n\nOutput_segment * __thiscall\ngold::Layout::find_output_segment(Layout *this,PT type,Elf_Word set,Elf_Word clear)\n\n{\n  Output_segment *pOVar1;\n  pointer ppOVar2;\n  \n  ppOVar2 = (this->segment_list_).\n            super__Vector_base<gold::Output_segment*,_std::allocator<gold::Output_segment*>_>.\n            _M_impl._M_start;\n  while( true ) {\n    if (ppOVar2 ==\n        (this->segment_list_).\n        super__Vector_base<gold::Output_segment*,_std::allocator<gold::Output_segment*>_>._M_impl.\n        _M_finish) {\n      return (Output_segment *)0x0;\n    }\n    pOVar1 = *ppOVar2;\n    if (((type == pOVar1->type_) && ((set & pOVar1->flags_) == set)) &&\n       ((clear & pOVar1->flags_) == 0)) break;\n    ppOVar2 = ppOVar2 + 1;\n  }\n  return pOVar1;\n}\n\n" comment comment comment (ERROR "Output_segment * __thiscall\ngold::Layout::find_output_segment(Layout *this,PT type,Elf_Word set,Elf_Word clear)" (binary_expression "Output_segment * __thiscall\ngold::Layout::find_output_segment(Layout *this" (binary_expression "Output_segment * __thiscall" identifier * identifier) (ERROR "gold::Layout::find_output_segment(Layout" identifier : : identifier : : identifier ( identifier) * identifier) , type_identifier identifier , identifier (ERROR "set" identifier) , identifier identifier )) (compound_statement "{\n  Output_segment *pOVar1;\n  pointer ppOVar2;\n  \n  ppOVar2 = (this->segment_list_).\n            super__Vector_base<gold::Output_segment*,_std::allocator<gold::Output_segment*>_>.\n            _M_impl._M_start;\n  while( true ) {\n    if (ppOVar2 ==\n        (this->segment_list_).\n        super__Vector_base<gold::Output_segment*,_std::allocator<gold::Output_segment*>_>._M_impl.\n        _M_finish) {\n      return (Output_segment *)0x0;\n    }\n    pOVar1 = *ppOVar2;\n    if (((type == pOVar1->type_) && ((set & pOVar1->flags_) == set)) &&\n       ((clear & pOVar1->flags_) == 0)) break;\n    ppOVar2 = ppOVar2 + 1;\n  }\n  return pOVar1;\n}" { (declaration "Output_segment *pOVar1;" type_identifier (pointer_declarator "*pOVar1" * identifier) ;) (declaration "pointer ppOVar2;" type_identifier identifier ;) (expression_statement "ppOVar2 = (this->segment_list_).\n            super__Vector_base<gold::Output_segment*,_std::allocator<gold::Output_segment*>_>.\n            _M_impl._M_start;" (field_expression "ppOVar2 = (this->segment_list_).\n            super__Vector_base<gold::Output_segment*,_std::allocator<gold::Output_segment*>_>.\n            _M_impl._M_start" (field_expression "ppOVar2 = (this->segment_list_).\n            super__Vector_base<gold::Output_segment*,_std::allocator<gold::Output_segment*>_>.\n            _M_impl" (binary_expression "ppOVar2 = (this->segment_list_).\n            super__Vector_base<gold::Output_segment*,_std::allocator<gold::Output_segment*>_" (binary_expression "ppOVar2 = (this->segment_list_).\n            super__Vector_base<gold::Output_segment*,_std::allocator<gold" (binary_expression "ppOVar2 = (this->segment_list_).\n            super__Vector_base<gold::Output_segment*,_std" (assignment_expression "ppOVar2 = (this->segment_list_).\n            super__Vector_base<gold" identifier = (binary_expression "(this->segment_list_).\n            super__Vector_base<gold" (field_expression "(this->segment_list_).\n            super__Vector_base" (parenthesized_expression "(this->segment_list_)" ( (field_expression "this->segment_list_" identifier -> field_identifier) )) . field_identifier) < identifier)) (ERROR "::Output_segment" : : identifier) * (ERROR "," ,) identifier) (ERROR "::allocator" : : identifier) < identifier) (ERROR "::Output_segment" : : identifier) * (ERROR ">" >) identifier) (ERROR ">" >) . field_identifier) . field_identifier) ;) (while_statement "while( true ) {\n    if (ppOVar2 ==\n        (this->segment_list_).\n        super__Vector_base<gold::Output_segment*,_std::allocator<gold::Output_segment*>_>._M_impl.\n        _M_finish) {\n      return (Output_segment *)0x0;\n    }\n    pOVar1 = *ppOVar2;\n    if (((type == pOVar1->type_) && ((set & pOVar1->flags_) == set)) &&\n       ((clear & pOVar1->flags_) == 0)) break;\n    ppOVar2 = ppOVar2 + 1;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (ppOVar2 ==\n        (this->segment_list_).\n        super__Vector_base<gold::Output_segment*,_std::allocator<gold::Output_segment*>_>._M_impl.\n        _M_finish) {\n      return (Output_segment *)0x0;\n    }\n    pOVar1 = *ppOVar2;\n    if (((type == pOVar1->type_) && ((set & pOVar1->flags_) == set)) &&\n       ((clear & pOVar1->flags_) == 0)) break;\n    ppOVar2 = ppOVar2 + 1;\n  }" { (if_statement "if (ppOVar2 ==\n        (this->segment_list_).\n        super__Vector_base<gold::Output_segment*,_std::allocator<gold::Output_segment*>_>._M_impl.\n        _M_finish) {\n      return (Output_segment *)0x0;\n    }" if (parenthesized_expression "(ppOVar2 ==\n        (this->segment_list_).\n        super__Vector_base<gold::Output_segment*,_std::allocator<gold::Output_segment*>_>._M_impl.\n        _M_finish)" ( (field_expression "ppOVar2 ==\n        (this->segment_list_).\n        super__Vector_base<gold::Output_segment*,_std::allocator<gold::Output_segment*>_>._M_impl.\n        _M_finish" (field_expression "ppOVar2 ==\n        (this->segment_list_).\n        super__Vector_base<gold::Output_segment*,_std::allocator<gold::Output_segment*>_>._M_impl" (binary_expression "ppOVar2 ==\n        (this->segment_list_).\n        super__Vector_base<gold::Output_segment*,_std::allocator<gold::Output_segment*>_" (binary_expression "ppOVar2 ==\n        (this->segment_list_).\n        super__Vector_base<gold::Output_segment*,_std::allocator<gold" (binary_expression "ppOVar2 ==\n        (this->segment_list_).\n        super__Vector_base<gold::Output_segment*,_std" (binary_expression "ppOVar2 ==\n        (this->segment_list_).\n        super__Vector_base<gold" identifier == (binary_expression "(this->segment_list_).\n        super__Vector_base<gold" (field_expression "(this->segment_list_).\n        super__Vector_base" (parenthesized_expression "(this->segment_list_)" ( (field_expression "this->segment_list_" identifier -> field_identifier) )) . field_identifier) < identifier)) (ERROR "::Output_segment" : : identifier) * (ERROR "," ,) identifier) (ERROR "::allocator" : : identifier) < identifier) (ERROR "::Output_segment" : : identifier) * (ERROR ">" >) identifier) (ERROR ">" >) . field_identifier) . field_identifier) )) (compound_statement "{\n      return (Output_segment *)0x0;\n    }" { (return_statement "return (Output_segment *)0x0;" return (cast_expression "(Output_segment *)0x0" ( (type_descriptor "Output_segment *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pOVar1 = *ppOVar2;" (assignment_expression "pOVar1 = *ppOVar2" identifier = (pointer_expression "*ppOVar2" * identifier)) ;) (if_statement "if (((type == pOVar1->type_) && ((set & pOVar1->flags_) == set)) &&\n       ((clear & pOVar1->flags_) == 0)) break;" if (parenthesized_expression "(((type == pOVar1->type_) && ((set & pOVar1->flags_) == set)) &&\n       ((clear & pOVar1->flags_) == 0))" ( (binary_expression "((type == pOVar1->type_) && ((set & pOVar1->flags_) == set)) &&\n       ((clear & pOVar1->flags_) == 0)" (parenthesized_expression "((type == pOVar1->type_) && ((set & pOVar1->flags_) == set))" ( (binary_expression "(type == pOVar1->type_) && ((set & pOVar1->flags_) == set)" (parenthesized_expression "(type == pOVar1->type_)" ( (binary_expression "type == pOVar1->type_" identifier == (field_expression "pOVar1->type_" identifier -> field_identifier)) )) && (parenthesized_expression "((set & pOVar1->flags_) == set)" ( (binary_expression "(set & pOVar1->flags_) == set" (parenthesized_expression "(set & pOVar1->flags_)" ( (binary_expression "set & pOVar1->flags_" identifier & (field_expression "pOVar1->flags_" identifier -> field_identifier)) )) == identifier) ))) )) && (parenthesized_expression "((clear & pOVar1->flags_) == 0)" ( (binary_expression "(clear & pOVar1->flags_) == 0" (parenthesized_expression "(clear & pOVar1->flags_)" ( (binary_expression "clear & pOVar1->flags_" identifier & (field_expression "pOVar1->flags_" identifier -> field_identifier)) )) == number_literal) ))) )) (break_statement "break;" break ;)) (expression_statement "ppOVar2 = ppOVar2 + 1;" (assignment_expression "ppOVar2 = ppOVar2 + 1" identifier = (binary_expression "ppOVar2 + 1" identifier + number_literal)) ;) })) (return_statement "return pOVar1;" return identifier ;) }))
(translation_unit "int FUN_00096f60(int param_1,int param_2,uint param_3,uint param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  \n  piVar2 = *(int **)(param_1 + 0x124);\n  while( true ) {\n    if (piVar2 == *(int **)(param_1 + 0x128)) {\n      return 0;\n    }\n    iVar1 = *piVar2;\n    if (((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)) break;\n    piVar2 = piVar2 + 1;\n  }\n  return iVar1;\n}\n\n" (function_definition "int FUN_00096f60(int param_1,int param_2,uint param_3,uint param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  \n  piVar2 = *(int **)(param_1 + 0x124);\n  while( true ) {\n    if (piVar2 == *(int **)(param_1 + 0x128)) {\n      return 0;\n    }\n    iVar1 = *piVar2;\n    if (((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)) break;\n    piVar2 = piVar2 + 1;\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_00096f60(int param_1,int param_2,uint param_3,uint param_4)" identifier (parameter_list "(int param_1,int param_2,uint param_3,uint param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  \n  piVar2 = *(int **)(param_1 + 0x124);\n  while( true ) {\n    if (piVar2 == *(int **)(param_1 + 0x128)) {\n      return 0;\n    }\n    iVar1 = *piVar2;\n    if (((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)) break;\n    piVar2 = piVar2 + 1;\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (expression_statement "piVar2 = *(int **)(param_1 + 0x124);" (assignment_expression "piVar2 = *(int **)(param_1 + 0x124)" identifier = (pointer_expression "*(int **)(param_1 + 0x124)" * (cast_expression "(int **)(param_1 + 0x124)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x124)" ( (binary_expression "param_1 + 0x124" identifier + number_literal) ))))) ;) (while_statement "while( true ) {\n    if (piVar2 == *(int **)(param_1 + 0x128)) {\n      return 0;\n    }\n    iVar1 = *piVar2;\n    if (((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)) break;\n    piVar2 = piVar2 + 1;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (piVar2 == *(int **)(param_1 + 0x128)) {\n      return 0;\n    }\n    iVar1 = *piVar2;\n    if (((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)) break;\n    piVar2 = piVar2 + 1;\n  }" { (if_statement "if (piVar2 == *(int **)(param_1 + 0x128)) {\n      return 0;\n    }" if (parenthesized_expression "(piVar2 == *(int **)(param_1 + 0x128))" ( (binary_expression "piVar2 == *(int **)(param_1 + 0x128)" identifier == (pointer_expression "*(int **)(param_1 + 0x128)" * (cast_expression "(int **)(param_1 + 0x128)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x128)" ( (binary_expression "param_1 + 0x128" identifier + number_literal) ))))) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (if_statement "if (((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)) break;" if (parenthesized_expression "(((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0))" ( (binary_expression "((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)" (parenthesized_expression "((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))" ( (binary_expression "(param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3)" (parenthesized_expression "(param_2 == *(int *)(iVar1 + 0x194))" ( (binary_expression "param_2 == *(int *)(iVar1 + 0x194)" identifier == (pointer_expression "*(int *)(iVar1 + 0x194)" * (cast_expression "(int *)(iVar1 + 0x194)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x194)" ( (binary_expression "iVar1 + 0x194" identifier + number_literal) ))))) )) && (parenthesized_expression "((param_3 & *(uint *)(iVar1 + 0x198)) == param_3)" ( (binary_expression "(param_3 & *(uint *)(iVar1 + 0x198)) == param_3" (parenthesized_expression "(param_3 & *(uint *)(iVar1 + 0x198))" ( (binary_expression "param_3 & *(uint *)(iVar1 + 0x198)" identifier & (pointer_expression "*(uint *)(iVar1 + 0x198)" * (cast_expression "(uint *)(iVar1 + 0x198)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x198)" ( (binary_expression "iVar1 + 0x198" identifier + number_literal) ))))) )) == identifier) ))) )) && (parenthesized_expression "((param_4 & *(uint *)(iVar1 + 0x198)) == 0)" ( (binary_expression "(param_4 & *(uint *)(iVar1 + 0x198)) == 0" (parenthesized_expression "(param_4 & *(uint *)(iVar1 + 0x198))" ( (binary_expression "param_4 & *(uint *)(iVar1 + 0x198)" identifier & (pointer_expression "*(uint *)(iVar1 + 0x198)" * (cast_expression "(uint *)(iVar1 + 0x198)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x198)" ( (binary_expression "iVar1 + 0x198" identifier + number_literal) ))))) )) == number_literal) ))) )) (break_statement "break;" break ;)) (expression_statement "piVar2 = piVar2 + 1;" (assignment_expression "piVar2 = piVar2 + 1" identifier = (binary_expression "piVar2 + 1" identifier + number_literal)) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) == IDENT) ))) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & (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 = (binary_expression IDENT + LIT)) ;) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_00096f60(int param_1,int param_2,uint param_3,uint param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  \n  piVar2 = *(int **)(param_1 + 0x124);\n  while( true ) {\n    if (piVar2 == *(int **)(param_1 + 0x128)) {\n      return 0;\n    }\n    iVar1 = *piVar2;\n    if (((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)) break;\n    piVar2 = piVar2 + 1;\n  }\n  return iVar1;\n}" (primitive_type "int") (function_declarator "FUN_00096f60(int param_1,int param_2,uint param_3,uint param_4)" (identifier "FUN_00096f60") (parameter_list "(int param_1,int param_2,uint param_3,uint param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "uint param_4" (type_identifier "uint") (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  \n  piVar2 = *(int **)(param_1 + 0x124);\n  while( true ) {\n    if (piVar2 == *(int **)(param_1 + 0x128)) {\n      return 0;\n    }\n    iVar1 = *piVar2;\n    if (((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)) break;\n    piVar2 = piVar2 + 1;\n  }\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (expression_statement "piVar2 = *(int **)(param_1 + 0x124);" (assignment_expression "piVar2 = *(int **)(param_1 + 0x124)" (identifier "piVar2") (= "=") (pointer_expression "*(int **)(param_1 + 0x124)" (* "*") (cast_expression "(int **)(param_1 + 0x124)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x124)" (( "(") (binary_expression "param_1 + 0x124" (identifier "param_1") (+ "+") (number_literal "0x124")) () ")"))))) (; ";")) (while_statement "while( true ) {\n    if (piVar2 == *(int **)(param_1 + 0x128)) {\n      return 0;\n    }\n    iVar1 = *piVar2;\n    if (((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)) break;\n    piVar2 = piVar2 + 1;\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    if (piVar2 == *(int **)(param_1 + 0x128)) {\n      return 0;\n    }\n    iVar1 = *piVar2;\n    if (((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)) break;\n    piVar2 = piVar2 + 1;\n  }" ({ "{") (if_statement "if (piVar2 == *(int **)(param_1 + 0x128)) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(piVar2 == *(int **)(param_1 + 0x128))" (( "(") (binary_expression "piVar2 == *(int **)(param_1 + 0x128)" (identifier "piVar2") (== "==") (pointer_expression "*(int **)(param_1 + 0x128)" (* "*") (cast_expression "(int **)(param_1 + 0x128)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x128)" (( "(") (binary_expression "param_1 + 0x128" (identifier "param_1") (+ "+") (number_literal "0x128")) () ")"))))) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" (identifier "iVar1") (= "=") (pointer_expression "*piVar2" (* "*") (identifier "piVar2"))) (; ";")) (if_statement "if (((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)) break;" (if "if") (parenthesized_expression "(((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0))" (( "(") (binary_expression "((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))\n       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)" (parenthesized_expression "((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))" (( "(") (binary_expression "(param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3)" (parenthesized_expression "(param_2 == *(int *)(iVar1 + 0x194))" (( "(") (binary_expression "param_2 == *(int *)(iVar1 + 0x194)" (identifier "param_2") (== "==") (pointer_expression "*(int *)(iVar1 + 0x194)" (* "*") (cast_expression "(int *)(iVar1 + 0x194)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x194)" (( "(") (binary_expression "iVar1 + 0x194" (identifier "iVar1") (+ "+") (number_literal "0x194")) () ")"))))) () ")")) (&& "&&") (parenthesized_expression "((param_3 & *(uint *)(iVar1 + 0x198)) == param_3)" (( "(") (binary_expression "(param_3 & *(uint *)(iVar1 + 0x198)) == param_3" (parenthesized_expression "(param_3 & *(uint *)(iVar1 + 0x198))" (( "(") (binary_expression "param_3 & *(uint *)(iVar1 + 0x198)" (identifier "param_3") (& "&") (pointer_expression "*(uint *)(iVar1 + 0x198)" (* "*") (cast_expression "(uint *)(iVar1 + 0x198)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x198)" (( "(") (binary_expression "iVar1 + 0x198" (identifier "iVar1") (+ "+") (number_literal "0x198")) () ")"))))) () ")")) (== "==") (identifier "param_3")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "((param_4 & *(uint *)(iVar1 + 0x198)) == 0)" (( "(") (binary_expression "(param_4 & *(uint *)(iVar1 + 0x198)) == 0" (parenthesized_expression "(param_4 & *(uint *)(iVar1 + 0x198))" (( "(") (binary_expression "param_4 & *(uint *)(iVar1 + 0x198)" (identifier "param_4") (& "&") (pointer_expression "*(uint *)(iVar1 + 0x198)" (* "*") (cast_expression "(uint *)(iVar1 + 0x198)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x198)" (( "(") (binary_expression "iVar1 + 0x198" (identifier "iVar1") (+ "+") (number_literal "0x198")) () ")"))))) () ")")) (== "==") (number_literal "0")) () ")"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "piVar2 = piVar2 + 1;" (assignment_expression "piVar2 = piVar2 + 1" (identifier "piVar2") (= "=") (binary_expression "piVar2 + 1" (identifier "piVar2") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

/* WARNING: Enum "DT": Some values do not have unique names */
/* WARNING: Enum "PT": Some values do not have unique names */
/* DWARF original prototype: Output_segment * find_output_segment(Layout * this, PT type, Elf_Word
   set, Elf_Word clear) */

type_1 * __thiscall
var_1::Layout::find_output_segment(Layout *this,PT var_5,Elf_Word var_6,Elf_Word var_7)

{
  type_1 *pOVar1;
  type_2 var_4;
  
  var_4 = (this->segment_list_).
            super__Vector_base<var_1::type_1*,var_2::allocator<var_1::type_1*>var_3>.
            _M_impl._M_start;
  while( true ) {
    if (var_4 ==
        (this->segment_list_).
        super__Vector_base<var_1::type_1*,var_2::allocator<var_1::type_1*>var_3>._M_impl.
        _M_finish) {
      return (type_1 *)0x0;
    }
    pOVar1 = *var_4;
    if (((var_5 == pOVar1->type_) && ((var_6 & pOVar1->flags_) == var_6)) &&
       ((var_7 & pOVar1->flags_) == 0)) break;
    var_4 = var_4 + 1;
  }
  return pOVar1;
}


(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: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) right: (identifier))))) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (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))))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (return_statement (identifier)))))

int MASKED(int param_1,int param_2,uint param_3,uint param_4)

{
  int iVar1;
  int *piVar2;
  
  piVar2 = *(int **)(param_1 + 0x124);
  while( true ) {
    if (piVar2 == *(int **)(param_1 + 0x128)) {
      return 0;
    }
    iVar1 = *piVar2;
    if (((param_2 == *(int *)(iVar1 + 0x194)) && ((param_3 & *(uint *)(iVar1 + 0x198)) == param_3))
       && ((param_4 & *(uint *)(iVar1 + 0x198)) == 0)) break;
    piVar2 = piVar2 + 1;
  }
  return iVar1;
}

