
void * safemalloc(size_t n,size_t size)

{
  int iVar1;
  void *pvVar2;
  undefined4 *puVar3;
  int iVar4;
  char str [200];
  
  iVar1 = *(int *)PTR___stack_chk_guard_000be114;
  if (size == 0) {
    trap(7);
  }
  iVar4 = size * n;
  if (n <= 0x7fffffff / size) {
    if (iVar4 == 0) {
      iVar4 = 1;
    }
    pvVar2 = (void *)(*(code *)PTR_malloc_000be030)(iVar4);
    if (pvVar2 != (void *)0x0) goto LAB_0003730c;
  }
  (*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_57__type_000bd268 + 0x4608);
  pvVar2 = (void *)0x0;
LAB_0003730c:
  if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {
    return pvVar2;
  }
  (*(code *)PTR___stack_chk_fail_000bddb4)();
  puVar3 = (undefined4 *)safemalloc(1,0x24);
  puVar3[6] = 0;
  puVar3[5] = 0;
  puVar3[7] = iVar1;
  puVar3[8] = 0;
  *puVar3 = 1;
  puVar3[3] = 0;
  puVar3[1] = 0;
  puVar3[4] = 0;
  puVar3[2] = 0;
  return puVar3;
}



undefined4 * safemalloc(uint param_1,uint param_2)

{
  int iVar1;
  undefined4 *puVar2;
  int iVar3;
  
  iVar1 = *(int *)PTR___stack_chk_guard_000be114;
  if (param_2 == 0) {
    trap(7);
  }
  iVar3 = param_2 * param_1;
  if (param_1 <= 0x7fffffff / param_2) {
    if (iVar3 == 0) {
      iVar3 = 1;
    }
    puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3);
    if (puVar2 != (undefined4 *)0x0) goto LAB_0003730c;
  }
  (*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_456__000bd268 + 0x4608);
  puVar2 = (undefined4 *)0x0;
LAB_0003730c:
  if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {
    return puVar2;
  }
  (*(code *)PTR___stack_chk_fail_000bddb4)();
  puVar2 = (undefined4 *)safemalloc(1,0x24);
  puVar2[6] = 0;
  puVar2[5] = 0;
  puVar2[7] = iVar1;
  puVar2[8] = 0;
  *puVar2 = 1;
  puVar2[3] = 0;
  puVar2[1] = 0;
  puVar2[4] = 0;
  puVar2[2] = 0;
  return puVar2;
}


