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

bfd_boolean
do_ar_emul_append(bfd **after_bfd,bfd *new_bfd,bfd_boolean verbose,bfd_boolean flatten,
                 _func_bfd_boolean_bfd_ptr *check)

{
  bfd_boolean bVar1;
  int iVar2;
  bfd *new_bfd_00;
  bfd_boolean bVar3;
  
  if ((flatten == 0) || (iVar2 = bfd_check_format(new_bfd,2), iVar2 == 0)) {
    bVar1 = (*check)(new_bfd);
    if (bVar1 == 0) {
      return 0;
    }
    if (verbose != 0) {
      printf("a - %s\n",new_bfd->filename);
    }
    bVar1 = 1;
    new_bfd->archive_next = *after_bfd;
    *after_bfd = new_bfd;
  }
  else {
    bVar1 = 0;
    new_bfd_00 = (bfd *)bfd_openr_next_archived_file(new_bfd,0);
    if (new_bfd_00 == (bfd *)0x0) {
      return 0;
    }
    do {
      bVar3 = do_ar_emul_append(after_bfd,new_bfd_00,verbose,1,check);
      if (bVar3 != 0) {
        bVar1 = 1;
        after_bfd = &(*after_bfd)->archive_next;
      }
      new_bfd_00 = (bfd *)bfd_openr_next_archived_file(new_bfd,new_bfd_00);
    } while (new_bfd_00 != (bfd *)0x0);
  }
  return bVar1;
}



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

undefined4 FUN_000178d0(int *param_1,undefined4 *param_2,int param_3,int param_4,code *param_5)

{
  int iVar1;
  int iVar2;
  undefined4 uVar3;
  
  if ((param_4 == 0) || (iVar1 = bfd_check_format(param_2,2), iVar1 == 0)) {
    iVar1 = (*param_5)(param_2);
    if (iVar1 == 0) {
      return 0;
    }
    if (param_3 != 0) {
      printf("a - %s\n",*param_2);
    }
    uVar3 = 1;
    param_2[0x24] = *param_1;
    *param_1 = (int)param_2;
  }
  else {
    uVar3 = 0;
    iVar1 = bfd_openr_next_archived_file(param_2,0);
    if (iVar1 == 0) {
      return 0;
    }
    do {
      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);
      if (iVar2 != 0) {
        uVar3 = 1;
        param_1 = (int *)(*param_1 + 0x90);
      }
      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);
    } while (iVar1 != 0);
  }
  return uVar3;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00013710
