
void * allocSpace(ReusableSpace *p,void *pBuf,int nByte)

{
  uint uVar1;
  int iVar2;
  
  uVar1 = (int)pBuf + 7U & 0xfffffff8;
  if ((int)uVar1 <= p->nFree) {
    iVar2 = p->nFree - uVar1;
    p->nFree = iVar2;
    return p->pSpace + iVar2;
  }
  p->nNeeded = p->nNeeded + uVar1;
  return (void *)0x0;
}



int FUN_00058880(int *param_1,int param_2)

{
  uint uVar1;
  int iVar2;
  
  uVar1 = param_2 + 7U & 0xfffffff8;
  if ((int)uVar1 <= param_1[1]) {
    iVar2 = param_1[1] - uVar1;
    param_1[1] = iVar2;
    return *param_1 + iVar2;
  }
  param_1[2] = param_1[2] + uVar1;
  return 0;
}


li v0,-0x8
lw v1,0x4(a0)
addiu a1,a1,0x7
and a1,a1,v0
slt v0,v1,a1
bne v0,zero,0x000588b0
_nop
lw v0,0x0(a0)
subu a1,v1,a1
sw a1,0x4(a0)
jr ra
_addu v0,v0,a1
lw v1,0x8(a0)
or v0,zero,zero
addu a1,v1,a1
jr ra
_sw a1,0x8(a0)
(translation_unit "int FUN_00058880(int *param_1,int param_2)\n\n{\n  uint uVar1;\n  int iVar2;\n  \n  uVar1 = param_2 + 7U & 0xfffffff8;\n  if ((int)uVar1 <= param_1[1]) {\n    iVar2 = param_1[1] - uVar1;\n    param_1[1] = iVar2;\n    return *param_1 + iVar2;\n  }\n  param_1[2] = param_1[2] + uVar1;\n  return 0;\n}\n\n" (function_definition "int FUN_00058880(int *param_1,int param_2)\n\n{\n  uint uVar1;\n  int iVar2;\n  \n  uVar1 = param_2 + 7U & 0xfffffff8;\n  if ((int)uVar1 <= param_1[1]) {\n    iVar2 = param_1[1] - uVar1;\n    param_1[1] = iVar2;\n    return *param_1 + iVar2;\n  }\n  param_1[2] = param_1[2] + uVar1;\n  return 0;\n}" primitive_type (function_declarator "FUN_00058880(int *param_1,int param_2)" identifier (parameter_list "(int *param_1,int param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  \n  uVar1 = param_2 + 7U & 0xfffffff8;\n  if ((int)uVar1 <= param_1[1]) {\n    iVar2 = param_1[1] - uVar1;\n    param_1[1] = iVar2;\n    return *param_1 + iVar2;\n  }\n  param_1[2] = param_1[2] + uVar1;\n  return 0;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "uVar1 = param_2 + 7U & 0xfffffff8;" (assignment_expression "uVar1 = param_2 + 7U & 0xfffffff8" identifier = (binary_expression "param_2 + 7U & 0xfffffff8" (binary_expression "param_2 + 7U" identifier + number_literal) & number_literal)) ;) (if_statement "if ((int)uVar1 <= param_1[1]) {\n    iVar2 = param_1[1] - uVar1;\n    param_1[1] = iVar2;\n    return *param_1 + iVar2;\n  }" if (parenthesized_expression "((int)uVar1 <= param_1[1])" ( (binary_expression "(int)uVar1 <= param_1[1]" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) <= (subscript_expression "param_1[1]" identifier [ number_literal ])) )) (compound_statement "{\n    iVar2 = param_1[1] - uVar1;\n    param_1[1] = iVar2;\n    return *param_1 + iVar2;\n  }" { (expression_statement "iVar2 = param_1[1] - uVar1;" (assignment_expression "iVar2 = param_1[1] - uVar1" identifier = (binary_expression "param_1[1] - uVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) - identifier)) ;) (expression_statement "param_1[1] = iVar2;" (assignment_expression "param_1[1] = iVar2" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (return_statement "return *param_1 + iVar2;" return (binary_expression "*param_1 + iVar2" (pointer_expression "*param_1" * identifier) + identifier) ;) })) (expression_statement "param_1[2] = param_1[2] + uVar1;" (assignment_expression "param_1[2] = param_1[2] + uVar1" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (binary_expression "param_1[2] + uVar1" (subscript_expression "param_1[2]" identifier [ number_literal ]) + identifier)) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "void * allocSpace(ReusableSpace *p,void *pBuf,int nByte)\n\n{\n  uint uVar1;\n  int iVar2;\n  \n  uVar1 = (int)pBuf + 7U & 0xfffffff8;\n  if ((int)uVar1 <= p->nFree) {\n    iVar2 = p->nFree - uVar1;\n    p->nFree = iVar2;\n    return p->pSpace + iVar2;\n  }\n  p->nNeeded = p->nNeeded + uVar1;\n  return (void *)0x0;\n}\n\n" (function_definition "void * allocSpace(ReusableSpace *p,void *pBuf,int nByte)\n\n{\n  uint uVar1;\n  int iVar2;\n  \n  uVar1 = (int)pBuf + 7U & 0xfffffff8;\n  if ((int)uVar1 <= p->nFree) {\n    iVar2 = p->nFree - uVar1;\n    p->nFree = iVar2;\n    return p->pSpace + iVar2;\n  }\n  p->nNeeded = p->nNeeded + uVar1;\n  return (void *)0x0;\n}" primitive_type (pointer_declarator "* allocSpace(ReusableSpace *p,void *pBuf,int nByte)" * (function_declarator "allocSpace(ReusableSpace *p,void *pBuf,int nByte)" identifier (parameter_list "(ReusableSpace *p,void *pBuf,int nByte)" ( (parameter_declaration "ReusableSpace *p" type_identifier (pointer_declarator "*p" * identifier)) , (parameter_declaration "void *pBuf" primitive_type (pointer_declarator "*pBuf" * identifier)) , (parameter_declaration "int nByte" primitive_type identifier) )))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  \n  uVar1 = (int)pBuf + 7U & 0xfffffff8;\n  if ((int)uVar1 <= p->nFree) {\n    iVar2 = p->nFree - uVar1;\n    p->nFree = iVar2;\n    return p->pSpace + iVar2;\n  }\n  p->nNeeded = p->nNeeded + uVar1;\n  return (void *)0x0;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "uVar1 = (int)pBuf + 7U & 0xfffffff8;" (assignment_expression "uVar1 = (int)pBuf + 7U & 0xfffffff8" identifier = (binary_expression "(int)pBuf + 7U & 0xfffffff8" (binary_expression "(int)pBuf + 7U" (cast_expression "(int)pBuf" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) & number_literal)) ;) (if_statement "if ((int)uVar1 <= p->nFree) {\n    iVar2 = p->nFree - uVar1;\n    p->nFree = iVar2;\n    return p->pSpace + iVar2;\n  }" if (parenthesized_expression "((int)uVar1 <= p->nFree)" ( (binary_expression "(int)uVar1 <= p->nFree" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) <= (field_expression "p->nFree" identifier -> field_identifier)) )) (compound_statement "{\n    iVar2 = p->nFree - uVar1;\n    p->nFree = iVar2;\n    return p->pSpace + iVar2;\n  }" { (expression_statement "iVar2 = p->nFree - uVar1;" (assignment_expression "iVar2 = p->nFree - uVar1" identifier = (binary_expression "p->nFree - uVar1" (field_expression "p->nFree" identifier -> field_identifier) - identifier)) ;) (expression_statement "p->nFree = iVar2;" (assignment_expression "p->nFree = iVar2" (field_expression "p->nFree" identifier -> field_identifier) = identifier) ;) (return_statement "return p->pSpace + iVar2;" return (binary_expression "p->pSpace + iVar2" (field_expression "p->pSpace" identifier -> field_identifier) + identifier) ;) })) (expression_statement "p->nNeeded = p->nNeeded + uVar1;" (assignment_expression "p->nNeeded = p->nNeeded + uVar1" (field_expression "p->nNeeded" identifier -> field_identifier) = (binary_expression "p->nNeeded + uVar1" (field_expression "p->nNeeded" identifier -> field_identifier) + identifier)) ;) (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "int FUN_00058880(int *param_1,int param_2)\n\n{\n  uint uVar1;\n  int iVar2;\n  \n  uVar1 = param_2 + 7U & 0xfffffff8;\n  if ((int)uVar1 <= param_1[1]) {\n    iVar2 = param_1[1] - uVar1;\n    param_1[1] = iVar2;\n    return *param_1 + iVar2;\n  }\n  param_1[2] = param_1[2] + uVar1;\n  return 0;\n}\n\n" (function_definition "int FUN_00058880(int *param_1,int param_2)\n\n{\n  uint uVar1;\n  int iVar2;\n  \n  uVar1 = param_2 + 7U & 0xfffffff8;\n  if ((int)uVar1 <= param_1[1]) {\n    iVar2 = param_1[1] - uVar1;\n    param_1[1] = iVar2;\n    return *param_1 + iVar2;\n  }\n  param_1[2] = param_1[2] + uVar1;\n  return 0;\n}" primitive_type (function_declarator "FUN_00058880(int *param_1,int param_2)" identifier (parameter_list "(int *param_1,int param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  \n  uVar1 = param_2 + 7U & 0xfffffff8;\n  if ((int)uVar1 <= param_1[1]) {\n    iVar2 = param_1[1] - uVar1;\n    param_1[1] = iVar2;\n    return *param_1 + iVar2;\n  }\n  param_1[2] = param_1[2] + uVar1;\n  return 0;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "uVar1 = param_2 + 7U & 0xfffffff8;" (assignment_expression "uVar1 = param_2 + 7U & 0xfffffff8" identifier = (binary_expression "param_2 + 7U & 0xfffffff8" (binary_expression "param_2 + 7U" identifier + number_literal) & number_literal)) ;) (if_statement "if ((int)uVar1 <= param_1[1]) {\n    iVar2 = param_1[1] - uVar1;\n    param_1[1] = iVar2;\n    return *param_1 + iVar2;\n  }" if (parenthesized_expression "((int)uVar1 <= param_1[1])" ( (binary_expression "(int)uVar1 <= param_1[1]" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) <= (subscript_expression "param_1[1]" identifier [ number_literal ])) )) (compound_statement "{\n    iVar2 = param_1[1] - uVar1;\n    param_1[1] = iVar2;\n    return *param_1 + iVar2;\n  }" { (expression_statement "iVar2 = param_1[1] - uVar1;" (assignment_expression "iVar2 = param_1[1] - uVar1" identifier = (binary_expression "param_1[1] - uVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) - identifier)) ;) (expression_statement "param_1[1] = iVar2;" (assignment_expression "param_1[1] = iVar2" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (return_statement "return *param_1 + iVar2;" return (binary_expression "*param_1 + iVar2" (pointer_expression "*param_1" * identifier) + identifier) ;) })) (expression_statement "param_1[2] = param_1[2] + uVar1;" (assignment_expression "param_1[2] = param_1[2] + uVar1" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (binary_expression "param_1[2] + uVar1" (subscript_expression "param_1[2]" identifier [ number_literal ]) + identifier)) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) <= (subscript_expression IDENT [ LIT ])) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) - IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (return_statement return (binary_expression (pointer_expression * IDENT) + IDENT) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) + IDENT)) ;) (return_statement return LIT ;) })))
(function_definition "int FUN_00058880(int *param_1,int param_2)\n\n{\n  uint uVar1;\n  int iVar2;\n  \n  uVar1 = param_2 + 7U & 0xfffffff8;\n  if ((int)uVar1 <= param_1[1]) {\n    iVar2 = param_1[1] - uVar1;\n    param_1[1] = iVar2;\n    return *param_1 + iVar2;\n  }\n  param_1[2] = param_1[2] + uVar1;\n  return 0;\n}" (primitive_type "int") (function_declarator "FUN_00058880(int *param_1,int param_2)" (identifier "FUN_00058880") (parameter_list "(int *param_1,int param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  \n  uVar1 = param_2 + 7U & 0xfffffff8;\n  if ((int)uVar1 <= param_1[1]) {\n    iVar2 = param_1[1] - uVar1;\n    param_1[1] = iVar2;\n    return *param_1 + iVar2;\n  }\n  param_1[2] = param_1[2] + uVar1;\n  return 0;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (expression_statement "uVar1 = param_2 + 7U & 0xfffffff8;" (assignment_expression "uVar1 = param_2 + 7U & 0xfffffff8" (identifier "uVar1") (= "=") (binary_expression "param_2 + 7U & 0xfffffff8" (binary_expression "param_2 + 7U" (identifier "param_2") (+ "+") (number_literal "7U")) (& "&") (number_literal "0xfffffff8"))) (; ";")) (if_statement "if ((int)uVar1 <= param_1[1]) {\n    iVar2 = param_1[1] - uVar1;\n    param_1[1] = iVar2;\n    return *param_1 + iVar2;\n  }" (if "if") (parenthesized_expression "((int)uVar1 <= param_1[1])" (( "(") (binary_expression "(int)uVar1 <= param_1[1]" (cast_expression "(int)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar1")) (<= "<=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) () ")")) (compound_statement "{\n    iVar2 = param_1[1] - uVar1;\n    param_1[1] = iVar2;\n    return *param_1 + iVar2;\n  }" ({ "{") (expression_statement "iVar2 = param_1[1] - uVar1;" (assignment_expression "iVar2 = param_1[1] - uVar1" (identifier "iVar2") (= "=") (binary_expression "param_1[1] - uVar1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (- "-") (identifier "uVar1"))) (; ";")) (expression_statement "param_1[1] = iVar2;" (assignment_expression "param_1[1] = iVar2" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "iVar2")) (; ";")) (return_statement "return *param_1 + iVar2;" (return "return") (binary_expression "*param_1 + iVar2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (identifier "iVar2")) (; ";")) (} "}"))) (expression_statement "param_1[2] = param_1[2] + uVar1;" (assignment_expression "param_1[2] = param_1[2] + uVar1" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (binary_expression "param_1[2] + uVar1" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (+ "+") (identifier "uVar1"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

void * function_1(type_1 *p,void *pBuf,int nByte)

{
  type_2 var_1;
  int var_2;
  
  var_1 = (int)pBuf + 7U & 0xfffffff8;
  if ((int)var_1 <= p->nFree) {
    var_2 = p->nFree - var_1;
    p->nFree = var_2;
    return p->pSpace + var_2;
  }
  p->nNeeded = p->nNeeded + var_1;
  return (void *)0x0;
}


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

int MASKED(int *param_1,int param_2)

{
  uint uVar1;
  int iVar2;
  
  uVar1 = param_2 + 7U & 0xfffffff8;
  if ((int)uVar1 <= param_1[1]) {
    iVar2 = param_1[1] - uVar1;
    param_1[1] = iVar2;
    return *param_1 + iVar2;
  }
  param_1[2] = param_1[2] + uVar1;
  return 0;
}

