
uint * find_cu_tu_set(void *file,uint shndx)

{
  ulong uVar1;
  bfd_boolean bVar2;
  uint *puVar3;
  uint *puVar4;
  ulong uVar5;
  uint uVar6;
  
  bVar2 = load_cu_tu_indexes(file);
  if ((bVar2 == 0) || (shndx_pool_used == 0)) {
LAB_00150d76:
    puVar3 = (uint *)0x0;
  }
  else {
    puVar3 = shndx_pool;
    if (shndx != *shndx_pool) {
      uVar1 = 0;
      puVar4 = shndx_pool;
      do {
        uVar5 = uVar1;
        puVar4 = puVar4 + 1;
        uVar6 = (int)uVar5 + 1;
        if (uVar6 == shndx_pool_used) goto LAB_00150d76;
        uVar1 = (ulong)uVar6;
      } while (*puVar4 != shndx);
      if (shndx_pool[uVar5] == 0) {
        return puVar4;
      }
      while ((int)uVar5 != 0) {
        uVar6 = (int)uVar5 - 1;
        if (shndx_pool[uVar6] == 0) {
          return shndx_pool + uVar5;
        }
        uVar5 = (ulong)uVar6;
      }
    }
  }
  return puVar3;
}



int * FUN_00150d30(undefined8 param_1,int param_2)

{
  ulong uVar1;
  int iVar2;
  int *piVar3;
  int *piVar4;
  ulong uVar5;
  uint uVar6;
  
  iVar2 = FUN_00150ca0();
  if ((iVar2 == 0) || (DAT_00196ed0 == 0)) {
LAB_00150d76:
    piVar3 = (int *)0x0;
  }
  else {
    piVar3 = DAT_00196ed8;
    if (param_2 != *DAT_00196ed8) {
      uVar1 = 0;
      piVar4 = DAT_00196ed8;
      do {
        uVar5 = uVar1;
        piVar4 = piVar4 + 1;
        uVar6 = (int)uVar5 + 1;
        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;
        uVar1 = (ulong)uVar6;
      } while (*piVar4 != param_2);
      if (DAT_00196ed8[uVar5] == 0) {
        return piVar4;
      }
      while ((int)uVar5 != 0) {
        uVar6 = (int)uVar5 - 1;
        if (DAT_00196ed8[uVar6] == 0) {
          return DAT_00196ed8 + uVar5;
        }
        uVar5 = (ulong)uVar6;
      }
    }
  }
  return piVar3;
}