lui gp,0x9
addiu gp,gp,-0x2088
addu gp,gp,t9
addiu sp,sp,-0xf0
sw ra,0xec(sp)
sw gp,0x10(sp)
lw v0,-0x70bc(gp)
lw v0,0x0(v0)
sw v0,0xe4(sp)
lui v0,0x7fff
ori v0,v0,0xffff
teq a1,zero
divu v0,a1
mflo v0
sltu v0,v0,a0
bne v0,zero,0x000372bc
_mul a0,a1,a0
bne a0,zero,0x000372a8
_lw t9,-0x71a0(gp)
li a0,0x1
jalr t9
_nop
lw gp,0x10(sp)
bne v0,zero,0x0003730c
_nop
addiu a1,sp,0x1c
lw v0,-0x7f68(gp)
lw a2,0x51c(v0)
addiu v0,v0,0x51c
lw a0,0x4(v0)
lw v1,0x8(v0)
sw a2,0x1c(sp)
sw a0,0x4(a1)
sw v1,0x8(a1)
lhu v1,0xc(v0)
sh v1,0xc(a1)
lbu v0,0xe(v0)
sb v0,0xe(a1)
lw a0,-0x7f68(gp)
addiu a0,a0,0x4608
lw t9,-0x7cf8(gp)
jalr t9
_nop
lw gp,0x10(sp)
or v0,zero,zero
lw a0,0xe4(sp)
lw v1,-0x70bc(gp)
lw v1,0x0(v1)
bne a0,v1,0x00037328
_lw ra,0xec(sp)
jr ra
_addiu sp,sp,0xf0
lw t9,-0x741c(gp)
jalr t9
_nop
(translation_unit "undefined4 * safemalloc(uint param_1,uint param_2)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)PTR___stack_chk_guard_000be114;\n  if (param_2 == 0) {\n    trap(7);\n  }\n  iVar3 = param_2 * param_1;\n  if (param_1 <= 0x7fffffff / param_2) {\n    if (iVar3 == 0) {\n      iVar3 = 1;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3);\n    if (puVar2 != (undefined4 *)0x0) goto LAB_0003730c;\n  }\n  (*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_456__000bd268 + 0x4608);\n  puVar2 = (undefined4 *)0x0;\nLAB_0003730c:\n  if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {\n    return puVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_000bddb4)();\n  puVar2 = (undefined4 *)safemalloc(1,0x24);\n  puVar2[6] = 0;\n  puVar2[5] = 0;\n  puVar2[7] = iVar1;\n  puVar2[8] = 0;\n  *puVar2 = 1;\n  puVar2[3] = 0;\n  puVar2[1] = 0;\n  puVar2[4] = 0;\n  puVar2[2] = 0;\n  return puVar2;\n}\n\n" (function_definition "undefined4 * safemalloc(uint param_1,uint param_2)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)PTR___stack_chk_guard_000be114;\n  if (param_2 == 0) {\n    trap(7);\n  }\n  iVar3 = param_2 * param_1;\n  if (param_1 <= 0x7fffffff / param_2) {\n    if (iVar3 == 0) {\n      iVar3 = 1;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3);\n    if (puVar2 != (undefined4 *)0x0) goto LAB_0003730c;\n  }\n  (*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_456__000bd268 + 0x4608);\n  puVar2 = (undefined4 *)0x0;\nLAB_0003730c:\n  if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {\n    return puVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_000bddb4)();\n  puVar2 = (undefined4 *)safemalloc(1,0x24);\n  puVar2[6] = 0;\n  puVar2[5] = 0;\n  puVar2[7] = iVar1;\n  puVar2[8] = 0;\n  *puVar2 = 1;\n  puVar2[3] = 0;\n  puVar2[1] = 0;\n  puVar2[4] = 0;\n  puVar2[2] = 0;\n  return puVar2;\n}" type_identifier (pointer_declarator "* safemalloc(uint param_1,uint param_2)" * (function_declarator "safemalloc(uint param_1,uint param_2)" identifier (parameter_list "(uint param_1,uint param_2)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) )))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)PTR___stack_chk_guard_000be114;\n  if (param_2 == 0) {\n    trap(7);\n  }\n  iVar3 = param_2 * param_1;\n  if (param_1 <= 0x7fffffff / param_2) {\n    if (iVar3 == 0) {\n      iVar3 = 1;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3);\n    if (puVar2 != (undefined4 *)0x0) goto LAB_0003730c;\n  }\n  (*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_456__000bd268 + 0x4608);\n  puVar2 = (undefined4 *)0x0;\nLAB_0003730c:\n  if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {\n    return puVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_000bddb4)();\n  puVar2 = (undefined4 *)safemalloc(1,0x24);\n  puVar2[6] = 0;\n  puVar2[5] = 0;\n  puVar2[7] = iVar1;\n  puVar2[8] = 0;\n  *puVar2 = 1;\n  puVar2[3] = 0;\n  puVar2[1] = 0;\n  puVar2[4] = 0;\n  puVar2[2] = 0;\n  return puVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)PTR___stack_chk_guard_000be114;" (assignment_expression "iVar1 = *(int *)PTR___stack_chk_guard_000be114" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_000be114" * (cast_expression "(int *)PTR___stack_chk_guard_000be114" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (param_2 == 0) {\n    trap(7);\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    trap(7);\n  }" { (expression_statement "trap(7);" (call_expression "trap(7)" identifier (argument_list "(7)" ( number_literal ))) ;) })) (expression_statement "iVar3 = param_2 * param_1;" (assignment_expression "iVar3 = param_2 * param_1" identifier = (binary_expression "param_2 * param_1" identifier * identifier)) ;) (if_statement "if (param_1 <= 0x7fffffff / param_2) {\n    if (iVar3 == 0) {\n      iVar3 = 1;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3);\n    if (puVar2 != (undefined4 *)0x0) goto LAB_0003730c;\n  }" if (parenthesized_expression "(param_1 <= 0x7fffffff / param_2)" ( (binary_expression "param_1 <= 0x7fffffff / param_2" identifier <= (binary_expression "0x7fffffff / param_2" number_literal / identifier)) )) (compound_statement "{\n    if (iVar3 == 0) {\n      iVar3 = 1;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3);\n    if (puVar2 != (undefined4 *)0x0) goto LAB_0003730c;\n  }" { (if_statement "if (iVar3 == 0) {\n      iVar3 = 1;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar3 = 1;\n    }" { (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" identifier = number_literal) ;) })) (expression_statement "puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3);" (assignment_expression "puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3)" identifier = (cast_expression "(undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_malloc_000be030)(iVar3)" (parenthesized_expression "(*(code *)PTR_malloc_000be030)" ( (pointer_expression "*(code *)PTR_malloc_000be030" * (cast_expression "(code *)PTR_malloc_000be030" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3)" ( identifier ))))) ;) (if_statement "if (puVar2 != (undefined4 *)0x0) goto LAB_0003730c;" if (parenthesized_expression "(puVar2 != (undefined4 *)0x0)" ( (binary_expression "puVar2 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0003730c;" goto statement_identifier ;)) })) (expression_statement "(*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_456__000bd268 + 0x4608);" (call_expression "(*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_456__000bd268 + 0x4608)" (parenthesized_expression "(*(code *)PTR_modalfatalbox_000bd4d8)" ( (pointer_expression "*(code *)PTR_modalfatalbox_000bd4d8" * (cast_expression "(code *)PTR_modalfatalbox_000bd4d8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_shapetypes_456__000bd268 + 0x4608)" ( (binary_expression "PTR_shapetypes_456__000bd268 + 0x4608" identifier + number_literal) ))) ;) (expression_statement "puVar2 = (undefined4 *)0x0;" (assignment_expression "puVar2 = (undefined4 *)0x0" identifier = (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (labeled_statement "LAB_0003730c:\n  if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {\n    return puVar2;\n  }" statement_identifier : (if_statement "if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {\n    return puVar2;\n  }" if (parenthesized_expression "(iVar1 == *(int *)PTR___stack_chk_guard_000be114)" ( (binary_expression "iVar1 == *(int *)PTR___stack_chk_guard_000be114" identifier == (pointer_expression "*(int *)PTR___stack_chk_guard_000be114" * (cast_expression "(int *)PTR___stack_chk_guard_000be114" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return puVar2;\n  }" { (return_statement "return puVar2;" return identifier ;) }))) (expression_statement "(*(code *)PTR___stack_chk_fail_000bddb4)();" (call_expression "(*(code *)PTR___stack_chk_fail_000bddb4)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_000bddb4)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_000bddb4" * (cast_expression "(code *)PTR___stack_chk_fail_000bddb4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "puVar2 = (undefined4 *)safemalloc(1,0x24);" (assignment_expression "puVar2 = (undefined4 *)safemalloc(1,0x24)" identifier = (cast_expression "(undefined4 *)safemalloc(1,0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0x24)" identifier (argument_list "(1,0x24)" ( number_literal , number_literal ))))) ;) (expression_statement "puVar2[6] = 0;" (assignment_expression "puVar2[6] = 0" (subscript_expression "puVar2[6]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[5] = 0;" (assignment_expression "puVar2[5] = 0" (subscript_expression "puVar2[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[7] = iVar1;" (assignment_expression "puVar2[7] = iVar1" (subscript_expression "puVar2[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar2[8] = 0;" (assignment_expression "puVar2[8] = 0" (subscript_expression "puVar2[8]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*puVar2 = 1;" (assignment_expression "*puVar2 = 1" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "puVar2[3] = 0;" (assignment_expression "puVar2[3] = 0" (subscript_expression "puVar2[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[1] = 0;" (assignment_expression "puVar2[1] = 0" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[4] = 0;" (assignment_expression "puVar2[4] = 0" (subscript_expression "puVar2[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[2] = 0;" (assignment_expression "puVar2[2] = 0" (subscript_expression "puVar2[2]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return puVar2;" return identifier ;) })))
(translation_unit "void * safemalloc(size_t n,size_t size)\n\n{\n  int iVar1;\n  void *pvVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  char str [200];\n  \n  iVar1 = *(int *)PTR___stack_chk_guard_000be114;\n  if (size == 0) {\n    trap(7);\n  }\n  iVar4 = size * n;\n  if (n <= 0x7fffffff / size) {\n    if (iVar4 == 0) {\n      iVar4 = 1;\n    }\n    pvVar2 = (void *)(*(code *)PTR_malloc_000be030)(iVar4);\n    if (pvVar2 != (void *)0x0) goto LAB_0003730c;\n  }\n  (*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_57__type_000bd268 + 0x4608);\n  pvVar2 = (void *)0x0;\nLAB_0003730c:\n  if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {\n    return pvVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_000bddb4)();\n  puVar3 = (undefined4 *)safemalloc(1,0x24);\n  puVar3[6] = 0;\n  puVar3[5] = 0;\n  puVar3[7] = iVar1;\n  puVar3[8] = 0;\n  *puVar3 = 1;\n  puVar3[3] = 0;\n  puVar3[1] = 0;\n  puVar3[4] = 0;\n  puVar3[2] = 0;\n  return puVar3;\n}\n\n" (function_definition "void * safemalloc(size_t n,size_t size)\n\n{\n  int iVar1;\n  void *pvVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  char str [200];\n  \n  iVar1 = *(int *)PTR___stack_chk_guard_000be114;\n  if (size == 0) {\n    trap(7);\n  }\n  iVar4 = size * n;\n  if (n <= 0x7fffffff / size) {\n    if (iVar4 == 0) {\n      iVar4 = 1;\n    }\n    pvVar2 = (void *)(*(code *)PTR_malloc_000be030)(iVar4);\n    if (pvVar2 != (void *)0x0) goto LAB_0003730c;\n  }\n  (*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_57__type_000bd268 + 0x4608);\n  pvVar2 = (void *)0x0;\nLAB_0003730c:\n  if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {\n    return pvVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_000bddb4)();\n  puVar3 = (undefined4 *)safemalloc(1,0x24);\n  puVar3[6] = 0;\n  puVar3[5] = 0;\n  puVar3[7] = iVar1;\n  puVar3[8] = 0;\n  *puVar3 = 1;\n  puVar3[3] = 0;\n  puVar3[1] = 0;\n  puVar3[4] = 0;\n  puVar3[2] = 0;\n  return puVar3;\n}" primitive_type (pointer_declarator "* safemalloc(size_t n,size_t size)" * (function_declarator "safemalloc(size_t n,size_t size)" identifier (parameter_list "(size_t n,size_t size)" ( (parameter_declaration "size_t n" primitive_type identifier) , (parameter_declaration "size_t size" primitive_type identifier) )))) (compound_statement "{\n  int iVar1;\n  void *pvVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  char str [200];\n  \n  iVar1 = *(int *)PTR___stack_chk_guard_000be114;\n  if (size == 0) {\n    trap(7);\n  }\n  iVar4 = size * n;\n  if (n <= 0x7fffffff / size) {\n    if (iVar4 == 0) {\n      iVar4 = 1;\n    }\n    pvVar2 = (void *)(*(code *)PTR_malloc_000be030)(iVar4);\n    if (pvVar2 != (void *)0x0) goto LAB_0003730c;\n  }\n  (*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_57__type_000bd268 + 0x4608);\n  pvVar2 = (void *)0x0;\nLAB_0003730c:\n  if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {\n    return pvVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_000bddb4)();\n  puVar3 = (undefined4 *)safemalloc(1,0x24);\n  puVar3[6] = 0;\n  puVar3[5] = 0;\n  puVar3[7] = iVar1;\n  puVar3[8] = 0;\n  *puVar3 = 1;\n  puVar3[3] = 0;\n  puVar3[1] = 0;\n  puVar3[4] = 0;\n  puVar3[2] = 0;\n  return puVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "void *pvVar2;" primitive_type (pointer_declarator "*pvVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "char str [200];" primitive_type (array_declarator "str [200]" identifier [ number_literal ]) ;) (expression_statement "iVar1 = *(int *)PTR___stack_chk_guard_000be114;" (assignment_expression "iVar1 = *(int *)PTR___stack_chk_guard_000be114" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_000be114" * (cast_expression "(int *)PTR___stack_chk_guard_000be114" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (size == 0) {\n    trap(7);\n  }" if (parenthesized_expression "(size == 0)" ( (binary_expression "size == 0" identifier == number_literal) )) (compound_statement "{\n    trap(7);\n  }" { (expression_statement "trap(7);" (call_expression "trap(7)" identifier (argument_list "(7)" ( number_literal ))) ;) })) (expression_statement "iVar4 = size * n;" (assignment_expression "iVar4 = size * n" identifier = (binary_expression "size * n" identifier * identifier)) ;) (if_statement "if (n <= 0x7fffffff / size) {\n    if (iVar4 == 0) {\n      iVar4 = 1;\n    }\n    pvVar2 = (void *)(*(code *)PTR_malloc_000be030)(iVar4);\n    if (pvVar2 != (void *)0x0) goto LAB_0003730c;\n  }" if (parenthesized_expression "(n <= 0x7fffffff / size)" ( (binary_expression "n <= 0x7fffffff / size" identifier <= (binary_expression "0x7fffffff / size" number_literal / identifier)) )) (compound_statement "{\n    if (iVar4 == 0) {\n      iVar4 = 1;\n    }\n    pvVar2 = (void *)(*(code *)PTR_malloc_000be030)(iVar4);\n    if (pvVar2 != (void *)0x0) goto LAB_0003730c;\n  }" { (if_statement "if (iVar4 == 0) {\n      iVar4 = 1;\n    }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar4 = 1;\n    }" { (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) })) (expression_statement "pvVar2 = (void *)(*(code *)PTR_malloc_000be030)(iVar4);" (assignment_expression "pvVar2 = (void *)(*(code *)PTR_malloc_000be030)(iVar4)" identifier = (cast_expression "(void *)(*(code *)PTR_malloc_000be030)(iVar4)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_malloc_000be030)(iVar4)" (parenthesized_expression "(*(code *)PTR_malloc_000be030)" ( (pointer_expression "*(code *)PTR_malloc_000be030" * (cast_expression "(code *)PTR_malloc_000be030" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar4)" ( identifier ))))) ;) (if_statement "if (pvVar2 != (void *)0x0) goto LAB_0003730c;" if (parenthesized_expression "(pvVar2 != (void *)0x0)" ( (binary_expression "pvVar2 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0003730c;" goto statement_identifier ;)) })) (expression_statement "(*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_57__type_000bd268 + 0x4608);" (call_expression "(*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_57__type_000bd268 + 0x4608)" (parenthesized_expression "(*(code *)PTR_modalfatalbox_000bd4d8)" ( (pointer_expression "*(code *)PTR_modalfatalbox_000bd4d8" * (cast_expression "(code *)PTR_modalfatalbox_000bd4d8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_shapetypes_57__type_000bd268 + 0x4608)" ( (binary_expression "PTR_shapetypes_57__type_000bd268 + 0x4608" identifier + number_literal) ))) ;) (expression_statement "pvVar2 = (void *)0x0;" (assignment_expression "pvVar2 = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (labeled_statement "LAB_0003730c:\n  if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {\n    return pvVar2;\n  }" statement_identifier : (if_statement "if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {\n    return pvVar2;\n  }" if (parenthesized_expression "(iVar1 == *(int *)PTR___stack_chk_guard_000be114)" ( (binary_expression "iVar1 == *(int *)PTR___stack_chk_guard_000be114" identifier == (pointer_expression "*(int *)PTR___stack_chk_guard_000be114" * (cast_expression "(int *)PTR___stack_chk_guard_000be114" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return pvVar2;\n  }" { (return_statement "return pvVar2;" return identifier ;) }))) (expression_statement "(*(code *)PTR___stack_chk_fail_000bddb4)();" (call_expression "(*(code *)PTR___stack_chk_fail_000bddb4)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_000bddb4)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_000bddb4" * (cast_expression "(code *)PTR___stack_chk_fail_000bddb4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "puVar3 = (undefined4 *)safemalloc(1,0x24);" (assignment_expression "puVar3 = (undefined4 *)safemalloc(1,0x24)" identifier = (cast_expression "(undefined4 *)safemalloc(1,0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0x24)" identifier (argument_list "(1,0x24)" ( number_literal , number_literal ))))) ;) (expression_statement "puVar3[6] = 0;" (assignment_expression "puVar3[6] = 0" (subscript_expression "puVar3[6]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[5] = 0;" (assignment_expression "puVar3[5] = 0" (subscript_expression "puVar3[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[7] = iVar1;" (assignment_expression "puVar3[7] = iVar1" (subscript_expression "puVar3[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar3[8] = 0;" (assignment_expression "puVar3[8] = 0" (subscript_expression "puVar3[8]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*puVar3 = 1;" (assignment_expression "*puVar3 = 1" (pointer_expression "*puVar3" * identifier) = number_literal) ;) (expression_statement "puVar3[3] = 0;" (assignment_expression "puVar3[3] = 0" (subscript_expression "puVar3[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[1] = 0;" (assignment_expression "puVar3[1] = 0" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[4] = 0;" (assignment_expression "puVar3[4] = 0" (subscript_expression "puVar3[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[2] = 0;" (assignment_expression "puVar3[2] = 0" (subscript_expression "puVar3[2]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return puVar3;" return identifier ;) })))
(translation_unit "undefined4 * safemalloc(uint param_1,uint param_2)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)PTR___stack_chk_guard_000be114;\n  if (param_2 == 0) {\n    trap(7);\n  }\n  iVar3 = param_2 * param_1;\n  if (param_1 <= 0x7fffffff / param_2) {\n    if (iVar3 == 0) {\n      iVar3 = 1;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3);\n    if (puVar2 != (undefined4 *)0x0) goto LAB_0003730c;\n  }\n  (*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_456__000bd268 + 0x4608);\n  puVar2 = (undefined4 *)0x0;\nLAB_0003730c:\n  if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {\n    return puVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_000bddb4)();\n  puVar2 = (undefined4 *)safemalloc(1,0x24);\n  puVar2[6] = 0;\n  puVar2[5] = 0;\n  puVar2[7] = iVar1;\n  puVar2[8] = 0;\n  *puVar2 = 1;\n  puVar2[3] = 0;\n  puVar2[1] = 0;\n  puVar2[4] = 0;\n  puVar2[2] = 0;\n  return puVar2;\n}\n\n" (function_definition "undefined4 * safemalloc(uint param_1,uint param_2)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)PTR___stack_chk_guard_000be114;\n  if (param_2 == 0) {\n    trap(7);\n  }\n  iVar3 = param_2 * param_1;\n  if (param_1 <= 0x7fffffff / param_2) {\n    if (iVar3 == 0) {\n      iVar3 = 1;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3);\n    if (puVar2 != (undefined4 *)0x0) goto LAB_0003730c;\n  }\n  (*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_456__000bd268 + 0x4608);\n  puVar2 = (undefined4 *)0x0;\nLAB_0003730c:\n  if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {\n    return puVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_000bddb4)();\n  puVar2 = (undefined4 *)safemalloc(1,0x24);\n  puVar2[6] = 0;\n  puVar2[5] = 0;\n  puVar2[7] = iVar1;\n  puVar2[8] = 0;\n  *puVar2 = 1;\n  puVar2[3] = 0;\n  puVar2[1] = 0;\n  puVar2[4] = 0;\n  puVar2[2] = 0;\n  return puVar2;\n}" type_identifier (pointer_declarator "* safemalloc(uint param_1,uint param_2)" * (function_declarator "safemalloc(uint param_1,uint param_2)" identifier (parameter_list "(uint param_1,uint param_2)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) )))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)PTR___stack_chk_guard_000be114;\n  if (param_2 == 0) {\n    trap(7);\n  }\n  iVar3 = param_2 * param_1;\n  if (param_1 <= 0x7fffffff / param_2) {\n    if (iVar3 == 0) {\n      iVar3 = 1;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3);\n    if (puVar2 != (undefined4 *)0x0) goto LAB_0003730c;\n  }\n  (*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_456__000bd268 + 0x4608);\n  puVar2 = (undefined4 *)0x0;\nLAB_0003730c:\n  if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {\n    return puVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_000bddb4)();\n  puVar2 = (undefined4 *)safemalloc(1,0x24);\n  puVar2[6] = 0;\n  puVar2[5] = 0;\n  puVar2[7] = iVar1;\n  puVar2[8] = 0;\n  *puVar2 = 1;\n  puVar2[3] = 0;\n  puVar2[1] = 0;\n  puVar2[4] = 0;\n  puVar2[2] = 0;\n  return puVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)PTR___stack_chk_guard_000be114;" (assignment_expression "iVar1 = *(int *)PTR___stack_chk_guard_000be114" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_000be114" * (cast_expression "(int *)PTR___stack_chk_guard_000be114" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (param_2 == 0) {\n    trap(7);\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    trap(7);\n  }" { (expression_statement "trap(7);" (call_expression "trap(7)" identifier (argument_list "(7)" ( number_literal ))) ;) })) (expression_statement "iVar3 = param_2 * param_1;" (assignment_expression "iVar3 = param_2 * param_1" identifier = (binary_expression "param_2 * param_1" identifier * identifier)) ;) (if_statement "if (param_1 <= 0x7fffffff / param_2) {\n    if (iVar3 == 0) {\n      iVar3 = 1;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3);\n    if (puVar2 != (undefined4 *)0x0) goto LAB_0003730c;\n  }" if (parenthesized_expression "(param_1 <= 0x7fffffff / param_2)" ( (binary_expression "param_1 <= 0x7fffffff / param_2" identifier <= (binary_expression "0x7fffffff / param_2" number_literal / identifier)) )) (compound_statement "{\n    if (iVar3 == 0) {\n      iVar3 = 1;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3);\n    if (puVar2 != (undefined4 *)0x0) goto LAB_0003730c;\n  }" { (if_statement "if (iVar3 == 0) {\n      iVar3 = 1;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar3 = 1;\n    }" { (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" identifier = number_literal) ;) })) (expression_statement "puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3);" (assignment_expression "puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3)" identifier = (cast_expression "(undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_malloc_000be030)(iVar3)" (parenthesized_expression "(*(code *)PTR_malloc_000be030)" ( (pointer_expression "*(code *)PTR_malloc_000be030" * (cast_expression "(code *)PTR_malloc_000be030" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3)" ( identifier ))))) ;) (if_statement "if (puVar2 != (undefined4 *)0x0) goto LAB_0003730c;" if (parenthesized_expression "(puVar2 != (undefined4 *)0x0)" ( (binary_expression "puVar2 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0003730c;" goto statement_identifier ;)) })) (expression_statement "(*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_456__000bd268 + 0x4608);" (call_expression "(*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_456__000bd268 + 0x4608)" (parenthesized_expression "(*(code *)PTR_modalfatalbox_000bd4d8)" ( (pointer_expression "*(code *)PTR_modalfatalbox_000bd4d8" * (cast_expression "(code *)PTR_modalfatalbox_000bd4d8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_shapetypes_456__000bd268 + 0x4608)" ( (binary_expression "PTR_shapetypes_456__000bd268 + 0x4608" identifier + number_literal) ))) ;) (expression_statement "puVar2 = (undefined4 *)0x0;" (assignment_expression "puVar2 = (undefined4 *)0x0" identifier = (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (labeled_statement "LAB_0003730c:\n  if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {\n    return puVar2;\n  }" statement_identifier : (if_statement "if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {\n    return puVar2;\n  }" if (parenthesized_expression "(iVar1 == *(int *)PTR___stack_chk_guard_000be114)" ( (binary_expression "iVar1 == *(int *)PTR___stack_chk_guard_000be114" identifier == (pointer_expression "*(int *)PTR___stack_chk_guard_000be114" * (cast_expression "(int *)PTR___stack_chk_guard_000be114" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return puVar2;\n  }" { (return_statement "return puVar2;" return identifier ;) }))) (expression_statement "(*(code *)PTR___stack_chk_fail_000bddb4)();" (call_expression "(*(code *)PTR___stack_chk_fail_000bddb4)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_000bddb4)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_000bddb4" * (cast_expression "(code *)PTR___stack_chk_fail_000bddb4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "puVar2 = (undefined4 *)safemalloc(1,0x24);" (assignment_expression "puVar2 = (undefined4 *)safemalloc(1,0x24)" identifier = (cast_expression "(undefined4 *)safemalloc(1,0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0x24)" identifier (argument_list "(1,0x24)" ( number_literal , number_literal ))))) ;) (expression_statement "puVar2[6] = 0;" (assignment_expression "puVar2[6] = 0" (subscript_expression "puVar2[6]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[5] = 0;" (assignment_expression "puVar2[5] = 0" (subscript_expression "puVar2[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[7] = iVar1;" (assignment_expression "puVar2[7] = iVar1" (subscript_expression "puVar2[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar2[8] = 0;" (assignment_expression "puVar2[8] = 0" (subscript_expression "puVar2[8]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*puVar2 = 1;" (assignment_expression "*puVar2 = 1" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "puVar2[3] = 0;" (assignment_expression "puVar2[3] = 0" (subscript_expression "puVar2[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[1] = 0;" (assignment_expression "puVar2[1] = 0" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[4] = 0;" (assignment_expression "puVar2[4] = 0" (subscript_expression "puVar2[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2[2] = 0;" (assignment_expression "puVar2[2] = 0" (subscript_expression "puVar2[2]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return puVar2;" 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 (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (binary_expression LIT / IDENT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4 * safemalloc(uint param_1,uint param_2)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)PTR___stack_chk_guard_000be114;\n  if (param_2 == 0) {\n    trap(7);\n  }\n  iVar3 = param_2 * param_1;\n  if (param_1 <= 0x7fffffff / param_2) {\n    if (iVar3 == 0) {\n      iVar3 = 1;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3);\n    if (puVar2 != (undefined4 *)0x0) goto LAB_0003730c;\n  }\n  (*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_456__000bd268 + 0x4608);\n  puVar2 = (undefined4 *)0x0;\nLAB_0003730c:\n  if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {\n    return puVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_000bddb4)();\n  puVar2 = (undefined4 *)safemalloc(1,0x24);\n  puVar2[6] = 0;\n  puVar2[5] = 0;\n  puVar2[7] = iVar1;\n  puVar2[8] = 0;\n  *puVar2 = 1;\n  puVar2[3] = 0;\n  puVar2[1] = 0;\n  puVar2[4] = 0;\n  puVar2[2] = 0;\n  return puVar2;\n}" (type_identifier "undefined4") (pointer_declarator "* safemalloc(uint param_1,uint param_2)" (* "*") (function_declarator "safemalloc(uint param_1,uint param_2)" (identifier "safemalloc") (parameter_list "(uint param_1,uint param_2)" (( "(") (parameter_declaration "uint param_1" (type_identifier "uint") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")")))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)PTR___stack_chk_guard_000be114;\n  if (param_2 == 0) {\n    trap(7);\n  }\n  iVar3 = param_2 * param_1;\n  if (param_1 <= 0x7fffffff / param_2) {\n    if (iVar3 == 0) {\n      iVar3 = 1;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3);\n    if (puVar2 != (undefined4 *)0x0) goto LAB_0003730c;\n  }\n  (*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_456__000bd268 + 0x4608);\n  puVar2 = (undefined4 *)0x0;\nLAB_0003730c:\n  if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {\n    return puVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_000bddb4)();\n  puVar2 = (undefined4 *)safemalloc(1,0x24);\n  puVar2[6] = 0;\n  puVar2[5] = 0;\n  puVar2[7] = iVar1;\n  puVar2[8] = 0;\n  *puVar2 = 1;\n  puVar2[3] = 0;\n  puVar2[1] = 0;\n  puVar2[4] = 0;\n  puVar2[2] = 0;\n  return puVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 *puVar2;" (type_identifier "undefined4") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (expression_statement "iVar1 = *(int *)PTR___stack_chk_guard_000be114;" (assignment_expression "iVar1 = *(int *)PTR___stack_chk_guard_000be114" (identifier "iVar1") (= "=") (pointer_expression "*(int *)PTR___stack_chk_guard_000be114" (* "*") (cast_expression "(int *)PTR___stack_chk_guard_000be114" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_guard_000be114")))) (; ";")) (if_statement "if (param_2 == 0) {\n    trap(7);\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    trap(7);\n  }" ({ "{") (expression_statement "trap(7);" (call_expression "trap(7)" (identifier "trap") (argument_list "(7)" (( "(") (number_literal "7") () ")"))) (; ";")) (} "}"))) (expression_statement "iVar3 = param_2 * param_1;" (assignment_expression "iVar3 = param_2 * param_1" (identifier "iVar3") (= "=") (binary_expression "param_2 * param_1" (identifier "param_2") (* "*") (identifier "param_1"))) (; ";")) (if_statement "if (param_1 <= 0x7fffffff / param_2) {\n    if (iVar3 == 0) {\n      iVar3 = 1;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3);\n    if (puVar2 != (undefined4 *)0x0) goto LAB_0003730c;\n  }" (if "if") (parenthesized_expression "(param_1 <= 0x7fffffff / param_2)" (( "(") (binary_expression "param_1 <= 0x7fffffff / param_2" (identifier "param_1") (<= "<=") (binary_expression "0x7fffffff / param_2" (number_literal "0x7fffffff") (/ "/") (identifier "param_2"))) () ")")) (compound_statement "{\n    if (iVar3 == 0) {\n      iVar3 = 1;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3);\n    if (puVar2 != (undefined4 *)0x0) goto LAB_0003730c;\n  }" ({ "{") (if_statement "if (iVar3 == 0) {\n      iVar3 = 1;\n    }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar3 = 1;\n    }" ({ "{") (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" (identifier "iVar3") (= "=") (number_literal "1")) (; ";")) (} "}"))) (expression_statement "puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3);" (assignment_expression "puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3)" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_malloc_000be030)(iVar3)" (parenthesized_expression "(*(code *)PTR_malloc_000be030)" (( "(") (pointer_expression "*(code *)PTR_malloc_000be030" (* "*") (cast_expression "(code *)PTR_malloc_000be030" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_malloc_000be030"))) () ")")) (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")"))))) (; ";")) (if_statement "if (puVar2 != (undefined4 *)0x0) goto LAB_0003730c;" (if "if") (parenthesized_expression "(puVar2 != (undefined4 *)0x0)" (( "(") (binary_expression "puVar2 != (undefined4 *)0x0" (identifier "puVar2") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_0003730c;" (goto "goto") (statement_identifier "LAB_0003730c") (; ";"))) (} "}"))) (expression_statement "(*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_456__000bd268 + 0x4608);" (call_expression "(*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_456__000bd268 + 0x4608)" (parenthesized_expression "(*(code *)PTR_modalfatalbox_000bd4d8)" (( "(") (pointer_expression "*(code *)PTR_modalfatalbox_000bd4d8" (* "*") (cast_expression "(code *)PTR_modalfatalbox_000bd4d8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_modalfatalbox_000bd4d8"))) () ")")) (argument_list "(PTR_shapetypes_456__000bd268 + 0x4608)" (( "(") (binary_expression "PTR_shapetypes_456__000bd268 + 0x4608" (identifier "PTR_shapetypes_456__000bd268") (+ "+") (number_literal "0x4608")) () ")"))) (; ";")) (expression_statement "puVar2 = (undefined4 *)0x0;" (assignment_expression "puVar2 = (undefined4 *)0x0" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (labeled_statement "LAB_0003730c:\n  if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {\n    return puVar2;\n  }" (statement_identifier "LAB_0003730c") (: ":") (if_statement "if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {\n    return puVar2;\n  }" (if "if") (parenthesized_expression "(iVar1 == *(int *)PTR___stack_chk_guard_000be114)" (( "(") (binary_expression "iVar1 == *(int *)PTR___stack_chk_guard_000be114" (identifier "iVar1") (== "==") (pointer_expression "*(int *)PTR___stack_chk_guard_000be114" (* "*") (cast_expression "(int *)PTR___stack_chk_guard_000be114" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_guard_000be114")))) () ")")) (compound_statement "{\n    return puVar2;\n  }" ({ "{") (return_statement "return puVar2;" (return "return") (identifier "puVar2") (; ";")) (} "}")))) (expression_statement "(*(code *)PTR___stack_chk_fail_000bddb4)();" (call_expression "(*(code *)PTR___stack_chk_fail_000bddb4)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_000bddb4)" (( "(") (pointer_expression "*(code *)PTR___stack_chk_fail_000bddb4" (* "*") (cast_expression "(code *)PTR___stack_chk_fail_000bddb4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_fail_000bddb4"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "puVar2 = (undefined4 *)safemalloc(1,0x24);" (assignment_expression "puVar2 = (undefined4 *)safemalloc(1,0x24)" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)safemalloc(1,0x24)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "safemalloc(1,0x24)" (identifier "safemalloc") (argument_list "(1,0x24)" (( "(") (number_literal "1") (, ",") (number_literal "0x24") () ")"))))) (; ";")) (expression_statement "puVar2[6] = 0;" (assignment_expression "puVar2[6] = 0" (subscript_expression "puVar2[6]" (identifier "puVar2") ([ "[") (number_literal "6") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2[5] = 0;" (assignment_expression "puVar2[5] = 0" (subscript_expression "puVar2[5]" (identifier "puVar2") ([ "[") (number_literal "5") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2[7] = iVar1;" (assignment_expression "puVar2[7] = iVar1" (subscript_expression "puVar2[7]" (identifier "puVar2") ([ "[") (number_literal "7") (] "]")) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "puVar2[8] = 0;" (assignment_expression "puVar2[8] = 0" (subscript_expression "puVar2[8]" (identifier "puVar2") ([ "[") (number_literal "8") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*puVar2 = 1;" (assignment_expression "*puVar2 = 1" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (number_literal "1")) (; ";")) (expression_statement "puVar2[3] = 0;" (assignment_expression "puVar2[3] = 0" (subscript_expression "puVar2[3]" (identifier "puVar2") ([ "[") (number_literal "3") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2[1] = 0;" (assignment_expression "puVar2[1] = 0" (subscript_expression "puVar2[1]" (identifier "puVar2") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2[4] = 0;" (assignment_expression "puVar2[4] = 0" (subscript_expression "puVar2[4]" (identifier "puVar2") ([ "[") (number_literal "4") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2[2] = 0;" (assignment_expression "puVar2[2] = 0" (subscript_expression "puVar2[2]" (identifier "puVar2") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (return_statement "return puVar2;" (return "return") (identifier "puVar2") (; ";")) (} "}")))

void * function_1(size_t var_3,size_t var_1)

{
  int var_7;
  void *var_5;
  type_1 *puVar3;
  int var_4;
  char str [200];
  
  var_7 = *(int *)PTR___stack_chk_guard_000be114;
  if (var_1 == 0) {
    var_2(7);
  }
  var_4 = var_1 * var_3;
  if (var_3 <= 0x7fffffff / var_1) {
    if (var_4 == 0) {
      var_4 = 1;
    }
    var_5 = (void *)(*(type_2 *)PTR_malloc_000be030)(var_4);
    if (var_5 != (void *)0x0) goto LAB_0003730c;
  }
  (*(type_2 *)PTR_modalfatalbox_000bd4d8)(var_6 + 0x4608);
  var_5 = (void *)0x0;
LAB_0003730c:
  if (var_7 == *(int *)PTR___stack_chk_guard_000be114) {
    return var_5;
  }
  (*(type_2 *)PTR___stack_chk_fail_000bddb4)();
  puVar3 = (type_1 *)function_1(1,0x24);
  puVar3[6] = 0;
  puVar3[5] = 0;
  puVar3[7] = var_7;
  puVar3[8] = 0;
  *puVar3 = 1;
  puVar3[3] = 0;
  puVar3[1] = 0;
  puVar3[4] = 0;
  puVar3[2] = 0;
  return puVar3;
}


(translation_unit (function_definition type: (type_identifier) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (number_literal) right: (identifier)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (goto_statement label: (statement_identifier))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))))) consequence: (compound_statement (return_statement (identifier))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (number_literal) (number_literal)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (return_statement (identifier)))))

undefined4 * MASKED(uint param_1,uint param_2)

{
  int iVar1;
  undefined4 *puVar2;
  int iVar3;
  
  iVar1 = *(int *)PTR___stack_chk_guard_000be114;
  if (param_2 == 0) {
    trap(7);
  }
  iVar3 = param_2 * param_1;
  if (param_1 <= 0x7fffffff / param_2) {
    if (iVar3 == 0) {
      iVar3 = 1;
    }
    puVar2 = (undefined4 *)(*(code *)PTR_malloc_000be030)(iVar3);
    if (puVar2 != (undefined4 *)0x0) goto LAB_0003730c;
  }
  (*(code *)PTR_modalfatalbox_000bd4d8)(PTR_shapetypes_456__000bd268 + 0x4608);
  puVar2 = (undefined4 *)0x0;
LAB_0003730c:
  if (iVar1 == *(int *)PTR___stack_chk_guard_000be114) {
    return puVar2;
  }
  (*(code *)PTR___stack_chk_fail_000bddb4)();
  puVar2 = (undefined4 *)MASKED(1,0x24);
  puVar2[6] = 0;
  puVar2[5] = 0;
  puVar2[7] = iVar1;
  puVar2[8] = 0;
  *puVar2 = 1;
  puVar2[3] = 0;
  puVar2[1] = 0;
  puVar2[4] = 0;
  puVar2[2] = 0;
  return puVar2;
}

