
/* WARNING: Unknown calling convention */

debug_type_conflict debug_make_pointer_type(void *handle,debug_type_conflict type)

{
  debug_type_conflict pdVar1;
  uint in_ECX;
  
  if (type == (debug_type_conflict)0x0) {
    pdVar1 = (debug_type_conflict)0x0;
  }
  else {
    pdVar1 = type->pointer;
    if (pdVar1 == (debug_type_conflict)0x0) {
      pdVar1 = debug_make_type((debug_handle *)0xc,DEBUG_KIND_ILLEGAL,in_ECX);
      if (pdVar1 != (debug_type_s *)0x0) {
        (pdVar1->u).kindirect = (debug_indirect_type *)type;
        type->pointer = pdVar1;
        return pdVar1;
      }
    }
  }
  return pdVar1;
}



int FUN_0001f9b0(undefined4 param_1,int param_2)

{
  int iVar1;
  
  if (param_2 == 0) {
    iVar1 = 0;
  }
  else {
    iVar1 = *(int *)(param_2 + 8);
    if (iVar1 == 0) {
      iVar1 = FUN_0001d440();
      if (iVar1 != 0) {
        *(int *)(iVar1 + 0xc) = param_2;
        *(int *)(param_2 + 8) = iVar1;
        return iVar1;
      }
    }
  }
  return iVar1;
}