PUSH RBX
MOV EBX,ESI
CALL 0x00150ca0
TEST EAX,EAX
JZ 0x00150d76
MOV R8D,dword ptr [0x00196ed0]
TEST R8D,R8D
JZ 0x00150d76
MOV RAX,qword ptr [0x00196ed8]
CMP EBX,dword ptr [RAX]
JZ 0x00150d78
LEA RCX,[RAX + 0x4]
XOR EDX,EDX
JMP 0x00150d6e
MOV RSI,RCX
ADD RCX,0x4
CMP dword ptr [RCX + -0x4],EBX
JZ 0x00150d80
MOV EDX,EDI
LEA EDI,[RDX + 0x1]
CMP EDI,R8D
JNZ 0x00150d60
XOR EAX,EAX
POP RBX
RET
MOV ECX,EDX
MOV EDI,dword ptr [RAX + RCX*0x4]
TEST EDI,EDI
JNZ 0x00150d9f
JMP 0x00150dae
LEA ESI,[RDX + -0x1]
MOV RCX,RSI
MOV ESI,dword ptr [RAX + RSI*0x4]
TEST ESI,ESI
JZ 0x00150da8
MOV EDX,ECX
TEST EDX,EDX
JNZ 0x00150d90
JMP 0x00150d78
LEA RAX,[RAX + RDX*0x4]
POP RBX
RET
MOV RAX,RSI
POP RBX
RET
(translation_unit "int * FUN_00150d30(undefined8 param_1,int param_2)\n\n{\n  ulong uVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  ulong uVar5;\n  uint uVar6;\n  \n  iVar2 = FUN_00150ca0();\n  if ((iVar2 == 0) || (DAT_00196ed0 == 0)) {\nLAB_00150d76:\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar3 = DAT_00196ed8;\n    if (param_2 != *DAT_00196ed8) {\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }\n  return piVar3;\n}\n\n" (function_definition "int * FUN_00150d30(undefined8 param_1,int param_2)\n\n{\n  ulong uVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  ulong uVar5;\n  uint uVar6;\n  \n  iVar2 = FUN_00150ca0();\n  if ((iVar2 == 0) || (DAT_00196ed0 == 0)) {\nLAB_00150d76:\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar3 = DAT_00196ed8;\n    if (param_2 != *DAT_00196ed8) {\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }\n  return piVar3;\n}" primitive_type (pointer_declarator "* FUN_00150d30(undefined8 param_1,int param_2)" * (function_declarator "FUN_00150d30(undefined8 param_1,int param_2)" identifier (parameter_list "(undefined8 param_1,int param_2)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) )))) (compound_statement "{\n  ulong uVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  ulong uVar5;\n  uint uVar6;\n  \n  iVar2 = FUN_00150ca0();\n  if ((iVar2 == 0) || (DAT_00196ed0 == 0)) {\nLAB_00150d76:\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar3 = DAT_00196ed8;\n    if (param_2 != *DAT_00196ed8) {\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }\n  return piVar3;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "ulong uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (expression_statement "iVar2 = FUN_00150ca0();" (assignment_expression "iVar2 = FUN_00150ca0()" identifier = (call_expression "FUN_00150ca0()" identifier (argument_list "()" ( )))) ;) (if_statement "if ((iVar2 == 0) || (DAT_00196ed0 == 0)) {\nLAB_00150d76:\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar3 = DAT_00196ed8;\n    if (param_2 != *DAT_00196ed8) {\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }" if (parenthesized_expression "((iVar2 == 0) || (DAT_00196ed0 == 0))" ( (binary_expression "(iVar2 == 0) || (DAT_00196ed0 == 0)" (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) || (parenthesized_expression "(DAT_00196ed0 == 0)" ( (binary_expression "DAT_00196ed0 == 0" identifier == number_literal) ))) )) (compound_statement "{\nLAB_00150d76:\n    piVar3 = (int *)0x0;\n  }" { (labeled_statement "LAB_00150d76:\n    piVar3 = (int *)0x0;" statement_identifier : (expression_statement "piVar3 = (int *)0x0;" (assignment_expression "piVar3 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;)) }) (else_clause "else {\n    piVar3 = DAT_00196ed8;\n    if (param_2 != *DAT_00196ed8) {\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }" else (compound_statement "{\n    piVar3 = DAT_00196ed8;\n    if (param_2 != *DAT_00196ed8) {\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }" { (expression_statement "piVar3 = DAT_00196ed8;" (assignment_expression "piVar3 = DAT_00196ed8" identifier = identifier) ;) (if_statement "if (param_2 != *DAT_00196ed8) {\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }" if (parenthesized_expression "(param_2 != *DAT_00196ed8)" ( (binary_expression "param_2 != *DAT_00196ed8" identifier != (pointer_expression "*DAT_00196ed8" * identifier)) )) (compound_statement "{\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }" { (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (expression_statement "piVar4 = DAT_00196ed8;" (assignment_expression "piVar4 = DAT_00196ed8" identifier = identifier) ;) (do_statement "do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);" do (compound_statement "{\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      }" { (expression_statement "uVar5 = uVar1;" (assignment_expression "uVar5 = uVar1" identifier = identifier) ;) (expression_statement "piVar4 = piVar4 + 1;" (assignment_expression "piVar4 = piVar4 + 1" identifier = (binary_expression "piVar4 + 1" identifier + number_literal)) ;) (expression_statement "uVar6 = (int)uVar5 + 1;" (assignment_expression "uVar6 = (int)uVar5 + 1" identifier = (binary_expression "(int)uVar5 + 1" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal)) ;) (if_statement "if (uVar6 == DAT_00196ed0) goto LAB_00150d76;" if (parenthesized_expression "(uVar6 == DAT_00196ed0)" ( (binary_expression "uVar6 == DAT_00196ed0" identifier == identifier) )) (goto_statement "goto LAB_00150d76;" goto statement_identifier ;)) (expression_statement "uVar1 = (ulong)uVar6;" (assignment_expression "uVar1 = (ulong)uVar6" identifier = (cast_expression "(ulong)uVar6" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) }) while (parenthesized_expression "(*piVar4 != param_2)" ( (binary_expression "*piVar4 != param_2" (pointer_expression "*piVar4" * identifier) != identifier) )) ;) (if_statement "if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }" if (parenthesized_expression "(DAT_00196ed8[uVar5] == 0)" ( (binary_expression "DAT_00196ed8[uVar5] == 0" (subscript_expression "DAT_00196ed8[uVar5]" identifier [ identifier ]) == number_literal) )) (compound_statement "{\n        return piVar4;\n      }" { (return_statement "return piVar4;" return identifier ;) })) (while_statement "while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }" while (parenthesized_expression "((int)uVar5 != 0)" ( (binary_expression "(int)uVar5 != 0" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) != number_literal) )) (compound_statement "{\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }" { (expression_statement "uVar6 = (int)uVar5 - 1;" (assignment_expression "uVar6 = (int)uVar5 - 1" identifier = (binary_expression "(int)uVar5 - 1" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) - number_literal)) ;) (if_statement "if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }" if (parenthesized_expression "(DAT_00196ed8[uVar6] == 0)" ( (binary_expression "DAT_00196ed8[uVar6] == 0" (subscript_expression "DAT_00196ed8[uVar6]" identifier [ identifier ]) == number_literal) )) (compound_statement "{\n          return DAT_00196ed8 + uVar5;\n        }" { (return_statement "return DAT_00196ed8 + uVar5;" return (binary_expression "DAT_00196ed8 + uVar5" identifier + identifier) ;) })) (expression_statement "uVar5 = (ulong)uVar6;" (assignment_expression "uVar5 = (ulong)uVar6" identifier = (cast_expression "(ulong)uVar6" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) })) })) }))) (return_statement "return piVar3;" return identifier ;) })))
(translation_unit "uint * find_cu_tu_set(void *file,uint shndx)\n\n{\n  ulong uVar1;\n  bfd_boolean bVar2;\n  uint *puVar3;\n  uint *puVar4;\n  ulong uVar5;\n  uint uVar6;\n  \n  bVar2 = load_cu_tu_indexes(file);\n  if ((bVar2 == 0) || (shndx_pool_used == 0)) {\nLAB_00150d76:\n    puVar3 = (uint *)0x0;\n  }\n  else {\n    puVar3 = shndx_pool;\n    if (shndx != *shndx_pool) {\n      uVar1 = 0;\n      puVar4 = shndx_pool;\n      do {\n        uVar5 = uVar1;\n        puVar4 = puVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == shndx_pool_used) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*puVar4 != shndx);\n      if (shndx_pool[uVar5] == 0) {\n        return puVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (shndx_pool[uVar6] == 0) {\n          return shndx_pool + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }\n  return puVar3;\n}\n\n" (function_definition "uint * find_cu_tu_set(void *file,uint shndx)\n\n{\n  ulong uVar1;\n  bfd_boolean bVar2;\n  uint *puVar3;\n  uint *puVar4;\n  ulong uVar5;\n  uint uVar6;\n  \n  bVar2 = load_cu_tu_indexes(file);\n  if ((bVar2 == 0) || (shndx_pool_used == 0)) {\nLAB_00150d76:\n    puVar3 = (uint *)0x0;\n  }\n  else {\n    puVar3 = shndx_pool;\n    if (shndx != *shndx_pool) {\n      uVar1 = 0;\n      puVar4 = shndx_pool;\n      do {\n        uVar5 = uVar1;\n        puVar4 = puVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == shndx_pool_used) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*puVar4 != shndx);\n      if (shndx_pool[uVar5] == 0) {\n        return puVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (shndx_pool[uVar6] == 0) {\n          return shndx_pool + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }\n  return puVar3;\n}" type_identifier (pointer_declarator "* find_cu_tu_set(void *file,uint shndx)" * (function_declarator "find_cu_tu_set(void *file,uint shndx)" identifier (parameter_list "(void *file,uint shndx)" ( (parameter_declaration "void *file" primitive_type (pointer_declarator "*file" * identifier)) , (parameter_declaration "uint shndx" type_identifier identifier) )))) (compound_statement "{\n  ulong uVar1;\n  bfd_boolean bVar2;\n  uint *puVar3;\n  uint *puVar4;\n  ulong uVar5;\n  uint uVar6;\n  \n  bVar2 = load_cu_tu_indexes(file);\n  if ((bVar2 == 0) || (shndx_pool_used == 0)) {\nLAB_00150d76:\n    puVar3 = (uint *)0x0;\n  }\n  else {\n    puVar3 = shndx_pool;\n    if (shndx != *shndx_pool) {\n      uVar1 = 0;\n      puVar4 = shndx_pool;\n      do {\n        uVar5 = uVar1;\n        puVar4 = puVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == shndx_pool_used) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*puVar4 != shndx);\n      if (shndx_pool[uVar5] == 0) {\n        return puVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (shndx_pool[uVar6] == 0) {\n          return shndx_pool + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }\n  return puVar3;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "bfd_boolean bVar2;" type_identifier identifier ;) (declaration "uint *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "uint *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "ulong uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (expression_statement "bVar2 = load_cu_tu_indexes(file);" (assignment_expression "bVar2 = load_cu_tu_indexes(file)" identifier = (call_expression "load_cu_tu_indexes(file)" identifier (argument_list "(file)" ( identifier )))) ;) (if_statement "if ((bVar2 == 0) || (shndx_pool_used == 0)) {\nLAB_00150d76:\n    puVar3 = (uint *)0x0;\n  }\n  else {\n    puVar3 = shndx_pool;\n    if (shndx != *shndx_pool) {\n      uVar1 = 0;\n      puVar4 = shndx_pool;\n      do {\n        uVar5 = uVar1;\n        puVar4 = puVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == shndx_pool_used) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*puVar4 != shndx);\n      if (shndx_pool[uVar5] == 0) {\n        return puVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (shndx_pool[uVar6] == 0) {\n          return shndx_pool + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }" if (parenthesized_expression "((bVar2 == 0) || (shndx_pool_used == 0))" ( (binary_expression "(bVar2 == 0) || (shndx_pool_used == 0)" (parenthesized_expression "(bVar2 == 0)" ( (binary_expression "bVar2 == 0" identifier == number_literal) )) || (parenthesized_expression "(shndx_pool_used == 0)" ( (binary_expression "shndx_pool_used == 0" identifier == number_literal) ))) )) (compound_statement "{\nLAB_00150d76:\n    puVar3 = (uint *)0x0;\n  }" { (labeled_statement "LAB_00150d76:\n    puVar3 = (uint *)0x0;" statement_identifier : (expression_statement "puVar3 = (uint *)0x0;" (assignment_expression "puVar3 = (uint *)0x0" identifier = (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;)) }) (else_clause "else {\n    puVar3 = shndx_pool;\n    if (shndx != *shndx_pool) {\n      uVar1 = 0;\n      puVar4 = shndx_pool;\n      do {\n        uVar5 = uVar1;\n        puVar4 = puVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == shndx_pool_used) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*puVar4 != shndx);\n      if (shndx_pool[uVar5] == 0) {\n        return puVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (shndx_pool[uVar6] == 0) {\n          return shndx_pool + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }" else (compound_statement "{\n    puVar3 = shndx_pool;\n    if (shndx != *shndx_pool) {\n      uVar1 = 0;\n      puVar4 = shndx_pool;\n      do {\n        uVar5 = uVar1;\n        puVar4 = puVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == shndx_pool_used) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*puVar4 != shndx);\n      if (shndx_pool[uVar5] == 0) {\n        return puVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (shndx_pool[uVar6] == 0) {\n          return shndx_pool + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }" { (expression_statement "puVar3 = shndx_pool;" (assignment_expression "puVar3 = shndx_pool" identifier = identifier) ;) (if_statement "if (shndx != *shndx_pool) {\n      uVar1 = 0;\n      puVar4 = shndx_pool;\n      do {\n        uVar5 = uVar1;\n        puVar4 = puVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == shndx_pool_used) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*puVar4 != shndx);\n      if (shndx_pool[uVar5] == 0) {\n        return puVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (shndx_pool[uVar6] == 0) {\n          return shndx_pool + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }" if (parenthesized_expression "(shndx != *shndx_pool)" ( (binary_expression "shndx != *shndx_pool" identifier != (pointer_expression "*shndx_pool" * identifier)) )) (compound_statement "{\n      uVar1 = 0;\n      puVar4 = shndx_pool;\n      do {\n        uVar5 = uVar1;\n        puVar4 = puVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == shndx_pool_used) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*puVar4 != shndx);\n      if (shndx_pool[uVar5] == 0) {\n        return puVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (shndx_pool[uVar6] == 0) {\n          return shndx_pool + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }" { (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (expression_statement "puVar4 = shndx_pool;" (assignment_expression "puVar4 = shndx_pool" identifier = identifier) ;) (do_statement "do {\n        uVar5 = uVar1;\n        puVar4 = puVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == shndx_pool_used) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*puVar4 != shndx);" do (compound_statement "{\n        uVar5 = uVar1;\n        puVar4 = puVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == shndx_pool_used) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      }" { (expression_statement "uVar5 = uVar1;" (assignment_expression "uVar5 = uVar1" identifier = identifier) ;) (expression_statement "puVar4 = puVar4 + 1;" (assignment_expression "puVar4 = puVar4 + 1" identifier = (binary_expression "puVar4 + 1" identifier + number_literal)) ;) (expression_statement "uVar6 = (int)uVar5 + 1;" (assignment_expression "uVar6 = (int)uVar5 + 1" identifier = (binary_expression "(int)uVar5 + 1" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal)) ;) (if_statement "if (uVar6 == shndx_pool_used) goto LAB_00150d76;" if (parenthesized_expression "(uVar6 == shndx_pool_used)" ( (binary_expression "uVar6 == shndx_pool_used" identifier == identifier) )) (goto_statement "goto LAB_00150d76;" goto statement_identifier ;)) (expression_statement "uVar1 = (ulong)uVar6;" (assignment_expression "uVar1 = (ulong)uVar6" identifier = (cast_expression "(ulong)uVar6" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) }) while (parenthesized_expression "(*puVar4 != shndx)" ( (binary_expression "*puVar4 != shndx" (pointer_expression "*puVar4" * identifier) != identifier) )) ;) (if_statement "if (shndx_pool[uVar5] == 0) {\n        return puVar4;\n      }" if (parenthesized_expression "(shndx_pool[uVar5] == 0)" ( (binary_expression "shndx_pool[uVar5] == 0" (subscript_expression "shndx_pool[uVar5]" identifier [ identifier ]) == number_literal) )) (compound_statement "{\n        return puVar4;\n      }" { (return_statement "return puVar4;" return identifier ;) })) (while_statement "while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (shndx_pool[uVar6] == 0) {\n          return shndx_pool + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }" while (parenthesized_expression "((int)uVar5 != 0)" ( (binary_expression "(int)uVar5 != 0" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) != number_literal) )) (compound_statement "{\n        uVar6 = (int)uVar5 - 1;\n        if (shndx_pool[uVar6] == 0) {\n          return shndx_pool + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }" { (expression_statement "uVar6 = (int)uVar5 - 1;" (assignment_expression "uVar6 = (int)uVar5 - 1" identifier = (binary_expression "(int)uVar5 - 1" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) - number_literal)) ;) (if_statement "if (shndx_pool[uVar6] == 0) {\n          return shndx_pool + uVar5;\n        }" if (parenthesized_expression "(shndx_pool[uVar6] == 0)" ( (binary_expression "shndx_pool[uVar6] == 0" (subscript_expression "shndx_pool[uVar6]" identifier [ identifier ]) == number_literal) )) (compound_statement "{\n          return shndx_pool + uVar5;\n        }" { (return_statement "return shndx_pool + uVar5;" return (binary_expression "shndx_pool + uVar5" identifier + identifier) ;) })) (expression_statement "uVar5 = (ulong)uVar6;" (assignment_expression "uVar5 = (ulong)uVar6" identifier = (cast_expression "(ulong)uVar6" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) })) })) }))) (return_statement "return puVar3;" return identifier ;) })))
(translation_unit "int * FUN_00150d30(undefined8 param_1,int param_2)\n\n{\n  ulong uVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  ulong uVar5;\n  uint uVar6;\n  \n  iVar2 = FUN_00150ca0();\n  if ((iVar2 == 0) || (DAT_00196ed0 == 0)) {\nLAB_00150d76:\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar3 = DAT_00196ed8;\n    if (param_2 != *DAT_00196ed8) {\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }\n  return piVar3;\n}\n\n" (function_definition "int * FUN_00150d30(undefined8 param_1,int param_2)\n\n{\n  ulong uVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  ulong uVar5;\n  uint uVar6;\n  \n  iVar2 = FUN_00150ca0();\n  if ((iVar2 == 0) || (DAT_00196ed0 == 0)) {\nLAB_00150d76:\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar3 = DAT_00196ed8;\n    if (param_2 != *DAT_00196ed8) {\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }\n  return piVar3;\n}" primitive_type (pointer_declarator "* FUN_00150d30(undefined8 param_1,int param_2)" * (function_declarator "FUN_00150d30(undefined8 param_1,int param_2)" identifier (parameter_list "(undefined8 param_1,int param_2)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) )))) (compound_statement "{\n  ulong uVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  ulong uVar5;\n  uint uVar6;\n  \n  iVar2 = FUN_00150ca0();\n  if ((iVar2 == 0) || (DAT_00196ed0 == 0)) {\nLAB_00150d76:\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar3 = DAT_00196ed8;\n    if (param_2 != *DAT_00196ed8) {\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }\n  return piVar3;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "ulong uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (expression_statement "iVar2 = FUN_00150ca0();" (assignment_expression "iVar2 = FUN_00150ca0()" identifier = (call_expression "FUN_00150ca0()" identifier (argument_list "()" ( )))) ;) (if_statement "if ((iVar2 == 0) || (DAT_00196ed0 == 0)) {\nLAB_00150d76:\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar3 = DAT_00196ed8;\n    if (param_2 != *DAT_00196ed8) {\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }" if (parenthesized_expression "((iVar2 == 0) || (DAT_00196ed0 == 0))" ( (binary_expression "(iVar2 == 0) || (DAT_00196ed0 == 0)" (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) || (parenthesized_expression "(DAT_00196ed0 == 0)" ( (binary_expression "DAT_00196ed0 == 0" identifier == number_literal) ))) )) (compound_statement "{\nLAB_00150d76:\n    piVar3 = (int *)0x0;\n  }" { (labeled_statement "LAB_00150d76:\n    piVar3 = (int *)0x0;" statement_identifier : (expression_statement "piVar3 = (int *)0x0;" (assignment_expression "piVar3 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;)) }) (else_clause "else {\n    piVar3 = DAT_00196ed8;\n    if (param_2 != *DAT_00196ed8) {\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }" else (compound_statement "{\n    piVar3 = DAT_00196ed8;\n    if (param_2 != *DAT_00196ed8) {\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }" { (expression_statement "piVar3 = DAT_00196ed8;" (assignment_expression "piVar3 = DAT_00196ed8" identifier = identifier) ;) (if_statement "if (param_2 != *DAT_00196ed8) {\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }" if (parenthesized_expression "(param_2 != *DAT_00196ed8)" ( (binary_expression "param_2 != *DAT_00196ed8" identifier != (pointer_expression "*DAT_00196ed8" * identifier)) )) (compound_statement "{\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }" { (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (expression_statement "piVar4 = DAT_00196ed8;" (assignment_expression "piVar4 = DAT_00196ed8" identifier = identifier) ;) (do_statement "do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);" do (compound_statement "{\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      }" { (expression_statement "uVar5 = uVar1;" (assignment_expression "uVar5 = uVar1" identifier = identifier) ;) (expression_statement "piVar4 = piVar4 + 1;" (assignment_expression "piVar4 = piVar4 + 1" identifier = (binary_expression "piVar4 + 1" identifier + number_literal)) ;) (expression_statement "uVar6 = (int)uVar5 + 1;" (assignment_expression "uVar6 = (int)uVar5 + 1" identifier = (binary_expression "(int)uVar5 + 1" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal)) ;) (if_statement "if (uVar6 == DAT_00196ed0) goto LAB_00150d76;" if (parenthesized_expression "(uVar6 == DAT_00196ed0)" ( (binary_expression "uVar6 == DAT_00196ed0" identifier == identifier) )) (goto_statement "goto LAB_00150d76;" goto statement_identifier ;)) (expression_statement "uVar1 = (ulong)uVar6;" (assignment_expression "uVar1 = (ulong)uVar6" identifier = (cast_expression "(ulong)uVar6" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) }) while (parenthesized_expression "(*piVar4 != param_2)" ( (binary_expression "*piVar4 != param_2" (pointer_expression "*piVar4" * identifier) != identifier) )) ;) (if_statement "if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }" if (parenthesized_expression "(DAT_00196ed8[uVar5] == 0)" ( (binary_expression "DAT_00196ed8[uVar5] == 0" (subscript_expression "DAT_00196ed8[uVar5]" identifier [ identifier ]) == number_literal) )) (compound_statement "{\n        return piVar4;\n      }" { (return_statement "return piVar4;" return identifier ;) })) (while_statement "while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }" while (parenthesized_expression "((int)uVar5 != 0)" ( (binary_expression "(int)uVar5 != 0" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) != number_literal) )) (compound_statement "{\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }" { (expression_statement "uVar6 = (int)uVar5 - 1;" (assignment_expression "uVar6 = (int)uVar5 - 1" identifier = (binary_expression "(int)uVar5 - 1" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) - number_literal)) ;) (if_statement "if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }" if (parenthesized_expression "(DAT_00196ed8[uVar6] == 0)" ( (binary_expression "DAT_00196ed8[uVar6] == 0" (subscript_expression "DAT_00196ed8[uVar6]" identifier [ identifier ]) == number_literal) )) (compound_statement "{\n          return DAT_00196ed8 + uVar5;\n        }" { (return_statement "return DAT_00196ed8 + uVar5;" return (binary_expression "DAT_00196ed8 + uVar5" identifier + identifier) ;) })) (expression_statement "uVar5 = (ulong)uVar6;" (assignment_expression "uVar5 = (ulong)uVar6" identifier = (cast_expression "(ulong)uVar6" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) })) })) }))) (return_statement "return piVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (binary_expression IDENT == LIT) ))) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;)) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) }) while (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != IDENT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ IDENT ]) == LIT) )) (compound_statement { (return_statement return IDENT ;) })) (while_statement while (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ IDENT ]) == LIT) )) (compound_statement { (return_statement return (binary_expression IDENT + IDENT) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) })) })) }))) (return_statement return IDENT ;) })))
(function_definition "int * FUN_00150d30(undefined8 param_1,int param_2)\n\n{\n  ulong uVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  ulong uVar5;\n  uint uVar6;\n  \n  iVar2 = FUN_00150ca0();\n  if ((iVar2 == 0) || (DAT_00196ed0 == 0)) {\nLAB_00150d76:\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar3 = DAT_00196ed8;\n    if (param_2 != *DAT_00196ed8) {\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }\n  return piVar3;\n}" (primitive_type "int") (pointer_declarator "* FUN_00150d30(undefined8 param_1,int param_2)" (* "*") (function_declarator "FUN_00150d30(undefined8 param_1,int param_2)" (identifier "FUN_00150d30") (parameter_list "(undefined8 param_1,int param_2)" (( "(") (parameter_declaration "undefined8 param_1" (type_identifier "undefined8") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")")))) (compound_statement "{\n  ulong uVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  ulong uVar5;\n  uint uVar6;\n  \n  iVar2 = FUN_00150ca0();\n  if ((iVar2 == 0) || (DAT_00196ed0 == 0)) {\nLAB_00150d76:\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar3 = DAT_00196ed8;\n    if (param_2 != *DAT_00196ed8) {\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }\n  return piVar3;\n}" ({ "{") (declaration "ulong uVar1;" (type_identifier "ulong") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "ulong uVar5;" (type_identifier "ulong") (identifier "uVar5") (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (expression_statement "iVar2 = FUN_00150ca0();" (assignment_expression "iVar2 = FUN_00150ca0()" (identifier "iVar2") (= "=") (call_expression "FUN_00150ca0()" (identifier "FUN_00150ca0") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if ((iVar2 == 0) || (DAT_00196ed0 == 0)) {\nLAB_00150d76:\n    piVar3 = (int *)0x0;\n  }\n  else {\n    piVar3 = DAT_00196ed8;\n    if (param_2 != *DAT_00196ed8) {\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }" (if "if") (parenthesized_expression "((iVar2 == 0) || (DAT_00196ed0 == 0))" (( "(") (binary_expression "(iVar2 == 0) || (DAT_00196ed0 == 0)" (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(DAT_00196ed0 == 0)" (( "(") (binary_expression "DAT_00196ed0 == 0" (identifier "DAT_00196ed0") (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\nLAB_00150d76:\n    piVar3 = (int *)0x0;\n  }" ({ "{") (labeled_statement "LAB_00150d76:\n    piVar3 = (int *)0x0;" (statement_identifier "LAB_00150d76") (: ":") (expression_statement "piVar3 = (int *)0x0;" (assignment_expression "piVar3 = (int *)0x0" (identifier "piVar3") (= "=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";"))) (} "}")) (else_clause "else {\n    piVar3 = DAT_00196ed8;\n    if (param_2 != *DAT_00196ed8) {\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }" (else "else") (compound_statement "{\n    piVar3 = DAT_00196ed8;\n    if (param_2 != *DAT_00196ed8) {\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }\n  }" ({ "{") (expression_statement "piVar3 = DAT_00196ed8;" (assignment_expression "piVar3 = DAT_00196ed8" (identifier "piVar3") (= "=") (identifier "DAT_00196ed8")) (; ";")) (if_statement "if (param_2 != *DAT_00196ed8) {\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }" (if "if") (parenthesized_expression "(param_2 != *DAT_00196ed8)" (( "(") (binary_expression "param_2 != *DAT_00196ed8" (identifier "param_2") (!= "!=") (pointer_expression "*DAT_00196ed8" (* "*") (identifier "DAT_00196ed8"))) () ")")) (compound_statement "{\n      uVar1 = 0;\n      piVar4 = DAT_00196ed8;\n      do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);\n      if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }\n      while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }\n    }" ({ "{") (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" (identifier "uVar1") (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar4 = DAT_00196ed8;" (assignment_expression "piVar4 = DAT_00196ed8" (identifier "piVar4") (= "=") (identifier "DAT_00196ed8")) (; ";")) (do_statement "do {\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      } while (*piVar4 != param_2);" (do "do") (compound_statement "{\n        uVar5 = uVar1;\n        piVar4 = piVar4 + 1;\n        uVar6 = (int)uVar5 + 1;\n        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;\n        uVar1 = (ulong)uVar6;\n      }" ({ "{") (expression_statement "uVar5 = uVar1;" (assignment_expression "uVar5 = uVar1" (identifier "uVar5") (= "=") (identifier "uVar1")) (; ";")) (expression_statement "piVar4 = piVar4 + 1;" (assignment_expression "piVar4 = piVar4 + 1" (identifier "piVar4") (= "=") (binary_expression "piVar4 + 1" (identifier "piVar4") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar6 = (int)uVar5 + 1;" (assignment_expression "uVar6 = (int)uVar5 + 1" (identifier "uVar6") (= "=") (binary_expression "(int)uVar5 + 1" (cast_expression "(int)uVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar5")) (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (uVar6 == DAT_00196ed0) goto LAB_00150d76;" (if "if") (parenthesized_expression "(uVar6 == DAT_00196ed0)" (( "(") (binary_expression "uVar6 == DAT_00196ed0" (identifier "uVar6") (== "==") (identifier "DAT_00196ed0")) () ")")) (goto_statement "goto LAB_00150d76;" (goto "goto") (statement_identifier "LAB_00150d76") (; ";"))) (expression_statement "uVar1 = (ulong)uVar6;" (assignment_expression "uVar1 = (ulong)uVar6" (identifier "uVar1") (= "=") (cast_expression "(ulong)uVar6" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar6"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(*piVar4 != param_2)" (( "(") (binary_expression "*piVar4 != param_2" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (!= "!=") (identifier "param_2")) () ")")) (; ";")) (if_statement "if (DAT_00196ed8[uVar5] == 0) {\n        return piVar4;\n      }" (if "if") (parenthesized_expression "(DAT_00196ed8[uVar5] == 0)" (( "(") (binary_expression "DAT_00196ed8[uVar5] == 0" (subscript_expression "DAT_00196ed8[uVar5]" (identifier "DAT_00196ed8") ([ "[") (identifier "uVar5") (] "]")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        return piVar4;\n      }" ({ "{") (return_statement "return piVar4;" (return "return") (identifier "piVar4") (; ";")) (} "}"))) (while_statement "while ((int)uVar5 != 0) {\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }" (while "while") (parenthesized_expression "((int)uVar5 != 0)" (( "(") (binary_expression "(int)uVar5 != 0" (cast_expression "(int)uVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar5")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        uVar6 = (int)uVar5 - 1;\n        if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }\n        uVar5 = (ulong)uVar6;\n      }" ({ "{") (expression_statement "uVar6 = (int)uVar5 - 1;" (assignment_expression "uVar6 = (int)uVar5 - 1" (identifier "uVar6") (= "=") (binary_expression "(int)uVar5 - 1" (cast_expression "(int)uVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar5")) (- "-") (number_literal "1"))) (; ";")) (if_statement "if (DAT_00196ed8[uVar6] == 0) {\n          return DAT_00196ed8 + uVar5;\n        }" (if "if") (parenthesized_expression "(DAT_00196ed8[uVar6] == 0)" (( "(") (binary_expression "DAT_00196ed8[uVar6] == 0" (subscript_expression "DAT_00196ed8[uVar6]" (identifier "DAT_00196ed8") ([ "[") (identifier "uVar6") (] "]")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          return DAT_00196ed8 + uVar5;\n        }" ({ "{") (return_statement "return DAT_00196ed8 + uVar5;" (return "return") (binary_expression "DAT_00196ed8 + uVar5" (identifier "DAT_00196ed8") (+ "+") (identifier "uVar5")) (; ";")) (} "}"))) (expression_statement "uVar5 = (ulong)uVar6;" (assignment_expression "uVar5 = (ulong)uVar6" (identifier "uVar5") (= "=") (cast_expression "(ulong)uVar6" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar6"))) (; ";")) (} "}"))) (} "}"))) (} "}")))) (return_statement "return piVar3;" (return "return") (identifier "piVar3") (; ";")) (} "}")))

type_1 * function_1(void *file,type_1 var_4)

{
  type_2 uVar1;
  type_3 var_2;
  type_1 *puVar3;
  type_1 *var_5;
  type_2 var_8;
  type_1 var_6;
  
  var_2 = var_1(file);
  if ((var_2 == 0) || (var_3 == 0)) {
LAB_00150d76:
    puVar3 = (type_1 *)0x0;
  }
  else {
    puVar3 = var_7;
    if (var_4 != *var_7) {
      uVar1 = 0;
      var_5 = var_7;
      do {
        var_8 = uVar1;
        var_5 = var_5 + 1;
        var_6 = (int)var_8 + 1;
        if (var_6 == var_3) goto LAB_00150d76;
        uVar1 = (type_2)var_6;
      } while (*var_5 != var_4);
      if (var_7[var_8] == 0) {
        return var_5;
      }
      while ((int)var_8 != 0) {
        var_6 = (int)var_8 - 1;
        if (var_7[var_6] == 0) {
          return var_7 + var_8;
        }
        var_8 = (type_2)var_6;
      }
    }
  }
  return puVar3;
}


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

int * MASKED(undefined8 param_1,int param_2)

{
  ulong uVar1;
  int iVar2;
  int *piVar3;
  int *piVar4;
  ulong uVar5;
  uint uVar6;
  
  iVar2 = FUN_00150ca0();
  if ((iVar2 == 0) || (DAT_00196ed0 == 0)) {
LAB_00150d76:
    piVar3 = (int *)0x0;
  }
  else {
    piVar3 = DAT_00196ed8;
    if (param_2 != *DAT_00196ed8) {
      uVar1 = 0;
      piVar4 = DAT_00196ed8;
      do {
        uVar5 = uVar1;
        piVar4 = piVar4 + 1;
        uVar6 = (int)uVar5 + 1;
        if (uVar6 == DAT_00196ed0) goto LAB_00150d76;
        uVar1 = (ulong)uVar6;
      } while (*piVar4 != param_2);
      if (DAT_00196ed8[uVar5] == 0) {
        return piVar4;
      }
      while ((int)uVar5 != 0) {
        uVar6 = (int)uVar5 - 1;
        if (DAT_00196ed8[uVar6] == 0) {
          return DAT_00196ed8 + uVar5;
        }
        uVar5 = (ulong)uVar6;
      }
    }
  }
  return piVar3;
}

