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

bfd ** __regparm3 get_pos_bfd(bfd **contents,pos default_pos,char *default_posname)

{
  int iVar1;
  bfd *pbVar2;
  bfd *pbVar3;
  
  if (postype == pos_default) {
    pbVar2 = *contents;
    if (default_pos != pos_end) goto LAB_000138a0;
  }
  else {
    pbVar2 = *contents;
    default_pos = postype;
    default_posname = posname;
    if (postype != pos_end) {
LAB_000138a0:
      while( true ) {
        if (pbVar2 == (bfd *)0x0) {
          return contents;
        }
        iVar1 = filename_cmp(pbVar2->filename,default_posname);
        if (iVar1 == 0) break;
        pbVar2 = *contents;
        contents = &pbVar2->archive_next;
        pbVar2 = pbVar2->archive_next;
      }
      if (default_pos != pos_after) {
        return contents;
      }
      return &(*contents)->archive_next;
    }
  }
  if (pbVar2 == (bfd *)0x0) {
    return contents;
  }
  do {
    pbVar3 = pbVar2;
    pbVar2 = pbVar3->archive_next;
  } while (pbVar2 != (bfd *)0x0);
  return &pbVar3->archive_next;
}



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

int * __regparm3 FUN_00013850(int *param_1,int param_2,undefined4 param_3)

{
  int iVar1;
  undefined4 *puVar2;
  undefined4 *puVar3;
  
  if (DAT_00021254 == 0) {
    puVar2 = (undefined4 *)*param_1;
    if (param_2 != 3) goto LAB_000138a0;
  }
  else {
    puVar2 = (undefined4 *)*param_1;
    param_2 = DAT_00021254;
    param_3 = DAT_00021258;
    if (DAT_00021254 != 3) {
LAB_000138a0:
      while( true ) {
        if (puVar2 == (undefined4 *)0x0) {
          return param_1;
        }
        iVar1 = filename_cmp(*puVar2,param_3);
        if (iVar1 == 0) break;
        iVar1 = *param_1;
        param_1 = (int *)(iVar1 + 0x90);
        puVar2 = *(undefined4 **)(iVar1 + 0x90);
      }
      if (param_2 != 2) {
        return param_1;
      }
      return (int *)(*param_1 + 0x90);
    }
  }
  if (puVar2 == (undefined4 *)0x0) {
    return param_1;
  }
  do {
    puVar3 = puVar2;
    puVar2 = (undefined4 *)puVar3[0x24];
  } while (puVar2 != (undefined4 *)0x0);
  return puVar3 + 0x24;
}


