
bfd_vma debug_get_type_size(void *handle,debug_type_conflict type)

{
  debug_type_kind dVar1;
  
  if (type == (debug_type_conflict)0x0) {
    return 0;
  }
  if (type->size != 0) {
    return (ulong)type->size;
  }
  do {
    dVar1 = type->kind;
    if (dVar1 == DEBUG_KIND_INDIRECT) {
      type = *((type->u).kindirect)->slot;
    }
    else {
      if (dVar1 == DEBUG_KIND_ILLEGAL) {
        return 0;
      }
      if (1 < dVar1 - DEBUG_KIND_NAMED) {
        return 0;
      }
      type = ((type->u).kpointer)->pointer;
    }
    if (type == (debug_type)0x0) {
      return 0;
    }
  } while (type->size == 0);
  return (ulong)type->size;
}



int FUN_0012e100(undefined8 param_1,int *param_2)

{
  int iVar1;
  
  if (param_2 == (int *)0x0) {
    return 0;
  }
  if (param_2[1] != 0) {
    return param_2[1];
  }
  do {
    iVar1 = *param_2;
    if (iVar1 == 1) {
      param_2 = *(int **)**(undefined8 **)(param_2 + 4);
    }
    else {
      if (iVar1 == 0) {
        return 0;
      }
      if (1 < iVar1 - 0x16U) {
        return 0;
      }
      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);
    }
    if (param_2 == (int *)0x0) {
      return 0;
    }
  } while (param_2[1] == 0);
  return param_2[1];
}