PUSH EBX
SUB ESP,0x8
MOV EBX,dword ptr [ESP + 0x14]
TEST EBX,EBX
JZ 0x0001f9f0
MOV EAX,dword ptr [EBX + 0x8]
TEST EAX,EAX
JZ 0x0001f9d0
ADD ESP,0x8
POP EBX
RET
XOR EDX,EDX
MOV EAX,0xc
CALL 0x0001d440
TEST EAX,EAX
JZ 0x0001f9c3
MOV dword ptr [EAX + 0xc],EBX
MOV dword ptr [EBX + 0x8],EAX
ADD ESP,0x8
POP EBX
RET
XOR EAX,EAX
JMP 0x0001f9c3
(translation_unit "int FUN_0001f9b0(undefined4 param_1,int param_2)\n\n{\n  int iVar1;\n  \n  if (param_2 == 0) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = *(int *)(param_2 + 8);\n    if (iVar1 == 0) {\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }\n  }\n  return iVar1;\n}\n\n" (function_definition "int FUN_0001f9b0(undefined4 param_1,int param_2)\n\n{\n  int iVar1;\n  \n  if (param_2 == 0) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = *(int *)(param_2 + 8);\n    if (iVar1 == 0) {\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_0001f9b0(undefined4 param_1,int param_2)" identifier (parameter_list "(undefined4 param_1,int param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if (param_2 == 0) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = *(int *)(param_2 + 8);\n    if (iVar1 == 0) {\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (param_2 == 0) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = *(int *)(param_2 + 8);\n    if (iVar1 == 0) {\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar1 = 0;\n  }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar1 = *(int *)(param_2 + 8);\n    if (iVar1 == 0) {\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }\n  }" else (compound_statement "{\n    iVar1 = *(int *)(param_2 + 8);\n    if (iVar1 == 0) {\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }\n  }" { (expression_statement "iVar1 = *(int *)(param_2 + 8);" (assignment_expression "iVar1 = *(int *)(param_2 + 8)" identifier = (pointer_expression "*(int *)(param_2 + 8)" * (cast_expression "(int *)(param_2 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 == 0) {\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }" { (expression_statement "iVar1 = FUN_0001d440();" (assignment_expression "iVar1 = FUN_0001d440()" identifier = (call_expression "FUN_0001d440()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }" { (expression_statement "*(int *)(iVar1 + 0xc) = param_2;" (assignment_expression "*(int *)(iVar1 + 0xc) = param_2" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(param_2 + 8) = iVar1;" (assignment_expression "*(int *)(param_2 + 8) = iVar1" (pointer_expression "*(int *)(param_2 + 8)" * (cast_expression "(int *)(param_2 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) = identifier) ;) (return_statement "return iVar1;" return identifier ;) })) })) }))) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\ndebug_type_conflict debug_make_pointer_type(void *handle,debug_type_conflict type)\n\n{\n  debug_type_conflict pdVar1;\n  uint in_ECX;\n  \n  if (type == (debug_type_conflict)0x0) {\n    pdVar1 = (debug_type_conflict)0x0;\n  }\n  else {\n    pdVar1 = type->pointer;\n    if (pdVar1 == (debug_type_conflict)0x0) {\n      pdVar1 = debug_make_type((debug_handle *)0xc,DEBUG_KIND_ILLEGAL,in_ECX);\n      if (pdVar1 != (debug_type_s *)0x0) {\n        (pdVar1->u).kindirect = (debug_indirect_type *)type;\n        type->pointer = pdVar1;\n        return pdVar1;\n      }\n    }\n  }\n  return pdVar1;\n}\n\n" comment (function_definition "debug_type_conflict debug_make_pointer_type(void *handle,debug_type_conflict type)\n\n{\n  debug_type_conflict pdVar1;\n  uint in_ECX;\n  \n  if (type == (debug_type_conflict)0x0) {\n    pdVar1 = (debug_type_conflict)0x0;\n  }\n  else {\n    pdVar1 = type->pointer;\n    if (pdVar1 == (debug_type_conflict)0x0) {\n      pdVar1 = debug_make_type((debug_handle *)0xc,DEBUG_KIND_ILLEGAL,in_ECX);\n      if (pdVar1 != (debug_type_s *)0x0) {\n        (pdVar1->u).kindirect = (debug_indirect_type *)type;\n        type->pointer = pdVar1;\n        return pdVar1;\n      }\n    }\n  }\n  return pdVar1;\n}" type_identifier (function_declarator "debug_make_pointer_type(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_conflict pdVar1;\n  uint in_ECX;\n  \n  if (type == (debug_type_conflict)0x0) {\n    pdVar1 = (debug_type_conflict)0x0;\n  }\n  else {\n    pdVar1 = type->pointer;\n    if (pdVar1 == (debug_type_conflict)0x0) {\n      pdVar1 = debug_make_type((debug_handle *)0xc,DEBUG_KIND_ILLEGAL,in_ECX);\n      if (pdVar1 != (debug_type_s *)0x0) {\n        (pdVar1->u).kindirect = (debug_indirect_type *)type;\n        type->pointer = pdVar1;\n        return pdVar1;\n      }\n    }\n  }\n  return pdVar1;\n}" { (declaration "debug_type_conflict pdVar1;" type_identifier identifier ;) (declaration "uint in_ECX;" type_identifier identifier ;) (if_statement "if (type == (debug_type_conflict)0x0) {\n    pdVar1 = (debug_type_conflict)0x0;\n  }\n  else {\n    pdVar1 = type->pointer;\n    if (pdVar1 == (debug_type_conflict)0x0) {\n      pdVar1 = debug_make_type((debug_handle *)0xc,DEBUG_KIND_ILLEGAL,in_ECX);\n      if (pdVar1 != (debug_type_s *)0x0) {\n        (pdVar1->u).kindirect = (debug_indirect_type *)type;\n        type->pointer = pdVar1;\n        return pdVar1;\n      }\n    }\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    pdVar1 = (debug_type_conflict)0x0;\n  }" { (expression_statement "pdVar1 = (debug_type_conflict)0x0;" (assignment_expression "pdVar1 = (debug_type_conflict)0x0" identifier = (cast_expression "(debug_type_conflict)0x0" ( (type_descriptor "debug_type_conflict" type_identifier) ) number_literal)) ;) }) (else_clause "else {\n    pdVar1 = type->pointer;\n    if (pdVar1 == (debug_type_conflict)0x0) {\n      pdVar1 = debug_make_type((debug_handle *)0xc,DEBUG_KIND_ILLEGAL,in_ECX);\n      if (pdVar1 != (debug_type_s *)0x0) {\n        (pdVar1->u).kindirect = (debug_indirect_type *)type;\n        type->pointer = pdVar1;\n        return pdVar1;\n      }\n    }\n  }" else (compound_statement "{\n    pdVar1 = type->pointer;\n    if (pdVar1 == (debug_type_conflict)0x0) {\n      pdVar1 = debug_make_type((debug_handle *)0xc,DEBUG_KIND_ILLEGAL,in_ECX);\n      if (pdVar1 != (debug_type_s *)0x0) {\n        (pdVar1->u).kindirect = (debug_indirect_type *)type;\n        type->pointer = pdVar1;\n        return pdVar1;\n      }\n    }\n  }" { (expression_statement "pdVar1 = type->pointer;" (assignment_expression "pdVar1 = type->pointer" identifier = (field_expression "type->pointer" identifier -> field_identifier)) ;) (if_statement "if (pdVar1 == (debug_type_conflict)0x0) {\n      pdVar1 = debug_make_type((debug_handle *)0xc,DEBUG_KIND_ILLEGAL,in_ECX);\n      if (pdVar1 != (debug_type_s *)0x0) {\n        (pdVar1->u).kindirect = (debug_indirect_type *)type;\n        type->pointer = pdVar1;\n        return pdVar1;\n      }\n    }" if (parenthesized_expression "(pdVar1 == (debug_type_conflict)0x0)" ( (binary_expression "pdVar1 == (debug_type_conflict)0x0" identifier == (cast_expression "(debug_type_conflict)0x0" ( (type_descriptor "debug_type_conflict" type_identifier) ) number_literal)) )) (compound_statement "{\n      pdVar1 = debug_make_type((debug_handle *)0xc,DEBUG_KIND_ILLEGAL,in_ECX);\n      if (pdVar1 != (debug_type_s *)0x0) {\n        (pdVar1->u).kindirect = (debug_indirect_type *)type;\n        type->pointer = pdVar1;\n        return pdVar1;\n      }\n    }" { (expression_statement "pdVar1 = debug_make_type((debug_handle *)0xc,DEBUG_KIND_ILLEGAL,in_ECX);" (assignment_expression "pdVar1 = debug_make_type((debug_handle *)0xc,DEBUG_KIND_ILLEGAL,in_ECX)" identifier = (call_expression "debug_make_type((debug_handle *)0xc,DEBUG_KIND_ILLEGAL,in_ECX)" identifier (argument_list "((debug_handle *)0xc,DEBUG_KIND_ILLEGAL,in_ECX)" ( (cast_expression "(debug_handle *)0xc" ( (type_descriptor "debug_handle *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , identifier , identifier )))) ;) (if_statement "if (pdVar1 != (debug_type_s *)0x0) {\n        (pdVar1->u).kindirect = (debug_indirect_type *)type;\n        type->pointer = pdVar1;\n        return pdVar1;\n      }" if (parenthesized_expression "(pdVar1 != (debug_type_s *)0x0)" ( (binary_expression "pdVar1 != (debug_type_s *)0x0" identifier != (cast_expression "(debug_type_s *)0x0" ( (type_descriptor "debug_type_s *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        (pdVar1->u).kindirect = (debug_indirect_type *)type;\n        type->pointer = pdVar1;\n        return pdVar1;\n      }" { (expression_statement "(pdVar1->u).kindirect = (debug_indirect_type *)type;" (assignment_expression "(pdVar1->u).kindirect = (debug_indirect_type *)type" (field_expression "(pdVar1->u).kindirect" (parenthesized_expression "(pdVar1->u)" ( (field_expression "pdVar1->u" identifier -> field_identifier) )) . field_identifier) = (cast_expression "(debug_indirect_type *)type" ( (type_descriptor "debug_indirect_type *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "type->pointer = pdVar1;" (assignment_expression "type->pointer = pdVar1" (field_expression "type->pointer" identifier -> field_identifier) = identifier) ;) (return_statement "return pdVar1;" return identifier ;) })) })) }))) (return_statement "return pdVar1;" return identifier ;) })))
(translation_unit "int FUN_0001f9b0(undefined4 param_1,int param_2)\n\n{\n  int iVar1;\n  \n  if (param_2 == 0) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = *(int *)(param_2 + 8);\n    if (iVar1 == 0) {\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }\n  }\n  return iVar1;\n}\n\n" (function_definition "int FUN_0001f9b0(undefined4 param_1,int param_2)\n\n{\n  int iVar1;\n  \n  if (param_2 == 0) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = *(int *)(param_2 + 8);\n    if (iVar1 == 0) {\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_0001f9b0(undefined4 param_1,int param_2)" identifier (parameter_list "(undefined4 param_1,int param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if (param_2 == 0) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = *(int *)(param_2 + 8);\n    if (iVar1 == 0) {\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (param_2 == 0) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = *(int *)(param_2 + 8);\n    if (iVar1 == 0) {\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar1 = 0;\n  }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar1 = *(int *)(param_2 + 8);\n    if (iVar1 == 0) {\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }\n  }" else (compound_statement "{\n    iVar1 = *(int *)(param_2 + 8);\n    if (iVar1 == 0) {\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }\n  }" { (expression_statement "iVar1 = *(int *)(param_2 + 8);" (assignment_expression "iVar1 = *(int *)(param_2 + 8)" identifier = (pointer_expression "*(int *)(param_2 + 8)" * (cast_expression "(int *)(param_2 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 == 0) {\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }" { (expression_statement "iVar1 = FUN_0001d440();" (assignment_expression "iVar1 = FUN_0001d440()" identifier = (call_expression "FUN_0001d440()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }" { (expression_statement "*(int *)(iVar1 + 0xc) = param_2;" (assignment_expression "*(int *)(iVar1 + 0xc) = param_2" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(param_2 + 8) = iVar1;" (assignment_expression "*(int *)(param_2 + 8) = iVar1" (pointer_expression "*(int *)(param_2 + 8)" * (cast_expression "(int *)(param_2 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) = identifier) ;) (return_statement "return iVar1;" return identifier ;) })) })) }))) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return IDENT ;) })) })) }))) (return_statement return IDENT ;) })))
(function_definition "int FUN_0001f9b0(undefined4 param_1,int param_2)\n\n{\n  int iVar1;\n  \n  if (param_2 == 0) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = *(int *)(param_2 + 8);\n    if (iVar1 == 0) {\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }\n  }\n  return iVar1;\n}" (primitive_type "int") (function_declarator "FUN_0001f9b0(undefined4 param_1,int param_2)" (identifier "FUN_0001f9b0") (parameter_list "(undefined4 param_1,int param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  if (param_2 == 0) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = *(int *)(param_2 + 8);\n    if (iVar1 == 0) {\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }\n  }\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (if_statement "if (param_2 == 0) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = *(int *)(param_2 + 8);\n    if (iVar1 == 0) {\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = 0;\n  }" ({ "{") (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" (identifier "iVar1") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    iVar1 = *(int *)(param_2 + 8);\n    if (iVar1 == 0) {\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }\n  }" (else "else") (compound_statement "{\n    iVar1 = *(int *)(param_2 + 8);\n    if (iVar1 == 0) {\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }\n  }" ({ "{") (expression_statement "iVar1 = *(int *)(param_2 + 8);" (assignment_expression "iVar1 = *(int *)(param_2 + 8)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(param_2 + 8)" (* "*") (cast_expression "(int *)(param_2 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (if_statement "if (iVar1 == 0) {\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar1 = FUN_0001d440();\n      if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }\n    }" ({ "{") (expression_statement "iVar1 = FUN_0001d440();" (assignment_expression "iVar1 = FUN_0001d440()" (identifier "iVar1") (= "=") (call_expression "FUN_0001d440()" (identifier "FUN_0001d440") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        *(int *)(iVar1 + 0xc) = param_2;\n        *(int *)(param_2 + 8) = iVar1;\n        return iVar1;\n      }" ({ "{") (expression_statement "*(int *)(iVar1 + 0xc) = param_2;" (assignment_expression "*(int *)(iVar1 + 0xc) = param_2" (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (expression_statement "*(int *)(param_2 + 8) = iVar1;" (assignment_expression "*(int *)(param_2 + 8) = iVar1" (pointer_expression "*(int *)(param_2 + 8)" (* "*") (cast_expression "(int *)(param_2 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "iVar1")) (; ";")) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (} "}"))) (} "}")))) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

type_1 function_1(void *handle,type_1 var_1)

{
  type_1 var_2;
  type_2 in_ECX;
  
  if (var_1 == (type_1)0x0) {
    var_2 = (type_1)0x0;
  }
  else {
    var_2 = var_1->pointer;
    if (var_2 == (type_1)0x0) {
      var_2 = var_3((type_3 *)0xc,DEBUG_KIND_ILLEGAL,in_ECX);
      if (var_2 != (type_4 *)0x0) {
        (var_2->u).kindirect = (type_5 *)var_1;
        var_1->pointer = var_2;
        return var_2;
      }
    }
  }
  return var_2;
}


(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: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (return_statement (identifier))))))))) (return_statement (identifier)))))

int MASKED(undefined4 param_1,int param_2)

{
  int iVar1;
  
  if (param_2 == 0) {
    iVar1 = 0;
  }
  else {
    iVar1 = *(int *)(param_2 + 8);
    if (iVar1 == 0) {
      iVar1 = FUN_0001d440();
      if (iVar1 != 0) {
        *(int *)(iVar1 + 0xc) = param_2;
        *(int *)(param_2 + 8) = iVar1;
        return iVar1;
      }
    }
  }
  return iVar1;
}

