
bfd_boolean
ldfile_open_file_search(char *arch,lang_input_statement_type *entry,char *lib,char *suffix)

{
  undefined *puVar1;
  bfd_boolean bVar2;
  char *pcVar3;
  search_dirs_type *search;
  undefined *puVar4;
  
  if (-1 < (short)*(ushort *)&entry->flags) {
    pcVar3 = entry->filename;
    if (((*(ushort *)&entry->flags & 0x1000) == 0) || (*pcVar3 != '/')) {
      bVar2 = ldfile_try_open_bfd(pcVar3,entry);
      if (bVar2 != 0) {
        return 1;
      }
    }
    else {
      pcVar3 = (char *)(*(code *)PTR_concat_001dc060)
                                 (*(undefined4 *)PTR_ld_sysroot_001db988,pcVar3,0);
      bVar2 = ldfile_try_open_bfd(pcVar3,entry);
      if (bVar2 != 0) {
        entry->filename = pcVar3;
        return 1;
      }
      (*(code *)PTR_free_001dc0ec)(pcVar3);
    }
    if (*entry->filename == '/') {
      return 0;
    }
  }
  puVar1 = PTR_link_info_001db928;
  search = *(search_dirs_type **)PTR_search_head_001dbd10;
  if (search != (search_dirs_type *)0x0) {
    puVar4 = PTR_yy_accept_1428__001db910 + 0x4564;
    do {
      if (((((ulonglong)entry->flags & 0x400000000000000) != 0) &&
          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&
         (bVar2 = ldemul_open_dynamic_archive(arch,search,entry), bVar2 != 0)) {
        return 1;
      }
      if (((ulonglong)entry->flags & 0xc000000000000000) == 0x8000000000000000) {
        pcVar3 = (char *)(*(code *)PTR_concat_001dc060)
                                   (search->name,puVar4,lib,entry->filename,arch,suffix,0);
      }
      else {
        pcVar3 = (char *)(*(code *)PTR_concat_001dc060)(search->name,puVar4,entry->filename,0);
      }
      bVar2 = ldfile_try_open_bfd(pcVar3,entry);
      if (bVar2 != 0) {
        entry->filename = pcVar3;
        return 1;
      }
      (*(code *)PTR_free_001dc0ec)(pcVar3);
      search = search->next;
    } while (search != (search_dirs *)0x0);
  }
  return 0;
}



undefined4
ldfile_open_file_search(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)

{
  undefined *puVar1;
  int iVar2;
  undefined4 uVar3;
  char *pcVar4;
  int *piVar5;
  undefined *puVar6;
  
  if (-1 < (short)*(ushort *)(param_2 + 0x24)) {
    pcVar4 = *(char **)(param_2 + 8);
    if (((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')) {
      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);
      if (iVar2 != 0) {
        return 1;
      }
    }
    else {
      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);
      iVar2 = ldfile_try_open_bfd(uVar3,param_2);
      if (iVar2 != 0) {
        *(undefined4 *)(param_2 + 8) = uVar3;
        return 1;
      }
      (*(code *)PTR_free_001dc0ec)(uVar3);
    }
    if (**(char **)(param_2 + 8) == '/') {
      return 0;
    }
  }
  puVar1 = PTR_link_info_001db928;
  piVar5 = *(int **)PTR_search_head_001dbd10;
  if (piVar5 != (int *)0x0) {
    puVar6 = PTR_DAT_001db910 + 0x4564;
    do {
      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&
          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&
         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {
        return 1;
      }
      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {
        uVar3 = (*(code *)PTR_concat_001dc060)
                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);
      }
      else {
        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);
      }
      iVar2 = ldfile_try_open_bfd(uVar3,param_2);
      if (iVar2 != 0) {
        *(undefined4 *)(param_2 + 8) = uVar3;
        return 1;
      }
      (*(code *)PTR_free_001dc0ec)(uVar3);
      piVar5 = (int *)*piVar5;
    } while (piVar5 != (int *)0x0);
  }
  return 0;
}


