
/* WARNING: Unknown calling convention */

strbuf * strbuf_new(void)

{
  strbuf *psVar1;
  char *pcVar2;
  
  psVar1 = (strbuf *)safemalloc(1,0xc);
  psVar1->len = 0;
  psVar1->size = 0x200;
  pcVar2 = (char *)safemalloc(0x200,1);
  psVar1->s = pcVar2;
  *pcVar2 = '\0';
  return psVar1;
}



undefined4 * strbuf_new(void)

{
  undefined4 *puVar1;
  undefined1 *puVar2;
  
  puVar1 = (undefined4 *)safemalloc(1,0xc);
  puVar1[1] = 0;
  puVar1[2] = 0x200;
  puVar2 = (undefined1 *)safemalloc(0x200,1);
  *puVar1 = puVar2;
  *puVar2 = 0;
  return puVar1;
}


lui gp,0xa
addiu gp,gp,-0x6878
addu gp,gp,t9
addiu sp,sp,-0x28
li a1,0xc
sw s1,0x20(sp)
sw ra,0x24(sp)
sw s0,0x1c(sp)
sw gp,0x10(sp)
lw s1,-0x7f68(gp)
or t9,s1,zero
bal 0x00020904
_li a0,0x1
li a1,0x1
or s0,v0,zero
sw zero,0x4(v0)
li v0,0x200
li a0,0x200
or t9,s1,zero
bal 0x00020904
_sw v0,0x8(s0)
or v1,v0,zero
sw v0,0x0(s0)
or v0,s0,zero
sb zero,0x0(v1)
lw ra,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
(translation_unit "undefined4 * strbuf_new(void)\n\n{\n  undefined4 *puVar1;\n  undefined1 *puVar2;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0xc);\n  puVar1[1] = 0;\n  puVar1[2] = 0x200;\n  puVar2 = (undefined1 *)safemalloc(0x200,1);\n  *puVar1 = puVar2;\n  *puVar2 = 0;\n  return puVar1;\n}\n\n" (function_definition "undefined4 * strbuf_new(void)\n\n{\n  undefined4 *puVar1;\n  undefined1 *puVar2;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0xc);\n  puVar1[1] = 0;\n  puVar1[2] = 0x200;\n  puVar2 = (undefined1 *)safemalloc(0x200,1);\n  *puVar1 = puVar2;\n  *puVar2 = 0;\n  return puVar1;\n}" type_identifier (pointer_declarator "* strbuf_new(void)" * (function_declarator "strbuf_new(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) )))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined1 *puVar2;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0xc);\n  puVar1[1] = 0;\n  puVar1[2] = 0x200;\n  puVar2 = (undefined1 *)safemalloc(0x200,1);\n  *puVar1 = puVar2;\n  *puVar2 = 0;\n  return puVar1;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (expression_statement "puVar1 = (undefined4 *)safemalloc(1,0xc);" (assignment_expression "puVar1 = (undefined4 *)safemalloc(1,0xc)" identifier = (cast_expression "(undefined4 *)safemalloc(1,0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0xc)" identifier (argument_list "(1,0xc)" ( number_literal , number_literal ))))) ;) (expression_statement "puVar1[1] = 0;" (assignment_expression "puVar1[1] = 0" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[2] = 0x200;" (assignment_expression "puVar1[2] = 0x200" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2 = (undefined1 *)safemalloc(0x200,1);" (assignment_expression "puVar2 = (undefined1 *)safemalloc(0x200,1)" identifier = (cast_expression "(undefined1 *)safemalloc(0x200,1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(0x200,1)" identifier (argument_list "(0x200,1)" ( number_literal , number_literal ))))) ;) (expression_statement "*puVar1 = puVar2;" (assignment_expression "*puVar1 = puVar2" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (return_statement "return puVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nstrbuf * strbuf_new(void)\n\n{\n  strbuf *psVar1;\n  char *pcVar2;\n  \n  psVar1 = (strbuf *)safemalloc(1,0xc);\n  psVar1->len = 0;\n  psVar1->size = 0x200;\n  pcVar2 = (char *)safemalloc(0x200,1);\n  psVar1->s = pcVar2;\n  *pcVar2 = '\0';\n  return psVar1;\n}\n\n" comment (function_definition "strbuf * strbuf_new(void)\n\n{\n  strbuf *psVar1;\n  char *pcVar2;\n  \n  psVar1 = (strbuf *)safemalloc(1,0xc);\n  psVar1->len = 0;\n  psVar1->size = 0x200;\n  pcVar2 = (char *)safemalloc(0x200,1);\n  psVar1->s = pcVar2;\n  *pcVar2 = '\0';\n  return psVar1;\n}" type_identifier (pointer_declarator "* strbuf_new(void)" * (function_declarator "strbuf_new(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) )))) (compound_statement "{\n  strbuf *psVar1;\n  char *pcVar2;\n  \n  psVar1 = (strbuf *)safemalloc(1,0xc);\n  psVar1->len = 0;\n  psVar1->size = 0x200;\n  pcVar2 = (char *)safemalloc(0x200,1);\n  psVar1->s = pcVar2;\n  *pcVar2 = '\0';\n  return psVar1;\n}" { (declaration "strbuf *psVar1;" type_identifier (pointer_declarator "*psVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (expression_statement "psVar1 = (strbuf *)safemalloc(1,0xc);" (assignment_expression "psVar1 = (strbuf *)safemalloc(1,0xc)" identifier = (cast_expression "(strbuf *)safemalloc(1,0xc)" ( (type_descriptor "strbuf *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0xc)" identifier (argument_list "(1,0xc)" ( number_literal , number_literal ))))) ;) (expression_statement "psVar1->len = 0;" (assignment_expression "psVar1->len = 0" (field_expression "psVar1->len" identifier -> field_identifier) = number_literal) ;) (expression_statement "psVar1->size = 0x200;" (assignment_expression "psVar1->size = 0x200" (field_expression "psVar1->size" identifier -> field_identifier) = number_literal) ;) (expression_statement "pcVar2 = (char *)safemalloc(0x200,1);" (assignment_expression "pcVar2 = (char *)safemalloc(0x200,1)" identifier = (cast_expression "(char *)safemalloc(0x200,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(0x200,1)" identifier (argument_list "(0x200,1)" ( number_literal , number_literal ))))) ;) (expression_statement "psVar1->s = pcVar2;" (assignment_expression "psVar1->s = pcVar2" (field_expression "psVar1->s" identifier -> field_identifier) = identifier) ;) (expression_statement "*pcVar2 = '\0';" (assignment_expression "*pcVar2 = '\0'" (pointer_expression "*pcVar2" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return psVar1;" return identifier ;) })))
(translation_unit "undefined4 * strbuf_new(void)\n\n{\n  undefined4 *puVar1;\n  undefined1 *puVar2;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0xc);\n  puVar1[1] = 0;\n  puVar1[2] = 0x200;\n  puVar2 = (undefined1 *)safemalloc(0x200,1);\n  *puVar1 = puVar2;\n  *puVar2 = 0;\n  return puVar1;\n}\n\n" (function_definition "undefined4 * strbuf_new(void)\n\n{\n  undefined4 *puVar1;\n  undefined1 *puVar2;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0xc);\n  puVar1[1] = 0;\n  puVar1[2] = 0x200;\n  puVar2 = (undefined1 *)safemalloc(0x200,1);\n  *puVar1 = puVar2;\n  *puVar2 = 0;\n  return puVar1;\n}" type_identifier (pointer_declarator "* strbuf_new(void)" * (function_declarator "strbuf_new(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) )))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined1 *puVar2;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0xc);\n  puVar1[1] = 0;\n  puVar1[2] = 0x200;\n  puVar2 = (undefined1 *)safemalloc(0x200,1);\n  *puVar1 = puVar2;\n  *puVar2 = 0;\n  return puVar1;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (expression_statement "puVar1 = (undefined4 *)safemalloc(1,0xc);" (assignment_expression "puVar1 = (undefined4 *)safemalloc(1,0xc)" identifier = (cast_expression "(undefined4 *)safemalloc(1,0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0xc)" identifier (argument_list "(1,0xc)" ( number_literal , number_literal ))))) ;) (expression_statement "puVar1[1] = 0;" (assignment_expression "puVar1[1] = 0" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[2] = 0x200;" (assignment_expression "puVar1[2] = 0x200" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar2 = (undefined1 *)safemalloc(0x200,1);" (assignment_expression "puVar2 = (undefined1 *)safemalloc(0x200,1)" identifier = (cast_expression "(undefined1 *)safemalloc(0x200,1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(0x200,1)" identifier (argument_list "(0x200,1)" ( number_literal , number_literal ))))) ;) (expression_statement "*puVar1 = puVar2;" (assignment_expression "*puVar1 = puVar2" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (return_statement "return puVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (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 IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4 * strbuf_new(void)\n\n{\n  undefined4 *puVar1;\n  undefined1 *puVar2;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0xc);\n  puVar1[1] = 0;\n  puVar1[2] = 0x200;\n  puVar2 = (undefined1 *)safemalloc(0x200,1);\n  *puVar1 = puVar2;\n  *puVar2 = 0;\n  return puVar1;\n}" (type_identifier "undefined4") (pointer_declarator "* strbuf_new(void)" (* "*") (function_declarator "strbuf_new(void)" (identifier "strbuf_new") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")")))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined1 *puVar2;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0xc);\n  puVar1[1] = 0;\n  puVar1[2] = 0x200;\n  puVar2 = (undefined1 *)safemalloc(0x200,1);\n  *puVar1 = puVar2;\n  *puVar2 = 0;\n  return puVar1;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined1 *puVar2;" (type_identifier "undefined1") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (expression_statement "puVar1 = (undefined4 *)safemalloc(1,0xc);" (assignment_expression "puVar1 = (undefined4 *)safemalloc(1,0xc)" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)safemalloc(1,0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "safemalloc(1,0xc)" (identifier "safemalloc") (argument_list "(1,0xc)" (( "(") (number_literal "1") (, ",") (number_literal "0xc") () ")"))))) (; ";")) (expression_statement "puVar1[1] = 0;" (assignment_expression "puVar1[1] = 0" (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar1[2] = 0x200;" (assignment_expression "puVar1[2] = 0x200" (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0x200")) (; ";")) (expression_statement "puVar2 = (undefined1 *)safemalloc(0x200,1);" (assignment_expression "puVar2 = (undefined1 *)safemalloc(0x200,1)" (identifier "puVar2") (= "=") (cast_expression "(undefined1 *)safemalloc(0x200,1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "safemalloc(0x200,1)" (identifier "safemalloc") (argument_list "(0x200,1)" (( "(") (number_literal "0x200") (, ",") (number_literal "1") () ")"))))) (; ";")) (expression_statement "*puVar1 = puVar2;" (assignment_expression "*puVar1 = puVar2" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (identifier "puVar2")) (; ";")) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (number_literal "0")) (; ";")) (return_statement "return puVar1;" (return "return") (identifier "puVar1") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

type_1 * function_1(void)

{
  type_1 *psVar1;
  char *pcVar2;
  
  psVar1 = (type_1 *)var_1(1,0xc);
  psVar1->len = 0;
  psVar1->size = 0x200;
  pcVar2 = (char *)var_1(0x200,1);
  psVar1->s = pcVar2;
  *pcVar2 = '\0';
  return psVar1;
}


(translation_unit (function_definition type: (type_identifier) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (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: (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: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (return_statement (identifier)))))

undefined4 * MASKED(void)

{
  undefined4 *puVar1;
  undefined1 *puVar2;
  
  puVar1 = (undefined4 *)safemalloc(1,0xc);
  puVar1[1] = 0;
  puVar1[2] = 0x200;
  puVar2 = (undefined1 *)safemalloc(0x200,1);
  *puVar1 = puVar2;
  *puVar2 = 0;
  return puVar1;
}

