
bfd_boolean process_corefile_note_segments(Filedata *filedata)

{
  bfd_boolean bVar1;
  bfd_boolean bVar2;
  Elf_Internal_Phdr *pEVar3;
  uint uVar4;
  
  pEVar3 = filedata->program_headers;
  if (pEVar3 == (Elf_Internal_Phdr *)0x0) {
    bVar2 = get_program_headers(filedata);
    if (bVar2 == 0) {
      return 1;
    }
    pEVar3 = filedata->program_headers;
  }
  if ((filedata->file_header).e_phnum == 0) {
    return 1;
  }
  bVar2 = 1;
  uVar4 = 0;
  do {
    while ((pEVar3->p_type == 4 &&
           ((pEVar3->p_filesz == 0 ||
            (bVar1 = process_notes_at(filedata,(Elf_Internal_Shdr *)0x0,pEVar3->p_offset,
                                      pEVar3->p_filesz,pEVar3->p_align), bVar1 == 0))))) {
      bVar2 = 0;
      uVar4 = uVar4 + 1;
      pEVar3 = pEVar3 + 1;
      if ((filedata->file_header).e_phnum <= uVar4) {
        return 0;
      }
    }
    uVar4 = uVar4 + 1;
    pEVar3 = pEVar3 + 1;
  } while (uVar4 < (filedata->file_header).e_phnum);
  return bVar2;
}



undefined8 FUN_001367d0(long param_1)