lui gp,0x1a
addiu gp,gp,0x6f84
addu gp,gp,t9
addiu sp,sp,-0x50
lhu v0,0x24(a1)
seh v1,v0
sw gp,0x20(sp)
sw s8,0x48(sp)
or s8,a3,zero
sw s5,0x3c(sp)
or s5,a0,zero
sw s0,0x28(sp)
or s0,a1,zero
sw ra,0x4c(sp)
sw s7,0x44(sp)
sw s6,0x40(sp)
sw s4,0x38(sp)
sw s3,0x34(sp)
sw s2,0x30(sp)
sw s1,0x2c(sp)
bltz v1,0x0003c9e8
_sw a2,0x58(sp)
andi v0,v0,0x1000
beq v0,zero,0x0003c9c0
_lw a0,0x8(a1)
lb v1,0x0(a0)
li v0,0x2f
beq v1,v0,0x0003cb3c
_lw v0,-0x7f48(gp)
lw t9,-0x7bbc(gp)
bal 0x0003c1ac
_or a1,s0,zero
bne v0,zero,0x0003cad4
_lw gp,0x20(sp)
lw v1,0x8(s0)
li v0,0x2f
lb v1,0x0(v1)
beq v1,v0,0x0003cb0c
_lw ra,0x4c(sp)
lw v0,-0x7bc0(gp)
lw s1,0x0(v0)
beq s1,zero,0x0003cb08
_lw s3,-0x7fc0(gp)
lui s2,0xc000
lw s6,-0x7fa8(gp)
lw s4,-0x7bbc(gp)
b 0x0003ca4c
_addiu s3,s3,0x4564
jalr t9
_nop
or s7,v0,zero
or a0,s7,zero
or t9,s4,zero
bal 0x0003c1ac
_or a1,s0,zero
or a0,s7,zero
lw gp,0x20(sp)
bne v0,zero,0x0003cad0
_lw t9,-0x77e4(gp)
jalr t9
_nop
lw s1,0x0(s1)
beq s1,zero,0x0003cb08
_lw gp,0x20(sp)
lhu v0,0x24(s0)
andi v0,v0,0x400
beq v0,zero,0x0003ca88
_lui v1,0x8000
lw v0,0x0(s6)
or a1,s1,zero
lw t9,-0x7bb8(gp)
or a2,s0,zero
and v0,v0,s2
beq v0,v1,0x0003ca88
_or a0,s5,zero
bal 0x00039f30
_nop
bne v0,zero,0x0003cad4
_lw gp,0x20(sp)
lw v0,0x24(s0)
lui v1,0x8000
or a3,zero,zero
lw t9,-0x7870(gp)
or a1,s3,zero
lw a0,0x4(s1)
and v0,v0,s2
bne v0,v1,0x0003ca0c
_lw a2,0x8(s0)
lw t9,-0x7870(gp)
or a3,a2,zero
lw a2,0x58(sp)
sw zero,0x18(sp)
sw s8,0x14(sp)
jalr t9
_sw s5,0x10(sp)
b 0x0003ca18
_or s7,v0,zero
sw s7,0x8(s0)
li v0,0x1
lw ra,0x4c(sp)
lw s8,0x48(sp)
lw s7,0x44(sp)
lw s6,0x40(sp)
lw s5,0x3c(sp)
lw s4,0x38(sp)
lw s3,0x34(sp)
lw s2,0x30(sp)
lw s1,0x2c(sp)
lw s0,0x28(sp)
jr ra
_addiu sp,sp,0x50
lw ra,0x4c(sp)
or v0,zero,zero
lw s8,0x48(sp)
lw s7,0x44(sp)
lw s6,0x40(sp)
lw s5,0x3c(sp)
lw s4,0x38(sp)
lw s3,0x34(sp)
lw s2,0x30(sp)
lw s1,0x2c(sp)
lw s0,0x28(sp)
jr ra
_addiu sp,sp,0x50
or a1,a0,zero
lw t9,-0x7870(gp)
or a2,zero,zero
jalr t9
_lw a0,0x0(v0)
or a1,s0,zero
lw gp,0x20(sp)
or a0,v0,zero
lw t9,-0x7bbc(gp)
bal 0x0003c1ac
_or s1,v0,zero
beq v0,zero,0x0003cb7c
_lw gp,0x20(sp)
sw s1,0x8(s0)
b 0x0003cad8
_li v0,0x1
lw t9,-0x77e4(gp)
jalr t9
_or a0,s1,zero
b 0x0003c9d4
_lw gp,0x20(sp)
(translation_unit "undefined4\nldfile_open_file_search(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  int *piVar5;\n  undefined *puVar6;\n  \n  if (-1 < (short)*(ushort *)(param_2 + 0x24)) {\n    pcVar4 = *(char **)(param_2 + 8);\n    if (((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')) {\n      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);\n      if (iVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }\n  puVar1 = PTR_link_info_001db928;\n  piVar5 = *(int **)PTR_search_head_001dbd10;\n  if (piVar5 != (int *)0x0) {\n    puVar6 = PTR_DAT_001db910 + 0x4564;\n    do {\n      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }\n      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n      piVar5 = (int *)*piVar5;\n    } while (piVar5 != (int *)0x0);\n  }\n  return 0;\n}\n\n" (function_definition "undefined4\nldfile_open_file_search(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  int *piVar5;\n  undefined *puVar6;\n  \n  if (-1 < (short)*(ushort *)(param_2 + 0x24)) {\n    pcVar4 = *(char **)(param_2 + 8);\n    if (((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')) {\n      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);\n      if (iVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }\n  puVar1 = PTR_link_info_001db928;\n  piVar5 = *(int **)PTR_search_head_001dbd10;\n  if (piVar5 != (int *)0x0) {\n    puVar6 = PTR_DAT_001db910 + 0x4564;\n    do {\n      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }\n      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n      piVar5 = (int *)*piVar5;\n    } while (piVar5 != (int *)0x0);\n  }\n  return 0;\n}" type_identifier (function_declarator "ldfile_open_file_search(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  int *piVar5;\n  undefined *puVar6;\n  \n  if (-1 < (short)*(ushort *)(param_2 + 0x24)) {\n    pcVar4 = *(char **)(param_2 + 8);\n    if (((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')) {\n      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);\n      if (iVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }\n  puVar1 = PTR_link_info_001db928;\n  piVar5 = *(int **)PTR_search_head_001dbd10;\n  if (piVar5 != (int *)0x0) {\n    puVar6 = PTR_DAT_001db910 + 0x4564;\n    do {\n      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }\n      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n      piVar5 = (int *)*piVar5;\n    } while (piVar5 != (int *)0x0);\n  }\n  return 0;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "undefined *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (if_statement "if (-1 < (short)*(ushort *)(param_2 + 0x24)) {\n    pcVar4 = *(char **)(param_2 + 8);\n    if (((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')) {\n      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);\n      if (iVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }" if (parenthesized_expression "(-1 < (short)*(ushort *)(param_2 + 0x24))" ( (binary_expression "-1 < (short)*(ushort *)(param_2 + 0x24)" number_literal < (cast_expression "(short)*(ushort *)(param_2 + 0x24)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (pointer_expression "*(ushort *)(param_2 + 0x24)" * (cast_expression "(ushort *)(param_2 + 0x24)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x24)" ( (binary_expression "param_2 + 0x24" identifier + number_literal) )))))) )) (compound_statement "{\n    pcVar4 = *(char **)(param_2 + 8);\n    if (((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')) {\n      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);\n      if (iVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }" { (expression_statement "pcVar4 = *(char **)(param_2 + 8);" (assignment_expression "pcVar4 = *(char **)(param_2 + 8)" identifier = (pointer_expression "*(char **)(param_2 + 8)" * (cast_expression "(char **)(param_2 + 8)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) ))))) ;) (if_statement "if (((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')) {\n      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);\n      if (iVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }" if (parenthesized_expression "(((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/'))" ( (binary_expression "((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')" (parenthesized_expression "((*(ushort *)(param_2 + 0x24) & 0x1000) == 0)" ( (binary_expression "(*(ushort *)(param_2 + 0x24) & 0x1000) == 0" (parenthesized_expression "(*(ushort *)(param_2 + 0x24) & 0x1000)" ( (binary_expression "*(ushort *)(param_2 + 0x24) & 0x1000" (pointer_expression "*(ushort *)(param_2 + 0x24)" * (cast_expression "(ushort *)(param_2 + 0x24)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x24)" ( (binary_expression "param_2 + 0x24" identifier + number_literal) )))) & number_literal) )) == number_literal) )) || (parenthesized_expression "(*pcVar4 != '/')" ( (binary_expression "*pcVar4 != '/'" (pointer_expression "*pcVar4" * identifier) != (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);\n      if (iVar2 != 0) {\n        return 1;\n      }\n    }" { (expression_statement "iVar2 = ldfile_try_open_bfd(pcVar4,param_2);" (assignment_expression "iVar2 = ldfile_try_open_bfd(pcVar4,param_2)" identifier = (call_expression "ldfile_try_open_bfd(pcVar4,param_2)" identifier (argument_list "(pcVar4,param_2)" ( identifier , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n        return 1;\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        return 1;\n      }" { (return_statement "return 1;" return number_literal ;) })) }) (else_clause "else {\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }" else (compound_statement "{\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }" { (expression_statement "uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);" (assignment_expression "uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0)" identifier = (call_expression "(*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0)" (parenthesized_expression "(*(code *)PTR_concat_001dc060)" ( (pointer_expression "*(code *)PTR_concat_001dc060" * (cast_expression "(code *)PTR_concat_001dc060" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0)" ( (pointer_expression "*(undefined4 *)PTR_ld_sysroot_001db988" * (cast_expression "(undefined4 *)PTR_ld_sysroot_001db988" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) , identifier , number_literal )))) ;) (expression_statement "iVar2 = ldfile_try_open_bfd(uVar3,param_2);" (assignment_expression "iVar2 = ldfile_try_open_bfd(uVar3,param_2)" identifier = (call_expression "ldfile_try_open_bfd(uVar3,param_2)" identifier (argument_list "(uVar3,param_2)" ( identifier , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }" { (expression_statement "*(undefined4 *)(param_2 + 8) = uVar3;" (assignment_expression "*(undefined4 *)(param_2 + 8) = uVar3" (pointer_expression "*(undefined4 *)(param_2 + 8)" * (cast_expression "(undefined4 *)(param_2 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "(*(code *)PTR_free_001dc0ec)(uVar3);" (call_expression "(*(code *)PTR_free_001dc0ec)(uVar3)" (parenthesized_expression "(*(code *)PTR_free_001dc0ec)" ( (pointer_expression "*(code *)PTR_free_001dc0ec" * (cast_expression "(code *)PTR_free_001dc0ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar3)" ( identifier ))) ;) }))) (if_statement "if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }" if (parenthesized_expression "(**(char **)(param_2 + 8) == '/')" ( (binary_expression "**(char **)(param_2 + 8) == '/'" (pointer_expression "**(char **)(param_2 + 8)" * (pointer_expression "*(char **)(param_2 + 8)" * (cast_expression "(char **)(param_2 + 8)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) ))))) == (char_literal "'/'" ' character ')) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) })) (expression_statement "puVar1 = PTR_link_info_001db928;" (assignment_expression "puVar1 = PTR_link_info_001db928" identifier = identifier) ;) (expression_statement "piVar5 = *(int **)PTR_search_head_001dbd10;" (assignment_expression "piVar5 = *(int **)PTR_search_head_001dbd10" identifier = (pointer_expression "*(int **)PTR_search_head_001dbd10" * (cast_expression "(int **)PTR_search_head_001dbd10" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (if_statement "if (piVar5 != (int *)0x0) {\n    puVar6 = PTR_DAT_001db910 + 0x4564;\n    do {\n      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }\n      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n      piVar5 = (int *)*piVar5;\n    } while (piVar5 != (int *)0x0);\n  }" if (parenthesized_expression "(piVar5 != (int *)0x0)" ( (binary_expression "piVar5 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar6 = PTR_DAT_001db910 + 0x4564;\n    do {\n      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }\n      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n      piVar5 = (int *)*piVar5;\n    } while (piVar5 != (int *)0x0);\n  }" { (expression_statement "puVar6 = PTR_DAT_001db910 + 0x4564;" (assignment_expression "puVar6 = PTR_DAT_001db910 + 0x4564" identifier = (binary_expression "PTR_DAT_001db910 + 0x4564" identifier + number_literal)) ;) (do_statement "do {\n      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }\n      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n      piVar5 = (int *)*piVar5;\n    } while (piVar5 != (int *)0x0);" do (compound_statement "{\n      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }\n      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n      piVar5 = (int *)*piVar5;\n    }" { (if_statement "if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }" if (parenthesized_expression "((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0))" ( (binary_expression "(((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)" (parenthesized_expression "(((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000))" ( (binary_expression "((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)" (parenthesized_expression "((*(ushort *)(param_2 + 0x24) & 0x400) != 0)" ( (binary_expression "(*(ushort *)(param_2 + 0x24) & 0x400) != 0" (parenthesized_expression "(*(ushort *)(param_2 + 0x24) & 0x400)" ( (binary_expression "*(ushort *)(param_2 + 0x24) & 0x400" (pointer_expression "*(ushort *)(param_2 + 0x24)" * (cast_expression "(ushort *)(param_2 + 0x24)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x24)" ( (binary_expression "param_2 + 0x24" identifier + number_literal) )))) & number_literal) )) != number_literal) )) && (parenthesized_expression "((*(uint *)puVar1 & 0xc0000000) != 0x80000000)" ( (binary_expression "(*(uint *)puVar1 & 0xc0000000) != 0x80000000" (parenthesized_expression "(*(uint *)puVar1 & 0xc0000000)" ( (binary_expression "*(uint *)puVar1 & 0xc0000000" (pointer_expression "*(uint *)puVar1" * (cast_expression "(uint *)puVar1" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) & number_literal) )) != number_literal) ))) )) && (parenthesized_expression "(iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)" ( (comma_expression "iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0" (assignment_expression "iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2)" identifier = (call_expression "ldemul_open_dynamic_archive(param_1,piVar5,param_2)" identifier (argument_list "(param_1,piVar5,param_2)" ( identifier , identifier , identifier )))) , (binary_expression "iVar2 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n        return 1;\n      }" { (return_statement "return 1;" return number_literal ;) })) (if_statement "if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }" if (parenthesized_expression "((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000)" ( (binary_expression "(*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000" (parenthesized_expression "(*(uint *)(param_2 + 0x24) & 0xc0000000)" ( (binary_expression "*(uint *)(param_2 + 0x24) & 0xc0000000" (pointer_expression "*(uint *)(param_2 + 0x24)" * (cast_expression "(uint *)(param_2 + 0x24)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x24)" ( (binary_expression "param_2 + 0x24" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }" { (expression_statement "uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);" (assignment_expression "uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0)" identifier = (call_expression "(*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0)" (parenthesized_expression "(*(code *)PTR_concat_001dc060)" ( (pointer_expression "*(code *)PTR_concat_001dc060" * (cast_expression "(code *)PTR_concat_001dc060" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0)" ( (subscript_expression "piVar5[1]" identifier [ number_literal ]) , identifier , identifier , (pointer_expression "*(undefined4 *)(param_2 + 8)" * (cast_expression "(undefined4 *)(param_2 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) , identifier , identifier , number_literal )))) ;) }) (else_clause "else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }" else (compound_statement "{\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }" { (expression_statement "uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);" (assignment_expression "uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0)" identifier = (call_expression "(*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0)" (parenthesized_expression "(*(code *)PTR_concat_001dc060)" ( (pointer_expression "*(code *)PTR_concat_001dc060" * (cast_expression "(code *)PTR_concat_001dc060" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0)" ( (subscript_expression "piVar5[1]" identifier [ number_literal ]) , identifier , (pointer_expression "*(undefined4 *)(param_2 + 8)" * (cast_expression "(undefined4 *)(param_2 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) , number_literal )))) ;) }))) (expression_statement "iVar2 = ldfile_try_open_bfd(uVar3,param_2);" (assignment_expression "iVar2 = ldfile_try_open_bfd(uVar3,param_2)" identifier = (call_expression "ldfile_try_open_bfd(uVar3,param_2)" identifier (argument_list "(uVar3,param_2)" ( identifier , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }" { (expression_statement "*(undefined4 *)(param_2 + 8) = uVar3;" (assignment_expression "*(undefined4 *)(param_2 + 8) = uVar3" (pointer_expression "*(undefined4 *)(param_2 + 8)" * (cast_expression "(undefined4 *)(param_2 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "(*(code *)PTR_free_001dc0ec)(uVar3);" (call_expression "(*(code *)PTR_free_001dc0ec)(uVar3)" (parenthesized_expression "(*(code *)PTR_free_001dc0ec)" ( (pointer_expression "*(code *)PTR_free_001dc0ec" * (cast_expression "(code *)PTR_free_001dc0ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar3)" ( identifier ))) ;) (expression_statement "piVar5 = (int *)*piVar5;" (assignment_expression "piVar5 = (int *)*piVar5" identifier = (cast_expression "(int *)*piVar5" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar5" * identifier))) ;) }) while (parenthesized_expression "(piVar5 != (int *)0x0)" ( (binary_expression "piVar5 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "bfd_boolean\nldfile_open_file_search(char *arch,lang_input_statement_type *entry,char *lib,char *suffix)\n\n{\n  undefined *puVar1;\n  bfd_boolean bVar2;\n  char *pcVar3;\n  search_dirs_type *search;\n  undefined *puVar4;\n  \n  if (-1 < (short)*(ushort *)&entry->flags) {\n    pcVar3 = entry->filename;\n    if (((*(ushort *)&entry->flags & 0x1000) == 0) || (*pcVar3 != '/')) {\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pcVar3 = (char *)(*(code *)PTR_concat_001dc060)\n                                 (*(undefined4 *)PTR_ld_sysroot_001db988,pcVar3,0);\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(pcVar3);\n    }\n    if (*entry->filename == '/') {\n      return 0;\n    }\n  }\n  puVar1 = PTR_link_info_001db928;\n  search = *(search_dirs_type **)PTR_search_head_001dbd10;\n  if (search != (search_dirs_type *)0x0) {\n    puVar4 = PTR_yy_accept_1428__001db910 + 0x4564;\n    do {\n      if (((((ulonglong)entry->flags & 0x400000000000000) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (bVar2 = ldemul_open_dynamic_archive(arch,search,entry), bVar2 != 0)) {\n        return 1;\n      }\n      if (((ulonglong)entry->flags & 0xc000000000000000) == 0x8000000000000000) {\n        pcVar3 = (char *)(*(code *)PTR_concat_001dc060)\n                                   (search->name,puVar4,lib,entry->filename,arch,suffix,0);\n      }\n      else {\n        pcVar3 = (char *)(*(code *)PTR_concat_001dc060)(search->name,puVar4,entry->filename,0);\n      }\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(pcVar3);\n      search = search->next;\n    } while (search != (search_dirs *)0x0);\n  }\n  return 0;\n}\n\n" (function_definition "bfd_boolean\nldfile_open_file_search(char *arch,lang_input_statement_type *entry,char *lib,char *suffix)\n\n{\n  undefined *puVar1;\n  bfd_boolean bVar2;\n  char *pcVar3;\n  search_dirs_type *search;\n  undefined *puVar4;\n  \n  if (-1 < (short)*(ushort *)&entry->flags) {\n    pcVar3 = entry->filename;\n    if (((*(ushort *)&entry->flags & 0x1000) == 0) || (*pcVar3 != '/')) {\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pcVar3 = (char *)(*(code *)PTR_concat_001dc060)\n                                 (*(undefined4 *)PTR_ld_sysroot_001db988,pcVar3,0);\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(pcVar3);\n    }\n    if (*entry->filename == '/') {\n      return 0;\n    }\n  }\n  puVar1 = PTR_link_info_001db928;\n  search = *(search_dirs_type **)PTR_search_head_001dbd10;\n  if (search != (search_dirs_type *)0x0) {\n    puVar4 = PTR_yy_accept_1428__001db910 + 0x4564;\n    do {\n      if (((((ulonglong)entry->flags & 0x400000000000000) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (bVar2 = ldemul_open_dynamic_archive(arch,search,entry), bVar2 != 0)) {\n        return 1;\n      }\n      if (((ulonglong)entry->flags & 0xc000000000000000) == 0x8000000000000000) {\n        pcVar3 = (char *)(*(code *)PTR_concat_001dc060)\n                                   (search->name,puVar4,lib,entry->filename,arch,suffix,0);\n      }\n      else {\n        pcVar3 = (char *)(*(code *)PTR_concat_001dc060)(search->name,puVar4,entry->filename,0);\n      }\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(pcVar3);\n      search = search->next;\n    } while (search != (search_dirs *)0x0);\n  }\n  return 0;\n}" type_identifier (function_declarator "ldfile_open_file_search(char *arch,lang_input_statement_type *entry,char *lib,char *suffix)" identifier (parameter_list "(char *arch,lang_input_statement_type *entry,char *lib,char *suffix)" ( (parameter_declaration "char *arch" primitive_type (pointer_declarator "*arch" * identifier)) , (parameter_declaration "lang_input_statement_type *entry" type_identifier (pointer_declarator "*entry" * identifier)) , (parameter_declaration "char *lib" primitive_type (pointer_declarator "*lib" * identifier)) , (parameter_declaration "char *suffix" primitive_type (pointer_declarator "*suffix" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  bfd_boolean bVar2;\n  char *pcVar3;\n  search_dirs_type *search;\n  undefined *puVar4;\n  \n  if (-1 < (short)*(ushort *)&entry->flags) {\n    pcVar3 = entry->filename;\n    if (((*(ushort *)&entry->flags & 0x1000) == 0) || (*pcVar3 != '/')) {\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pcVar3 = (char *)(*(code *)PTR_concat_001dc060)\n                                 (*(undefined4 *)PTR_ld_sysroot_001db988,pcVar3,0);\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(pcVar3);\n    }\n    if (*entry->filename == '/') {\n      return 0;\n    }\n  }\n  puVar1 = PTR_link_info_001db928;\n  search = *(search_dirs_type **)PTR_search_head_001dbd10;\n  if (search != (search_dirs_type *)0x0) {\n    puVar4 = PTR_yy_accept_1428__001db910 + 0x4564;\n    do {\n      if (((((ulonglong)entry->flags & 0x400000000000000) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (bVar2 = ldemul_open_dynamic_archive(arch,search,entry), bVar2 != 0)) {\n        return 1;\n      }\n      if (((ulonglong)entry->flags & 0xc000000000000000) == 0x8000000000000000) {\n        pcVar3 = (char *)(*(code *)PTR_concat_001dc060)\n                                   (search->name,puVar4,lib,entry->filename,arch,suffix,0);\n      }\n      else {\n        pcVar3 = (char *)(*(code *)PTR_concat_001dc060)(search->name,puVar4,entry->filename,0);\n      }\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(pcVar3);\n      search = search->next;\n    } while (search != (search_dirs *)0x0);\n  }\n  return 0;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "bfd_boolean bVar2;" type_identifier identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "search_dirs_type *search;" type_identifier (pointer_declarator "*search" * identifier) ;) (declaration "undefined *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (if_statement "if (-1 < (short)*(ushort *)&entry->flags) {\n    pcVar3 = entry->filename;\n    if (((*(ushort *)&entry->flags & 0x1000) == 0) || (*pcVar3 != '/')) {\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pcVar3 = (char *)(*(code *)PTR_concat_001dc060)\n                                 (*(undefined4 *)PTR_ld_sysroot_001db988,pcVar3,0);\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(pcVar3);\n    }\n    if (*entry->filename == '/') {\n      return 0;\n    }\n  }" if (parenthesized_expression "(-1 < (short)*(ushort *)&entry->flags)" ( (binary_expression "-1 < (short)*(ushort *)&entry->flags" number_literal < (cast_expression "(short)*(ushort *)&entry->flags" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (pointer_expression "*(ushort *)&entry->flags" * (cast_expression "(ushort *)&entry->flags" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&entry->flags" & (field_expression "entry->flags" identifier -> field_identifier)))))) )) (compound_statement "{\n    pcVar3 = entry->filename;\n    if (((*(ushort *)&entry->flags & 0x1000) == 0) || (*pcVar3 != '/')) {\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pcVar3 = (char *)(*(code *)PTR_concat_001dc060)\n                                 (*(undefined4 *)PTR_ld_sysroot_001db988,pcVar3,0);\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(pcVar3);\n    }\n    if (*entry->filename == '/') {\n      return 0;\n    }\n  }" { (expression_statement "pcVar3 = entry->filename;" (assignment_expression "pcVar3 = entry->filename" identifier = (field_expression "entry->filename" identifier -> field_identifier)) ;) (if_statement "if (((*(ushort *)&entry->flags & 0x1000) == 0) || (*pcVar3 != '/')) {\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pcVar3 = (char *)(*(code *)PTR_concat_001dc060)\n                                 (*(undefined4 *)PTR_ld_sysroot_001db988,pcVar3,0);\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(pcVar3);\n    }" if (parenthesized_expression "(((*(ushort *)&entry->flags & 0x1000) == 0) || (*pcVar3 != '/'))" ( (binary_expression "((*(ushort *)&entry->flags & 0x1000) == 0) || (*pcVar3 != '/')" (parenthesized_expression "((*(ushort *)&entry->flags & 0x1000) == 0)" ( (binary_expression "(*(ushort *)&entry->flags & 0x1000) == 0" (parenthesized_expression "(*(ushort *)&entry->flags & 0x1000)" ( (binary_expression "*(ushort *)&entry->flags & 0x1000" (pointer_expression "*(ushort *)&entry->flags" * (cast_expression "(ushort *)&entry->flags" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&entry->flags" & (field_expression "entry->flags" identifier -> field_identifier)))) & number_literal) )) == number_literal) )) || (parenthesized_expression "(*pcVar3 != '/')" ( (binary_expression "*pcVar3 != '/'" (pointer_expression "*pcVar3" * identifier) != (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        return 1;\n      }\n    }" { (expression_statement "bVar2 = ldfile_try_open_bfd(pcVar3,entry);" (assignment_expression "bVar2 = ldfile_try_open_bfd(pcVar3,entry)" identifier = (call_expression "ldfile_try_open_bfd(pcVar3,entry)" identifier (argument_list "(pcVar3,entry)" ( identifier , identifier )))) ;) (if_statement "if (bVar2 != 0) {\n        return 1;\n      }" if (parenthesized_expression "(bVar2 != 0)" ( (binary_expression "bVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        return 1;\n      }" { (return_statement "return 1;" return number_literal ;) })) }) (else_clause "else {\n      pcVar3 = (char *)(*(code *)PTR_concat_001dc060)\n                                 (*(undefined4 *)PTR_ld_sysroot_001db988,pcVar3,0);\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(pcVar3);\n    }" else (compound_statement "{\n      pcVar3 = (char *)(*(code *)PTR_concat_001dc060)\n                                 (*(undefined4 *)PTR_ld_sysroot_001db988,pcVar3,0);\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(pcVar3);\n    }" { (expression_statement "pcVar3 = (char *)(*(code *)PTR_concat_001dc060)\n                                 (*(undefined4 *)PTR_ld_sysroot_001db988,pcVar3,0);" (assignment_expression "pcVar3 = (char *)(*(code *)PTR_concat_001dc060)\n                                 (*(undefined4 *)PTR_ld_sysroot_001db988,pcVar3,0)" identifier = (cast_expression "(char *)(*(code *)PTR_concat_001dc060)\n                                 (*(undefined4 *)PTR_ld_sysroot_001db988,pcVar3,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_concat_001dc060)\n                                 (*(undefined4 *)PTR_ld_sysroot_001db988,pcVar3,0)" (parenthesized_expression "(*(code *)PTR_concat_001dc060)" ( (pointer_expression "*(code *)PTR_concat_001dc060" * (cast_expression "(code *)PTR_concat_001dc060" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar3,0)" ( (pointer_expression "*(undefined4 *)PTR_ld_sysroot_001db988" * (cast_expression "(undefined4 *)PTR_ld_sysroot_001db988" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) , identifier , number_literal ))))) ;) (expression_statement "bVar2 = ldfile_try_open_bfd(pcVar3,entry);" (assignment_expression "bVar2 = ldfile_try_open_bfd(pcVar3,entry)" identifier = (call_expression "ldfile_try_open_bfd(pcVar3,entry)" identifier (argument_list "(pcVar3,entry)" ( identifier , identifier )))) ;) (if_statement "if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }" if (parenthesized_expression "(bVar2 != 0)" ( (binary_expression "bVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        entry->filename = pcVar3;\n        return 1;\n      }" { (expression_statement "entry->filename = pcVar3;" (assignment_expression "entry->filename = pcVar3" (field_expression "entry->filename" identifier -> field_identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "(*(code *)PTR_free_001dc0ec)(pcVar3);" (call_expression "(*(code *)PTR_free_001dc0ec)(pcVar3)" (parenthesized_expression "(*(code *)PTR_free_001dc0ec)" ( (pointer_expression "*(code *)PTR_free_001dc0ec" * (cast_expression "(code *)PTR_free_001dc0ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar3)" ( identifier ))) ;) }))) (if_statement "if (*entry->filename == '/') {\n      return 0;\n    }" if (parenthesized_expression "(*entry->filename == '/')" ( (binary_expression "*entry->filename == '/'" (pointer_expression "*entry->filename" * (field_expression "entry->filename" identifier -> field_identifier)) == (char_literal "'/'" ' character ')) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) })) (expression_statement "puVar1 = PTR_link_info_001db928;" (assignment_expression "puVar1 = PTR_link_info_001db928" identifier = identifier) ;) (expression_statement "search = *(search_dirs_type **)PTR_search_head_001dbd10;" (assignment_expression "search = *(search_dirs_type **)PTR_search_head_001dbd10" identifier = (pointer_expression "*(search_dirs_type **)PTR_search_head_001dbd10" * (cast_expression "(search_dirs_type **)PTR_search_head_001dbd10" ( (type_descriptor "search_dirs_type **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (if_statement "if (search != (search_dirs_type *)0x0) {\n    puVar4 = PTR_yy_accept_1428__001db910 + 0x4564;\n    do {\n      if (((((ulonglong)entry->flags & 0x400000000000000) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (bVar2 = ldemul_open_dynamic_archive(arch,search,entry), bVar2 != 0)) {\n        return 1;\n      }\n      if (((ulonglong)entry->flags & 0xc000000000000000) == 0x8000000000000000) {\n        pcVar3 = (char *)(*(code *)PTR_concat_001dc060)\n                                   (search->name,puVar4,lib,entry->filename,arch,suffix,0);\n      }\n      else {\n        pcVar3 = (char *)(*(code *)PTR_concat_001dc060)(search->name,puVar4,entry->filename,0);\n      }\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(pcVar3);\n      search = search->next;\n    } while (search != (search_dirs *)0x0);\n  }" if (parenthesized_expression "(search != (search_dirs_type *)0x0)" ( (binary_expression "search != (search_dirs_type *)0x0" identifier != (cast_expression "(search_dirs_type *)0x0" ( (type_descriptor "search_dirs_type *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar4 = PTR_yy_accept_1428__001db910 + 0x4564;\n    do {\n      if (((((ulonglong)entry->flags & 0x400000000000000) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (bVar2 = ldemul_open_dynamic_archive(arch,search,entry), bVar2 != 0)) {\n        return 1;\n      }\n      if (((ulonglong)entry->flags & 0xc000000000000000) == 0x8000000000000000) {\n        pcVar3 = (char *)(*(code *)PTR_concat_001dc060)\n                                   (search->name,puVar4,lib,entry->filename,arch,suffix,0);\n      }\n      else {\n        pcVar3 = (char *)(*(code *)PTR_concat_001dc060)(search->name,puVar4,entry->filename,0);\n      }\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(pcVar3);\n      search = search->next;\n    } while (search != (search_dirs *)0x0);\n  }" { (expression_statement "puVar4 = PTR_yy_accept_1428__001db910 + 0x4564;" (assignment_expression "puVar4 = PTR_yy_accept_1428__001db910 + 0x4564" identifier = (binary_expression "PTR_yy_accept_1428__001db910 + 0x4564" identifier + number_literal)) ;) (do_statement "do {\n      if (((((ulonglong)entry->flags & 0x400000000000000) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (bVar2 = ldemul_open_dynamic_archive(arch,search,entry), bVar2 != 0)) {\n        return 1;\n      }\n      if (((ulonglong)entry->flags & 0xc000000000000000) == 0x8000000000000000) {\n        pcVar3 = (char *)(*(code *)PTR_concat_001dc060)\n                                   (search->name,puVar4,lib,entry->filename,arch,suffix,0);\n      }\n      else {\n        pcVar3 = (char *)(*(code *)PTR_concat_001dc060)(search->name,puVar4,entry->filename,0);\n      }\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(pcVar3);\n      search = search->next;\n    } while (search != (search_dirs *)0x0);" do (compound_statement "{\n      if (((((ulonglong)entry->flags & 0x400000000000000) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (bVar2 = ldemul_open_dynamic_archive(arch,search,entry), bVar2 != 0)) {\n        return 1;\n      }\n      if (((ulonglong)entry->flags & 0xc000000000000000) == 0x8000000000000000) {\n        pcVar3 = (char *)(*(code *)PTR_concat_001dc060)\n                                   (search->name,puVar4,lib,entry->filename,arch,suffix,0);\n      }\n      else {\n        pcVar3 = (char *)(*(code *)PTR_concat_001dc060)(search->name,puVar4,entry->filename,0);\n      }\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(pcVar3);\n      search = search->next;\n    }" { (if_statement "if (((((ulonglong)entry->flags & 0x400000000000000) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (bVar2 = ldemul_open_dynamic_archive(arch,search,entry), bVar2 != 0)) {\n        return 1;\n      }" if (parenthesized_expression "(((((ulonglong)entry->flags & 0x400000000000000) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (bVar2 = ldemul_open_dynamic_archive(arch,search,entry), bVar2 != 0))" ( (binary_expression "((((ulonglong)entry->flags & 0x400000000000000) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (bVar2 = ldemul_open_dynamic_archive(arch,search,entry), bVar2 != 0)" (parenthesized_expression "((((ulonglong)entry->flags & 0x400000000000000) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000))" ( (binary_expression "(((ulonglong)entry->flags & 0x400000000000000) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)" (parenthesized_expression "(((ulonglong)entry->flags & 0x400000000000000) != 0)" ( (binary_expression "((ulonglong)entry->flags & 0x400000000000000) != 0" (parenthesized_expression "((ulonglong)entry->flags & 0x400000000000000)" ( (binary_expression "(ulonglong)entry->flags & 0x400000000000000" (cast_expression "(ulonglong)entry->flags" ( (type_descriptor "ulonglong" type_identifier) ) (field_expression "entry->flags" identifier -> field_identifier)) & number_literal) )) != number_literal) )) && (parenthesized_expression "((*(uint *)puVar1 & 0xc0000000) != 0x80000000)" ( (binary_expression "(*(uint *)puVar1 & 0xc0000000) != 0x80000000" (parenthesized_expression "(*(uint *)puVar1 & 0xc0000000)" ( (binary_expression "*(uint *)puVar1 & 0xc0000000" (pointer_expression "*(uint *)puVar1" * (cast_expression "(uint *)puVar1" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) & number_literal) )) != number_literal) ))) )) && (parenthesized_expression "(bVar2 = ldemul_open_dynamic_archive(arch,search,entry), bVar2 != 0)" ( (comma_expression "bVar2 = ldemul_open_dynamic_archive(arch,search,entry), bVar2 != 0" (assignment_expression "bVar2 = ldemul_open_dynamic_archive(arch,search,entry)" identifier = (call_expression "ldemul_open_dynamic_archive(arch,search,entry)" identifier (argument_list "(arch,search,entry)" ( identifier , identifier , identifier )))) , (binary_expression "bVar2 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n        return 1;\n      }" { (return_statement "return 1;" return number_literal ;) })) (if_statement "if (((ulonglong)entry->flags & 0xc000000000000000) == 0x8000000000000000) {\n        pcVar3 = (char *)(*(code *)PTR_concat_001dc060)\n                                   (search->name,puVar4,lib,entry->filename,arch,suffix,0);\n      }\n      else {\n        pcVar3 = (char *)(*(code *)PTR_concat_001dc060)(search->name,puVar4,entry->filename,0);\n      }" if (parenthesized_expression "(((ulonglong)entry->flags & 0xc000000000000000) == 0x8000000000000000)" ( (binary_expression "((ulonglong)entry->flags & 0xc000000000000000) == 0x8000000000000000" (parenthesized_expression "((ulonglong)entry->flags & 0xc000000000000000)" ( (binary_expression "(ulonglong)entry->flags & 0xc000000000000000" (cast_expression "(ulonglong)entry->flags" ( (type_descriptor "ulonglong" type_identifier) ) (field_expression "entry->flags" identifier -> field_identifier)) & number_literal) )) == number_literal) )) (compound_statement "{\n        pcVar3 = (char *)(*(code *)PTR_concat_001dc060)\n                                   (search->name,puVar4,lib,entry->filename,arch,suffix,0);\n      }" { (expression_statement "pcVar3 = (char *)(*(code *)PTR_concat_001dc060)\n                                   (search->name,puVar4,lib,entry->filename,arch,suffix,0);" (assignment_expression "pcVar3 = (char *)(*(code *)PTR_concat_001dc060)\n                                   (search->name,puVar4,lib,entry->filename,arch,suffix,0)" identifier = (cast_expression "(char *)(*(code *)PTR_concat_001dc060)\n                                   (search->name,puVar4,lib,entry->filename,arch,suffix,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_concat_001dc060)\n                                   (search->name,puVar4,lib,entry->filename,arch,suffix,0)" (parenthesized_expression "(*(code *)PTR_concat_001dc060)" ( (pointer_expression "*(code *)PTR_concat_001dc060" * (cast_expression "(code *)PTR_concat_001dc060" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(search->name,puVar4,lib,entry->filename,arch,suffix,0)" ( (field_expression "search->name" identifier -> field_identifier) , identifier , identifier , (field_expression "entry->filename" identifier -> field_identifier) , identifier , identifier , number_literal ))))) ;) }) (else_clause "else {\n        pcVar3 = (char *)(*(code *)PTR_concat_001dc060)(search->name,puVar4,entry->filename,0);\n      }" else (compound_statement "{\n        pcVar3 = (char *)(*(code *)PTR_concat_001dc060)(search->name,puVar4,entry->filename,0);\n      }" { (expression_statement "pcVar3 = (char *)(*(code *)PTR_concat_001dc060)(search->name,puVar4,entry->filename,0);" (assignment_expression "pcVar3 = (char *)(*(code *)PTR_concat_001dc060)(search->name,puVar4,entry->filename,0)" identifier = (cast_expression "(char *)(*(code *)PTR_concat_001dc060)(search->name,puVar4,entry->filename,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_concat_001dc060)(search->name,puVar4,entry->filename,0)" (parenthesized_expression "(*(code *)PTR_concat_001dc060)" ( (pointer_expression "*(code *)PTR_concat_001dc060" * (cast_expression "(code *)PTR_concat_001dc060" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(search->name,puVar4,entry->filename,0)" ( (field_expression "search->name" identifier -> field_identifier) , identifier , (field_expression "entry->filename" identifier -> field_identifier) , number_literal ))))) ;) }))) (expression_statement "bVar2 = ldfile_try_open_bfd(pcVar3,entry);" (assignment_expression "bVar2 = ldfile_try_open_bfd(pcVar3,entry)" identifier = (call_expression "ldfile_try_open_bfd(pcVar3,entry)" identifier (argument_list "(pcVar3,entry)" ( identifier , identifier )))) ;) (if_statement "if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }" if (parenthesized_expression "(bVar2 != 0)" ( (binary_expression "bVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        entry->filename = pcVar3;\n        return 1;\n      }" { (expression_statement "entry->filename = pcVar3;" (assignment_expression "entry->filename = pcVar3" (field_expression "entry->filename" identifier -> field_identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "(*(code *)PTR_free_001dc0ec)(pcVar3);" (call_expression "(*(code *)PTR_free_001dc0ec)(pcVar3)" (parenthesized_expression "(*(code *)PTR_free_001dc0ec)" ( (pointer_expression "*(code *)PTR_free_001dc0ec" * (cast_expression "(code *)PTR_free_001dc0ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar3)" ( identifier ))) ;) (expression_statement "search = search->next;" (assignment_expression "search = search->next" identifier = (field_expression "search->next" identifier -> field_identifier)) ;) }) while (parenthesized_expression "(search != (search_dirs *)0x0)" ( (binary_expression "search != (search_dirs *)0x0" identifier != (cast_expression "(search_dirs *)0x0" ( (type_descriptor "search_dirs *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4\nldfile_open_file_search(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  int *piVar5;\n  undefined *puVar6;\n  \n  if (-1 < (short)*(ushort *)(param_2 + 0x24)) {\n    pcVar4 = *(char **)(param_2 + 8);\n    if (((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')) {\n      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);\n      if (iVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }\n  puVar1 = PTR_link_info_001db928;\n  piVar5 = *(int **)PTR_search_head_001dbd10;\n  if (piVar5 != (int *)0x0) {\n    puVar6 = PTR_DAT_001db910 + 0x4564;\n    do {\n      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }\n      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n      piVar5 = (int *)*piVar5;\n    } while (piVar5 != (int *)0x0);\n  }\n  return 0;\n}\n\n" (function_definition "undefined4\nldfile_open_file_search(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  int *piVar5;\n  undefined *puVar6;\n  \n  if (-1 < (short)*(ushort *)(param_2 + 0x24)) {\n    pcVar4 = *(char **)(param_2 + 8);\n    if (((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')) {\n      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);\n      if (iVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }\n  puVar1 = PTR_link_info_001db928;\n  piVar5 = *(int **)PTR_search_head_001dbd10;\n  if (piVar5 != (int *)0x0) {\n    puVar6 = PTR_DAT_001db910 + 0x4564;\n    do {\n      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }\n      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n      piVar5 = (int *)*piVar5;\n    } while (piVar5 != (int *)0x0);\n  }\n  return 0;\n}" type_identifier (function_declarator "ldfile_open_file_search(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  int *piVar5;\n  undefined *puVar6;\n  \n  if (-1 < (short)*(ushort *)(param_2 + 0x24)) {\n    pcVar4 = *(char **)(param_2 + 8);\n    if (((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')) {\n      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);\n      if (iVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }\n  puVar1 = PTR_link_info_001db928;\n  piVar5 = *(int **)PTR_search_head_001dbd10;\n  if (piVar5 != (int *)0x0) {\n    puVar6 = PTR_DAT_001db910 + 0x4564;\n    do {\n      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }\n      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n      piVar5 = (int *)*piVar5;\n    } while (piVar5 != (int *)0x0);\n  }\n  return 0;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "undefined *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (if_statement "if (-1 < (short)*(ushort *)(param_2 + 0x24)) {\n    pcVar4 = *(char **)(param_2 + 8);\n    if (((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')) {\n      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);\n      if (iVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }" if (parenthesized_expression "(-1 < (short)*(ushort *)(param_2 + 0x24))" ( (binary_expression "-1 < (short)*(ushort *)(param_2 + 0x24)" number_literal < (cast_expression "(short)*(ushort *)(param_2 + 0x24)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (pointer_expression "*(ushort *)(param_2 + 0x24)" * (cast_expression "(ushort *)(param_2 + 0x24)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x24)" ( (binary_expression "param_2 + 0x24" identifier + number_literal) )))))) )) (compound_statement "{\n    pcVar4 = *(char **)(param_2 + 8);\n    if (((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')) {\n      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);\n      if (iVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }" { (expression_statement "pcVar4 = *(char **)(param_2 + 8);" (assignment_expression "pcVar4 = *(char **)(param_2 + 8)" identifier = (pointer_expression "*(char **)(param_2 + 8)" * (cast_expression "(char **)(param_2 + 8)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) ))))) ;) (if_statement "if (((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')) {\n      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);\n      if (iVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }" if (parenthesized_expression "(((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/'))" ( (binary_expression "((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')" (parenthesized_expression "((*(ushort *)(param_2 + 0x24) & 0x1000) == 0)" ( (binary_expression "(*(ushort *)(param_2 + 0x24) & 0x1000) == 0" (parenthesized_expression "(*(ushort *)(param_2 + 0x24) & 0x1000)" ( (binary_expression "*(ushort *)(param_2 + 0x24) & 0x1000" (pointer_expression "*(ushort *)(param_2 + 0x24)" * (cast_expression "(ushort *)(param_2 + 0x24)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x24)" ( (binary_expression "param_2 + 0x24" identifier + number_literal) )))) & number_literal) )) == number_literal) )) || (parenthesized_expression "(*pcVar4 != '/')" ( (binary_expression "*pcVar4 != '/'" (pointer_expression "*pcVar4" * identifier) != (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);\n      if (iVar2 != 0) {\n        return 1;\n      }\n    }" { (expression_statement "iVar2 = ldfile_try_open_bfd(pcVar4,param_2);" (assignment_expression "iVar2 = ldfile_try_open_bfd(pcVar4,param_2)" identifier = (call_expression "ldfile_try_open_bfd(pcVar4,param_2)" identifier (argument_list "(pcVar4,param_2)" ( identifier , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n        return 1;\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        return 1;\n      }" { (return_statement "return 1;" return number_literal ;) })) }) (else_clause "else {\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }" else (compound_statement "{\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }" { (expression_statement "uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);" (assignment_expression "uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0)" identifier = (call_expression "(*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0)" (parenthesized_expression "(*(code *)PTR_concat_001dc060)" ( (pointer_expression "*(code *)PTR_concat_001dc060" * (cast_expression "(code *)PTR_concat_001dc060" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0)" ( (pointer_expression "*(undefined4 *)PTR_ld_sysroot_001db988" * (cast_expression "(undefined4 *)PTR_ld_sysroot_001db988" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) , identifier , number_literal )))) ;) (expression_statement "iVar2 = ldfile_try_open_bfd(uVar3,param_2);" (assignment_expression "iVar2 = ldfile_try_open_bfd(uVar3,param_2)" identifier = (call_expression "ldfile_try_open_bfd(uVar3,param_2)" identifier (argument_list "(uVar3,param_2)" ( identifier , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }" { (expression_statement "*(undefined4 *)(param_2 + 8) = uVar3;" (assignment_expression "*(undefined4 *)(param_2 + 8) = uVar3" (pointer_expression "*(undefined4 *)(param_2 + 8)" * (cast_expression "(undefined4 *)(param_2 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "(*(code *)PTR_free_001dc0ec)(uVar3);" (call_expression "(*(code *)PTR_free_001dc0ec)(uVar3)" (parenthesized_expression "(*(code *)PTR_free_001dc0ec)" ( (pointer_expression "*(code *)PTR_free_001dc0ec" * (cast_expression "(code *)PTR_free_001dc0ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar3)" ( identifier ))) ;) }))) (if_statement "if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }" if (parenthesized_expression "(**(char **)(param_2 + 8) == '/')" ( (binary_expression "**(char **)(param_2 + 8) == '/'" (pointer_expression "**(char **)(param_2 + 8)" * (pointer_expression "*(char **)(param_2 + 8)" * (cast_expression "(char **)(param_2 + 8)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) ))))) == (char_literal "'/'" ' character ')) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) })) (expression_statement "puVar1 = PTR_link_info_001db928;" (assignment_expression "puVar1 = PTR_link_info_001db928" identifier = identifier) ;) (expression_statement "piVar5 = *(int **)PTR_search_head_001dbd10;" (assignment_expression "piVar5 = *(int **)PTR_search_head_001dbd10" identifier = (pointer_expression "*(int **)PTR_search_head_001dbd10" * (cast_expression "(int **)PTR_search_head_001dbd10" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (if_statement "if (piVar5 != (int *)0x0) {\n    puVar6 = PTR_DAT_001db910 + 0x4564;\n    do {\n      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }\n      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n      piVar5 = (int *)*piVar5;\n    } while (piVar5 != (int *)0x0);\n  }" if (parenthesized_expression "(piVar5 != (int *)0x0)" ( (binary_expression "piVar5 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar6 = PTR_DAT_001db910 + 0x4564;\n    do {\n      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }\n      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n      piVar5 = (int *)*piVar5;\n    } while (piVar5 != (int *)0x0);\n  }" { (expression_statement "puVar6 = PTR_DAT_001db910 + 0x4564;" (assignment_expression "puVar6 = PTR_DAT_001db910 + 0x4564" identifier = (binary_expression "PTR_DAT_001db910 + 0x4564" identifier + number_literal)) ;) (do_statement "do {\n      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }\n      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n      piVar5 = (int *)*piVar5;\n    } while (piVar5 != (int *)0x0);" do (compound_statement "{\n      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }\n      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n      piVar5 = (int *)*piVar5;\n    }" { (if_statement "if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }" if (parenthesized_expression "((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0))" ( (binary_expression "(((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)" (parenthesized_expression "(((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000))" ( (binary_expression "((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)" (parenthesized_expression "((*(ushort *)(param_2 + 0x24) & 0x400) != 0)" ( (binary_expression "(*(ushort *)(param_2 + 0x24) & 0x400) != 0" (parenthesized_expression "(*(ushort *)(param_2 + 0x24) & 0x400)" ( (binary_expression "*(ushort *)(param_2 + 0x24) & 0x400" (pointer_expression "*(ushort *)(param_2 + 0x24)" * (cast_expression "(ushort *)(param_2 + 0x24)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x24)" ( (binary_expression "param_2 + 0x24" identifier + number_literal) )))) & number_literal) )) != number_literal) )) && (parenthesized_expression "((*(uint *)puVar1 & 0xc0000000) != 0x80000000)" ( (binary_expression "(*(uint *)puVar1 & 0xc0000000) != 0x80000000" (parenthesized_expression "(*(uint *)puVar1 & 0xc0000000)" ( (binary_expression "*(uint *)puVar1 & 0xc0000000" (pointer_expression "*(uint *)puVar1" * (cast_expression "(uint *)puVar1" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) & number_literal) )) != number_literal) ))) )) && (parenthesized_expression "(iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)" ( (comma_expression "iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0" (assignment_expression "iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2)" identifier = (call_expression "ldemul_open_dynamic_archive(param_1,piVar5,param_2)" identifier (argument_list "(param_1,piVar5,param_2)" ( identifier , identifier , identifier )))) , (binary_expression "iVar2 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n        return 1;\n      }" { (return_statement "return 1;" return number_literal ;) })) (if_statement "if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }" if (parenthesized_expression "((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000)" ( (binary_expression "(*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000" (parenthesized_expression "(*(uint *)(param_2 + 0x24) & 0xc0000000)" ( (binary_expression "*(uint *)(param_2 + 0x24) & 0xc0000000" (pointer_expression "*(uint *)(param_2 + 0x24)" * (cast_expression "(uint *)(param_2 + 0x24)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x24)" ( (binary_expression "param_2 + 0x24" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }" { (expression_statement "uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);" (assignment_expression "uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0)" identifier = (call_expression "(*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0)" (parenthesized_expression "(*(code *)PTR_concat_001dc060)" ( (pointer_expression "*(code *)PTR_concat_001dc060" * (cast_expression "(code *)PTR_concat_001dc060" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0)" ( (subscript_expression "piVar5[1]" identifier [ number_literal ]) , identifier , identifier , (pointer_expression "*(undefined4 *)(param_2 + 8)" * (cast_expression "(undefined4 *)(param_2 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) , identifier , identifier , number_literal )))) ;) }) (else_clause "else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }" else (compound_statement "{\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }" { (expression_statement "uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);" (assignment_expression "uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0)" identifier = (call_expression "(*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0)" (parenthesized_expression "(*(code *)PTR_concat_001dc060)" ( (pointer_expression "*(code *)PTR_concat_001dc060" * (cast_expression "(code *)PTR_concat_001dc060" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0)" ( (subscript_expression "piVar5[1]" identifier [ number_literal ]) , identifier , (pointer_expression "*(undefined4 *)(param_2 + 8)" * (cast_expression "(undefined4 *)(param_2 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) , number_literal )))) ;) }))) (expression_statement "iVar2 = ldfile_try_open_bfd(uVar3,param_2);" (assignment_expression "iVar2 = ldfile_try_open_bfd(uVar3,param_2)" identifier = (call_expression "ldfile_try_open_bfd(uVar3,param_2)" identifier (argument_list "(uVar3,param_2)" ( identifier , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }" { (expression_statement "*(undefined4 *)(param_2 + 8) = uVar3;" (assignment_expression "*(undefined4 *)(param_2 + 8) = uVar3" (pointer_expression "*(undefined4 *)(param_2 + 8)" * (cast_expression "(undefined4 *)(param_2 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "(*(code *)PTR_free_001dc0ec)(uVar3);" (call_expression "(*(code *)PTR_free_001dc0ec)(uVar3)" (parenthesized_expression "(*(code *)PTR_free_001dc0ec)" ( (pointer_expression "*(code *)PTR_free_001dc0ec" * (cast_expression "(code *)PTR_free_001dc0ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar3)" ( identifier ))) ;) (expression_statement "piVar5 = (int *)*piVar5;" (assignment_expression "piVar5 = (int *)*piVar5" identifier = (cast_expression "(int *)*piVar5" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar5" * identifier))) ;) }) while (parenthesized_expression "(piVar5 != (int *)0x0)" ( (binary_expression "piVar5 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor (sized_type_specifier short)) ) (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) )) (compound_statement { (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 (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) || (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != (char_literal ' character ')) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return LIT ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) , IDENT , LIT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return LIT ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) == (char_literal ' character ')) )) (compound_statement { (return_statement return LIT ;) })) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) != LIT) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) & LIT) )) != LIT) ))) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) , (binary_expression IDENT != LIT)) ))) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (subscript_expression IDENT [ LIT ]) , IDENT , IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT , IDENT , LIT )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (subscript_expression IDENT [ LIT ]) , IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT )))) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return LIT ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) ;) })) (return_statement return LIT ;) })))
(function_definition "undefined4\nldfile_open_file_search(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  int *piVar5;\n  undefined *puVar6;\n  \n  if (-1 < (short)*(ushort *)(param_2 + 0x24)) {\n    pcVar4 = *(char **)(param_2 + 8);\n    if (((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')) {\n      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);\n      if (iVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }\n  puVar1 = PTR_link_info_001db928;\n  piVar5 = *(int **)PTR_search_head_001dbd10;\n  if (piVar5 != (int *)0x0) {\n    puVar6 = PTR_DAT_001db910 + 0x4564;\n    do {\n      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }\n      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n      piVar5 = (int *)*piVar5;\n    } while (piVar5 != (int *)0x0);\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "ldfile_open_file_search(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)" (identifier "ldfile_open_file_search") (parameter_list "(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (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")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  char *pcVar4;\n  int *piVar5;\n  undefined *puVar6;\n  \n  if (-1 < (short)*(ushort *)(param_2 + 0x24)) {\n    pcVar4 = *(char **)(param_2 + 8);\n    if (((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')) {\n      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);\n      if (iVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }\n  puVar1 = PTR_link_info_001db928;\n  piVar5 = *(int **)PTR_search_head_001dbd10;\n  if (piVar5 != (int *)0x0) {\n    puVar6 = PTR_DAT_001db910 + 0x4564;\n    do {\n      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }\n      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n      piVar5 = (int *)*piVar5;\n    } while (piVar5 != (int *)0x0);\n  }\n  return 0;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "char *pcVar4;" (primitive_type "char") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (declaration "int *piVar5;" (primitive_type "int") (pointer_declarator "*piVar5" (* "*") (identifier "piVar5")) (; ";")) (declaration "undefined *puVar6;" (type_identifier "undefined") (pointer_declarator "*puVar6" (* "*") (identifier "puVar6")) (; ";")) (if_statement "if (-1 < (short)*(ushort *)(param_2 + 0x24)) {\n    pcVar4 = *(char **)(param_2 + 8);\n    if (((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')) {\n      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);\n      if (iVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }" (if "if") (parenthesized_expression "(-1 < (short)*(ushort *)(param_2 + 0x24))" (( "(") (binary_expression "-1 < (short)*(ushort *)(param_2 + 0x24)" (number_literal "-1") (< "<") (cast_expression "(short)*(ushort *)(param_2 + 0x24)" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (pointer_expression "*(ushort *)(param_2 + 0x24)" (* "*") (cast_expression "(ushort *)(param_2 + 0x24)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x24)" (( "(") (binary_expression "param_2 + 0x24" (identifier "param_2") (+ "+") (number_literal "0x24")) () ")")))))) () ")")) (compound_statement "{\n    pcVar4 = *(char **)(param_2 + 8);\n    if (((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')) {\n      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);\n      if (iVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }" ({ "{") (expression_statement "pcVar4 = *(char **)(param_2 + 8);" (assignment_expression "pcVar4 = *(char **)(param_2 + 8)" (identifier "pcVar4") (= "=") (pointer_expression "*(char **)(param_2 + 8)" (* "*") (cast_expression "(char **)(param_2 + 8)" (( "(") (type_descriptor "char **" (primitive_type "char") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (if_statement "if (((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')) {\n      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);\n      if (iVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }" (if "if") (parenthesized_expression "(((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/'))" (( "(") (binary_expression "((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')" (parenthesized_expression "((*(ushort *)(param_2 + 0x24) & 0x1000) == 0)" (( "(") (binary_expression "(*(ushort *)(param_2 + 0x24) & 0x1000) == 0" (parenthesized_expression "(*(ushort *)(param_2 + 0x24) & 0x1000)" (( "(") (binary_expression "*(ushort *)(param_2 + 0x24) & 0x1000" (pointer_expression "*(ushort *)(param_2 + 0x24)" (* "*") (cast_expression "(ushort *)(param_2 + 0x24)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x24)" (( "(") (binary_expression "param_2 + 0x24" (identifier "param_2") (+ "+") (number_literal "0x24")) () ")")))) (& "&") (number_literal "0x1000")) () ")")) (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(*pcVar4 != '/')" (( "(") (binary_expression "*pcVar4 != '/'" (pointer_expression "*pcVar4" (* "*") (identifier "pcVar4")) (!= "!=") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")"))) () ")")) (compound_statement "{\n      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);\n      if (iVar2 != 0) {\n        return 1;\n      }\n    }" ({ "{") (expression_statement "iVar2 = ldfile_try_open_bfd(pcVar4,param_2);" (assignment_expression "iVar2 = ldfile_try_open_bfd(pcVar4,param_2)" (identifier "iVar2") (= "=") (call_expression "ldfile_try_open_bfd(pcVar4,param_2)" (identifier "ldfile_try_open_bfd") (argument_list "(pcVar4,param_2)" (( "(") (identifier "pcVar4") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n        return 1;\n      }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        return 1;\n      }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }" (else "else") (compound_statement "{\n      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n    }" ({ "{") (expression_statement "uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);" (assignment_expression "uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0)" (identifier "uVar3") (= "=") (call_expression "(*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0)" (parenthesized_expression "(*(code *)PTR_concat_001dc060)" (( "(") (pointer_expression "*(code *)PTR_concat_001dc060" (* "*") (cast_expression "(code *)PTR_concat_001dc060" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_concat_001dc060"))) () ")")) (argument_list "(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0)" (( "(") (pointer_expression "*(undefined4 *)PTR_ld_sysroot_001db988" (* "*") (cast_expression "(undefined4 *)PTR_ld_sysroot_001db988" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_ld_sysroot_001db988"))) (, ",") (identifier "pcVar4") (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "iVar2 = ldfile_try_open_bfd(uVar3,param_2);" (assignment_expression "iVar2 = ldfile_try_open_bfd(uVar3,param_2)" (identifier "iVar2") (= "=") (call_expression "ldfile_try_open_bfd(uVar3,param_2)" (identifier "ldfile_try_open_bfd") (argument_list "(uVar3,param_2)" (( "(") (identifier "uVar3") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }" ({ "{") (expression_statement "*(undefined4 *)(param_2 + 8) = uVar3;" (assignment_expression "*(undefined4 *)(param_2 + 8) = uVar3" (pointer_expression "*(undefined4 *)(param_2 + 8)" (* "*") (cast_expression "(undefined4 *)(param_2 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_free_001dc0ec)(uVar3);" (call_expression "(*(code *)PTR_free_001dc0ec)(uVar3)" (parenthesized_expression "(*(code *)PTR_free_001dc0ec)" (( "(") (pointer_expression "*(code *)PTR_free_001dc0ec" (* "*") (cast_expression "(code *)PTR_free_001dc0ec" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_free_001dc0ec"))) () ")")) (argument_list "(uVar3)" (( "(") (identifier "uVar3") () ")"))) (; ";")) (} "}")))) (if_statement "if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }" (if "if") (parenthesized_expression "(**(char **)(param_2 + 8) == '/')" (( "(") (binary_expression "**(char **)(param_2 + 8) == '/'" (pointer_expression "**(char **)(param_2 + 8)" (* "*") (pointer_expression "*(char **)(param_2 + 8)" (* "*") (cast_expression "(char **)(param_2 + 8)" (( "(") (type_descriptor "char **" (primitive_type "char") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")"))))) (== "==") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (} "}"))) (expression_statement "puVar1 = PTR_link_info_001db928;" (assignment_expression "puVar1 = PTR_link_info_001db928" (identifier "puVar1") (= "=") (identifier "PTR_link_info_001db928")) (; ";")) (expression_statement "piVar5 = *(int **)PTR_search_head_001dbd10;" (assignment_expression "piVar5 = *(int **)PTR_search_head_001dbd10" (identifier "piVar5") (= "=") (pointer_expression "*(int **)PTR_search_head_001dbd10" (* "*") (cast_expression "(int **)PTR_search_head_001dbd10" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "PTR_search_head_001dbd10")))) (; ";")) (if_statement "if (piVar5 != (int *)0x0) {\n    puVar6 = PTR_DAT_001db910 + 0x4564;\n    do {\n      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }\n      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n      piVar5 = (int *)*piVar5;\n    } while (piVar5 != (int *)0x0);\n  }" (if "if") (parenthesized_expression "(piVar5 != (int *)0x0)" (( "(") (binary_expression "piVar5 != (int *)0x0" (identifier "piVar5") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    puVar6 = PTR_DAT_001db910 + 0x4564;\n    do {\n      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }\n      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n      piVar5 = (int *)*piVar5;\n    } while (piVar5 != (int *)0x0);\n  }" ({ "{") (expression_statement "puVar6 = PTR_DAT_001db910 + 0x4564;" (assignment_expression "puVar6 = PTR_DAT_001db910 + 0x4564" (identifier "puVar6") (= "=") (binary_expression "PTR_DAT_001db910 + 0x4564" (identifier "PTR_DAT_001db910") (+ "+") (number_literal "0x4564"))) (; ";")) (do_statement "do {\n      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }\n      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n      piVar5 = (int *)*piVar5;\n    } while (piVar5 != (int *)0x0);" (do "do") (compound_statement "{\n      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }\n      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }\n      iVar2 = ldfile_try_open_bfd(uVar3,param_2);\n      if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }\n      (*(code *)PTR_free_001dc0ec)(uVar3);\n      piVar5 = (int *)*piVar5;\n    }" ({ "{") (if_statement "if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {\n        return 1;\n      }" (if "if") (parenthesized_expression "((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0))" (( "(") (binary_expression "(((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&\n         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)" (parenthesized_expression "(((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000))" (( "(") (binary_expression "((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&\n          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)" (parenthesized_expression "((*(ushort *)(param_2 + 0x24) & 0x400) != 0)" (( "(") (binary_expression "(*(ushort *)(param_2 + 0x24) & 0x400) != 0" (parenthesized_expression "(*(ushort *)(param_2 + 0x24) & 0x400)" (( "(") (binary_expression "*(ushort *)(param_2 + 0x24) & 0x400" (pointer_expression "*(ushort *)(param_2 + 0x24)" (* "*") (cast_expression "(ushort *)(param_2 + 0x24)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x24)" (( "(") (binary_expression "param_2 + 0x24" (identifier "param_2") (+ "+") (number_literal "0x24")) () ")")))) (& "&") (number_literal "0x400")) () ")")) (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "((*(uint *)puVar1 & 0xc0000000) != 0x80000000)" (( "(") (binary_expression "(*(uint *)puVar1 & 0xc0000000) != 0x80000000" (parenthesized_expression "(*(uint *)puVar1 & 0xc0000000)" (( "(") (binary_expression "*(uint *)puVar1 & 0xc0000000" (pointer_expression "*(uint *)puVar1" (* "*") (cast_expression "(uint *)puVar1" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1"))) (& "&") (number_literal "0xc0000000")) () ")")) (!= "!=") (number_literal "0x80000000")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)" (( "(") (comma_expression "iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0" (assignment_expression "iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2)" (identifier "iVar2") (= "=") (call_expression "ldemul_open_dynamic_archive(param_1,piVar5,param_2)" (identifier "ldemul_open_dynamic_archive") (argument_list "(param_1,piVar5,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "piVar5") (, ",") (identifier "param_2") () ")")))) (, ",") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n        return 1;\n      }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (if_statement "if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }\n      else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }" (if "if") (parenthesized_expression "((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000)" (( "(") (binary_expression "(*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000" (parenthesized_expression "(*(uint *)(param_2 + 0x24) & 0xc0000000)" (( "(") (binary_expression "*(uint *)(param_2 + 0x24) & 0xc0000000" (pointer_expression "*(uint *)(param_2 + 0x24)" (* "*") (cast_expression "(uint *)(param_2 + 0x24)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x24)" (( "(") (binary_expression "param_2 + 0x24" (identifier "param_2") (+ "+") (number_literal "0x24")) () ")")))) (& "&") (number_literal "0xc0000000")) () ")")) (== "==") (number_literal "0x80000000")) () ")")) (compound_statement "{\n        uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n      }" ({ "{") (expression_statement "uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);" (assignment_expression "uVar3 = (*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0)" (identifier "uVar3") (= "=") (call_expression "(*(code *)PTR_concat_001dc060)\n                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0)" (parenthesized_expression "(*(code *)PTR_concat_001dc060)" (( "(") (pointer_expression "*(code *)PTR_concat_001dc060" (* "*") (cast_expression "(code *)PTR_concat_001dc060" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_concat_001dc060"))) () ")")) (argument_list "(piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0)" (( "(") (subscript_expression "piVar5[1]" (identifier "piVar5") ([ "[") (number_literal "1") (] "]")) (, ",") (identifier "puVar6") (, ",") (identifier "param_3") (, ",") (pointer_expression "*(undefined4 *)(param_2 + 8)" (* "*") (cast_expression "(undefined4 *)(param_2 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")")))) (, ",") (identifier "param_1") (, ",") (identifier "param_4") (, ",") (number_literal "0") () ")")))) (; ";")) (} "}")) (else_clause "else {\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }" (else "else") (compound_statement "{\n        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);\n      }" ({ "{") (expression_statement "uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);" (assignment_expression "uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0)" (identifier "uVar3") (= "=") (call_expression "(*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0)" (parenthesized_expression "(*(code *)PTR_concat_001dc060)" (( "(") (pointer_expression "*(code *)PTR_concat_001dc060" (* "*") (cast_expression "(code *)PTR_concat_001dc060" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_concat_001dc060"))) () ")")) (argument_list "(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0)" (( "(") (subscript_expression "piVar5[1]" (identifier "piVar5") ([ "[") (number_literal "1") (] "]")) (, ",") (identifier "puVar6") (, ",") (pointer_expression "*(undefined4 *)(param_2 + 8)" (* "*") (cast_expression "(undefined4 *)(param_2 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")")))) (, ",") (number_literal "0") () ")")))) (; ";")) (} "}")))) (expression_statement "iVar2 = ldfile_try_open_bfd(uVar3,param_2);" (assignment_expression "iVar2 = ldfile_try_open_bfd(uVar3,param_2)" (identifier "iVar2") (= "=") (call_expression "ldfile_try_open_bfd(uVar3,param_2)" (identifier "ldfile_try_open_bfd") (argument_list "(uVar3,param_2)" (( "(") (identifier "uVar3") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        *(undefined4 *)(param_2 + 8) = uVar3;\n        return 1;\n      }" ({ "{") (expression_statement "*(undefined4 *)(param_2 + 8) = uVar3;" (assignment_expression "*(undefined4 *)(param_2 + 8) = uVar3" (pointer_expression "*(undefined4 *)(param_2 + 8)" (* "*") (cast_expression "(undefined4 *)(param_2 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_free_001dc0ec)(uVar3);" (call_expression "(*(code *)PTR_free_001dc0ec)(uVar3)" (parenthesized_expression "(*(code *)PTR_free_001dc0ec)" (( "(") (pointer_expression "*(code *)PTR_free_001dc0ec" (* "*") (cast_expression "(code *)PTR_free_001dc0ec" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_free_001dc0ec"))) () ")")) (argument_list "(uVar3)" (( "(") (identifier "uVar3") () ")"))) (; ";")) (expression_statement "piVar5 = (int *)*piVar5;" (assignment_expression "piVar5 = (int *)*piVar5" (identifier "piVar5") (= "=") (cast_expression "(int *)*piVar5" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar5" (* "*") (identifier "piVar5")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(piVar5 != (int *)0x0)" (( "(") (binary_expression "piVar5 != (int *)0x0" (identifier "piVar5") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))
(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (character)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier))) (identifier) (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (return_statement (number_literal)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) right: (char_literal (character)))) consequence: (compound_statement (return_statement (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (do_statement body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (number_literal))) right: (number_literal))))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (return_statement (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (subscript_expression argument: (identifier) index: (number_literal)) (identifier) (identifier) (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (identifier) (identifier) (number_literal)))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (subscript_expression argument: (identifier) index: (number_literal)) (identifier) (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (return_statement (number_literal)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier)))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal))))))) (return_statement (number_literal)))))

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

{
  undefined *puVar1;
  int iVar2;
  undefined4 uVar3;
  char *pcVar4;
  int *piVar5;
  undefined *puVar6;
  
  if (-1 < (short)*(ushort *)(param_2 + 0x24)) {
    pcVar4 = *(char **)(param_2 + 8);
    if (((*(ushort *)(param_2 + 0x24) & 0x1000) == 0) || (*pcVar4 != '/')) {
      iVar2 = ldfile_try_open_bfd(pcVar4,param_2);
      if (iVar2 != 0) {
        return 1;
      }
    }
    else {
      uVar3 = (*(code *)PTR_concat_001dc060)(*(undefined4 *)PTR_ld_sysroot_001db988,pcVar4,0);
      iVar2 = ldfile_try_open_bfd(uVar3,param_2);
      if (iVar2 != 0) {
        *(undefined4 *)(param_2 + 8) = uVar3;
        return 1;
      }
      (*(code *)PTR_free_001dc0ec)(uVar3);
    }
    if (**(char **)(param_2 + 8) == '/') {
      return 0;
    }
  }
  puVar1 = PTR_link_info_001db928;
  piVar5 = *(int **)PTR_search_head_001dbd10;
  if (piVar5 != (int *)0x0) {
    puVar6 = PTR_DAT_001db910 + 0x4564;
    do {
      if ((((*(ushort *)(param_2 + 0x24) & 0x400) != 0) &&
          ((*(uint *)puVar1 & 0xc0000000) != 0x80000000)) &&
         (iVar2 = ldemul_open_dynamic_archive(param_1,piVar5,param_2), iVar2 != 0)) {
        return 1;
      }
      if ((*(uint *)(param_2 + 0x24) & 0xc0000000) == 0x80000000) {
        uVar3 = (*(code *)PTR_concat_001dc060)
                          (piVar5[1],puVar6,param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);
      }
      else {
        uVar3 = (*(code *)PTR_concat_001dc060)(piVar5[1],puVar6,*(undefined4 *)(param_2 + 8),0);
      }
      iVar2 = ldfile_try_open_bfd(uVar3,param_2);
      if (iVar2 != 0) {
        *(undefined4 *)(param_2 + 8) = uVar3;
        return 1;
      }
      (*(code *)PTR_free_001dc0ec)(uVar3);
      piVar5 = (int *)*piVar5;
    } while (piVar5 != (int *)0x0);
  }
  return 0;
}