ADD EBX,0x9727
SUB ESP,0x1c
MOV EDX,dword ptr [ESP + 0x3c]
MOV EDI,dword ptr [ESP + 0x30]
MOV ESI,dword ptr [ESP + 0x34]
TEST EDX,EDX
JNZ 0x00017950
SUB ESP,0xc
PUSH ESI
CALL dword ptr [ESP + 0x50]
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00017940
MOV EAX,dword ptr [ESP + 0x38]
TEST EAX,EAX
JNZ 0x00017928
MOV EAX,dword ptr [EDI]
MOV EBP,0x1
MOV dword ptr [ESI + 0x90],EAX
MOV dword ptr [EDI],ESI
ADD ESP,0x1c
MOV EAX,EBP
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
LEA EAX,[EBX + 0xffffb1ab]
PUSH dword ptr [ESI]
PUSH EAX
CALL 0x000120a0
ADD ESP,0x10
JMP 0x00017909
ADD ESP,0x1c
XOR EBP,EBP
POP EBX
MOV EAX,EBP
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
PUSH 0x2
PUSH ESI
CALL 0x00012520
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000178f2
SUB ESP,0x8
XOR EBP,EBP
PUSH 0x0
PUSH ESI
CALL 0x00012530
ADD ESP,0x10
MOV ECX,EAX
TEST EAX,EAX
JZ 0x00017940
SUB ESP,0xc
PUSH dword ptr [ESP + 0x4c]
PUSH 0x1
PUSH dword ptr [ESP + 0x4c]
PUSH ECX
MOV dword ptr [ESP + 0x28],ECX
PUSH EDI
CALL 0x000178d0
ADD ESP,0x20
MOV ECX,dword ptr [ESP + 0xc]
TEST EAX,EAX
JZ 0x000179a8
MOV EDI,dword ptr [EDI]
MOV EBP,0x1
ADD EDI,0x90
SUB ESP,0x8
PUSH ECX
PUSH ESI
CALL 0x00012530
ADD ESP,0x10
MOV ECX,EAX
TEST EAX,EAX
JNZ 0x00017978
JMP 0x00017918
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_000178d0(int *param_1,undefined4 *param_2,int param_3,int param_4,code *param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  if ((param_4 == 0) || (iVar1 = bfd_check_format(param_2,2), iVar1 == 0)) {\n    iVar1 = (*param_5)(param_2);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    if (param_3 != 0) {\n      printf("a - %s\n",*param_2);\n    }\n    uVar3 = 1;\n    param_2[0x24] = *param_1;\n    *param_1 = (int)param_2;\n  }\n  else {\n    uVar3 = 0;\n    iVar1 = bfd_openr_next_archived_file(param_2,0);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    do {\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    } while (iVar1 != 0);\n  }\n  return uVar3;\n}\n\n" comment (function_definition "undefined4 FUN_000178d0(int *param_1,undefined4 *param_2,int param_3,int param_4,code *param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  if ((param_4 == 0) || (iVar1 = bfd_check_format(param_2,2), iVar1 == 0)) {\n    iVar1 = (*param_5)(param_2);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    if (param_3 != 0) {\n      printf("a - %s\n",*param_2);\n    }\n    uVar3 = 1;\n    param_2[0x24] = *param_1;\n    *param_1 = (int)param_2;\n  }\n  else {\n    uVar3 = 0;\n    iVar1 = bfd_openr_next_archived_file(param_2,0);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    do {\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    } while (iVar1 != 0);\n  }\n  return uVar3;\n}" type_identifier (function_declarator "FUN_000178d0(int *param_1,undefined4 *param_2,int param_3,int param_4,code *param_5)" identifier (parameter_list "(int *param_1,undefined4 *param_2,int param_3,int param_4,code *param_5)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "code *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  if ((param_4 == 0) || (iVar1 = bfd_check_format(param_2,2), iVar1 == 0)) {\n    iVar1 = (*param_5)(param_2);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    if (param_3 != 0) {\n      printf("a - %s\n",*param_2);\n    }\n    uVar3 = 1;\n    param_2[0x24] = *param_1;\n    *param_1 = (int)param_2;\n  }\n  else {\n    uVar3 = 0;\n    iVar1 = bfd_openr_next_archived_file(param_2,0);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    do {\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    } while (iVar1 != 0);\n  }\n  return uVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (if_statement "if ((param_4 == 0) || (iVar1 = bfd_check_format(param_2,2), iVar1 == 0)) {\n    iVar1 = (*param_5)(param_2);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    if (param_3 != 0) {\n      printf("a - %s\n",*param_2);\n    }\n    uVar3 = 1;\n    param_2[0x24] = *param_1;\n    *param_1 = (int)param_2;\n  }\n  else {\n    uVar3 = 0;\n    iVar1 = bfd_openr_next_archived_file(param_2,0);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    do {\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    } while (iVar1 != 0);\n  }" if (parenthesized_expression "((param_4 == 0) || (iVar1 = bfd_check_format(param_2,2), iVar1 == 0))" ( (binary_expression "(param_4 == 0) || (iVar1 = bfd_check_format(param_2,2), iVar1 == 0)" (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) )) || (parenthesized_expression "(iVar1 = bfd_check_format(param_2,2), iVar1 == 0)" ( (comma_expression "iVar1 = bfd_check_format(param_2,2), iVar1 == 0" (assignment_expression "iVar1 = bfd_check_format(param_2,2)" identifier = (call_expression "bfd_check_format(param_2,2)" identifier (argument_list "(param_2,2)" ( identifier , number_literal )))) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    iVar1 = (*param_5)(param_2);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    if (param_3 != 0) {\n      printf("a - %s\n",*param_2);\n    }\n    uVar3 = 1;\n    param_2[0x24] = *param_1;\n    *param_1 = (int)param_2;\n  }" { (expression_statement "iVar1 = (*param_5)(param_2);" (assignment_expression "iVar1 = (*param_5)(param_2)" identifier = (call_expression "(*param_5)(param_2)" (parenthesized_expression "(*param_5)" ( (pointer_expression "*param_5" * identifier) )) (argument_list "(param_2)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n      return 0;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (param_3 != 0) {\n      printf("a - %s\n",*param_2);\n    }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n      printf("a - %s\n",*param_2);\n    }" { (expression_statement "printf("a - %s\n",*param_2);" (call_expression "printf("a - %s\n",*param_2)" identifier (argument_list "("a - %s\n",*param_2)" ( (string_literal ""a - %s\n"" " string_content escape_sequence ") , (pointer_expression "*param_2" * identifier) ))) ;) })) (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" identifier = number_literal) ;) (expression_statement "param_2[0x24] = *param_1;" (assignment_expression "param_2[0x24] = *param_1" (subscript_expression "param_2[0x24]" identifier [ number_literal ]) = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "*param_1 = (int)param_2;" (assignment_expression "*param_1 = (int)param_2" (pointer_expression "*param_1" * identifier) = (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) ;) }) (else_clause "else {\n    uVar3 = 0;\n    iVar1 = bfd_openr_next_archived_file(param_2,0);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    do {\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    } while (iVar1 != 0);\n  }" else (compound_statement "{\n    uVar3 = 0;\n    iVar1 = bfd_openr_next_archived_file(param_2,0);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    do {\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    } while (iVar1 != 0);\n  }" { (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = bfd_openr_next_archived_file(param_2,0);" (assignment_expression "iVar1 = bfd_openr_next_archived_file(param_2,0)" identifier = (call_expression "bfd_openr_next_archived_file(param_2,0)" identifier (argument_list "(param_2,0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n      return 0;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (do_statement "do {\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    } while (iVar1 != 0);" do (compound_statement "{\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    }" { (expression_statement "iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);" (assignment_expression "iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5)" identifier = (call_expression "FUN_000178d0(param_1,iVar1,param_3,1,param_5)" identifier (argument_list "(param_1,iVar1,param_3,1,param_5)" ( identifier , identifier , identifier , number_literal , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }" { (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" identifier = number_literal) ;) (expression_statement "param_1 = (int *)(*param_1 + 0x90);" (assignment_expression "param_1 = (int *)(*param_1 + 0x90)" identifier = (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) )))) ;) })) (expression_statement "iVar1 = bfd_openr_next_archived_file(param_2,iVar1);" (assignment_expression "iVar1 = bfd_openr_next_archived_file(param_2,iVar1)" identifier = (call_expression "bfd_openr_next_archived_file(param_2,iVar1)" identifier (argument_list "(param_2,iVar1)" ( identifier , identifier )))) ;) }) while (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) ;) }))) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nbfd_boolean\ndo_ar_emul_append(bfd **after_bfd,bfd *new_bfd,bfd_boolean verbose,bfd_boolean flatten,\n                 _func_bfd_boolean_bfd_ptr *check)\n\n{\n  bfd_boolean bVar1;\n  int iVar2;\n  bfd *new_bfd_00;\n  bfd_boolean bVar3;\n  \n  if ((flatten == 0) || (iVar2 = bfd_check_format(new_bfd,2), iVar2 == 0)) {\n    bVar1 = (*check)(new_bfd);\n    if (bVar1 == 0) {\n      return 0;\n    }\n    if (verbose != 0) {\n      printf("a - %s\n",new_bfd->filename);\n    }\n    bVar1 = 1;\n    new_bfd->archive_next = *after_bfd;\n    *after_bfd = new_bfd;\n  }\n  else {\n    bVar1 = 0;\n    new_bfd_00 = (bfd *)bfd_openr_next_archived_file(new_bfd,0);\n    if (new_bfd_00 == (bfd *)0x0) {\n      return 0;\n    }\n    do {\n      bVar3 = do_ar_emul_append(after_bfd,new_bfd_00,verbose,1,check);\n      if (bVar3 != 0) {\n        bVar1 = 1;\n        after_bfd = &(*after_bfd)->archive_next;\n      }\n      new_bfd_00 = (bfd *)bfd_openr_next_archived_file(new_bfd,new_bfd_00);\n    } while (new_bfd_00 != (bfd *)0x0);\n  }\n  return bVar1;\n}\n\n" comment comment (function_definition "bfd_boolean\ndo_ar_emul_append(bfd **after_bfd,bfd *new_bfd,bfd_boolean verbose,bfd_boolean flatten,\n                 _func_bfd_boolean_bfd_ptr *check)\n\n{\n  bfd_boolean bVar1;\n  int iVar2;\n  bfd *new_bfd_00;\n  bfd_boolean bVar3;\n  \n  if ((flatten == 0) || (iVar2 = bfd_check_format(new_bfd,2), iVar2 == 0)) {\n    bVar1 = (*check)(new_bfd);\n    if (bVar1 == 0) {\n      return 0;\n    }\n    if (verbose != 0) {\n      printf("a - %s\n",new_bfd->filename);\n    }\n    bVar1 = 1;\n    new_bfd->archive_next = *after_bfd;\n    *after_bfd = new_bfd;\n  }\n  else {\n    bVar1 = 0;\n    new_bfd_00 = (bfd *)bfd_openr_next_archived_file(new_bfd,0);\n    if (new_bfd_00 == (bfd *)0x0) {\n      return 0;\n    }\n    do {\n      bVar3 = do_ar_emul_append(after_bfd,new_bfd_00,verbose,1,check);\n      if (bVar3 != 0) {\n        bVar1 = 1;\n        after_bfd = &(*after_bfd)->archive_next;\n      }\n      new_bfd_00 = (bfd *)bfd_openr_next_archived_file(new_bfd,new_bfd_00);\n    } while (new_bfd_00 != (bfd *)0x0);\n  }\n  return bVar1;\n}" type_identifier (function_declarator "do_ar_emul_append(bfd **after_bfd,bfd *new_bfd,bfd_boolean verbose,bfd_boolean flatten,\n                 _func_bfd_boolean_bfd_ptr *check)" identifier (parameter_list "(bfd **after_bfd,bfd *new_bfd,bfd_boolean verbose,bfd_boolean flatten,\n                 _func_bfd_boolean_bfd_ptr *check)" ( (parameter_declaration "bfd **after_bfd" type_identifier (pointer_declarator "**after_bfd" * (pointer_declarator "*after_bfd" * identifier))) , (parameter_declaration "bfd *new_bfd" type_identifier (pointer_declarator "*new_bfd" * identifier)) , (parameter_declaration "bfd_boolean verbose" type_identifier identifier) , (parameter_declaration "bfd_boolean flatten" type_identifier identifier) , (parameter_declaration "_func_bfd_boolean_bfd_ptr *check" type_identifier (pointer_declarator "*check" * identifier)) ))) (compound_statement "{\n  bfd_boolean bVar1;\n  int iVar2;\n  bfd *new_bfd_00;\n  bfd_boolean bVar3;\n  \n  if ((flatten == 0) || (iVar2 = bfd_check_format(new_bfd,2), iVar2 == 0)) {\n    bVar1 = (*check)(new_bfd);\n    if (bVar1 == 0) {\n      return 0;\n    }\n    if (verbose != 0) {\n      printf("a - %s\n",new_bfd->filename);\n    }\n    bVar1 = 1;\n    new_bfd->archive_next = *after_bfd;\n    *after_bfd = new_bfd;\n  }\n  else {\n    bVar1 = 0;\n    new_bfd_00 = (bfd *)bfd_openr_next_archived_file(new_bfd,0);\n    if (new_bfd_00 == (bfd *)0x0) {\n      return 0;\n    }\n    do {\n      bVar3 = do_ar_emul_append(after_bfd,new_bfd_00,verbose,1,check);\n      if (bVar3 != 0) {\n        bVar1 = 1;\n        after_bfd = &(*after_bfd)->archive_next;\n      }\n      new_bfd_00 = (bfd *)bfd_openr_next_archived_file(new_bfd,new_bfd_00);\n    } while (new_bfd_00 != (bfd *)0x0);\n  }\n  return bVar1;\n}" { (declaration "bfd_boolean bVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "bfd *new_bfd_00;" type_identifier (pointer_declarator "*new_bfd_00" * identifier) ;) (declaration "bfd_boolean bVar3;" type_identifier identifier ;) (if_statement "if ((flatten == 0) || (iVar2 = bfd_check_format(new_bfd,2), iVar2 == 0)) {\n    bVar1 = (*check)(new_bfd);\n    if (bVar1 == 0) {\n      return 0;\n    }\n    if (verbose != 0) {\n      printf("a - %s\n",new_bfd->filename);\n    }\n    bVar1 = 1;\n    new_bfd->archive_next = *after_bfd;\n    *after_bfd = new_bfd;\n  }\n  else {\n    bVar1 = 0;\n    new_bfd_00 = (bfd *)bfd_openr_next_archived_file(new_bfd,0);\n    if (new_bfd_00 == (bfd *)0x0) {\n      return 0;\n    }\n    do {\n      bVar3 = do_ar_emul_append(after_bfd,new_bfd_00,verbose,1,check);\n      if (bVar3 != 0) {\n        bVar1 = 1;\n        after_bfd = &(*after_bfd)->archive_next;\n      }\n      new_bfd_00 = (bfd *)bfd_openr_next_archived_file(new_bfd,new_bfd_00);\n    } while (new_bfd_00 != (bfd *)0x0);\n  }" if (parenthesized_expression "((flatten == 0) || (iVar2 = bfd_check_format(new_bfd,2), iVar2 == 0))" ( (binary_expression "(flatten == 0) || (iVar2 = bfd_check_format(new_bfd,2), iVar2 == 0)" (parenthesized_expression "(flatten == 0)" ( (binary_expression "flatten == 0" identifier == number_literal) )) || (parenthesized_expression "(iVar2 = bfd_check_format(new_bfd,2), iVar2 == 0)" ( (comma_expression "iVar2 = bfd_check_format(new_bfd,2), iVar2 == 0" (assignment_expression "iVar2 = bfd_check_format(new_bfd,2)" identifier = (call_expression "bfd_check_format(new_bfd,2)" identifier (argument_list "(new_bfd,2)" ( identifier , number_literal )))) , (binary_expression "iVar2 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    bVar1 = (*check)(new_bfd);\n    if (bVar1 == 0) {\n      return 0;\n    }\n    if (verbose != 0) {\n      printf("a - %s\n",new_bfd->filename);\n    }\n    bVar1 = 1;\n    new_bfd->archive_next = *after_bfd;\n    *after_bfd = new_bfd;\n  }" { (expression_statement "bVar1 = (*check)(new_bfd);" (assignment_expression "bVar1 = (*check)(new_bfd)" identifier = (call_expression "(*check)(new_bfd)" (parenthesized_expression "(*check)" ( (pointer_expression "*check" * identifier) )) (argument_list "(new_bfd)" ( identifier )))) ;) (if_statement "if (bVar1 == 0) {\n      return 0;\n    }" if (parenthesized_expression "(bVar1 == 0)" ( (binary_expression "bVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (verbose != 0) {\n      printf("a - %s\n",new_bfd->filename);\n    }" if (parenthesized_expression "(verbose != 0)" ( (binary_expression "verbose != 0" identifier != number_literal) )) (compound_statement "{\n      printf("a - %s\n",new_bfd->filename);\n    }" { (expression_statement "printf("a - %s\n",new_bfd->filename);" (call_expression "printf("a - %s\n",new_bfd->filename)" identifier (argument_list "("a - %s\n",new_bfd->filename)" ( (string_literal ""a - %s\n"" " string_content escape_sequence ") , (field_expression "new_bfd->filename" identifier -> field_identifier) ))) ;) })) (expression_statement "bVar1 = 1;" (assignment_expression "bVar1 = 1" identifier = number_literal) ;) (expression_statement "new_bfd->archive_next = *after_bfd;" (assignment_expression "new_bfd->archive_next = *after_bfd" (field_expression "new_bfd->archive_next" identifier -> field_identifier) = (pointer_expression "*after_bfd" * identifier)) ;) (expression_statement "*after_bfd = new_bfd;" (assignment_expression "*after_bfd = new_bfd" (pointer_expression "*after_bfd" * identifier) = identifier) ;) }) (else_clause "else {\n    bVar1 = 0;\n    new_bfd_00 = (bfd *)bfd_openr_next_archived_file(new_bfd,0);\n    if (new_bfd_00 == (bfd *)0x0) {\n      return 0;\n    }\n    do {\n      bVar3 = do_ar_emul_append(after_bfd,new_bfd_00,verbose,1,check);\n      if (bVar3 != 0) {\n        bVar1 = 1;\n        after_bfd = &(*after_bfd)->archive_next;\n      }\n      new_bfd_00 = (bfd *)bfd_openr_next_archived_file(new_bfd,new_bfd_00);\n    } while (new_bfd_00 != (bfd *)0x0);\n  }" else (compound_statement "{\n    bVar1 = 0;\n    new_bfd_00 = (bfd *)bfd_openr_next_archived_file(new_bfd,0);\n    if (new_bfd_00 == (bfd *)0x0) {\n      return 0;\n    }\n    do {\n      bVar3 = do_ar_emul_append(after_bfd,new_bfd_00,verbose,1,check);\n      if (bVar3 != 0) {\n        bVar1 = 1;\n        after_bfd = &(*after_bfd)->archive_next;\n      }\n      new_bfd_00 = (bfd *)bfd_openr_next_archived_file(new_bfd,new_bfd_00);\n    } while (new_bfd_00 != (bfd *)0x0);\n  }" { (expression_statement "bVar1 = 0;" (assignment_expression "bVar1 = 0" identifier = number_literal) ;) (expression_statement "new_bfd_00 = (bfd *)bfd_openr_next_archived_file(new_bfd,0);" (assignment_expression "new_bfd_00 = (bfd *)bfd_openr_next_archived_file(new_bfd,0)" identifier = (cast_expression "(bfd *)bfd_openr_next_archived_file(new_bfd,0)" ( (type_descriptor "bfd *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "bfd_openr_next_archived_file(new_bfd,0)" identifier (argument_list "(new_bfd,0)" ( identifier , number_literal ))))) ;) (if_statement "if (new_bfd_00 == (bfd *)0x0) {\n      return 0;\n    }" if (parenthesized_expression "(new_bfd_00 == (bfd *)0x0)" ( (binary_expression "new_bfd_00 == (bfd *)0x0" identifier == (cast_expression "(bfd *)0x0" ( (type_descriptor "bfd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (do_statement "do {\n      bVar3 = do_ar_emul_append(after_bfd,new_bfd_00,verbose,1,check);\n      if (bVar3 != 0) {\n        bVar1 = 1;\n        after_bfd = &(*after_bfd)->archive_next;\n      }\n      new_bfd_00 = (bfd *)bfd_openr_next_archived_file(new_bfd,new_bfd_00);\n    } while (new_bfd_00 != (bfd *)0x0);" do (compound_statement "{\n      bVar3 = do_ar_emul_append(after_bfd,new_bfd_00,verbose,1,check);\n      if (bVar3 != 0) {\n        bVar1 = 1;\n        after_bfd = &(*after_bfd)->archive_next;\n      }\n      new_bfd_00 = (bfd *)bfd_openr_next_archived_file(new_bfd,new_bfd_00);\n    }" { (expression_statement "bVar3 = do_ar_emul_append(after_bfd,new_bfd_00,verbose,1,check);" (assignment_expression "bVar3 = do_ar_emul_append(after_bfd,new_bfd_00,verbose,1,check)" identifier = (call_expression "do_ar_emul_append(after_bfd,new_bfd_00,verbose,1,check)" identifier (argument_list "(after_bfd,new_bfd_00,verbose,1,check)" ( identifier , identifier , identifier , number_literal , identifier )))) ;) (if_statement "if (bVar3 != 0) {\n        bVar1 = 1;\n        after_bfd = &(*after_bfd)->archive_next;\n      }" if (parenthesized_expression "(bVar3 != 0)" ( (binary_expression "bVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        bVar1 = 1;\n        after_bfd = &(*after_bfd)->archive_next;\n      }" { (expression_statement "bVar1 = 1;" (assignment_expression "bVar1 = 1" identifier = number_literal) ;) (expression_statement "after_bfd = &(*after_bfd)->archive_next;" (assignment_expression "after_bfd = &(*after_bfd)->archive_next" identifier = (pointer_expression "&(*after_bfd)->archive_next" & (field_expression "(*after_bfd)->archive_next" (parenthesized_expression "(*after_bfd)" ( (pointer_expression "*after_bfd" * identifier) )) -> field_identifier))) ;) })) (expression_statement "new_bfd_00 = (bfd *)bfd_openr_next_archived_file(new_bfd,new_bfd_00);" (assignment_expression "new_bfd_00 = (bfd *)bfd_openr_next_archived_file(new_bfd,new_bfd_00)" identifier = (cast_expression "(bfd *)bfd_openr_next_archived_file(new_bfd,new_bfd_00)" ( (type_descriptor "bfd *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "bfd_openr_next_archived_file(new_bfd,new_bfd_00)" identifier (argument_list "(new_bfd,new_bfd_00)" ( identifier , identifier ))))) ;) }) while (parenthesized_expression "(new_bfd_00 != (bfd *)0x0)" ( (binary_expression "new_bfd_00 != (bfd *)0x0" identifier != (cast_expression "(bfd *)0x0" ( (type_descriptor "bfd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) }))) (return_statement "return bVar1;" return identifier ;) })))
(translation_unit "undefined4 FUN_000178d0(int *param_1,undefined4 *param_2,int param_3,int param_4,code *param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  if ((param_4 == 0) || (iVar1 = bfd_check_format(param_2,2), iVar1 == 0)) {\n    iVar1 = (*param_5)(param_2);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    if (param_3 != 0) {\n      printf("a - %s\n",*param_2);\n    }\n    uVar3 = 1;\n    param_2[0x24] = *param_1;\n    *param_1 = (int)param_2;\n  }\n  else {\n    uVar3 = 0;\n    iVar1 = bfd_openr_next_archived_file(param_2,0);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    do {\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    } while (iVar1 != 0);\n  }\n  return uVar3;\n}\n\n" (function_definition "undefined4 FUN_000178d0(int *param_1,undefined4 *param_2,int param_3,int param_4,code *param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  if ((param_4 == 0) || (iVar1 = bfd_check_format(param_2,2), iVar1 == 0)) {\n    iVar1 = (*param_5)(param_2);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    if (param_3 != 0) {\n      printf("a - %s\n",*param_2);\n    }\n    uVar3 = 1;\n    param_2[0x24] = *param_1;\n    *param_1 = (int)param_2;\n  }\n  else {\n    uVar3 = 0;\n    iVar1 = bfd_openr_next_archived_file(param_2,0);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    do {\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    } while (iVar1 != 0);\n  }\n  return uVar3;\n}" type_identifier (function_declarator "FUN_000178d0(int *param_1,undefined4 *param_2,int param_3,int param_4,code *param_5)" identifier (parameter_list "(int *param_1,undefined4 *param_2,int param_3,int param_4,code *param_5)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "code *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  if ((param_4 == 0) || (iVar1 = bfd_check_format(param_2,2), iVar1 == 0)) {\n    iVar1 = (*param_5)(param_2);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    if (param_3 != 0) {\n      printf("a - %s\n",*param_2);\n    }\n    uVar3 = 1;\n    param_2[0x24] = *param_1;\n    *param_1 = (int)param_2;\n  }\n  else {\n    uVar3 = 0;\n    iVar1 = bfd_openr_next_archived_file(param_2,0);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    do {\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    } while (iVar1 != 0);\n  }\n  return uVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (if_statement "if ((param_4 == 0) || (iVar1 = bfd_check_format(param_2,2), iVar1 == 0)) {\n    iVar1 = (*param_5)(param_2);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    if (param_3 != 0) {\n      printf("a - %s\n",*param_2);\n    }\n    uVar3 = 1;\n    param_2[0x24] = *param_1;\n    *param_1 = (int)param_2;\n  }\n  else {\n    uVar3 = 0;\n    iVar1 = bfd_openr_next_archived_file(param_2,0);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    do {\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    } while (iVar1 != 0);\n  }" if (parenthesized_expression "((param_4 == 0) || (iVar1 = bfd_check_format(param_2,2), iVar1 == 0))" ( (binary_expression "(param_4 == 0) || (iVar1 = bfd_check_format(param_2,2), iVar1 == 0)" (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) )) || (parenthesized_expression "(iVar1 = bfd_check_format(param_2,2), iVar1 == 0)" ( (comma_expression "iVar1 = bfd_check_format(param_2,2), iVar1 == 0" (assignment_expression "iVar1 = bfd_check_format(param_2,2)" identifier = (call_expression "bfd_check_format(param_2,2)" identifier (argument_list "(param_2,2)" ( identifier , number_literal )))) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    iVar1 = (*param_5)(param_2);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    if (param_3 != 0) {\n      printf("a - %s\n",*param_2);\n    }\n    uVar3 = 1;\n    param_2[0x24] = *param_1;\n    *param_1 = (int)param_2;\n  }" { (expression_statement "iVar1 = (*param_5)(param_2);" (assignment_expression "iVar1 = (*param_5)(param_2)" identifier = (call_expression "(*param_5)(param_2)" (parenthesized_expression "(*param_5)" ( (pointer_expression "*param_5" * identifier) )) (argument_list "(param_2)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n      return 0;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (param_3 != 0) {\n      printf("a - %s\n",*param_2);\n    }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n      printf("a - %s\n",*param_2);\n    }" { (expression_statement "printf("a - %s\n",*param_2);" (call_expression "printf("a - %s\n",*param_2)" identifier (argument_list "("a - %s\n",*param_2)" ( (string_literal ""a - %s\n"" " string_content escape_sequence ") , (pointer_expression "*param_2" * identifier) ))) ;) })) (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" identifier = number_literal) ;) (expression_statement "param_2[0x24] = *param_1;" (assignment_expression "param_2[0x24] = *param_1" (subscript_expression "param_2[0x24]" identifier [ number_literal ]) = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "*param_1 = (int)param_2;" (assignment_expression "*param_1 = (int)param_2" (pointer_expression "*param_1" * identifier) = (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) ;) }) (else_clause "else {\n    uVar3 = 0;\n    iVar1 = bfd_openr_next_archived_file(param_2,0);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    do {\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    } while (iVar1 != 0);\n  }" else (compound_statement "{\n    uVar3 = 0;\n    iVar1 = bfd_openr_next_archived_file(param_2,0);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    do {\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    } while (iVar1 != 0);\n  }" { (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = bfd_openr_next_archived_file(param_2,0);" (assignment_expression "iVar1 = bfd_openr_next_archived_file(param_2,0)" identifier = (call_expression "bfd_openr_next_archived_file(param_2,0)" identifier (argument_list "(param_2,0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n      return 0;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (do_statement "do {\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    } while (iVar1 != 0);" do (compound_statement "{\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    }" { (expression_statement "iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);" (assignment_expression "iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5)" identifier = (call_expression "FUN_000178d0(param_1,iVar1,param_3,1,param_5)" identifier (argument_list "(param_1,iVar1,param_3,1,param_5)" ( identifier , identifier , identifier , number_literal , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }" { (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" identifier = number_literal) ;) (expression_statement "param_1 = (int *)(*param_1 + 0x90);" (assignment_expression "param_1 = (int *)(*param_1 + 0x90)" identifier = (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) )))) ;) })) (expression_statement "iVar1 = bfd_openr_next_archived_file(param_2,iVar1);" (assignment_expression "iVar1 = bfd_openr_next_archived_file(param_2,iVar1)" identifier = (call_expression "bfd_openr_next_archived_file(param_2,iVar1)" identifier (argument_list "(param_2,iVar1)" ( identifier , identifier )))) ;) }) while (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) ;) }))) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) , (binary_expression IDENT == LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") , (pointer_expression * IDENT) ))) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , LIT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) }))) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_000178d0(int *param_1,undefined4 *param_2,int param_3,int param_4,code *param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  if ((param_4 == 0) || (iVar1 = bfd_check_format(param_2,2), iVar1 == 0)) {\n    iVar1 = (*param_5)(param_2);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    if (param_3 != 0) {\n      printf("a - %s\n",*param_2);\n    }\n    uVar3 = 1;\n    param_2[0x24] = *param_1;\n    *param_1 = (int)param_2;\n  }\n  else {\n    uVar3 = 0;\n    iVar1 = bfd_openr_next_archived_file(param_2,0);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    do {\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    } while (iVar1 != 0);\n  }\n  return uVar3;\n}" (type_identifier "undefined4") (function_declarator "FUN_000178d0(int *param_1,undefined4 *param_2,int param_3,int param_4,code *param_5)" (identifier "FUN_000178d0") (parameter_list "(int *param_1,undefined4 *param_2,int param_3,int param_4,code *param_5)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) (, ",") (parameter_declaration "code *param_5" (type_identifier "code") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  if ((param_4 == 0) || (iVar1 = bfd_check_format(param_2,2), iVar1 == 0)) {\n    iVar1 = (*param_5)(param_2);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    if (param_3 != 0) {\n      printf("a - %s\n",*param_2);\n    }\n    uVar3 = 1;\n    param_2[0x24] = *param_1;\n    *param_1 = (int)param_2;\n  }\n  else {\n    uVar3 = 0;\n    iVar1 = bfd_openr_next_archived_file(param_2,0);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    do {\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    } while (iVar1 != 0);\n  }\n  return uVar3;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (if_statement "if ((param_4 == 0) || (iVar1 = bfd_check_format(param_2,2), iVar1 == 0)) {\n    iVar1 = (*param_5)(param_2);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    if (param_3 != 0) {\n      printf("a - %s\n",*param_2);\n    }\n    uVar3 = 1;\n    param_2[0x24] = *param_1;\n    *param_1 = (int)param_2;\n  }\n  else {\n    uVar3 = 0;\n    iVar1 = bfd_openr_next_archived_file(param_2,0);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    do {\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    } while (iVar1 != 0);\n  }" (if "if") (parenthesized_expression "((param_4 == 0) || (iVar1 = bfd_check_format(param_2,2), iVar1 == 0))" (( "(") (binary_expression "(param_4 == 0) || (iVar1 = bfd_check_format(param_2,2), iVar1 == 0)" (parenthesized_expression "(param_4 == 0)" (( "(") (binary_expression "param_4 == 0" (identifier "param_4") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(iVar1 = bfd_check_format(param_2,2), iVar1 == 0)" (( "(") (comma_expression "iVar1 = bfd_check_format(param_2,2), iVar1 == 0" (assignment_expression "iVar1 = bfd_check_format(param_2,2)" (identifier "iVar1") (= "=") (call_expression "bfd_check_format(param_2,2)" (identifier "bfd_check_format") (argument_list "(param_2,2)" (( "(") (identifier "param_2") (, ",") (number_literal "2") () ")")))) (, ",") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n    iVar1 = (*param_5)(param_2);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    if (param_3 != 0) {\n      printf("a - %s\n",*param_2);\n    }\n    uVar3 = 1;\n    param_2[0x24] = *param_1;\n    *param_1 = (int)param_2;\n  }" ({ "{") (expression_statement "iVar1 = (*param_5)(param_2);" (assignment_expression "iVar1 = (*param_5)(param_2)" (identifier "iVar1") (= "=") (call_expression "(*param_5)(param_2)" (parenthesized_expression "(*param_5)" (( "(") (pointer_expression "*param_5" (* "*") (identifier "param_5")) () ")")) (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (param_3 != 0) {\n      printf("a - %s\n",*param_2);\n    }" (if "if") (parenthesized_expression "(param_3 != 0)" (( "(") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      printf("a - %s\n",*param_2);\n    }" ({ "{") (expression_statement "printf("a - %s\n",*param_2);" (call_expression "printf("a - %s\n",*param_2)" (identifier "printf") (argument_list "("a - %s\n",*param_2)" (( "(") (string_literal ""a - %s\n"" (" """) (string_content "a - %s") (escape_sequence "\n") (" """)) (, ",") (pointer_expression "*param_2" (* "*") (identifier "param_2")) () ")"))) (; ";")) (} "}"))) (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" (identifier "uVar3") (= "=") (number_literal "1")) (; ";")) (expression_statement "param_2[0x24] = *param_1;" (assignment_expression "param_2[0x24] = *param_1" (subscript_expression "param_2[0x24]" (identifier "param_2") ([ "[") (number_literal "0x24") (] "]")) (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "*param_1 = (int)param_2;" (assignment_expression "*param_1 = (int)param_2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) (; ";")) (} "}")) (else_clause "else {\n    uVar3 = 0;\n    iVar1 = bfd_openr_next_archived_file(param_2,0);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    do {\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    } while (iVar1 != 0);\n  }" (else "else") (compound_statement "{\n    uVar3 = 0;\n    iVar1 = bfd_openr_next_archived_file(param_2,0);\n    if (iVar1 == 0) {\n      return 0;\n    }\n    do {\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    } while (iVar1 != 0);\n  }" ({ "{") (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" (identifier "uVar3") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar1 = bfd_openr_next_archived_file(param_2,0);" (assignment_expression "iVar1 = bfd_openr_next_archived_file(param_2,0)" (identifier "iVar1") (= "=") (call_expression "bfd_openr_next_archived_file(param_2,0)" (identifier "bfd_openr_next_archived_file") (argument_list "(param_2,0)" (( "(") (identifier "param_2") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (do_statement "do {\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    } while (iVar1 != 0);" (do "do") (compound_statement "{\n      iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);\n      if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }\n      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);\n    }" ({ "{") (expression_statement "iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5);" (assignment_expression "iVar2 = FUN_000178d0(param_1,iVar1,param_3,1,param_5)" (identifier "iVar2") (= "=") (call_expression "FUN_000178d0(param_1,iVar1,param_3,1,param_5)" (identifier "FUN_000178d0") (argument_list "(param_1,iVar1,param_3,1,param_5)" (( "(") (identifier "param_1") (, ",") (identifier "iVar1") (, ",") (identifier "param_3") (, ",") (number_literal "1") (, ",") (identifier "param_5") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        uVar3 = 1;\n        param_1 = (int *)(*param_1 + 0x90);\n      }" ({ "{") (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" (identifier "uVar3") (= "=") (number_literal "1")) (; ";")) (expression_statement "param_1 = (int *)(*param_1 + 0x90);" (assignment_expression "param_1 = (int *)(*param_1 + 0x90)" (identifier "param_1") (= "=") (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")) () ")")))) (; ";")) (} "}"))) (expression_statement "iVar1 = bfd_openr_next_archived_file(param_2,iVar1);" (assignment_expression "iVar1 = bfd_openr_next_archived_file(param_2,iVar1)" (identifier "iVar1") (= "=") (call_expression "bfd_openr_next_archived_file(param_2,iVar1)" (identifier "bfd_openr_next_archived_file") (argument_list "(param_2,iVar1)" (( "(") (identifier "param_2") (, ",") (identifier "iVar1") () ")")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (; ";")) (} "}")))) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}")))

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

type_1
function_1(type_2 **after_bfd,type_2 *new_bfd,type_1 var_5,type_1 var_1,
                 type_3 *check)

{
  type_1 var_4;
  int var_3;
  type_2 *var_8;
  type_1 var_9;
  
  if ((var_1 == 0) || (var_3 = var_2(new_bfd,2), var_3 == 0)) {
    var_4 = (*check)(new_bfd);
    if (var_4 == 0) {
      return 0;
    }
    if (var_5 != 0) {
      var_6("a - %s\n",new_bfd->filename);
    }
    var_4 = 1;
    new_bfd->archive_next = *after_bfd;
    *after_bfd = new_bfd;
  }
  else {
    var_4 = 0;
    var_8 = (type_2 *)var_7(new_bfd,0);
    if (var_8 == (type_2 *)0x0) {
      return 0;
    }
    do {
      var_9 = function_1(after_bfd,var_8,var_5,1,check);
      if (var_9 != 0) {
        var_4 = 1;
        after_bfd = &(*after_bfd)->archive_next;
      }
      var_8 = (type_2 *)var_7(new_bfd,var_8);
    } while (var_8 != (type_2 *)0x0);
  }
  return var_4;
}


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

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

undefined4 MASKED(int *param_1,undefined4 *param_2,int param_3,int param_4,code *param_5)

{
  int iVar1;
  int iVar2;
  undefined4 uVar3;
  
  if ((param_4 == 0) || (iVar1 = bfd_check_format(param_2,2), iVar1 == 0)) {
    iVar1 = (*param_5)(param_2);
    if (iVar1 == 0) {
      return 0;
    }
    if (param_3 != 0) {
      printf("a - %s\n",*param_2);
    }
    uVar3 = 1;
    param_2[0x24] = *param_1;
    *param_1 = (int)param_2;
  }
  else {
    uVar3 = 0;
    iVar1 = bfd_openr_next_archived_file(param_2,0);
    if (iVar1 == 0) {
      return 0;
    }
    do {
      iVar2 = MASKED(param_1,iVar1,param_3,1,param_5);
      if (iVar2 != 0) {
        uVar3 = 1;
        param_1 = (int *)(*param_1 + 0x90);
      }
      iVar1 = bfd_openr_next_archived_file(param_2,iVar1);
    } while (iVar1 != 0);
  }
  return uVar3;
}