{
  int iVar1;
  long *plVar2;
  uint uVar3;
  undefined8 uVar4;
  
  plVar2 = *(long **)(param_1 + 0x78);
  if (plVar2 == (long *)0x0) {
    iVar1 = FUN_001199d0();
    if (iVar1 == 0) {
      return 1;
    }
    plVar2 = *(long **)(param_1 + 0x78);
  }
  if (*(int *)(param_1 + 0x5c) == 0) {
    return 1;
  }
  uVar4 = 1;
  uVar3 = 0;
  do {
    while ((*plVar2 == 4 &&
           ((plVar2[5] == 0 ||
            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))) {
      uVar4 = 0;
      uVar3 = uVar3 + 1;
      plVar2 = plVar2 + 8;
      if (*(uint *)(param_1 + 0x5c) <= uVar3) {
        return 0;
      }
    }
    uVar3 = uVar3 + 1;
    plVar2 = plVar2 + 8;
  } while (uVar3 < *(uint *)(param_1 + 0x5c));
  return uVar4;
}


PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,qword ptr [RDI + 0x78]
TEST RBX,RBX
JZ 0x00136858
MOV EAX,dword ptr [R12 + 0x5c]
TEST EAX,EAX
JZ 0x00136870
MOV R13D,0x1
XOR EBP,EBP
JMP 0x0013680e
ADD EBP,0x1
ADD RBX,0x40
CMP dword ptr [R12 + 0x5c],EBP
JBE 0x00136844
CMP qword ptr [RBX],0x4
JNZ 0x00136800
MOV RCX,qword ptr [RBX + 0x28]
TEST RCX,RCX
JZ 0x00136833
MOV RDX,qword ptr [RBX + 0x10]
MOV R8,qword ptr [RBX + 0x38]
XOR ESI,ESI
MOV RDI,R12
CALL 0x00133a50
TEST EAX,EAX
JNZ 0x00136800
XOR R13D,R13D
ADD EBP,0x1
ADD RBX,0x40
CMP dword ptr [R12 + 0x5c],EBP
JA 0x0013680e
ADD RSP,0x8
MOV EAX,R13D
POP RBX
POP RBP
POP R12
POP R13
RET
CALL 0x001199d0
TEST EAX,EAX
JZ 0x00136870
MOV RBX,qword ptr [R12 + 0x78]
JMP 0x001367e6
ADD RSP,0x8
MOV R13D,0x1
POP RBX
MOV EAX,R13D
POP RBP
POP R12
POP R13
RET
(translation_unit "undefined8 FUN_001367d0(long param_1)\n\n{\n  int iVar1;\n  long *plVar2;\n  uint uVar3;\n  undefined8 uVar4;\n  \n  plVar2 = *(long **)(param_1 + 0x78);\n  if (plVar2 == (long *)0x0) {\n    iVar1 = FUN_001199d0();\n    if (iVar1 == 0) {\n      return 1;\n    }\n    plVar2 = *(long **)(param_1 + 0x78);\n  }\n  if (*(int *)(param_1 + 0x5c) == 0) {\n    return 1;\n  }\n  uVar4 = 1;\n  uVar3 = 0;\n  do {\n    while ((*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))) {\n      uVar4 = 0;\n      uVar3 = uVar3 + 1;\n      plVar2 = plVar2 + 8;\n      if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }\n    }\n    uVar3 = uVar3 + 1;\n    plVar2 = plVar2 + 8;\n  } while (uVar3 < *(uint *)(param_1 + 0x5c));\n  return uVar4;\n}\n\n" (function_definition "undefined8 FUN_001367d0(long param_1)\n\n{\n  int iVar1;\n  long *plVar2;\n  uint uVar3;\n  undefined8 uVar4;\n  \n  plVar2 = *(long **)(param_1 + 0x78);\n  if (plVar2 == (long *)0x0) {\n    iVar1 = FUN_001199d0();\n    if (iVar1 == 0) {\n      return 1;\n    }\n    plVar2 = *(long **)(param_1 + 0x78);\n  }\n  if (*(int *)(param_1 + 0x5c) == 0) {\n    return 1;\n  }\n  uVar4 = 1;\n  uVar3 = 0;\n  do {\n    while ((*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))) {\n      uVar4 = 0;\n      uVar3 = uVar3 + 1;\n      plVar2 = plVar2 + 8;\n      if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }\n    }\n    uVar3 = uVar3 + 1;\n    plVar2 = plVar2 + 8;\n  } while (uVar3 < *(uint *)(param_1 + 0x5c));\n  return uVar4;\n}" type_identifier (function_declarator "FUN_001367d0(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  int iVar1;\n  long *plVar2;\n  uint uVar3;\n  undefined8 uVar4;\n  \n  plVar2 = *(long **)(param_1 + 0x78);\n  if (plVar2 == (long *)0x0) {\n    iVar1 = FUN_001199d0();\n    if (iVar1 == 0) {\n      return 1;\n    }\n    plVar2 = *(long **)(param_1 + 0x78);\n  }\n  if (*(int *)(param_1 + 0x5c) == 0) {\n    return 1;\n  }\n  uVar4 = 1;\n  uVar3 = 0;\n  do {\n    while ((*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))) {\n      uVar4 = 0;\n      uVar3 = uVar3 + 1;\n      plVar2 = plVar2 + 8;\n      if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }\n    }\n    uVar3 = uVar3 + 1;\n    plVar2 = plVar2 + 8;\n  } while (uVar3 < *(uint *)(param_1 + 0x5c));\n  return uVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "long *plVar2;" (sized_type_specifier "long" long) (pointer_declarator "*plVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined8 uVar4;" type_identifier identifier ;) (expression_statement "plVar2 = *(long **)(param_1 + 0x78);" (assignment_expression "plVar2 = *(long **)(param_1 + 0x78)" identifier = (pointer_expression "*(long **)(param_1 + 0x78)" * (cast_expression "(long **)(param_1 + 0x78)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x78)" ( (binary_expression "param_1 + 0x78" identifier + number_literal) ))))) ;) (if_statement "if (plVar2 == (long *)0x0) {\n    iVar1 = FUN_001199d0();\n    if (iVar1 == 0) {\n      return 1;\n    }\n    plVar2 = *(long **)(param_1 + 0x78);\n  }" if (parenthesized_expression "(plVar2 == (long *)0x0)" ( (binary_expression "plVar2 == (long *)0x0" identifier == (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar1 = FUN_001199d0();\n    if (iVar1 == 0) {\n      return 1;\n    }\n    plVar2 = *(long **)(param_1 + 0x78);\n  }" { (expression_statement "iVar1 = FUN_001199d0();" (assignment_expression "iVar1 = FUN_001199d0()" identifier = (call_expression "FUN_001199d0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 == 0) {\n      return 1;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "plVar2 = *(long **)(param_1 + 0x78);" (assignment_expression "plVar2 = *(long **)(param_1 + 0x78)" identifier = (pointer_expression "*(long **)(param_1 + 0x78)" * (cast_expression "(long **)(param_1 + 0x78)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x78)" ( (binary_expression "param_1 + 0x78" identifier + number_literal) ))))) ;) })) (if_statement "if (*(int *)(param_1 + 0x5c) == 0) {\n    return 1;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x5c) == 0)" ( (binary_expression "*(int *)(param_1 + 0x5c) == 0" (pointer_expression "*(int *)(param_1 + 0x5c)" * (cast_expression "(int *)(param_1 + 0x5c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x5c)" ( (binary_expression "param_1 + 0x5c" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    return 1;\n  }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (do_statement "do {\n    while ((*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))) {\n      uVar4 = 0;\n      uVar3 = uVar3 + 1;\n      plVar2 = plVar2 + 8;\n      if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }\n    }\n    uVar3 = uVar3 + 1;\n    plVar2 = plVar2 + 8;\n  } while (uVar3 < *(uint *)(param_1 + 0x5c));" do (compound_statement "{\n    while ((*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))) {\n      uVar4 = 0;\n      uVar3 = uVar3 + 1;\n      plVar2 = plVar2 + 8;\n      if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }\n    }\n    uVar3 = uVar3 + 1;\n    plVar2 = plVar2 + 8;\n  }" { (while_statement "while ((*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))) {\n      uVar4 = 0;\n      uVar3 = uVar3 + 1;\n      plVar2 = plVar2 + 8;\n      if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }\n    }" while (parenthesized_expression "((*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0)))))" ( (parenthesized_expression "(*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))" ( (binary_expression "*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0)))" (binary_expression "*plVar2 == 4" (pointer_expression "*plVar2" * identifier) == number_literal) && (parenthesized_expression "((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0)))" ( (parenthesized_expression "(plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))" ( (binary_expression "plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0)" (binary_expression "plVar2[5] == 0" (subscript_expression "plVar2[5]" identifier [ number_literal ]) == number_literal) || (parenthesized_expression "(iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0)" ( (comma_expression "iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0" (assignment_expression "iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7])" identifier = (call_expression "FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7])" identifier (argument_list "(param_1,0,plVar2[2],plVar2[5],plVar2[7])" ( identifier , number_literal , (subscript_expression "plVar2[2]" identifier [ number_literal ]) , (subscript_expression "plVar2[5]" identifier [ number_literal ]) , (subscript_expression "plVar2[7]" identifier [ number_literal ]) )))) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) ))) )) )) (compound_statement "{\n      uVar4 = 0;\n      uVar3 = uVar3 + 1;\n      plVar2 = plVar2 + 8;\n      if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }\n    }" { (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (expression_statement "uVar3 = uVar3 + 1;" (assignment_expression "uVar3 = uVar3 + 1" identifier = (binary_expression "uVar3 + 1" identifier + number_literal)) ;) (expression_statement "plVar2 = plVar2 + 8;" (assignment_expression "plVar2 = plVar2 + 8" identifier = (binary_expression "plVar2 + 8" identifier + number_literal)) ;) (if_statement "if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }" if (parenthesized_expression "(*(uint *)(param_1 + 0x5c) <= uVar3)" ( (binary_expression "*(uint *)(param_1 + 0x5c) <= uVar3" (pointer_expression "*(uint *)(param_1 + 0x5c)" * (cast_expression "(uint *)(param_1 + 0x5c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x5c)" ( (binary_expression "param_1 + 0x5c" identifier + number_literal) )))) <= identifier) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) })) (expression_statement "uVar3 = uVar3 + 1;" (assignment_expression "uVar3 = uVar3 + 1" identifier = (binary_expression "uVar3 + 1" identifier + number_literal)) ;) (expression_statement "plVar2 = plVar2 + 8;" (assignment_expression "plVar2 = plVar2 + 8" identifier = (binary_expression "plVar2 + 8" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar3 < *(uint *)(param_1 + 0x5c))" ( (binary_expression "uVar3 < *(uint *)(param_1 + 0x5c)" identifier < (pointer_expression "*(uint *)(param_1 + 0x5c)" * (cast_expression "(uint *)(param_1 + 0x5c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x5c)" ( (binary_expression "param_1 + 0x5c" identifier + number_literal) ))))) )) ;) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit "bfd_boolean process_corefile_note_segments(Filedata *filedata)\n\n{\n  bfd_boolean bVar1;\n  bfd_boolean bVar2;\n  Elf_Internal_Phdr *pEVar3;\n  uint uVar4;\n  \n  pEVar3 = filedata->program_headers;\n  if (pEVar3 == (Elf_Internal_Phdr *)0x0) {\n    bVar2 = get_program_headers(filedata);\n    if (bVar2 == 0) {\n      return 1;\n    }\n    pEVar3 = filedata->program_headers;\n  }\n  if ((filedata->file_header).e_phnum == 0) {\n    return 1;\n  }\n  bVar2 = 1;\n  uVar4 = 0;\n  do {\n    while ((pEVar3->p_type == 4 &&\n           ((pEVar3->p_filesz == 0 ||\n            (bVar1 = process_notes_at(filedata,(Elf_Internal_Shdr *)0x0,pEVar3->p_offset,\n                                      pEVar3->p_filesz,pEVar3->p_align), bVar1 == 0))))) {\n      bVar2 = 0;\n      uVar4 = uVar4 + 1;\n      pEVar3 = pEVar3 + 1;\n      if ((filedata->file_header).e_phnum <= uVar4) {\n        return 0;\n      }\n    }\n    uVar4 = uVar4 + 1;\n    pEVar3 = pEVar3 + 1;\n  } while (uVar4 < (filedata->file_header).e_phnum);\n  return bVar2;\n}\n\n" (function_definition "bfd_boolean process_corefile_note_segments(Filedata *filedata)\n\n{\n  bfd_boolean bVar1;\n  bfd_boolean bVar2;\n  Elf_Internal_Phdr *pEVar3;\n  uint uVar4;\n  \n  pEVar3 = filedata->program_headers;\n  if (pEVar3 == (Elf_Internal_Phdr *)0x0) {\n    bVar2 = get_program_headers(filedata);\n    if (bVar2 == 0) {\n      return 1;\n    }\n    pEVar3 = filedata->program_headers;\n  }\n  if ((filedata->file_header).e_phnum == 0) {\n    return 1;\n  }\n  bVar2 = 1;\n  uVar4 = 0;\n  do {\n    while ((pEVar3->p_type == 4 &&\n           ((pEVar3->p_filesz == 0 ||\n            (bVar1 = process_notes_at(filedata,(Elf_Internal_Shdr *)0x0,pEVar3->p_offset,\n                                      pEVar3->p_filesz,pEVar3->p_align), bVar1 == 0))))) {\n      bVar2 = 0;\n      uVar4 = uVar4 + 1;\n      pEVar3 = pEVar3 + 1;\n      if ((filedata->file_header).e_phnum <= uVar4) {\n        return 0;\n      }\n    }\n    uVar4 = uVar4 + 1;\n    pEVar3 = pEVar3 + 1;\n  } while (uVar4 < (filedata->file_header).e_phnum);\n  return bVar2;\n}" type_identifier (function_declarator "process_corefile_note_segments(Filedata *filedata)" identifier (parameter_list "(Filedata *filedata)" ( (parameter_declaration "Filedata *filedata" type_identifier (pointer_declarator "*filedata" * identifier)) ))) (compound_statement "{\n  bfd_boolean bVar1;\n  bfd_boolean bVar2;\n  Elf_Internal_Phdr *pEVar3;\n  uint uVar4;\n  \n  pEVar3 = filedata->program_headers;\n  if (pEVar3 == (Elf_Internal_Phdr *)0x0) {\n    bVar2 = get_program_headers(filedata);\n    if (bVar2 == 0) {\n      return 1;\n    }\n    pEVar3 = filedata->program_headers;\n  }\n  if ((filedata->file_header).e_phnum == 0) {\n    return 1;\n  }\n  bVar2 = 1;\n  uVar4 = 0;\n  do {\n    while ((pEVar3->p_type == 4 &&\n           ((pEVar3->p_filesz == 0 ||\n            (bVar1 = process_notes_at(filedata,(Elf_Internal_Shdr *)0x0,pEVar3->p_offset,\n                                      pEVar3->p_filesz,pEVar3->p_align), bVar1 == 0))))) {\n      bVar2 = 0;\n      uVar4 = uVar4 + 1;\n      pEVar3 = pEVar3 + 1;\n      if ((filedata->file_header).e_phnum <= uVar4) {\n        return 0;\n      }\n    }\n    uVar4 = uVar4 + 1;\n    pEVar3 = pEVar3 + 1;\n  } while (uVar4 < (filedata->file_header).e_phnum);\n  return bVar2;\n}" { (declaration "bfd_boolean bVar1;" type_identifier identifier ;) (declaration "bfd_boolean bVar2;" type_identifier identifier ;) (declaration "Elf_Internal_Phdr *pEVar3;" type_identifier (pointer_declarator "*pEVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "pEVar3 = filedata->program_headers;" (assignment_expression "pEVar3 = filedata->program_headers" identifier = (field_expression "filedata->program_headers" identifier -> field_identifier)) ;) (if_statement "if (pEVar3 == (Elf_Internal_Phdr *)0x0) {\n    bVar2 = get_program_headers(filedata);\n    if (bVar2 == 0) {\n      return 1;\n    }\n    pEVar3 = filedata->program_headers;\n  }" if (parenthesized_expression "(pEVar3 == (Elf_Internal_Phdr *)0x0)" ( (binary_expression "pEVar3 == (Elf_Internal_Phdr *)0x0" identifier == (cast_expression "(Elf_Internal_Phdr *)0x0" ( (type_descriptor "Elf_Internal_Phdr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    bVar2 = get_program_headers(filedata);\n    if (bVar2 == 0) {\n      return 1;\n    }\n    pEVar3 = filedata->program_headers;\n  }" { (expression_statement "bVar2 = get_program_headers(filedata);" (assignment_expression "bVar2 = get_program_headers(filedata)" identifier = (call_expression "get_program_headers(filedata)" identifier (argument_list "(filedata)" ( 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 ;) })) (expression_statement "pEVar3 = filedata->program_headers;" (assignment_expression "pEVar3 = filedata->program_headers" identifier = (field_expression "filedata->program_headers" identifier -> field_identifier)) ;) })) (if_statement "if ((filedata->file_header).e_phnum == 0) {\n    return 1;\n  }" if (parenthesized_expression "((filedata->file_header).e_phnum == 0)" ( (binary_expression "(filedata->file_header).e_phnum == 0" (field_expression "(filedata->file_header).e_phnum" (parenthesized_expression "(filedata->file_header)" ( (field_expression "filedata->file_header" identifier -> field_identifier) )) . field_identifier) == number_literal) )) (compound_statement "{\n    return 1;\n  }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "bVar2 = 1;" (assignment_expression "bVar2 = 1" identifier = number_literal) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n    while ((pEVar3->p_type == 4 &&\n           ((pEVar3->p_filesz == 0 ||\n            (bVar1 = process_notes_at(filedata,(Elf_Internal_Shdr *)0x0,pEVar3->p_offset,\n                                      pEVar3->p_filesz,pEVar3->p_align), bVar1 == 0))))) {\n      bVar2 = 0;\n      uVar4 = uVar4 + 1;\n      pEVar3 = pEVar3 + 1;\n      if ((filedata->file_header).e_phnum <= uVar4) {\n        return 0;\n      }\n    }\n    uVar4 = uVar4 + 1;\n    pEVar3 = pEVar3 + 1;\n  } while (uVar4 < (filedata->file_header).e_phnum);" do (compound_statement "{\n    while ((pEVar3->p_type == 4 &&\n           ((pEVar3->p_filesz == 0 ||\n            (bVar1 = process_notes_at(filedata,(Elf_Internal_Shdr *)0x0,pEVar3->p_offset,\n                                      pEVar3->p_filesz,pEVar3->p_align), bVar1 == 0))))) {\n      bVar2 = 0;\n      uVar4 = uVar4 + 1;\n      pEVar3 = pEVar3 + 1;\n      if ((filedata->file_header).e_phnum <= uVar4) {\n        return 0;\n      }\n    }\n    uVar4 = uVar4 + 1;\n    pEVar3 = pEVar3 + 1;\n  }" { (while_statement "while ((pEVar3->p_type == 4 &&\n           ((pEVar3->p_filesz == 0 ||\n            (bVar1 = process_notes_at(filedata,(Elf_Internal_Shdr *)0x0,pEVar3->p_offset,\n                                      pEVar3->p_filesz,pEVar3->p_align), bVar1 == 0))))) {\n      bVar2 = 0;\n      uVar4 = uVar4 + 1;\n      pEVar3 = pEVar3 + 1;\n      if ((filedata->file_header).e_phnum <= uVar4) {\n        return 0;\n      }\n    }" while (parenthesized_expression "((pEVar3->p_type == 4 &&\n           ((pEVar3->p_filesz == 0 ||\n            (bVar1 = process_notes_at(filedata,(Elf_Internal_Shdr *)0x0,pEVar3->p_offset,\n                                      pEVar3->p_filesz,pEVar3->p_align), bVar1 == 0)))))" ( (parenthesized_expression "(pEVar3->p_type == 4 &&\n           ((pEVar3->p_filesz == 0 ||\n            (bVar1 = process_notes_at(filedata,(Elf_Internal_Shdr *)0x0,pEVar3->p_offset,\n                                      pEVar3->p_filesz,pEVar3->p_align), bVar1 == 0))))" ( (binary_expression "pEVar3->p_type == 4 &&\n           ((pEVar3->p_filesz == 0 ||\n            (bVar1 = process_notes_at(filedata,(Elf_Internal_Shdr *)0x0,pEVar3->p_offset,\n                                      pEVar3->p_filesz,pEVar3->p_align), bVar1 == 0)))" (binary_expression "pEVar3->p_type == 4" (field_expression "pEVar3->p_type" identifier -> field_identifier) == number_literal) && (parenthesized_expression "((pEVar3->p_filesz == 0 ||\n            (bVar1 = process_notes_at(filedata,(Elf_Internal_Shdr *)0x0,pEVar3->p_offset,\n                                      pEVar3->p_filesz,pEVar3->p_align), bVar1 == 0)))" ( (parenthesized_expression "(pEVar3->p_filesz == 0 ||\n            (bVar1 = process_notes_at(filedata,(Elf_Internal_Shdr *)0x0,pEVar3->p_offset,\n                                      pEVar3->p_filesz,pEVar3->p_align), bVar1 == 0))" ( (binary_expression "pEVar3->p_filesz == 0 ||\n            (bVar1 = process_notes_at(filedata,(Elf_Internal_Shdr *)0x0,pEVar3->p_offset,\n                                      pEVar3->p_filesz,pEVar3->p_align), bVar1 == 0)" (binary_expression "pEVar3->p_filesz == 0" (field_expression "pEVar3->p_filesz" identifier -> field_identifier) == number_literal) || (parenthesized_expression "(bVar1 = process_notes_at(filedata,(Elf_Internal_Shdr *)0x0,pEVar3->p_offset,\n                                      pEVar3->p_filesz,pEVar3->p_align), bVar1 == 0)" ( (comma_expression "bVar1 = process_notes_at(filedata,(Elf_Internal_Shdr *)0x0,pEVar3->p_offset,\n                                      pEVar3->p_filesz,pEVar3->p_align), bVar1 == 0" (assignment_expression "bVar1 = process_notes_at(filedata,(Elf_Internal_Shdr *)0x0,pEVar3->p_offset,\n                                      pEVar3->p_filesz,pEVar3->p_align)" identifier = (call_expression "process_notes_at(filedata,(Elf_Internal_Shdr *)0x0,pEVar3->p_offset,\n                                      pEVar3->p_filesz,pEVar3->p_align)" identifier (argument_list "(filedata,(Elf_Internal_Shdr *)0x0,pEVar3->p_offset,\n                                      pEVar3->p_filesz,pEVar3->p_align)" ( identifier , (cast_expression "(Elf_Internal_Shdr *)0x0" ( (type_descriptor "Elf_Internal_Shdr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (field_expression "pEVar3->p_offset" identifier -> field_identifier) , (field_expression "pEVar3->p_filesz" identifier -> field_identifier) , (field_expression "pEVar3->p_align" identifier -> field_identifier) )))) , (binary_expression "bVar1 == 0" identifier == number_literal)) ))) )) ))) )) )) (compound_statement "{\n      bVar2 = 0;\n      uVar4 = uVar4 + 1;\n      pEVar3 = pEVar3 + 1;\n      if ((filedata->file_header).e_phnum <= uVar4) {\n        return 0;\n      }\n    }" { (expression_statement "bVar2 = 0;" (assignment_expression "bVar2 = 0" identifier = number_literal) ;) (expression_statement "uVar4 = uVar4 + 1;" (assignment_expression "uVar4 = uVar4 + 1" identifier = (binary_expression "uVar4 + 1" identifier + number_literal)) ;) (expression_statement "pEVar3 = pEVar3 + 1;" (assignment_expression "pEVar3 = pEVar3 + 1" identifier = (binary_expression "pEVar3 + 1" identifier + number_literal)) ;) (if_statement "if ((filedata->file_header).e_phnum <= uVar4) {\n        return 0;\n      }" if (parenthesized_expression "((filedata->file_header).e_phnum <= uVar4)" ( (binary_expression "(filedata->file_header).e_phnum <= uVar4" (field_expression "(filedata->file_header).e_phnum" (parenthesized_expression "(filedata->file_header)" ( (field_expression "filedata->file_header" identifier -> field_identifier) )) . field_identifier) <= identifier) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) })) (expression_statement "uVar4 = uVar4 + 1;" (assignment_expression "uVar4 = uVar4 + 1" identifier = (binary_expression "uVar4 + 1" identifier + number_literal)) ;) (expression_statement "pEVar3 = pEVar3 + 1;" (assignment_expression "pEVar3 = pEVar3 + 1" identifier = (binary_expression "pEVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar4 < (filedata->file_header).e_phnum)" ( (binary_expression "uVar4 < (filedata->file_header).e_phnum" identifier < (field_expression "(filedata->file_header).e_phnum" (parenthesized_expression "(filedata->file_header)" ( (field_expression "filedata->file_header" identifier -> field_identifier) )) . field_identifier)) )) ;) (return_statement "return bVar2;" return identifier ;) })))
(translation_unit "undefined8 FUN_001367d0(long param_1)\n\n{\n  int iVar1;\n  long *plVar2;\n  uint uVar3;\n  undefined8 uVar4;\n  \n  plVar2 = *(long **)(param_1 + 0x78);\n  if (plVar2 == (long *)0x0) {\n    iVar1 = FUN_001199d0();\n    if (iVar1 == 0) {\n      return 1;\n    }\n    plVar2 = *(long **)(param_1 + 0x78);\n  }\n  if (*(int *)(param_1 + 0x5c) == 0) {\n    return 1;\n  }\n  uVar4 = 1;\n  uVar3 = 0;\n  do {\n    while ((*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))) {\n      uVar4 = 0;\n      uVar3 = uVar3 + 1;\n      plVar2 = plVar2 + 8;\n      if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }\n    }\n    uVar3 = uVar3 + 1;\n    plVar2 = plVar2 + 8;\n  } while (uVar3 < *(uint *)(param_1 + 0x5c));\n  return uVar4;\n}\n\n" (function_definition "undefined8 FUN_001367d0(long param_1)\n\n{\n  int iVar1;\n  long *plVar2;\n  uint uVar3;\n  undefined8 uVar4;\n  \n  plVar2 = *(long **)(param_1 + 0x78);\n  if (plVar2 == (long *)0x0) {\n    iVar1 = FUN_001199d0();\n    if (iVar1 == 0) {\n      return 1;\n    }\n    plVar2 = *(long **)(param_1 + 0x78);\n  }\n  if (*(int *)(param_1 + 0x5c) == 0) {\n    return 1;\n  }\n  uVar4 = 1;\n  uVar3 = 0;\n  do {\n    while ((*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))) {\n      uVar4 = 0;\n      uVar3 = uVar3 + 1;\n      plVar2 = plVar2 + 8;\n      if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }\n    }\n    uVar3 = uVar3 + 1;\n    plVar2 = plVar2 + 8;\n  } while (uVar3 < *(uint *)(param_1 + 0x5c));\n  return uVar4;\n}" type_identifier (function_declarator "FUN_001367d0(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  int iVar1;\n  long *plVar2;\n  uint uVar3;\n  undefined8 uVar4;\n  \n  plVar2 = *(long **)(param_1 + 0x78);\n  if (plVar2 == (long *)0x0) {\n    iVar1 = FUN_001199d0();\n    if (iVar1 == 0) {\n      return 1;\n    }\n    plVar2 = *(long **)(param_1 + 0x78);\n  }\n  if (*(int *)(param_1 + 0x5c) == 0) {\n    return 1;\n  }\n  uVar4 = 1;\n  uVar3 = 0;\n  do {\n    while ((*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))) {\n      uVar4 = 0;\n      uVar3 = uVar3 + 1;\n      plVar2 = plVar2 + 8;\n      if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }\n    }\n    uVar3 = uVar3 + 1;\n    plVar2 = plVar2 + 8;\n  } while (uVar3 < *(uint *)(param_1 + 0x5c));\n  return uVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "long *plVar2;" (sized_type_specifier "long" long) (pointer_declarator "*plVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined8 uVar4;" type_identifier identifier ;) (expression_statement "plVar2 = *(long **)(param_1 + 0x78);" (assignment_expression "plVar2 = *(long **)(param_1 + 0x78)" identifier = (pointer_expression "*(long **)(param_1 + 0x78)" * (cast_expression "(long **)(param_1 + 0x78)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x78)" ( (binary_expression "param_1 + 0x78" identifier + number_literal) ))))) ;) (if_statement "if (plVar2 == (long *)0x0) {\n    iVar1 = FUN_001199d0();\n    if (iVar1 == 0) {\n      return 1;\n    }\n    plVar2 = *(long **)(param_1 + 0x78);\n  }" if (parenthesized_expression "(plVar2 == (long *)0x0)" ( (binary_expression "plVar2 == (long *)0x0" identifier == (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar1 = FUN_001199d0();\n    if (iVar1 == 0) {\n      return 1;\n    }\n    plVar2 = *(long **)(param_1 + 0x78);\n  }" { (expression_statement "iVar1 = FUN_001199d0();" (assignment_expression "iVar1 = FUN_001199d0()" identifier = (call_expression "FUN_001199d0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 == 0) {\n      return 1;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "plVar2 = *(long **)(param_1 + 0x78);" (assignment_expression "plVar2 = *(long **)(param_1 + 0x78)" identifier = (pointer_expression "*(long **)(param_1 + 0x78)" * (cast_expression "(long **)(param_1 + 0x78)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x78)" ( (binary_expression "param_1 + 0x78" identifier + number_literal) ))))) ;) })) (if_statement "if (*(int *)(param_1 + 0x5c) == 0) {\n    return 1;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x5c) == 0)" ( (binary_expression "*(int *)(param_1 + 0x5c) == 0" (pointer_expression "*(int *)(param_1 + 0x5c)" * (cast_expression "(int *)(param_1 + 0x5c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x5c)" ( (binary_expression "param_1 + 0x5c" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    return 1;\n  }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (do_statement "do {\n    while ((*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))) {\n      uVar4 = 0;\n      uVar3 = uVar3 + 1;\n      plVar2 = plVar2 + 8;\n      if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }\n    }\n    uVar3 = uVar3 + 1;\n    plVar2 = plVar2 + 8;\n  } while (uVar3 < *(uint *)(param_1 + 0x5c));" do (compound_statement "{\n    while ((*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))) {\n      uVar4 = 0;\n      uVar3 = uVar3 + 1;\n      plVar2 = plVar2 + 8;\n      if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }\n    }\n    uVar3 = uVar3 + 1;\n    plVar2 = plVar2 + 8;\n  }" { (while_statement "while ((*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))) {\n      uVar4 = 0;\n      uVar3 = uVar3 + 1;\n      plVar2 = plVar2 + 8;\n      if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }\n    }" while (parenthesized_expression "((*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0)))))" ( (parenthesized_expression "(*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))" ( (binary_expression "*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0)))" (binary_expression "*plVar2 == 4" (pointer_expression "*plVar2" * identifier) == number_literal) && (parenthesized_expression "((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0)))" ( (parenthesized_expression "(plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))" ( (binary_expression "plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0)" (binary_expression "plVar2[5] == 0" (subscript_expression "plVar2[5]" identifier [ number_literal ]) == number_literal) || (parenthesized_expression "(iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0)" ( (comma_expression "iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0" (assignment_expression "iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7])" identifier = (call_expression "FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7])" identifier (argument_list "(param_1,0,plVar2[2],plVar2[5],plVar2[7])" ( identifier , number_literal , (subscript_expression "plVar2[2]" identifier [ number_literal ]) , (subscript_expression "plVar2[5]" identifier [ number_literal ]) , (subscript_expression "plVar2[7]" identifier [ number_literal ]) )))) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) ))) )) )) (compound_statement "{\n      uVar4 = 0;\n      uVar3 = uVar3 + 1;\n      plVar2 = plVar2 + 8;\n      if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }\n    }" { (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (expression_statement "uVar3 = uVar3 + 1;" (assignment_expression "uVar3 = uVar3 + 1" identifier = (binary_expression "uVar3 + 1" identifier + number_literal)) ;) (expression_statement "plVar2 = plVar2 + 8;" (assignment_expression "plVar2 = plVar2 + 8" identifier = (binary_expression "plVar2 + 8" identifier + number_literal)) ;) (if_statement "if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }" if (parenthesized_expression "(*(uint *)(param_1 + 0x5c) <= uVar3)" ( (binary_expression "*(uint *)(param_1 + 0x5c) <= uVar3" (pointer_expression "*(uint *)(param_1 + 0x5c)" * (cast_expression "(uint *)(param_1 + 0x5c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x5c)" ( (binary_expression "param_1 + 0x5c" identifier + number_literal) )))) <= identifier) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) })) (expression_statement "uVar3 = uVar3 + 1;" (assignment_expression "uVar3 = uVar3 + 1" identifier = (binary_expression "uVar3 + 1" identifier + number_literal)) ;) (expression_statement "plVar2 = plVar2 + 8;" (assignment_expression "plVar2 = plVar2 + 8" identifier = (binary_expression "plVar2 + 8" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar3 < *(uint *)(param_1 + 0x5c))" ( (binary_expression "uVar3 < *(uint *)(param_1 + 0x5c)" identifier < (pointer_expression "*(uint *)(param_1 + 0x5c)" * (cast_expression "(uint *)(param_1 + 0x5c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x5c)" ( (binary_expression "param_1 + 0x5c" identifier + number_literal) ))))) )) ;) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (while_statement while (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * IDENT) == LIT) && (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , (subscript_expression IDENT [ LIT ]) , (subscript_expression IDENT [ LIT ]) , (subscript_expression IDENT [ LIT ]) )))) , (binary_expression IDENT == LIT)) ))) )) ))) )) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) <= IDENT) )) (compound_statement { (return_statement return LIT ;) })) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) ;) (return_statement return IDENT ;) })))
(function_definition "undefined8 FUN_001367d0(long param_1)\n\n{\n  int iVar1;\n  long *plVar2;\n  uint uVar3;\n  undefined8 uVar4;\n  \n  plVar2 = *(long **)(param_1 + 0x78);\n  if (plVar2 == (long *)0x0) {\n    iVar1 = FUN_001199d0();\n    if (iVar1 == 0) {\n      return 1;\n    }\n    plVar2 = *(long **)(param_1 + 0x78);\n  }\n  if (*(int *)(param_1 + 0x5c) == 0) {\n    return 1;\n  }\n  uVar4 = 1;\n  uVar3 = 0;\n  do {\n    while ((*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))) {\n      uVar4 = 0;\n      uVar3 = uVar3 + 1;\n      plVar2 = plVar2 + 8;\n      if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }\n    }\n    uVar3 = uVar3 + 1;\n    plVar2 = plVar2 + 8;\n  } while (uVar3 < *(uint *)(param_1 + 0x5c));\n  return uVar4;\n}" (type_identifier "undefined8") (function_declarator "FUN_001367d0(long param_1)" (identifier "FUN_001367d0") (parameter_list "(long param_1)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  long *plVar2;\n  uint uVar3;\n  undefined8 uVar4;\n  \n  plVar2 = *(long **)(param_1 + 0x78);\n  if (plVar2 == (long *)0x0) {\n    iVar1 = FUN_001199d0();\n    if (iVar1 == 0) {\n      return 1;\n    }\n    plVar2 = *(long **)(param_1 + 0x78);\n  }\n  if (*(int *)(param_1 + 0x5c) == 0) {\n    return 1;\n  }\n  uVar4 = 1;\n  uVar3 = 0;\n  do {\n    while ((*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))) {\n      uVar4 = 0;\n      uVar3 = uVar3 + 1;\n      plVar2 = plVar2 + 8;\n      if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }\n    }\n    uVar3 = uVar3 + 1;\n    plVar2 = plVar2 + 8;\n  } while (uVar3 < *(uint *)(param_1 + 0x5c));\n  return uVar4;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "long *plVar2;" (sized_type_specifier "long" (long "long")) (pointer_declarator "*plVar2" (* "*") (identifier "plVar2")) (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "undefined8 uVar4;" (type_identifier "undefined8") (identifier "uVar4") (; ";")) (expression_statement "plVar2 = *(long **)(param_1 + 0x78);" (assignment_expression "plVar2 = *(long **)(param_1 + 0x78)" (identifier "plVar2") (= "=") (pointer_expression "*(long **)(param_1 + 0x78)" (* "*") (cast_expression "(long **)(param_1 + 0x78)" (( "(") (type_descriptor "long **" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x78)" (( "(") (binary_expression "param_1 + 0x78" (identifier "param_1") (+ "+") (number_literal "0x78")) () ")"))))) (; ";")) (if_statement "if (plVar2 == (long *)0x0) {\n    iVar1 = FUN_001199d0();\n    if (iVar1 == 0) {\n      return 1;\n    }\n    plVar2 = *(long **)(param_1 + 0x78);\n  }" (if "if") (parenthesized_expression "(plVar2 == (long *)0x0)" (( "(") (binary_expression "plVar2 == (long *)0x0" (identifier "plVar2") (== "==") (cast_expression "(long *)0x0" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    iVar1 = FUN_001199d0();\n    if (iVar1 == 0) {\n      return 1;\n    }\n    plVar2 = *(long **)(param_1 + 0x78);\n  }" ({ "{") (expression_statement "iVar1 = FUN_001199d0();" (assignment_expression "iVar1 = FUN_001199d0()" (identifier "iVar1") (= "=") (call_expression "FUN_001199d0()" (identifier "FUN_001199d0") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n      return 1;\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return 1;\n    }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "plVar2 = *(long **)(param_1 + 0x78);" (assignment_expression "plVar2 = *(long **)(param_1 + 0x78)" (identifier "plVar2") (= "=") (pointer_expression "*(long **)(param_1 + 0x78)" (* "*") (cast_expression "(long **)(param_1 + 0x78)" (( "(") (type_descriptor "long **" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x78)" (( "(") (binary_expression "param_1 + 0x78" (identifier "param_1") (+ "+") (number_literal "0x78")) () ")"))))) (; ";")) (} "}"))) (if_statement "if (*(int *)(param_1 + 0x5c) == 0) {\n    return 1;\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x5c) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x5c) == 0" (pointer_expression "*(int *)(param_1 + 0x5c)" (* "*") (cast_expression "(int *)(param_1 + 0x5c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x5c)" (( "(") (binary_expression "param_1 + 0x5c" (identifier "param_1") (+ "+") (number_literal "0x5c")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return 1;\n  }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" (identifier "uVar4") (= "=") (number_literal "1")) (; ";")) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" (identifier "uVar3") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n    while ((*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))) {\n      uVar4 = 0;\n      uVar3 = uVar3 + 1;\n      plVar2 = plVar2 + 8;\n      if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }\n    }\n    uVar3 = uVar3 + 1;\n    plVar2 = plVar2 + 8;\n  } while (uVar3 < *(uint *)(param_1 + 0x5c));" (do "do") (compound_statement "{\n    while ((*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))) {\n      uVar4 = 0;\n      uVar3 = uVar3 + 1;\n      plVar2 = plVar2 + 8;\n      if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }\n    }\n    uVar3 = uVar3 + 1;\n    plVar2 = plVar2 + 8;\n  }" ({ "{") (while_statement "while ((*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))) {\n      uVar4 = 0;\n      uVar3 = uVar3 + 1;\n      plVar2 = plVar2 + 8;\n      if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }\n    }" (while "while") (parenthesized_expression "((*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0)))))" (( "(") (parenthesized_expression "(*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))" (( "(") (binary_expression "*plVar2 == 4 &&\n           ((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0)))" (binary_expression "*plVar2 == 4" (pointer_expression "*plVar2" (* "*") (identifier "plVar2")) (== "==") (number_literal "4")) (&& "&&") (parenthesized_expression "((plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0)))" (( "(") (parenthesized_expression "(plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))" (( "(") (binary_expression "plVar2[5] == 0 ||\n            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0)" (binary_expression "plVar2[5] == 0" (subscript_expression "plVar2[5]" (identifier "plVar2") ([ "[") (number_literal "5") (] "]")) (== "==") (number_literal "0")) (|| "||") (parenthesized_expression "(iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0)" (( "(") (comma_expression "iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0" (assignment_expression "iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7])" (identifier "iVar1") (= "=") (call_expression "FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7])" (identifier "FUN_00133a50") (argument_list "(param_1,0,plVar2[2],plVar2[5],plVar2[7])" (( "(") (identifier "param_1") (, ",") (number_literal "0") (, ",") (subscript_expression "plVar2[2]" (identifier "plVar2") ([ "[") (number_literal "2") (] "]")) (, ",") (subscript_expression "plVar2[5]" (identifier "plVar2") ([ "[") (number_literal "5") (] "]")) (, ",") (subscript_expression "plVar2[7]" (identifier "plVar2") ([ "[") (number_literal "7") (] "]")) () ")")))) (, ",") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0"))) () ")"))) () ")")) () ")"))) () ")")) () ")")) (compound_statement "{\n      uVar4 = 0;\n      uVar3 = uVar3 + 1;\n      plVar2 = plVar2 + 8;\n      if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }\n    }" ({ "{") (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar3 = uVar3 + 1;" (assignment_expression "uVar3 = uVar3 + 1" (identifier "uVar3") (= "=") (binary_expression "uVar3 + 1" (identifier "uVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "plVar2 = plVar2 + 8;" (assignment_expression "plVar2 = plVar2 + 8" (identifier "plVar2") (= "=") (binary_expression "plVar2 + 8" (identifier "plVar2") (+ "+") (number_literal "8"))) (; ";")) (if_statement "if (*(uint *)(param_1 + 0x5c) <= uVar3) {\n        return 0;\n      }" (if "if") (parenthesized_expression "(*(uint *)(param_1 + 0x5c) <= uVar3)" (( "(") (binary_expression "*(uint *)(param_1 + 0x5c) <= uVar3" (pointer_expression "*(uint *)(param_1 + 0x5c)" (* "*") (cast_expression "(uint *)(param_1 + 0x5c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x5c)" (( "(") (binary_expression "param_1 + 0x5c" (identifier "param_1") (+ "+") (number_literal "0x5c")) () ")")))) (<= "<=") (identifier "uVar3")) () ")")) (compound_statement "{\n        return 0;\n      }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (} "}"))) (expression_statement "uVar3 = uVar3 + 1;" (assignment_expression "uVar3 = uVar3 + 1" (identifier "uVar3") (= "=") (binary_expression "uVar3 + 1" (identifier "uVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "plVar2 = plVar2 + 8;" (assignment_expression "plVar2 = plVar2 + 8" (identifier "plVar2") (= "=") (binary_expression "plVar2 + 8" (identifier "plVar2") (+ "+") (number_literal "8"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar3 < *(uint *)(param_1 + 0x5c))" (( "(") (binary_expression "uVar3 < *(uint *)(param_1 + 0x5c)" (identifier "uVar3") (< "<") (pointer_expression "*(uint *)(param_1 + 0x5c)" (* "*") (cast_expression "(uint *)(param_1 + 0x5c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x5c)" (( "(") (binary_expression "param_1 + 0x5c" (identifier "param_1") (+ "+") (number_literal "0x5c")) () ")"))))) () ")")) (; ";")) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}")))

type_1 function_1(type_2 *filedata)

{
  type_1 var_5;
  type_1 var_3;
  type_3 *var_1;
  type_4 var_6;
  
  var_1 = filedata->program_headers;
  if (var_1 == (type_3 *)0x0) {
    var_3 = var_2(filedata);
    if (var_3 == 0) {
      return 1;
    }
    var_1 = filedata->program_headers;
  }
  if ((filedata->file_header).e_phnum == 0) {
    return 1;
  }
  var_3 = 1;
  var_6 = 0;
  do {
    while ((var_1->p_type == 4 &&
           ((var_1->p_filesz == 0 ||
            (var_5 = var_4(filedata,(type_5 *)0x0,var_1->p_offset,
                                      var_1->p_filesz,var_1->p_align), var_5 == 0))))) {
      var_3 = 0;
      var_6 = var_6 + 1;
      var_1 = var_1 + 1;
      if ((filedata->file_header).e_phnum <= var_6) {
        return 0;
      }
    }
    var_6 = var_6 + 1;
    var_1 = var_1 + 1;
  } while (var_6 < (filedata->file_header).e_phnum);
  return var_3;
}


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

undefined8 MASKED(long param_1)

{
  int iVar1;
  long *plVar2;
  uint uVar3;
  undefined8 uVar4;
  
  plVar2 = *(long **)(param_1 + 0x78);
  if (plVar2 == (long *)0x0) {
    iVar1 = FUN_001199d0();
    if (iVar1 == 0) {
      return 1;
    }
    plVar2 = *(long **)(param_1 + 0x78);
  }
  if (*(int *)(param_1 + 0x5c) == 0) {
    return 1;
  }
  uVar4 = 1;
  uVar3 = 0;
  do {
    while ((*plVar2 == 4 &&
           ((plVar2[5] == 0 ||
            (iVar1 = FUN_00133a50(param_1,0,plVar2[2],plVar2[5],plVar2[7]), iVar1 == 0))))) {
      uVar4 = 0;
      uVar3 = uVar3 + 1;
      plVar2 = plVar2 + 8;
      if (*(uint *)(param_1 + 0x5c) <= uVar3) {
        return 0;
      }
    }
    uVar3 = uVar3 + 1;
    plVar2 = plVar2 + 8;
  } while (uVar3 < *(uint *)(param_1 + 0x5c));
  return uVar4;
}