TEST RSI,RSI
JZ 0x0012e147
MOV EAX,dword ptr [RSI + 0x4]
TEST EAX,EAX
JNZ 0x0012e150
MOV EAX,dword ptr [RSI]
CMP EAX,0x1
JZ 0x0012e138
TEST EAX,EAX
JZ 0x0012e147
SUB EAX,0x16
CMP EAX,0x1
JA 0x0012e147
MOV RAX,qword ptr [RSI + 0x10]
MOV RSI,qword ptr [RAX + 0x8]
TEST RSI,RSI
JZ 0x0012e147
MOV EAX,dword ptr [RSI + 0x4]
TEST EAX,EAX
JZ 0x0012e10c
RET
MOV RAX,qword ptr [RSI + 0x10]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX]
TEST RSI,RSI
JNZ 0x0012e12c
XOR EAX,EAX
RET
RET
(translation_unit "int FUN_0012e100(undefined8 param_1,int *param_2)\n\n{\n  int iVar1;\n  \n  if (param_2 == (int *)0x0) {\n    return 0;\n  }\n  if (param_2[1] != 0) {\n    return param_2[1];\n  }\n  do {\n    iVar1 = *param_2;\n    if (iVar1 == 1) {\n      param_2 = *(int **)**(undefined8 **)(param_2 + 4);\n    }\n    else {\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }\n    if (param_2 == (int *)0x0) {\n      return 0;\n    }\n  } while (param_2[1] == 0);\n  return param_2[1];\n}\n\n" (function_definition "int FUN_0012e100(undefined8 param_1,int *param_2)\n\n{\n  int iVar1;\n  \n  if (param_2 == (int *)0x0) {\n    return 0;\n  }\n  if (param_2[1] != 0) {\n    return param_2[1];\n  }\n  do {\n    iVar1 = *param_2;\n    if (iVar1 == 1) {\n      param_2 = *(int **)**(undefined8 **)(param_2 + 4);\n    }\n    else {\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }\n    if (param_2 == (int *)0x0) {\n      return 0;\n    }\n  } while (param_2[1] == 0);\n  return param_2[1];\n}" primitive_type (function_declarator "FUN_0012e100(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 (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  \n  if (param_2 == (int *)0x0) {\n    return 0;\n  }\n  if (param_2[1] != 0) {\n    return param_2[1];\n  }\n  do {\n    iVar1 = *param_2;\n    if (iVar1 == 1) {\n      param_2 = *(int **)**(undefined8 **)(param_2 + 4);\n    }\n    else {\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }\n    if (param_2 == (int *)0x0) {\n      return 0;\n    }\n  } while (param_2[1] == 0);\n  return param_2[1];\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (param_2 == (int *)0x0) {\n    return 0;\n  }" if (parenthesized_expression "(param_2 == (int *)0x0)" ( (binary_expression "param_2 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (param_2[1] != 0) {\n    return param_2[1];\n  }" if (parenthesized_expression "(param_2[1] != 0)" ( (binary_expression "param_2[1] != 0" (subscript_expression "param_2[1]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n    return param_2[1];\n  }" { (return_statement "return param_2[1];" return (subscript_expression "param_2[1]" identifier [ number_literal ]) ;) })) (do_statement "do {\n    iVar1 = *param_2;\n    if (iVar1 == 1) {\n      param_2 = *(int **)**(undefined8 **)(param_2 + 4);\n    }\n    else {\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }\n    if (param_2 == (int *)0x0) {\n      return 0;\n    }\n  } while (param_2[1] == 0);" do (compound_statement "{\n    iVar1 = *param_2;\n    if (iVar1 == 1) {\n      param_2 = *(int **)**(undefined8 **)(param_2 + 4);\n    }\n    else {\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }\n    if (param_2 == (int *)0x0) {\n      return 0;\n    }\n  }" { (expression_statement "iVar1 = *param_2;" (assignment_expression "iVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (iVar1 == 1) {\n      param_2 = *(int **)**(undefined8 **)(param_2 + 4);\n    }\n    else {\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }" if (parenthesized_expression "(iVar1 == 1)" ( (binary_expression "iVar1 == 1" identifier == number_literal) )) (compound_statement "{\n      param_2 = *(int **)**(undefined8 **)(param_2 + 4);\n    }" { (expression_statement "param_2 = *(int **)**(undefined8 **)(param_2 + 4);" (assignment_expression "param_2 = *(int **)**(undefined8 **)(param_2 + 4)" identifier = (pointer_expression "*(int **)**(undefined8 **)(param_2 + 4)" * (cast_expression "(int **)**(undefined8 **)(param_2 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (pointer_expression "**(undefined8 **)(param_2 + 4)" * (pointer_expression "*(undefined8 **)(param_2 + 4)" * (cast_expression "(undefined8 **)(param_2 + 4)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))))))) ;) }) (else_clause "else {\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }" else (compound_statement "{\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }" { (if_statement "if (iVar1 == 0) {\n        return 0;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (1 < iVar1 - 0x16U) {\n        return 0;\n      }" if (parenthesized_expression "(1 < iVar1 - 0x16U)" ( (binary_expression "1 < iVar1 - 0x16U" number_literal < (binary_expression "iVar1 - 0x16U" identifier - number_literal)) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "param_2 = *(int **)(*(long *)(param_2 + 4) + 8);" (assignment_expression "param_2 = *(int **)(*(long *)(param_2 + 4) + 8)" identifier = (pointer_expression "*(int **)(*(long *)(param_2 + 4) + 8)" * (cast_expression "(int **)(*(long *)(param_2 + 4) + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(long *)(param_2 + 4) + 8)" ( (binary_expression "*(long *)(param_2 + 4) + 8" (pointer_expression "*(long *)(param_2 + 4)" * (cast_expression "(long *)(param_2 + 4)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) + number_literal) ))))) ;) }))) (if_statement "if (param_2 == (int *)0x0) {\n      return 0;\n    }" if (parenthesized_expression "(param_2 == (int *)0x0)" ( (binary_expression "param_2 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) }) while (parenthesized_expression "(param_2[1] == 0)" ( (binary_expression "param_2[1] == 0" (subscript_expression "param_2[1]" identifier [ number_literal ]) == number_literal) )) ;) (return_statement "return param_2[1];" return (subscript_expression "param_2[1]" identifier [ number_literal ]) ;) })))
(translation_unit "bfd_vma debug_get_type_size(void *handle,debug_type_conflict type)\n\n{\n  debug_type_kind dVar1;\n  \n  if (type == (debug_type_conflict)0x0) {\n    return 0;\n  }\n  if (type->size != 0) {\n    return (ulong)type->size;\n  }\n  do {\n    dVar1 = type->kind;\n    if (dVar1 == DEBUG_KIND_INDIRECT) {\n      type = *((type->u).kindirect)->slot;\n    }\n    else {\n      if (dVar1 == DEBUG_KIND_ILLEGAL) {\n        return 0;\n      }\n      if (1 < dVar1 - DEBUG_KIND_NAMED) {\n        return 0;\n      }\n      type = ((type->u).kpointer)->pointer;\n    }\n    if (type == (debug_type)0x0) {\n      return 0;\n    }\n  } while (type->size == 0);\n  return (ulong)type->size;\n}\n\n" (function_definition "bfd_vma debug_get_type_size(void *handle,debug_type_conflict type)\n\n{\n  debug_type_kind dVar1;\n  \n  if (type == (debug_type_conflict)0x0) {\n    return 0;\n  }\n  if (type->size != 0) {\n    return (ulong)type->size;\n  }\n  do {\n    dVar1 = type->kind;\n    if (dVar1 == DEBUG_KIND_INDIRECT) {\n      type = *((type->u).kindirect)->slot;\n    }\n    else {\n      if (dVar1 == DEBUG_KIND_ILLEGAL) {\n        return 0;\n      }\n      if (1 < dVar1 - DEBUG_KIND_NAMED) {\n        return 0;\n      }\n      type = ((type->u).kpointer)->pointer;\n    }\n    if (type == (debug_type)0x0) {\n      return 0;\n    }\n  } while (type->size == 0);\n  return (ulong)type->size;\n}" type_identifier (function_declarator "debug_get_type_size(void *handle,debug_type_conflict type)" identifier (parameter_list "(void *handle,debug_type_conflict type)" ( (parameter_declaration "void *handle" primitive_type (pointer_declarator "*handle" * identifier)) , (parameter_declaration "debug_type_conflict type" type_identifier identifier) ))) (compound_statement "{\n  debug_type_kind dVar1;\n  \n  if (type == (debug_type_conflict)0x0) {\n    return 0;\n  }\n  if (type->size != 0) {\n    return (ulong)type->size;\n  }\n  do {\n    dVar1 = type->kind;\n    if (dVar1 == DEBUG_KIND_INDIRECT) {\n      type = *((type->u).kindirect)->slot;\n    }\n    else {\n      if (dVar1 == DEBUG_KIND_ILLEGAL) {\n        return 0;\n      }\n      if (1 < dVar1 - DEBUG_KIND_NAMED) {\n        return 0;\n      }\n      type = ((type->u).kpointer)->pointer;\n    }\n    if (type == (debug_type)0x0) {\n      return 0;\n    }\n  } while (type->size == 0);\n  return (ulong)type->size;\n}" { (declaration "debug_type_kind dVar1;" type_identifier identifier ;) (if_statement "if (type == (debug_type_conflict)0x0) {\n    return 0;\n  }" if (parenthesized_expression "(type == (debug_type_conflict)0x0)" ( (binary_expression "type == (debug_type_conflict)0x0" identifier == (cast_expression "(debug_type_conflict)0x0" ( (type_descriptor "debug_type_conflict" type_identifier) ) number_literal)) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (type->size != 0) {\n    return (ulong)type->size;\n  }" if (parenthesized_expression "(type->size != 0)" ( (binary_expression "type->size != 0" (field_expression "type->size" identifier -> field_identifier) != number_literal) )) (compound_statement "{\n    return (ulong)type->size;\n  }" { (return_statement "return (ulong)type->size;" return (cast_expression "(ulong)type->size" ( (type_descriptor "ulong" type_identifier) ) (field_expression "type->size" identifier -> field_identifier)) ;) })) (do_statement "do {\n    dVar1 = type->kind;\n    if (dVar1 == DEBUG_KIND_INDIRECT) {\n      type = *((type->u).kindirect)->slot;\n    }\n    else {\n      if (dVar1 == DEBUG_KIND_ILLEGAL) {\n        return 0;\n      }\n      if (1 < dVar1 - DEBUG_KIND_NAMED) {\n        return 0;\n      }\n      type = ((type->u).kpointer)->pointer;\n    }\n    if (type == (debug_type)0x0) {\n      return 0;\n    }\n  } while (type->size == 0);" do (compound_statement "{\n    dVar1 = type->kind;\n    if (dVar1 == DEBUG_KIND_INDIRECT) {\n      type = *((type->u).kindirect)->slot;\n    }\n    else {\n      if (dVar1 == DEBUG_KIND_ILLEGAL) {\n        return 0;\n      }\n      if (1 < dVar1 - DEBUG_KIND_NAMED) {\n        return 0;\n      }\n      type = ((type->u).kpointer)->pointer;\n    }\n    if (type == (debug_type)0x0) {\n      return 0;\n    }\n  }" { (expression_statement "dVar1 = type->kind;" (assignment_expression "dVar1 = type->kind" identifier = (field_expression "type->kind" identifier -> field_identifier)) ;) (if_statement "if (dVar1 == DEBUG_KIND_INDIRECT) {\n      type = *((type->u).kindirect)->slot;\n    }\n    else {\n      if (dVar1 == DEBUG_KIND_ILLEGAL) {\n        return 0;\n      }\n      if (1 < dVar1 - DEBUG_KIND_NAMED) {\n        return 0;\n      }\n      type = ((type->u).kpointer)->pointer;\n    }" if (parenthesized_expression "(dVar1 == DEBUG_KIND_INDIRECT)" ( (binary_expression "dVar1 == DEBUG_KIND_INDIRECT" identifier == identifier) )) (compound_statement "{\n      type = *((type->u).kindirect)->slot;\n    }" { (expression_statement "type = *((type->u).kindirect)->slot;" (assignment_expression "type = *((type->u).kindirect)->slot" identifier = (pointer_expression "*((type->u).kindirect)->slot" * (field_expression "((type->u).kindirect)->slot" (parenthesized_expression "((type->u).kindirect)" ( (field_expression "(type->u).kindirect" (parenthesized_expression "(type->u)" ( (field_expression "type->u" identifier -> field_identifier) )) . field_identifier) )) -> field_identifier))) ;) }) (else_clause "else {\n      if (dVar1 == DEBUG_KIND_ILLEGAL) {\n        return 0;\n      }\n      if (1 < dVar1 - DEBUG_KIND_NAMED) {\n        return 0;\n      }\n      type = ((type->u).kpointer)->pointer;\n    }" else (compound_statement "{\n      if (dVar1 == DEBUG_KIND_ILLEGAL) {\n        return 0;\n      }\n      if (1 < dVar1 - DEBUG_KIND_NAMED) {\n        return 0;\n      }\n      type = ((type->u).kpointer)->pointer;\n    }" { (if_statement "if (dVar1 == DEBUG_KIND_ILLEGAL) {\n        return 0;\n      }" if (parenthesized_expression "(dVar1 == DEBUG_KIND_ILLEGAL)" ( (binary_expression "dVar1 == DEBUG_KIND_ILLEGAL" identifier == identifier) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (1 < dVar1 - DEBUG_KIND_NAMED) {\n        return 0;\n      }" if (parenthesized_expression "(1 < dVar1 - DEBUG_KIND_NAMED)" ( (binary_expression "1 < dVar1 - DEBUG_KIND_NAMED" number_literal < (binary_expression "dVar1 - DEBUG_KIND_NAMED" identifier - identifier)) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "type = ((type->u).kpointer)->pointer;" (assignment_expression "type = ((type->u).kpointer)->pointer" identifier = (field_expression "((type->u).kpointer)->pointer" (parenthesized_expression "((type->u).kpointer)" ( (field_expression "(type->u).kpointer" (parenthesized_expression "(type->u)" ( (field_expression "type->u" identifier -> field_identifier) )) . field_identifier) )) -> field_identifier)) ;) }))) (if_statement "if (type == (debug_type)0x0) {\n      return 0;\n    }" if (parenthesized_expression "(type == (debug_type)0x0)" ( (binary_expression "type == (debug_type)0x0" identifier == (cast_expression "(debug_type)0x0" ( (type_descriptor "debug_type" type_identifier) ) number_literal)) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) }) while (parenthesized_expression "(type->size == 0)" ( (binary_expression "type->size == 0" (field_expression "type->size" identifier -> field_identifier) == number_literal) )) ;) (return_statement "return (ulong)type->size;" return (cast_expression "(ulong)type->size" ( (type_descriptor "ulong" type_identifier) ) (field_expression "type->size" identifier -> field_identifier)) ;) })))
(translation_unit "int FUN_0012e100(undefined8 param_1,int *param_2)\n\n{\n  int iVar1;\n  \n  if (param_2 == (int *)0x0) {\n    return 0;\n  }\n  if (param_2[1] != 0) {\n    return param_2[1];\n  }\n  do {\n    iVar1 = *param_2;\n    if (iVar1 == 1) {\n      param_2 = *(int **)**(undefined8 **)(param_2 + 4);\n    }\n    else {\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }\n    if (param_2 == (int *)0x0) {\n      return 0;\n    }\n  } while (param_2[1] == 0);\n  return param_2[1];\n}\n\n" (function_definition "int FUN_0012e100(undefined8 param_1,int *param_2)\n\n{\n  int iVar1;\n  \n  if (param_2 == (int *)0x0) {\n    return 0;\n  }\n  if (param_2[1] != 0) {\n    return param_2[1];\n  }\n  do {\n    iVar1 = *param_2;\n    if (iVar1 == 1) {\n      param_2 = *(int **)**(undefined8 **)(param_2 + 4);\n    }\n    else {\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }\n    if (param_2 == (int *)0x0) {\n      return 0;\n    }\n  } while (param_2[1] == 0);\n  return param_2[1];\n}" primitive_type (function_declarator "FUN_0012e100(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 (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  \n  if (param_2 == (int *)0x0) {\n    return 0;\n  }\n  if (param_2[1] != 0) {\n    return param_2[1];\n  }\n  do {\n    iVar1 = *param_2;\n    if (iVar1 == 1) {\n      param_2 = *(int **)**(undefined8 **)(param_2 + 4);\n    }\n    else {\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }\n    if (param_2 == (int *)0x0) {\n      return 0;\n    }\n  } while (param_2[1] == 0);\n  return param_2[1];\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (param_2 == (int *)0x0) {\n    return 0;\n  }" if (parenthesized_expression "(param_2 == (int *)0x0)" ( (binary_expression "param_2 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (param_2[1] != 0) {\n    return param_2[1];\n  }" if (parenthesized_expression "(param_2[1] != 0)" ( (binary_expression "param_2[1] != 0" (subscript_expression "param_2[1]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n    return param_2[1];\n  }" { (return_statement "return param_2[1];" return (subscript_expression "param_2[1]" identifier [ number_literal ]) ;) })) (do_statement "do {\n    iVar1 = *param_2;\n    if (iVar1 == 1) {\n      param_2 = *(int **)**(undefined8 **)(param_2 + 4);\n    }\n    else {\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }\n    if (param_2 == (int *)0x0) {\n      return 0;\n    }\n  } while (param_2[1] == 0);" do (compound_statement "{\n    iVar1 = *param_2;\n    if (iVar1 == 1) {\n      param_2 = *(int **)**(undefined8 **)(param_2 + 4);\n    }\n    else {\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }\n    if (param_2 == (int *)0x0) {\n      return 0;\n    }\n  }" { (expression_statement "iVar1 = *param_2;" (assignment_expression "iVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (iVar1 == 1) {\n      param_2 = *(int **)**(undefined8 **)(param_2 + 4);\n    }\n    else {\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }" if (parenthesized_expression "(iVar1 == 1)" ( (binary_expression "iVar1 == 1" identifier == number_literal) )) (compound_statement "{\n      param_2 = *(int **)**(undefined8 **)(param_2 + 4);\n    }" { (expression_statement "param_2 = *(int **)**(undefined8 **)(param_2 + 4);" (assignment_expression "param_2 = *(int **)**(undefined8 **)(param_2 + 4)" identifier = (pointer_expression "*(int **)**(undefined8 **)(param_2 + 4)" * (cast_expression "(int **)**(undefined8 **)(param_2 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (pointer_expression "**(undefined8 **)(param_2 + 4)" * (pointer_expression "*(undefined8 **)(param_2 + 4)" * (cast_expression "(undefined8 **)(param_2 + 4)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))))))) ;) }) (else_clause "else {\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }" else (compound_statement "{\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }" { (if_statement "if (iVar1 == 0) {\n        return 0;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (1 < iVar1 - 0x16U) {\n        return 0;\n      }" if (parenthesized_expression "(1 < iVar1 - 0x16U)" ( (binary_expression "1 < iVar1 - 0x16U" number_literal < (binary_expression "iVar1 - 0x16U" identifier - number_literal)) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "param_2 = *(int **)(*(long *)(param_2 + 4) + 8);" (assignment_expression "param_2 = *(int **)(*(long *)(param_2 + 4) + 8)" identifier = (pointer_expression "*(int **)(*(long *)(param_2 + 4) + 8)" * (cast_expression "(int **)(*(long *)(param_2 + 4) + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(long *)(param_2 + 4) + 8)" ( (binary_expression "*(long *)(param_2 + 4) + 8" (pointer_expression "*(long *)(param_2 + 4)" * (cast_expression "(long *)(param_2 + 4)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) + number_literal) ))))) ;) }))) (if_statement "if (param_2 == (int *)0x0) {\n      return 0;\n    }" if (parenthesized_expression "(param_2 == (int *)0x0)" ( (binary_expression "param_2 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) }) while (parenthesized_expression "(param_2[1] == 0)" ( (binary_expression "param_2[1] == 0" (subscript_expression "param_2[1]" identifier [ number_literal ]) == number_literal) )) ;) (return_statement "return param_2[1];" return (subscript_expression "param_2[1]" identifier [ number_literal ]) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (return_statement return (subscript_expression IDENT [ LIT ]) ;) })) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))))) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < (binary_expression IDENT - LIT)) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return LIT ;) })) }) while (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) ;) (return_statement return (subscript_expression IDENT [ LIT ]) ;) })))
(function_definition "int FUN_0012e100(undefined8 param_1,int *param_2)\n\n{\n  int iVar1;\n  \n  if (param_2 == (int *)0x0) {\n    return 0;\n  }\n  if (param_2[1] != 0) {\n    return param_2[1];\n  }\n  do {\n    iVar1 = *param_2;\n    if (iVar1 == 1) {\n      param_2 = *(int **)**(undefined8 **)(param_2 + 4);\n    }\n    else {\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }\n    if (param_2 == (int *)0x0) {\n      return 0;\n    }\n  } while (param_2[1] == 0);\n  return param_2[1];\n}" (primitive_type "int") (function_declarator "FUN_0012e100(undefined8 param_1,int *param_2)" (identifier "FUN_0012e100") (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") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  if (param_2 == (int *)0x0) {\n    return 0;\n  }\n  if (param_2[1] != 0) {\n    return param_2[1];\n  }\n  do {\n    iVar1 = *param_2;\n    if (iVar1 == 1) {\n      param_2 = *(int **)**(undefined8 **)(param_2 + 4);\n    }\n    else {\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }\n    if (param_2 == (int *)0x0) {\n      return 0;\n    }\n  } while (param_2[1] == 0);\n  return param_2[1];\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (if_statement "if (param_2 == (int *)0x0) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(param_2 == (int *)0x0)" (( "(") (binary_expression "param_2 == (int *)0x0" (identifier "param_2") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (param_2[1] != 0) {\n    return param_2[1];\n  }" (if "if") (parenthesized_expression "(param_2[1] != 0)" (( "(") (binary_expression "param_2[1] != 0" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    return param_2[1];\n  }" ({ "{") (return_statement "return param_2[1];" (return "return") (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (; ";")) (} "}"))) (do_statement "do {\n    iVar1 = *param_2;\n    if (iVar1 == 1) {\n      param_2 = *(int **)**(undefined8 **)(param_2 + 4);\n    }\n    else {\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }\n    if (param_2 == (int *)0x0) {\n      return 0;\n    }\n  } while (param_2[1] == 0);" (do "do") (compound_statement "{\n    iVar1 = *param_2;\n    if (iVar1 == 1) {\n      param_2 = *(int **)**(undefined8 **)(param_2 + 4);\n    }\n    else {\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }\n    if (param_2 == (int *)0x0) {\n      return 0;\n    }\n  }" ({ "{") (expression_statement "iVar1 = *param_2;" (assignment_expression "iVar1 = *param_2" (identifier "iVar1") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (if_statement "if (iVar1 == 1) {\n      param_2 = *(int **)**(undefined8 **)(param_2 + 4);\n    }\n    else {\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }" (if "if") (parenthesized_expression "(iVar1 == 1)" (( "(") (binary_expression "iVar1 == 1" (identifier "iVar1") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      param_2 = *(int **)**(undefined8 **)(param_2 + 4);\n    }" ({ "{") (expression_statement "param_2 = *(int **)**(undefined8 **)(param_2 + 4);" (assignment_expression "param_2 = *(int **)**(undefined8 **)(param_2 + 4)" (identifier "param_2") (= "=") (pointer_expression "*(int **)**(undefined8 **)(param_2 + 4)" (* "*") (cast_expression "(int **)**(undefined8 **)(param_2 + 4)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (pointer_expression "**(undefined8 **)(param_2 + 4)" (* "*") (pointer_expression "*(undefined8 **)(param_2 + 4)" (* "*") (cast_expression "(undefined8 **)(param_2 + 4)" (( "(") (type_descriptor "undefined8 **" (type_identifier "undefined8") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + 4)" (( "(") (binary_expression "param_2 + 4" (identifier "param_2") (+ "+") (number_literal "4")) () ")")))))))) (; ";")) (} "}")) (else_clause "else {\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }" (else "else") (compound_statement "{\n      if (iVar1 == 0) {\n        return 0;\n      }\n      if (1 < iVar1 - 0x16U) {\n        return 0;\n      }\n      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);\n    }" ({ "{") (if_statement "if (iVar1 == 0) {\n        return 0;\n      }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        return 0;\n      }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (1 < iVar1 - 0x16U) {\n        return 0;\n      }" (if "if") (parenthesized_expression "(1 < iVar1 - 0x16U)" (( "(") (binary_expression "1 < iVar1 - 0x16U" (number_literal "1") (< "<") (binary_expression "iVar1 - 0x16U" (identifier "iVar1") (- "-") (number_literal "0x16U"))) () ")")) (compound_statement "{\n        return 0;\n      }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "param_2 = *(int **)(*(long *)(param_2 + 4) + 8);" (assignment_expression "param_2 = *(int **)(*(long *)(param_2 + 4) + 8)" (identifier "param_2") (= "=") (pointer_expression "*(int **)(*(long *)(param_2 + 4) + 8)" (* "*") (cast_expression "(int **)(*(long *)(param_2 + 4) + 8)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(long *)(param_2 + 4) + 8)" (( "(") (binary_expression "*(long *)(param_2 + 4) + 8" (pointer_expression "*(long *)(param_2 + 4)" (* "*") (cast_expression "(long *)(param_2 + 4)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 4)" (( "(") (binary_expression "param_2 + 4" (identifier "param_2") (+ "+") (number_literal "4")) () ")")))) (+ "+") (number_literal "8")) () ")"))))) (; ";")) (} "}")))) (if_statement "if (param_2 == (int *)0x0) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(param_2 == (int *)0x0)" (( "(") (binary_expression "param_2 == (int *)0x0" (identifier "param_2") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "(param_2[1] == 0)" (( "(") (binary_expression "param_2[1] == 0" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (== "==") (number_literal "0")) () ")")) (; ";")) (return_statement "return param_2[1];" (return "return") (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (; ";")) (} "}")))

type_1 function_1(void *handle,type_2 var_1)

{
  type_3 var_2;
  
  if (var_1 == (type_2)0x0) {
    return 0;
  }
  if (var_1->size != 0) {
    return (type_4)var_1->size;
  }
  do {
    var_2 = var_1->kind;
    if (var_2 == var_3) {
      var_1 = *((var_1->u).kindirect)->slot;
    }
    else {
      if (var_2 == var_4) {
        return 0;
      }
      if (1 < var_2 - var_5) {
        return 0;
      }
      var_1 = ((var_1->u).kpointer)->pointer;
    }
    if (var_1 == (type_5)0x0) {
      return 0;
    }
  } while (var_1->size == 0);
  return (type_4)var_1->size;
}


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

int MASKED(undefined8 param_1,int *param_2)

{
  int iVar1;
  
  if (param_2 == (int *)0x0) {
    return 0;
  }
  if (param_2[1] != 0) {
    return param_2[1];
  }
  do {
    iVar1 = *param_2;
    if (iVar1 == 1) {
      param_2 = *(int **)**(undefined8 **)(param_2 + 4);
    }
    else {
      if (iVar1 == 0) {
        return 0;
      }
      if (1 < iVar1 - 0x16U) {
        return 0;
      }
      param_2 = *(int **)(*(long *)(param_2 + 4) + 8);
    }
    if (param_2 == (int *)0x0) {
      return 0;
    }
  } while (param_2[1] == 0);
  return param_2[1];
}