PUSH EBP
PUSH EDI
PUSH ESI
MOV ESI,EAX
PUSH EBX
CALL 0x00013710
ADD EBX,0xd7a5
SUB ESP,0xc
MOV EAX,dword ptr [EBX + 0x254]
TEST EAX,EAX
JZ 0x000138b0
MOV EBP,EAX
MOV EDI,dword ptr [EBX + 0x258]
MOV EAX,dword ptr [ESI]
CMP EBP,0x3
JNZ 0x000138a0
JMP 0x000138bb
SUB ESP,0x8
PUSH EDI
PUSH dword ptr [EAX]
CALL 0x00012130
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000138e8
MOV EAX,dword ptr [ESI]
LEA ESI,[EAX + 0x90]
MOV EAX,dword ptr [EAX + 0x90]
TEST EAX,EAX
JNZ 0x00013880
MOV EAX,ESI
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EBP,EDX
MOV EDI,ECX
MOV EAX,dword ptr [ESI]
CMP EBP,0x3
JNZ 0x000138a0
TEST EAX,EAX
JNZ 0x000138ca
JMP 0x000138a4
MOV EAX,EDX
MOV EDX,dword ptr [EAX + 0x90]
TEST EDX,EDX
JNZ 0x000138c8
ADD ESP,0xc
ADD EAX,0x90
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,ESI
CMP EBP,0x2
JNZ 0x000138a6
MOV ESI,dword ptr [ESI]
ADD ESP,0xc
POP EBX
LEA EAX,[ESI + 0x90]
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint * __regparm3 FUN_00013850(int *param_1,int param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  \n  if (DAT_00021254 == 0) {\n    puVar2 = (undefined4 *)*param_1;\n    if (param_2 != 3) goto LAB_000138a0;\n  }\n  else {\n    puVar2 = (undefined4 *)*param_1;\n    param_2 = DAT_00021254;\n    param_3 = DAT_00021258;\n    if (DAT_00021254 != 3) {\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }\n  }\n  if (puVar2 == (undefined4 *)0x0) {\n    return param_1;\n  }\n  do {\n    puVar3 = puVar2;\n    puVar2 = (undefined4 *)puVar3[0x24];\n  } while (puVar2 != (undefined4 *)0x0);\n  return puVar3 + 0x24;\n}\n\n" comment (function_definition "int * __regparm3 FUN_00013850(int *param_1,int param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  \n  if (DAT_00021254 == 0) {\n    puVar2 = (undefined4 *)*param_1;\n    if (param_2 != 3) goto LAB_000138a0;\n  }\n  else {\n    puVar2 = (undefined4 *)*param_1;\n    param_2 = DAT_00021254;\n    param_3 = DAT_00021258;\n    if (DAT_00021254 != 3) {\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }\n  }\n  if (puVar2 == (undefined4 *)0x0) {\n    return param_1;\n  }\n  do {\n    puVar3 = puVar2;\n    puVar2 = (undefined4 *)puVar3[0x24];\n  } while (puVar2 != (undefined4 *)0x0);\n  return puVar3 + 0x24;\n}" primitive_type (pointer_declarator "* __regparm3 FUN_00013850(int *param_1,int param_2,undefined4 param_3)" * (ERROR "__regparm3" identifier) (function_declarator "FUN_00013850(int *param_1,int param_2,undefined4 param_3)" identifier (parameter_list "(int *param_1,int param_2,undefined4 param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) )))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  \n  if (DAT_00021254 == 0) {\n    puVar2 = (undefined4 *)*param_1;\n    if (param_2 != 3) goto LAB_000138a0;\n  }\n  else {\n    puVar2 = (undefined4 *)*param_1;\n    param_2 = DAT_00021254;\n    param_3 = DAT_00021258;\n    if (DAT_00021254 != 3) {\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }\n  }\n  if (puVar2 == (undefined4 *)0x0) {\n    return param_1;\n  }\n  do {\n    puVar3 = puVar2;\n    puVar2 = (undefined4 *)puVar3[0x24];\n  } while (puVar2 != (undefined4 *)0x0);\n  return puVar3 + 0x24;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (if_statement "if (DAT_00021254 == 0) {\n    puVar2 = (undefined4 *)*param_1;\n    if (param_2 != 3) goto LAB_000138a0;\n  }\n  else {\n    puVar2 = (undefined4 *)*param_1;\n    param_2 = DAT_00021254;\n    param_3 = DAT_00021258;\n    if (DAT_00021254 != 3) {\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }\n  }" if (parenthesized_expression "(DAT_00021254 == 0)" ( (binary_expression "DAT_00021254 == 0" identifier == number_literal) )) (compound_statement "{\n    puVar2 = (undefined4 *)*param_1;\n    if (param_2 != 3) goto LAB_000138a0;\n  }" { (expression_statement "puVar2 = (undefined4 *)*param_1;" (assignment_expression "puVar2 = (undefined4 *)*param_1" identifier = (cast_expression "(undefined4 *)*param_1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if (param_2 != 3) goto LAB_000138a0;" if (parenthesized_expression "(param_2 != 3)" ( (binary_expression "param_2 != 3" identifier != number_literal) )) (goto_statement "goto LAB_000138a0;" goto statement_identifier ;)) }) (else_clause "else {\n    puVar2 = (undefined4 *)*param_1;\n    param_2 = DAT_00021254;\n    param_3 = DAT_00021258;\n    if (DAT_00021254 != 3) {\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }\n  }" else (compound_statement "{\n    puVar2 = (undefined4 *)*param_1;\n    param_2 = DAT_00021254;\n    param_3 = DAT_00021258;\n    if (DAT_00021254 != 3) {\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }\n  }" { (expression_statement "puVar2 = (undefined4 *)*param_1;" (assignment_expression "puVar2 = (undefined4 *)*param_1" identifier = (cast_expression "(undefined4 *)*param_1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "param_2 = DAT_00021254;" (assignment_expression "param_2 = DAT_00021254" identifier = identifier) ;) (expression_statement "param_3 = DAT_00021258;" (assignment_expression "param_3 = DAT_00021258" identifier = identifier) ;) (if_statement "if (DAT_00021254 != 3) {\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }" if (parenthesized_expression "(DAT_00021254 != 3)" ( (binary_expression "DAT_00021254 != 3" identifier != number_literal) )) (compound_statement "{\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }" { (labeled_statement "LAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }" statement_identifier : (while_statement "while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }" { (if_statement "if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }" if (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" ( (binary_expression "puVar2 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          return param_1;\n        }" { (return_statement "return param_1;" return identifier ;) })) (expression_statement "iVar1 = filename_cmp(*puVar2,param_3);" (assignment_expression "iVar1 = filename_cmp(*puVar2,param_3)" identifier = (call_expression "filename_cmp(*puVar2,param_3)" identifier (argument_list "(*puVar2,param_3)" ( (pointer_expression "*puVar2" * identifier) , identifier )))) ;) (if_statement "if (iVar1 == 0) break;" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "param_1 = (int *)(iVar1 + 0x90);" (assignment_expression "param_1 = (int *)(iVar1 + 0x90)" identifier = (cast_expression "(int *)(iVar1 + 0x90)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x90)" ( (binary_expression "iVar1 + 0x90" identifier + number_literal) )))) ;) (expression_statement "puVar2 = *(undefined4 **)(iVar1 + 0x90);" (assignment_expression "puVar2 = *(undefined4 **)(iVar1 + 0x90)" identifier = (pointer_expression "*(undefined4 **)(iVar1 + 0x90)" * (cast_expression "(undefined4 **)(iVar1 + 0x90)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar1 + 0x90)" ( (binary_expression "iVar1 + 0x90" identifier + number_literal) ))))) ;) }))) (if_statement "if (param_2 != 2) {\n        return param_1;\n      }" if (parenthesized_expression "(param_2 != 2)" ( (binary_expression "param_2 != 2" identifier != number_literal) )) (compound_statement "{\n        return param_1;\n      }" { (return_statement "return param_1;" return identifier ;) })) (return_statement "return (int *)(*param_1 + 0x90);" return (cast_expression "(int *)(*param_1 + 0x90)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x90)" ( (binary_expression "*param_1 + 0x90" (pointer_expression "*param_1" * identifier) + number_literal) ))) ;) })) }))) (if_statement "if (puVar2 == (undefined4 *)0x0) {\n    return param_1;\n  }" if (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" ( (binary_expression "puVar2 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return param_1;\n  }" { (return_statement "return param_1;" return identifier ;) })) (do_statement "do {\n    puVar3 = puVar2;\n    puVar2 = (undefined4 *)puVar3[0x24];\n  } while (puVar2 != (undefined4 *)0x0);" do (compound_statement "{\n    puVar3 = puVar2;\n    puVar2 = (undefined4 *)puVar3[0x24];\n  }" { (expression_statement "puVar3 = puVar2;" (assignment_expression "puVar3 = puVar2" identifier = identifier) ;) (expression_statement "puVar2 = (undefined4 *)puVar3[0x24];" (assignment_expression "puVar2 = (undefined4 *)puVar3[0x24]" identifier = (cast_expression "(undefined4 *)puVar3[0x24]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar3[0x24]" identifier [ number_literal ]))) ;) }) while (parenthesized_expression "(puVar2 != (undefined4 *)0x0)" ( (binary_expression "puVar2 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (return_statement "return puVar3 + 0x24;" return (binary_expression "puVar3 + 0x24" identifier + number_literal) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nbfd ** __regparm3 get_pos_bfd(bfd **contents,pos default_pos,char *default_posname)\n\n{\n  int iVar1;\n  bfd *pbVar2;\n  bfd *pbVar3;\n  \n  if (postype == pos_default) {\n    pbVar2 = *contents;\n    if (default_pos != pos_end) goto LAB_000138a0;\n  }\n  else {\n    pbVar2 = *contents;\n    default_pos = postype;\n    default_posname = posname;\n    if (postype != pos_end) {\nLAB_000138a0:\n      while( true ) {\n        if (pbVar2 == (bfd *)0x0) {\n          return contents;\n        }\n        iVar1 = filename_cmp(pbVar2->filename,default_posname);\n        if (iVar1 == 0) break;\n        pbVar2 = *contents;\n        contents = &pbVar2->archive_next;\n        pbVar2 = pbVar2->archive_next;\n      }\n      if (default_pos != pos_after) {\n        return contents;\n      }\n      return &(*contents)->archive_next;\n    }\n  }\n  if (pbVar2 == (bfd *)0x0) {\n    return contents;\n  }\n  do {\n    pbVar3 = pbVar2;\n    pbVar2 = pbVar3->archive_next;\n  } while (pbVar2 != (bfd *)0x0);\n  return &pbVar3->archive_next;\n}\n\n" comment (ERROR "bfd ** __regparm3 get_pos_bfd(bfd **contents,pos default_pos,char *default_posname)" (binary_expression "bfd ** __regparm3 get_pos_bfd(bfd **contents,pos default_pos,char *default_posname)" identifier * (ERROR "* __regparm3" (pointer_expression "* __regparm3" * identifier)) (call_expression "get_pos_bfd(bfd **contents,pos default_pos,char *default_posname)" identifier (argument_list "(bfd **contents,pos default_pos,char *default_posname)" ( (binary_expression "bfd **contents" identifier * (pointer_expression "*contents" * identifier)) , (ERROR "pos" identifier) identifier , (binary_expression "char *default_posname" identifier * identifier) ))))) (compound_statement "{\n  int iVar1;\n  bfd *pbVar2;\n  bfd *pbVar3;\n  \n  if (postype == pos_default) {\n    pbVar2 = *contents;\n    if (default_pos != pos_end) goto LAB_000138a0;\n  }\n  else {\n    pbVar2 = *contents;\n    default_pos = postype;\n    default_posname = posname;\n    if (postype != pos_end) {\nLAB_000138a0:\n      while( true ) {\n        if (pbVar2 == (bfd *)0x0) {\n          return contents;\n        }\n        iVar1 = filename_cmp(pbVar2->filename,default_posname);\n        if (iVar1 == 0) break;\n        pbVar2 = *contents;\n        contents = &pbVar2->archive_next;\n        pbVar2 = pbVar2->archive_next;\n      }\n      if (default_pos != pos_after) {\n        return contents;\n      }\n      return &(*contents)->archive_next;\n    }\n  }\n  if (pbVar2 == (bfd *)0x0) {\n    return contents;\n  }\n  do {\n    pbVar3 = pbVar2;\n    pbVar2 = pbVar3->archive_next;\n  } while (pbVar2 != (bfd *)0x0);\n  return &pbVar3->archive_next;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "bfd *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "bfd *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (if_statement "if (postype == pos_default) {\n    pbVar2 = *contents;\n    if (default_pos != pos_end) goto LAB_000138a0;\n  }\n  else {\n    pbVar2 = *contents;\n    default_pos = postype;\n    default_posname = posname;\n    if (postype != pos_end) {\nLAB_000138a0:\n      while( true ) {\n        if (pbVar2 == (bfd *)0x0) {\n          return contents;\n        }\n        iVar1 = filename_cmp(pbVar2->filename,default_posname);\n        if (iVar1 == 0) break;\n        pbVar2 = *contents;\n        contents = &pbVar2->archive_next;\n        pbVar2 = pbVar2->archive_next;\n      }\n      if (default_pos != pos_after) {\n        return contents;\n      }\n      return &(*contents)->archive_next;\n    }\n  }" if (parenthesized_expression "(postype == pos_default)" ( (binary_expression "postype == pos_default" identifier == identifier) )) (compound_statement "{\n    pbVar2 = *contents;\n    if (default_pos != pos_end) goto LAB_000138a0;\n  }" { (expression_statement "pbVar2 = *contents;" (assignment_expression "pbVar2 = *contents" identifier = (pointer_expression "*contents" * identifier)) ;) (if_statement "if (default_pos != pos_end) goto LAB_000138a0;" if (parenthesized_expression "(default_pos != pos_end)" ( (binary_expression "default_pos != pos_end" identifier != identifier) )) (goto_statement "goto LAB_000138a0;" goto statement_identifier ;)) }) (else_clause "else {\n    pbVar2 = *contents;\n    default_pos = postype;\n    default_posname = posname;\n    if (postype != pos_end) {\nLAB_000138a0:\n      while( true ) {\n        if (pbVar2 == (bfd *)0x0) {\n          return contents;\n        }\n        iVar1 = filename_cmp(pbVar2->filename,default_posname);\n        if (iVar1 == 0) break;\n        pbVar2 = *contents;\n        contents = &pbVar2->archive_next;\n        pbVar2 = pbVar2->archive_next;\n      }\n      if (default_pos != pos_after) {\n        return contents;\n      }\n      return &(*contents)->archive_next;\n    }\n  }" else (compound_statement "{\n    pbVar2 = *contents;\n    default_pos = postype;\n    default_posname = posname;\n    if (postype != pos_end) {\nLAB_000138a0:\n      while( true ) {\n        if (pbVar2 == (bfd *)0x0) {\n          return contents;\n        }\n        iVar1 = filename_cmp(pbVar2->filename,default_posname);\n        if (iVar1 == 0) break;\n        pbVar2 = *contents;\n        contents = &pbVar2->archive_next;\n        pbVar2 = pbVar2->archive_next;\n      }\n      if (default_pos != pos_after) {\n        return contents;\n      }\n      return &(*contents)->archive_next;\n    }\n  }" { (expression_statement "pbVar2 = *contents;" (assignment_expression "pbVar2 = *contents" identifier = (pointer_expression "*contents" * identifier)) ;) (expression_statement "default_pos = postype;" (assignment_expression "default_pos = postype" identifier = identifier) ;) (expression_statement "default_posname = posname;" (assignment_expression "default_posname = posname" identifier = identifier) ;) (if_statement "if (postype != pos_end) {\nLAB_000138a0:\n      while( true ) {\n        if (pbVar2 == (bfd *)0x0) {\n          return contents;\n        }\n        iVar1 = filename_cmp(pbVar2->filename,default_posname);\n        if (iVar1 == 0) break;\n        pbVar2 = *contents;\n        contents = &pbVar2->archive_next;\n        pbVar2 = pbVar2->archive_next;\n      }\n      if (default_pos != pos_after) {\n        return contents;\n      }\n      return &(*contents)->archive_next;\n    }" if (parenthesized_expression "(postype != pos_end)" ( (binary_expression "postype != pos_end" identifier != identifier) )) (compound_statement "{\nLAB_000138a0:\n      while( true ) {\n        if (pbVar2 == (bfd *)0x0) {\n          return contents;\n        }\n        iVar1 = filename_cmp(pbVar2->filename,default_posname);\n        if (iVar1 == 0) break;\n        pbVar2 = *contents;\n        contents = &pbVar2->archive_next;\n        pbVar2 = pbVar2->archive_next;\n      }\n      if (default_pos != pos_after) {\n        return contents;\n      }\n      return &(*contents)->archive_next;\n    }" { (labeled_statement "LAB_000138a0:\n      while( true ) {\n        if (pbVar2 == (bfd *)0x0) {\n          return contents;\n        }\n        iVar1 = filename_cmp(pbVar2->filename,default_posname);\n        if (iVar1 == 0) break;\n        pbVar2 = *contents;\n        contents = &pbVar2->archive_next;\n        pbVar2 = pbVar2->archive_next;\n      }" statement_identifier : (while_statement "while( true ) {\n        if (pbVar2 == (bfd *)0x0) {\n          return contents;\n        }\n        iVar1 = filename_cmp(pbVar2->filename,default_posname);\n        if (iVar1 == 0) break;\n        pbVar2 = *contents;\n        contents = &pbVar2->archive_next;\n        pbVar2 = pbVar2->archive_next;\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        if (pbVar2 == (bfd *)0x0) {\n          return contents;\n        }\n        iVar1 = filename_cmp(pbVar2->filename,default_posname);\n        if (iVar1 == 0) break;\n        pbVar2 = *contents;\n        contents = &pbVar2->archive_next;\n        pbVar2 = pbVar2->archive_next;\n      }" { (if_statement "if (pbVar2 == (bfd *)0x0) {\n          return contents;\n        }" if (parenthesized_expression "(pbVar2 == (bfd *)0x0)" ( (binary_expression "pbVar2 == (bfd *)0x0" identifier == (cast_expression "(bfd *)0x0" ( (type_descriptor "bfd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          return contents;\n        }" { (return_statement "return contents;" return identifier ;) })) (expression_statement "iVar1 = filename_cmp(pbVar2->filename,default_posname);" (assignment_expression "iVar1 = filename_cmp(pbVar2->filename,default_posname)" identifier = (call_expression "filename_cmp(pbVar2->filename,default_posname)" identifier (argument_list "(pbVar2->filename,default_posname)" ( (field_expression "pbVar2->filename" identifier -> field_identifier) , identifier )))) ;) (if_statement "if (iVar1 == 0) break;" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "pbVar2 = *contents;" (assignment_expression "pbVar2 = *contents" identifier = (pointer_expression "*contents" * identifier)) ;) (expression_statement "contents = &pbVar2->archive_next;" (assignment_expression "contents = &pbVar2->archive_next" identifier = (pointer_expression "&pbVar2->archive_next" & (field_expression "pbVar2->archive_next" identifier -> field_identifier))) ;) (expression_statement "pbVar2 = pbVar2->archive_next;" (assignment_expression "pbVar2 = pbVar2->archive_next" identifier = (field_expression "pbVar2->archive_next" identifier -> field_identifier)) ;) }))) (if_statement "if (default_pos != pos_after) {\n        return contents;\n      }" if (parenthesized_expression "(default_pos != pos_after)" ( (binary_expression "default_pos != pos_after" identifier != identifier) )) (compound_statement "{\n        return contents;\n      }" { (return_statement "return contents;" return identifier ;) })) (return_statement "return &(*contents)->archive_next;" return (pointer_expression "&(*contents)->archive_next" & (field_expression "(*contents)->archive_next" (parenthesized_expression "(*contents)" ( (pointer_expression "*contents" * identifier) )) -> field_identifier)) ;) })) }))) (if_statement "if (pbVar2 == (bfd *)0x0) {\n    return contents;\n  }" if (parenthesized_expression "(pbVar2 == (bfd *)0x0)" ( (binary_expression "pbVar2 == (bfd *)0x0" identifier == (cast_expression "(bfd *)0x0" ( (type_descriptor "bfd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return contents;\n  }" { (return_statement "return contents;" return identifier ;) })) (do_statement "do {\n    pbVar3 = pbVar2;\n    pbVar2 = pbVar3->archive_next;\n  } while (pbVar2 != (bfd *)0x0);" do (compound_statement "{\n    pbVar3 = pbVar2;\n    pbVar2 = pbVar3->archive_next;\n  }" { (expression_statement "pbVar3 = pbVar2;" (assignment_expression "pbVar3 = pbVar2" identifier = identifier) ;) (expression_statement "pbVar2 = pbVar3->archive_next;" (assignment_expression "pbVar2 = pbVar3->archive_next" identifier = (field_expression "pbVar3->archive_next" identifier -> field_identifier)) ;) }) while (parenthesized_expression "(pbVar2 != (bfd *)0x0)" ( (binary_expression "pbVar2 != (bfd *)0x0" identifier != (cast_expression "(bfd *)0x0" ( (type_descriptor "bfd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (return_statement "return &pbVar3->archive_next;" return (pointer_expression "&pbVar3->archive_next" & (field_expression "pbVar3->archive_next" identifier -> field_identifier)) ;) }))
(translation_unit "int * __regparm3 FUN_00013850(int *param_1,int param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  \n  if (DAT_00021254 == 0) {\n    puVar2 = (undefined4 *)*param_1;\n    if (param_2 != 3) goto LAB_000138a0;\n  }\n  else {\n    puVar2 = (undefined4 *)*param_1;\n    param_2 = DAT_00021254;\n    param_3 = DAT_00021258;\n    if (DAT_00021254 != 3) {\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }\n  }\n  if (puVar2 == (undefined4 *)0x0) {\n    return param_1;\n  }\n  do {\n    puVar3 = puVar2;\n    puVar2 = (undefined4 *)puVar3[0x24];\n  } while (puVar2 != (undefined4 *)0x0);\n  return puVar3 + 0x24;\n}\n\n" (function_definition "int * __regparm3 FUN_00013850(int *param_1,int param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  \n  if (DAT_00021254 == 0) {\n    puVar2 = (undefined4 *)*param_1;\n    if (param_2 != 3) goto LAB_000138a0;\n  }\n  else {\n    puVar2 = (undefined4 *)*param_1;\n    param_2 = DAT_00021254;\n    param_3 = DAT_00021258;\n    if (DAT_00021254 != 3) {\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }\n  }\n  if (puVar2 == (undefined4 *)0x0) {\n    return param_1;\n  }\n  do {\n    puVar3 = puVar2;\n    puVar2 = (undefined4 *)puVar3[0x24];\n  } while (puVar2 != (undefined4 *)0x0);\n  return puVar3 + 0x24;\n}" primitive_type (pointer_declarator "* __regparm3 FUN_00013850(int *param_1,int param_2,undefined4 param_3)" * (ERROR "__regparm3" identifier) (function_declarator "FUN_00013850(int *param_1,int param_2,undefined4 param_3)" identifier (parameter_list "(int *param_1,int param_2,undefined4 param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) )))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  \n  if (DAT_00021254 == 0) {\n    puVar2 = (undefined4 *)*param_1;\n    if (param_2 != 3) goto LAB_000138a0;\n  }\n  else {\n    puVar2 = (undefined4 *)*param_1;\n    param_2 = DAT_00021254;\n    param_3 = DAT_00021258;\n    if (DAT_00021254 != 3) {\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }\n  }\n  if (puVar2 == (undefined4 *)0x0) {\n    return param_1;\n  }\n  do {\n    puVar3 = puVar2;\n    puVar2 = (undefined4 *)puVar3[0x24];\n  } while (puVar2 != (undefined4 *)0x0);\n  return puVar3 + 0x24;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (if_statement "if (DAT_00021254 == 0) {\n    puVar2 = (undefined4 *)*param_1;\n    if (param_2 != 3) goto LAB_000138a0;\n  }\n  else {\n    puVar2 = (undefined4 *)*param_1;\n    param_2 = DAT_00021254;\n    param_3 = DAT_00021258;\n    if (DAT_00021254 != 3) {\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }\n  }" if (parenthesized_expression "(DAT_00021254 == 0)" ( (binary_expression "DAT_00021254 == 0" identifier == number_literal) )) (compound_statement "{\n    puVar2 = (undefined4 *)*param_1;\n    if (param_2 != 3) goto LAB_000138a0;\n  }" { (expression_statement "puVar2 = (undefined4 *)*param_1;" (assignment_expression "puVar2 = (undefined4 *)*param_1" identifier = (cast_expression "(undefined4 *)*param_1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if (param_2 != 3) goto LAB_000138a0;" if (parenthesized_expression "(param_2 != 3)" ( (binary_expression "param_2 != 3" identifier != number_literal) )) (goto_statement "goto LAB_000138a0;" goto statement_identifier ;)) }) (else_clause "else {\n    puVar2 = (undefined4 *)*param_1;\n    param_2 = DAT_00021254;\n    param_3 = DAT_00021258;\n    if (DAT_00021254 != 3) {\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }\n  }" else (compound_statement "{\n    puVar2 = (undefined4 *)*param_1;\n    param_2 = DAT_00021254;\n    param_3 = DAT_00021258;\n    if (DAT_00021254 != 3) {\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }\n  }" { (expression_statement "puVar2 = (undefined4 *)*param_1;" (assignment_expression "puVar2 = (undefined4 *)*param_1" identifier = (cast_expression "(undefined4 *)*param_1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "param_2 = DAT_00021254;" (assignment_expression "param_2 = DAT_00021254" identifier = identifier) ;) (expression_statement "param_3 = DAT_00021258;" (assignment_expression "param_3 = DAT_00021258" identifier = identifier) ;) (if_statement "if (DAT_00021254 != 3) {\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }" if (parenthesized_expression "(DAT_00021254 != 3)" ( (binary_expression "DAT_00021254 != 3" identifier != number_literal) )) (compound_statement "{\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }" { (labeled_statement "LAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }" statement_identifier : (while_statement "while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }" { (if_statement "if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }" if (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" ( (binary_expression "puVar2 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          return param_1;\n        }" { (return_statement "return param_1;" return identifier ;) })) (expression_statement "iVar1 = filename_cmp(*puVar2,param_3);" (assignment_expression "iVar1 = filename_cmp(*puVar2,param_3)" identifier = (call_expression "filename_cmp(*puVar2,param_3)" identifier (argument_list "(*puVar2,param_3)" ( (pointer_expression "*puVar2" * identifier) , identifier )))) ;) (if_statement "if (iVar1 == 0) break;" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "param_1 = (int *)(iVar1 + 0x90);" (assignment_expression "param_1 = (int *)(iVar1 + 0x90)" identifier = (cast_expression "(int *)(iVar1 + 0x90)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x90)" ( (binary_expression "iVar1 + 0x90" identifier + number_literal) )))) ;) (expression_statement "puVar2 = *(undefined4 **)(iVar1 + 0x90);" (assignment_expression "puVar2 = *(undefined4 **)(iVar1 + 0x90)" identifier = (pointer_expression "*(undefined4 **)(iVar1 + 0x90)" * (cast_expression "(undefined4 **)(iVar1 + 0x90)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar1 + 0x90)" ( (binary_expression "iVar1 + 0x90" identifier + number_literal) ))))) ;) }))) (if_statement "if (param_2 != 2) {\n        return param_1;\n      }" if (parenthesized_expression "(param_2 != 2)" ( (binary_expression "param_2 != 2" identifier != number_literal) )) (compound_statement "{\n        return param_1;\n      }" { (return_statement "return param_1;" return identifier ;) })) (return_statement "return (int *)(*param_1 + 0x90);" return (cast_expression "(int *)(*param_1 + 0x90)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x90)" ( (binary_expression "*param_1 + 0x90" (pointer_expression "*param_1" * identifier) + number_literal) ))) ;) })) }))) (if_statement "if (puVar2 == (undefined4 *)0x0) {\n    return param_1;\n  }" if (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" ( (binary_expression "puVar2 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return param_1;\n  }" { (return_statement "return param_1;" return identifier ;) })) (do_statement "do {\n    puVar3 = puVar2;\n    puVar2 = (undefined4 *)puVar3[0x24];\n  } while (puVar2 != (undefined4 *)0x0);" do (compound_statement "{\n    puVar3 = puVar2;\n    puVar2 = (undefined4 *)puVar3[0x24];\n  }" { (expression_statement "puVar3 = puVar2;" (assignment_expression "puVar3 = puVar2" identifier = identifier) ;) (expression_statement "puVar2 = (undefined4 *)puVar3[0x24];" (assignment_expression "puVar2 = (undefined4 *)puVar3[0x24]" identifier = (cast_expression "(undefined4 *)puVar3[0x24]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar3[0x24]" identifier [ number_literal ]))) ;) }) while (parenthesized_expression "(puVar2 != (undefined4 *)0x0)" ( (binary_expression "puVar2 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (return_statement "return puVar3 + 0x24;" return (binary_expression "puVar3 + 0x24" identifier + number_literal) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (labeled_statement statement_identifier : (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (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 IDENT != LIT) )) (compound_statement { (return_statement return IDENT ;) })) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))) ;) })) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return IDENT ;) })) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) ;) (return_statement return (binary_expression IDENT + LIT) ;) })))
(function_definition "int * __regparm3 FUN_00013850(int *param_1,int param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  \n  if (DAT_00021254 == 0) {\n    puVar2 = (undefined4 *)*param_1;\n    if (param_2 != 3) goto LAB_000138a0;\n  }\n  else {\n    puVar2 = (undefined4 *)*param_1;\n    param_2 = DAT_00021254;\n    param_3 = DAT_00021258;\n    if (DAT_00021254 != 3) {\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }\n  }\n  if (puVar2 == (undefined4 *)0x0) {\n    return param_1;\n  }\n  do {\n    puVar3 = puVar2;\n    puVar2 = (undefined4 *)puVar3[0x24];\n  } while (puVar2 != (undefined4 *)0x0);\n  return puVar3 + 0x24;\n}" (primitive_type "int") (pointer_declarator "* __regparm3 FUN_00013850(int *param_1,int param_2,undefined4 param_3)" (* "*") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00013850(int *param_1,int param_2,undefined4 param_3)" (identifier "FUN_00013850") (parameter_list "(int *param_1,int param_2,undefined4 param_3)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")")))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  \n  if (DAT_00021254 == 0) {\n    puVar2 = (undefined4 *)*param_1;\n    if (param_2 != 3) goto LAB_000138a0;\n  }\n  else {\n    puVar2 = (undefined4 *)*param_1;\n    param_2 = DAT_00021254;\n    param_3 = DAT_00021258;\n    if (DAT_00021254 != 3) {\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }\n  }\n  if (puVar2 == (undefined4 *)0x0) {\n    return param_1;\n  }\n  do {\n    puVar3 = puVar2;\n    puVar2 = (undefined4 *)puVar3[0x24];\n  } while (puVar2 != (undefined4 *)0x0);\n  return puVar3 + 0x24;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 *puVar2;" (type_identifier "undefined4") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined4 *puVar3;" (type_identifier "undefined4") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (if_statement "if (DAT_00021254 == 0) {\n    puVar2 = (undefined4 *)*param_1;\n    if (param_2 != 3) goto LAB_000138a0;\n  }\n  else {\n    puVar2 = (undefined4 *)*param_1;\n    param_2 = DAT_00021254;\n    param_3 = DAT_00021258;\n    if (DAT_00021254 != 3) {\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }\n  }" (if "if") (parenthesized_expression "(DAT_00021254 == 0)" (( "(") (binary_expression "DAT_00021254 == 0" (identifier "DAT_00021254") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    puVar2 = (undefined4 *)*param_1;\n    if (param_2 != 3) goto LAB_000138a0;\n  }" ({ "{") (expression_statement "puVar2 = (undefined4 *)*param_1;" (assignment_expression "puVar2 = (undefined4 *)*param_1" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)*param_1" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (if_statement "if (param_2 != 3) goto LAB_000138a0;" (if "if") (parenthesized_expression "(param_2 != 3)" (( "(") (binary_expression "param_2 != 3" (identifier "param_2") (!= "!=") (number_literal "3")) () ")")) (goto_statement "goto LAB_000138a0;" (goto "goto") (statement_identifier "LAB_000138a0") (; ";"))) (} "}")) (else_clause "else {\n    puVar2 = (undefined4 *)*param_1;\n    param_2 = DAT_00021254;\n    param_3 = DAT_00021258;\n    if (DAT_00021254 != 3) {\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }\n  }" (else "else") (compound_statement "{\n    puVar2 = (undefined4 *)*param_1;\n    param_2 = DAT_00021254;\n    param_3 = DAT_00021258;\n    if (DAT_00021254 != 3) {\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }\n  }" ({ "{") (expression_statement "puVar2 = (undefined4 *)*param_1;" (assignment_expression "puVar2 = (undefined4 *)*param_1" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)*param_1" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "param_2 = DAT_00021254;" (assignment_expression "param_2 = DAT_00021254" (identifier "param_2") (= "=") (identifier "DAT_00021254")) (; ";")) (expression_statement "param_3 = DAT_00021258;" (assignment_expression "param_3 = DAT_00021258" (identifier "param_3") (= "=") (identifier "DAT_00021258")) (; ";")) (if_statement "if (DAT_00021254 != 3) {\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }" (if "if") (parenthesized_expression "(DAT_00021254 != 3)" (( "(") (binary_expression "DAT_00021254 != 3" (identifier "DAT_00021254") (!= "!=") (number_literal "3")) () ")")) (compound_statement "{\nLAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }\n      if (param_2 != 2) {\n        return param_1;\n      }\n      return (int *)(*param_1 + 0x90);\n    }" ({ "{") (labeled_statement "LAB_000138a0:\n      while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }" (statement_identifier "LAB_000138a0") (: ":") (while_statement "while( true ) {\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n        if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }\n        iVar1 = filename_cmp(*puVar2,param_3);\n        if (iVar1 == 0) break;\n        iVar1 = *param_1;\n        param_1 = (int *)(iVar1 + 0x90);\n        puVar2 = *(undefined4 **)(iVar1 + 0x90);\n      }" ({ "{") (if_statement "if (puVar2 == (undefined4 *)0x0) {\n          return param_1;\n        }" (if "if") (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" (( "(") (binary_expression "puVar2 == (undefined4 *)0x0" (identifier "puVar2") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n          return param_1;\n        }" ({ "{") (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (expression_statement "iVar1 = filename_cmp(*puVar2,param_3);" (assignment_expression "iVar1 = filename_cmp(*puVar2,param_3)" (identifier "iVar1") (= "=") (call_expression "filename_cmp(*puVar2,param_3)" (identifier "filename_cmp") (argument_list "(*puVar2,param_3)" (( "(") (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) break;" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" (identifier "iVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "param_1 = (int *)(iVar1 + 0x90);" (assignment_expression "param_1 = (int *)(iVar1 + 0x90)" (identifier "param_1") (= "=") (cast_expression "(int *)(iVar1 + 0x90)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x90)" (( "(") (binary_expression "iVar1 + 0x90" (identifier "iVar1") (+ "+") (number_literal "0x90")) () ")")))) (; ";")) (expression_statement "puVar2 = *(undefined4 **)(iVar1 + 0x90);" (assignment_expression "puVar2 = *(undefined4 **)(iVar1 + 0x90)" (identifier "puVar2") (= "=") (pointer_expression "*(undefined4 **)(iVar1 + 0x90)" (* "*") (cast_expression "(undefined4 **)(iVar1 + 0x90)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar1 + 0x90)" (( "(") (binary_expression "iVar1 + 0x90" (identifier "iVar1") (+ "+") (number_literal "0x90")) () ")"))))) (; ";")) (} "}")))) (if_statement "if (param_2 != 2) {\n        return param_1;\n      }" (if "if") (parenthesized_expression "(param_2 != 2)" (( "(") (binary_expression "param_2 != 2" (identifier "param_2") (!= "!=") (number_literal "2")) () ")")) (compound_statement "{\n        return param_1;\n      }" ({ "{") (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (return_statement "return (int *)(*param_1 + 0x90);" (return "return") (cast_expression "(int *)(*param_1 + 0x90)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 0x90)" (( "(") (binary_expression "*param_1 + 0x90" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x90")) () ")"))) (; ";")) (} "}"))) (} "}")))) (if_statement "if (puVar2 == (undefined4 *)0x0) {\n    return param_1;\n  }" (if "if") (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" (( "(") (binary_expression "puVar2 == (undefined4 *)0x0" (identifier "puVar2") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    return param_1;\n  }" ({ "{") (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (do_statement "do {\n    puVar3 = puVar2;\n    puVar2 = (undefined4 *)puVar3[0x24];\n  } while (puVar2 != (undefined4 *)0x0);" (do "do") (compound_statement "{\n    puVar3 = puVar2;\n    puVar2 = (undefined4 *)puVar3[0x24];\n  }" ({ "{") (expression_statement "puVar3 = puVar2;" (assignment_expression "puVar3 = puVar2" (identifier "puVar3") (= "=") (identifier "puVar2")) (; ";")) (expression_statement "puVar2 = (undefined4 *)puVar3[0x24];" (assignment_expression "puVar2 = (undefined4 *)puVar3[0x24]" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)puVar3[0x24]" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar3[0x24]" (identifier "puVar3") ([ "[") (number_literal "0x24") (] "]")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(puVar2 != (undefined4 *)0x0)" (( "(") (binary_expression "puVar2 != (undefined4 *)0x0" (identifier "puVar2") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (; ";")) (return_statement "return puVar3 + 0x24;" (return "return") (binary_expression "puVar3 + 0x24" (identifier "puVar3") (+ "+") (number_literal "0x24")) (; ";")) (} "}")))

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

type_1 ** __regparm3 get_pos_bfd(type_1 **contents,pos var_3,char *default_posname)

{
  int var_7;
  type_1 *var_5;
  type_1 *pbVar3;
  
  if (var_1 == var_2) {
    var_5 = *contents;
    if (var_3 != var_4) goto LAB_000138a0;
  }
  else {
    var_5 = *contents;
    var_3 = var_1;
    default_posname = posname;
    if (var_1 != var_4) {
LAB_000138a0:
      while( true ) {
        if (var_5 == (type_1 *)0x0) {
          return contents;
        }
        var_7 = var_6(var_5->filename,default_posname);
        if (var_7 == 0) break;
        var_5 = *contents;
        contents = &var_5->archive_next;
        var_5 = var_5->archive_next;
      }
      if (var_3 != var_8) {
        return contents;
      }
      return &(*contents)->archive_next;
    }
  }
  if (var_5 == (type_1 *)0x0) {
    return contents;
  }
  do {
    pbVar3 = var_5;
    var_5 = pbVar3->archive_next;
  } while (var_5 != (type_1 *)0x0);
  return &pbVar3->archive_next;
}


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

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

int * __regparm3 MASKED(int *param_1,int param_2,undefined4 param_3)

{
  int iVar1;
  undefined4 *puVar2;
  undefined4 *puVar3;
  
  if (DAT_00021254 == 0) {
    puVar2 = (undefined4 *)*param_1;
    if (param_2 != 3) goto LAB_000138a0;
  }
  else {
    puVar2 = (undefined4 *)*param_1;
    param_2 = DAT_00021254;
    param_3 = DAT_00021258;
    if (DAT_00021254 != 3) {
LAB_000138a0:
      while( true ) {
        if (puVar2 == (undefined4 *)0x0) {
          return param_1;
        }
        iVar1 = filename_cmp(*puVar2,param_3);
        if (iVar1 == 0) break;
        iVar1 = *param_1;
        param_1 = (int *)(iVar1 + 0x90);
        puVar2 = *(undefined4 **)(iVar1 + 0x90);
      }
      if (param_2 != 2) {
        return param_1;
      }
      return (int *)(*param_1 + 0x90);
    }
  }
  if (puVar2 == (undefined4 *)0x0) {
    return param_1;
  }
  do {
    puVar3 = puVar2;
    puVar2 = (undefined4 *)puVar3[0x24];
  } while (puVar2 != (undefined4 *)0x0);
  return puVar3 + 0x24;
}

