
void * mmalloca(size_t n)

{
  int iVar1;
  void *pvVar2;
  uint uVar3;
  
  if (n + 0x10 < n) {
    return (void *)0x0;
  }
  iVar1 = (*(code *)PTR_malloc_0005b508)(n + 0x10);
  if (iVar1 != 0) {
    uVar3 = iVar1 + 8U & 0xfffffff0;
    pvVar2 = (void *)(uVar3 + 8);
    *(char *)(uVar3 + 7) = (char)pvVar2 - (char)iVar1;
    return pvVar2;
  }
  return (void *)0x0;
}



int mmalloca(uint param_1)

{
  int iVar1;
  int iVar2;
  uint uVar3;
  
  if (param_1 + 0x10 < param_1) {
    return 0;
  }
  iVar1 = (*(code *)PTR_malloc_0005b508)(param_1 + 0x10);
  if (iVar1 != 0) {
    uVar3 = iVar1 + 8U & 0xfffffff0;
    iVar2 = uVar3 + 8;
    *(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1;
    return iVar2;
  }
  return 0;
}


lui gp,0x2
addiu gp,gp,-0xc30
addu gp,gp,t9
addiu v1,a0,0x10
sltu v0,v1,a0
bne v0,zero,0x00043d8c
_lw t9,-0x7be8(gp)
addiu sp,sp,-0x20
sw gp,0x10(sp)
sw ra,0x1c(sp)
jalr t9
_or a0,v1,zero
beq v0,zero,0x00043d7c
_or a0,v0,zero
addiu v1,v0,0x8
li v0,-0x10
and v1,v1,v0
addiu v0,v1,0x8
subu a0,v0,a0
sb a0,0x7(v1)
lw ra,0x1c(sp)
jr ra
_addiu sp,sp,0x20
lw ra,0x1c(sp)
or v0,zero,zero
jr ra
_addiu sp,sp,0x20
jr ra
_or v0,zero,zero
(translation_unit "int mmalloca(uint param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (param_1 + 0x10 < param_1) {\n    return 0;\n  }\n  iVar1 = (*(code *)PTR_malloc_0005b508)(param_1 + 0x10);\n  if (iVar1 != 0) {\n    uVar3 = iVar1 + 8U & 0xfffffff0;\n    iVar2 = uVar3 + 8;\n    *(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1;\n    return iVar2;\n  }\n  return 0;\n}\n\n" (function_definition "int mmalloca(uint param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (param_1 + 0x10 < param_1) {\n    return 0;\n  }\n  iVar1 = (*(code *)PTR_malloc_0005b508)(param_1 + 0x10);\n  if (iVar1 != 0) {\n    uVar3 = iVar1 + 8U & 0xfffffff0;\n    iVar2 = uVar3 + 8;\n    *(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1;\n    return iVar2;\n  }\n  return 0;\n}" primitive_type (function_declarator "mmalloca(uint param_1)" identifier (parameter_list "(uint param_1)" ( (parameter_declaration "uint param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (param_1 + 0x10 < param_1) {\n    return 0;\n  }\n  iVar1 = (*(code *)PTR_malloc_0005b508)(param_1 + 0x10);\n  if (iVar1 != 0) {\n    uVar3 = iVar1 + 8U & 0xfffffff0;\n    iVar2 = uVar3 + 8;\n    *(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1;\n    return iVar2;\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (if_statement "if (param_1 + 0x10 < param_1) {\n    return 0;\n  }" if (parenthesized_expression "(param_1 + 0x10 < param_1)" ( (binary_expression "param_1 + 0x10 < param_1" (binary_expression "param_1 + 0x10" identifier + number_literal) < identifier) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = (*(code *)PTR_malloc_0005b508)(param_1 + 0x10);" (assignment_expression "iVar1 = (*(code *)PTR_malloc_0005b508)(param_1 + 0x10)" identifier = (call_expression "(*(code *)PTR_malloc_0005b508)(param_1 + 0x10)" (parenthesized_expression "(*(code *)PTR_malloc_0005b508)" ( (pointer_expression "*(code *)PTR_malloc_0005b508" * (cast_expression "(code *)PTR_malloc_0005b508" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) ;) (if_statement "if (iVar1 != 0) {\n    uVar3 = iVar1 + 8U & 0xfffffff0;\n    iVar2 = uVar3 + 8;\n    *(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1;\n    return iVar2;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar3 = iVar1 + 8U & 0xfffffff0;\n    iVar2 = uVar3 + 8;\n    *(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1;\n    return iVar2;\n  }" { (expression_statement "uVar3 = iVar1 + 8U & 0xfffffff0;" (assignment_expression "uVar3 = iVar1 + 8U & 0xfffffff0" identifier = (binary_expression "iVar1 + 8U & 0xfffffff0" (binary_expression "iVar1 + 8U" identifier + number_literal) & number_literal)) ;) (expression_statement "iVar2 = uVar3 + 8;" (assignment_expression "iVar2 = uVar3 + 8" identifier = (binary_expression "uVar3 + 8" identifier + number_literal)) ;) (expression_statement "*(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1;" (assignment_expression "*(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1" (pointer_expression "*(char *)(uVar3 + 7)" * (cast_expression "(char *)(uVar3 + 7)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar3 + 7)" ( (binary_expression "uVar3 + 7" identifier + number_literal) )))) = (binary_expression "(char)iVar2 - (char)iVar1" (cast_expression "(char)iVar2" ( (type_descriptor "char" primitive_type) ) identifier) - (cast_expression "(char)iVar1" ( (type_descriptor "char" primitive_type) ) identifier))) ;) (return_statement "return iVar2;" return identifier ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "void * mmalloca(size_t n)\n\n{\n  int iVar1;\n  void *pvVar2;\n  uint uVar3;\n  \n  if (n + 0x10 < n) {\n    return (void *)0x0;\n  }\n  iVar1 = (*(code *)PTR_malloc_0005b508)(n + 0x10);\n  if (iVar1 != 0) {\n    uVar3 = iVar1 + 8U & 0xfffffff0;\n    pvVar2 = (void *)(uVar3 + 8);\n    *(char *)(uVar3 + 7) = (char)pvVar2 - (char)iVar1;\n    return pvVar2;\n  }\n  return (void *)0x0;\n}\n\n" (function_definition "void * mmalloca(size_t n)\n\n{\n  int iVar1;\n  void *pvVar2;\n  uint uVar3;\n  \n  if (n + 0x10 < n) {\n    return (void *)0x0;\n  }\n  iVar1 = (*(code *)PTR_malloc_0005b508)(n + 0x10);\n  if (iVar1 != 0) {\n    uVar3 = iVar1 + 8U & 0xfffffff0;\n    pvVar2 = (void *)(uVar3 + 8);\n    *(char *)(uVar3 + 7) = (char)pvVar2 - (char)iVar1;\n    return pvVar2;\n  }\n  return (void *)0x0;\n}" primitive_type (pointer_declarator "* mmalloca(size_t n)" * (function_declarator "mmalloca(size_t n)" identifier (parameter_list "(size_t n)" ( (parameter_declaration "size_t n" primitive_type identifier) )))) (compound_statement "{\n  int iVar1;\n  void *pvVar2;\n  uint uVar3;\n  \n  if (n + 0x10 < n) {\n    return (void *)0x0;\n  }\n  iVar1 = (*(code *)PTR_malloc_0005b508)(n + 0x10);\n  if (iVar1 != 0) {\n    uVar3 = iVar1 + 8U & 0xfffffff0;\n    pvVar2 = (void *)(uVar3 + 8);\n    *(char *)(uVar3 + 7) = (char)pvVar2 - (char)iVar1;\n    return pvVar2;\n  }\n  return (void *)0x0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "void *pvVar2;" primitive_type (pointer_declarator "*pvVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (if_statement "if (n + 0x10 < n) {\n    return (void *)0x0;\n  }" if (parenthesized_expression "(n + 0x10 < n)" ( (binary_expression "n + 0x10 < n" (binary_expression "n + 0x10" identifier + number_literal) < identifier) )) (compound_statement "{\n    return (void *)0x0;\n  }" { (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "iVar1 = (*(code *)PTR_malloc_0005b508)(n + 0x10);" (assignment_expression "iVar1 = (*(code *)PTR_malloc_0005b508)(n + 0x10)" identifier = (call_expression "(*(code *)PTR_malloc_0005b508)(n + 0x10)" (parenthesized_expression "(*(code *)PTR_malloc_0005b508)" ( (pointer_expression "*(code *)PTR_malloc_0005b508" * (cast_expression "(code *)PTR_malloc_0005b508" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(n + 0x10)" ( (binary_expression "n + 0x10" identifier + number_literal) )))) ;) (if_statement "if (iVar1 != 0) {\n    uVar3 = iVar1 + 8U & 0xfffffff0;\n    pvVar2 = (void *)(uVar3 + 8);\n    *(char *)(uVar3 + 7) = (char)pvVar2 - (char)iVar1;\n    return pvVar2;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar3 = iVar1 + 8U & 0xfffffff0;\n    pvVar2 = (void *)(uVar3 + 8);\n    *(char *)(uVar3 + 7) = (char)pvVar2 - (char)iVar1;\n    return pvVar2;\n  }" { (expression_statement "uVar3 = iVar1 + 8U & 0xfffffff0;" (assignment_expression "uVar3 = iVar1 + 8U & 0xfffffff0" identifier = (binary_expression "iVar1 + 8U & 0xfffffff0" (binary_expression "iVar1 + 8U" identifier + number_literal) & number_literal)) ;) (expression_statement "pvVar2 = (void *)(uVar3 + 8);" (assignment_expression "pvVar2 = (void *)(uVar3 + 8)" identifier = (cast_expression "(void *)(uVar3 + 8)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar3 + 8)" ( (binary_expression "uVar3 + 8" identifier + number_literal) )))) ;) (expression_statement "*(char *)(uVar3 + 7) = (char)pvVar2 - (char)iVar1;" (assignment_expression "*(char *)(uVar3 + 7) = (char)pvVar2 - (char)iVar1" (pointer_expression "*(char *)(uVar3 + 7)" * (cast_expression "(char *)(uVar3 + 7)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar3 + 7)" ( (binary_expression "uVar3 + 7" identifier + number_literal) )))) = (binary_expression "(char)pvVar2 - (char)iVar1" (cast_expression "(char)pvVar2" ( (type_descriptor "char" primitive_type) ) identifier) - (cast_expression "(char)iVar1" ( (type_descriptor "char" primitive_type) ) identifier))) ;) (return_statement "return pvVar2;" return identifier ;) })) (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "int mmalloca(uint param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (param_1 + 0x10 < param_1) {\n    return 0;\n  }\n  iVar1 = (*(code *)PTR_malloc_0005b508)(param_1 + 0x10);\n  if (iVar1 != 0) {\n    uVar3 = iVar1 + 8U & 0xfffffff0;\n    iVar2 = uVar3 + 8;\n    *(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1;\n    return iVar2;\n  }\n  return 0;\n}\n\n" (function_definition "int mmalloca(uint param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (param_1 + 0x10 < param_1) {\n    return 0;\n  }\n  iVar1 = (*(code *)PTR_malloc_0005b508)(param_1 + 0x10);\n  if (iVar1 != 0) {\n    uVar3 = iVar1 + 8U & 0xfffffff0;\n    iVar2 = uVar3 + 8;\n    *(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1;\n    return iVar2;\n  }\n  return 0;\n}" primitive_type (function_declarator "mmalloca(uint param_1)" identifier (parameter_list "(uint param_1)" ( (parameter_declaration "uint param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (param_1 + 0x10 < param_1) {\n    return 0;\n  }\n  iVar1 = (*(code *)PTR_malloc_0005b508)(param_1 + 0x10);\n  if (iVar1 != 0) {\n    uVar3 = iVar1 + 8U & 0xfffffff0;\n    iVar2 = uVar3 + 8;\n    *(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1;\n    return iVar2;\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (if_statement "if (param_1 + 0x10 < param_1) {\n    return 0;\n  }" if (parenthesized_expression "(param_1 + 0x10 < param_1)" ( (binary_expression "param_1 + 0x10 < param_1" (binary_expression "param_1 + 0x10" identifier + number_literal) < identifier) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = (*(code *)PTR_malloc_0005b508)(param_1 + 0x10);" (assignment_expression "iVar1 = (*(code *)PTR_malloc_0005b508)(param_1 + 0x10)" identifier = (call_expression "(*(code *)PTR_malloc_0005b508)(param_1 + 0x10)" (parenthesized_expression "(*(code *)PTR_malloc_0005b508)" ( (pointer_expression "*(code *)PTR_malloc_0005b508" * (cast_expression "(code *)PTR_malloc_0005b508" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) ;) (if_statement "if (iVar1 != 0) {\n    uVar3 = iVar1 + 8U & 0xfffffff0;\n    iVar2 = uVar3 + 8;\n    *(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1;\n    return iVar2;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar3 = iVar1 + 8U & 0xfffffff0;\n    iVar2 = uVar3 + 8;\n    *(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1;\n    return iVar2;\n  }" { (expression_statement "uVar3 = iVar1 + 8U & 0xfffffff0;" (assignment_expression "uVar3 = iVar1 + 8U & 0xfffffff0" identifier = (binary_expression "iVar1 + 8U & 0xfffffff0" (binary_expression "iVar1 + 8U" identifier + number_literal) & number_literal)) ;) (expression_statement "iVar2 = uVar3 + 8;" (assignment_expression "iVar2 = uVar3 + 8" identifier = (binary_expression "uVar3 + 8" identifier + number_literal)) ;) (expression_statement "*(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1;" (assignment_expression "*(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1" (pointer_expression "*(char *)(uVar3 + 7)" * (cast_expression "(char *)(uVar3 + 7)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar3 + 7)" ( (binary_expression "uVar3 + 7" identifier + number_literal) )))) = (binary_expression "(char)iVar2 - (char)iVar1" (cast_expression "(char)iVar2" ( (type_descriptor "char" primitive_type) ) identifier) - (cast_expression "(char)iVar1" ( (type_descriptor "char" primitive_type) ) identifier))) ;) (return_statement "return iVar2;" return identifier ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) < IDENT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) & LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (return_statement return IDENT ;) })) (return_statement return LIT ;) })))
(function_definition "int mmalloca(uint param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (param_1 + 0x10 < param_1) {\n    return 0;\n  }\n  iVar1 = (*(code *)PTR_malloc_0005b508)(param_1 + 0x10);\n  if (iVar1 != 0) {\n    uVar3 = iVar1 + 8U & 0xfffffff0;\n    iVar2 = uVar3 + 8;\n    *(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1;\n    return iVar2;\n  }\n  return 0;\n}" (primitive_type "int") (function_declarator "mmalloca(uint param_1)" (identifier "mmalloca") (parameter_list "(uint param_1)" (( "(") (parameter_declaration "uint param_1" (type_identifier "uint") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (param_1 + 0x10 < param_1) {\n    return 0;\n  }\n  iVar1 = (*(code *)PTR_malloc_0005b508)(param_1 + 0x10);\n  if (iVar1 != 0) {\n    uVar3 = iVar1 + 8U & 0xfffffff0;\n    iVar2 = uVar3 + 8;\n    *(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1;\n    return iVar2;\n  }\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (if_statement "if (param_1 + 0x10 < param_1) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(param_1 + 0x10 < param_1)" (( "(") (binary_expression "param_1 + 0x10 < param_1" (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) (< "<") (identifier "param_1")) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar1 = (*(code *)PTR_malloc_0005b508)(param_1 + 0x10);" (assignment_expression "iVar1 = (*(code *)PTR_malloc_0005b508)(param_1 + 0x10)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_malloc_0005b508)(param_1 + 0x10)" (parenthesized_expression "(*(code *)PTR_malloc_0005b508)" (( "(") (pointer_expression "*(code *)PTR_malloc_0005b508" (* "*") (cast_expression "(code *)PTR_malloc_0005b508" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_malloc_0005b508"))) () ")")) (argument_list "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    uVar3 = iVar1 + 8U & 0xfffffff0;\n    iVar2 = uVar3 + 8;\n    *(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1;\n    return iVar2;\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    uVar3 = iVar1 + 8U & 0xfffffff0;\n    iVar2 = uVar3 + 8;\n    *(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1;\n    return iVar2;\n  }" ({ "{") (expression_statement "uVar3 = iVar1 + 8U & 0xfffffff0;" (assignment_expression "uVar3 = iVar1 + 8U & 0xfffffff0" (identifier "uVar3") (= "=") (binary_expression "iVar1 + 8U & 0xfffffff0" (binary_expression "iVar1 + 8U" (identifier "iVar1") (+ "+") (number_literal "8U")) (& "&") (number_literal "0xfffffff0"))) (; ";")) (expression_statement "iVar2 = uVar3 + 8;" (assignment_expression "iVar2 = uVar3 + 8" (identifier "iVar2") (= "=") (binary_expression "uVar3 + 8" (identifier "uVar3") (+ "+") (number_literal "8"))) (; ";")) (expression_statement "*(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1;" (assignment_expression "*(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1" (pointer_expression "*(char *)(uVar3 + 7)" (* "*") (cast_expression "(char *)(uVar3 + 7)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(uVar3 + 7)" (( "(") (binary_expression "uVar3 + 7" (identifier "uVar3") (+ "+") (number_literal "7")) () ")")))) (= "=") (binary_expression "(char)iVar2 - (char)iVar1" (cast_expression "(char)iVar2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "iVar2")) (- "-") (cast_expression "(char)iVar1" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "iVar1")))) (; ";")) (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

void * function_1(size_t var_1)

{
  int var_2;
  void *pvVar2;
  type_1 var_3;
  
  if (var_1 + 0x10 < var_1) {
    return (void *)0x0;
  }
  var_2 = (*(type_2 *)PTR_malloc_0005b508)(var_1 + 0x10);
  if (var_2 != 0) {
    var_3 = var_2 + 8U & 0xfffffff0;
    pvVar2 = (void *)(var_3 + 8);
    *(char *)(var_3 + 7) = (char)pvVar2 - (char)var_2;
    return pvVar2;
  }
  return (void *)0x0;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (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)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (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: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) (return_statement (identifier)))) (return_statement (number_literal)))))

int MASKED(uint param_1)

{
  int iVar1;
  int iVar2;
  uint uVar3;
  
  if (param_1 + 0x10 < param_1) {
    return 0;
  }
  iVar1 = (*(code *)PTR_malloc_0005b508)(param_1 + 0x10);
  if (iVar1 != 0) {
    uVar3 = iVar1 + 8U & 0xfffffff0;
    iVar2 = uVar3 + 8;
    *(char *)(uVar3 + 7) = (char)iVar2 - (char)iVar1;
    return iVar2;
  }
  return 0;
}

