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

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



int __regparm3 FUN_0002d700(int *param_1,int param_2)

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


ADD EDX,0x7
MOV ECX,dword ptr [EAX + 0x4]
AND EDX,0xfffffff8
CMP EDX,ECX
JG 0x0002d720
SUB ECX,EDX
MOV dword ptr [EAX + 0x4],ECX
ADD ECX,dword ptr [EAX]
MOV EAX,ECX
RET
ADD dword ptr [EAX + 0x8],EDX
XOR EAX,EAX
RET
(translation_unit "int __regparm3 FUN_0002d700(int *param_1,int param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = param_2 + 7U & 0xfffffff8;\n  if ((int)uVar2 <= param_1[1]) {\n    iVar1 = param_1[1] - uVar2;\n    param_1[1] = iVar1;\n    return iVar1 + *param_1;\n  }\n  param_1[2] = param_1[2] + uVar2;\n  return 0;\n}\n\n" (function_definition "int __regparm3 FUN_0002d700(int *param_1,int param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = param_2 + 7U & 0xfffffff8;\n  if ((int)uVar2 <= param_1[1]) {\n    iVar1 = param_1[1] - uVar2;\n    param_1[1] = iVar1;\n    return iVar1 + *param_1;\n  }\n  param_1[2] = param_1[2] + uVar2;\n  return 0;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0002d700(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  int iVar1;\n  uint uVar2;\n  \n  uVar2 = param_2 + 7U & 0xfffffff8;\n  if ((int)uVar2 <= param_1[1]) {\n    iVar1 = param_1[1] - uVar2;\n    param_1[1] = iVar1;\n    return iVar1 + *param_1;\n  }\n  param_1[2] = param_1[2] + uVar2;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = param_2 + 7U & 0xfffffff8;" (assignment_expression "uVar2 = 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)uVar2 <= param_1[1]) {\n    iVar1 = param_1[1] - uVar2;\n    param_1[1] = iVar1;\n    return iVar1 + *param_1;\n  }" if (parenthesized_expression "((int)uVar2 <= param_1[1])" ( (binary_expression "(int)uVar2 <= param_1[1]" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) <= (subscript_expression "param_1[1]" identifier [ number_literal ])) )) (compound_statement "{\n    iVar1 = param_1[1] - uVar2;\n    param_1[1] = iVar1;\n    return iVar1 + *param_1;\n  }" { (expression_statement "iVar1 = param_1[1] - uVar2;" (assignment_expression "iVar1 = param_1[1] - uVar2" identifier = (binary_expression "param_1[1] - uVar2" (subscript_expression "param_1[1]" identifier [ number_literal ]) - identifier)) ;) (expression_statement "param_1[1] = iVar1;" (assignment_expression "param_1[1] = iVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (return_statement "return iVar1 + *param_1;" return (binary_expression "iVar1 + *param_1" identifier + (pointer_expression "*param_1" * identifier)) ;) })) (expression_statement "param_1[2] = param_1[2] + uVar2;" (assignment_expression "param_1[2] = param_1[2] + uVar2" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (binary_expression "param_1[2] + uVar2" (subscript_expression "param_1[2]" identifier [ number_literal ]) + identifier)) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "void * __regparm3 allocSpace(ReusableSpace *p,void *pBuf,int nByte)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = (int)pBuf + 7U & 0xfffffff8;\n  if ((int)uVar2 <= p->nFree) {\n    iVar1 = p->nFree - uVar2;\n    p->nFree = iVar1;\n    return p->pSpace + iVar1;\n  }\n  p->nNeeded = p->nNeeded + uVar2;\n  return (void *)0x0;\n}\n\n" (function_definition "void * __regparm3 allocSpace(ReusableSpace *p,void *pBuf,int nByte)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = (int)pBuf + 7U & 0xfffffff8;\n  if ((int)uVar2 <= p->nFree) {\n    iVar1 = p->nFree - uVar2;\n    p->nFree = iVar1;\n    return p->pSpace + iVar1;\n  }\n  p->nNeeded = p->nNeeded + uVar2;\n  return (void *)0x0;\n}" primitive_type (pointer_declarator "* __regparm3 allocSpace(ReusableSpace *p,void *pBuf,int nByte)" * (ERROR "__regparm3" identifier) (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  int iVar1;\n  uint uVar2;\n  \n  uVar2 = (int)pBuf + 7U & 0xfffffff8;\n  if ((int)uVar2 <= p->nFree) {\n    iVar1 = p->nFree - uVar2;\n    p->nFree = iVar1;\n    return p->pSpace + iVar1;\n  }\n  p->nNeeded = p->nNeeded + uVar2;\n  return (void *)0x0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = (int)pBuf + 7U & 0xfffffff8;" (assignment_expression "uVar2 = (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)uVar2 <= p->nFree) {\n    iVar1 = p->nFree - uVar2;\n    p->nFree = iVar1;\n    return p->pSpace + iVar1;\n  }" if (parenthesized_expression "((int)uVar2 <= p->nFree)" ( (binary_expression "(int)uVar2 <= p->nFree" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) <= (field_expression "p->nFree" identifier -> field_identifier)) )) (compound_statement "{\n    iVar1 = p->nFree - uVar2;\n    p->nFree = iVar1;\n    return p->pSpace + iVar1;\n  }" { (expression_statement "iVar1 = p->nFree - uVar2;" (assignment_expression "iVar1 = p->nFree - uVar2" identifier = (binary_expression "p->nFree - uVar2" (field_expression "p->nFree" identifier -> field_identifier) - identifier)) ;) (expression_statement "p->nFree = iVar1;" (assignment_expression "p->nFree = iVar1" (field_expression "p->nFree" identifier -> field_identifier) = identifier) ;) (return_statement "return p->pSpace + iVar1;" return (binary_expression "p->pSpace + iVar1" (field_expression "p->pSpace" identifier -> field_identifier) + identifier) ;) })) (expression_statement "p->nNeeded = p->nNeeded + uVar2;" (assignment_expression "p->nNeeded = p->nNeeded + uVar2" (field_expression "p->nNeeded" identifier -> field_identifier) = (binary_expression "p->nNeeded + uVar2" (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 __regparm3 FUN_0002d700(int *param_1,int param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = param_2 + 7U & 0xfffffff8;\n  if ((int)uVar2 <= param_1[1]) {\n    iVar1 = param_1[1] - uVar2;\n    param_1[1] = iVar1;\n    return iVar1 + *param_1;\n  }\n  param_1[2] = param_1[2] + uVar2;\n  return 0;\n}\n\n" (function_definition "int __regparm3 FUN_0002d700(int *param_1,int param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = param_2 + 7U & 0xfffffff8;\n  if ((int)uVar2 <= param_1[1]) {\n    iVar1 = param_1[1] - uVar2;\n    param_1[1] = iVar1;\n    return iVar1 + *param_1;\n  }\n  param_1[2] = param_1[2] + uVar2;\n  return 0;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0002d700(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  int iVar1;\n  uint uVar2;\n  \n  uVar2 = param_2 + 7U & 0xfffffff8;\n  if ((int)uVar2 <= param_1[1]) {\n    iVar1 = param_1[1] - uVar2;\n    param_1[1] = iVar1;\n    return iVar1 + *param_1;\n  }\n  param_1[2] = param_1[2] + uVar2;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = param_2 + 7U & 0xfffffff8;" (assignment_expression "uVar2 = 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)uVar2 <= param_1[1]) {\n    iVar1 = param_1[1] - uVar2;\n    param_1[1] = iVar1;\n    return iVar1 + *param_1;\n  }" if (parenthesized_expression "((int)uVar2 <= param_1[1])" ( (binary_expression "(int)uVar2 <= param_1[1]" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) <= (subscript_expression "param_1[1]" identifier [ number_literal ])) )) (compound_statement "{\n    iVar1 = param_1[1] - uVar2;\n    param_1[1] = iVar1;\n    return iVar1 + *param_1;\n  }" { (expression_statement "iVar1 = param_1[1] - uVar2;" (assignment_expression "iVar1 = param_1[1] - uVar2" identifier = (binary_expression "param_1[1] - uVar2" (subscript_expression "param_1[1]" identifier [ number_literal ]) - identifier)) ;) (expression_statement "param_1[1] = iVar1;" (assignment_expression "param_1[1] = iVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (return_statement "return iVar1 + *param_1;" return (binary_expression "iVar1 + *param_1" identifier + (pointer_expression "*param_1" * identifier)) ;) })) (expression_statement "param_1[2] = param_1[2] + uVar2;" (assignment_expression "param_1[2] = param_1[2] + uVar2" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (binary_expression "param_1[2] + uVar2" (subscript_expression "param_1[2]" identifier [ number_literal ]) + identifier)) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (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 IDENT + (pointer_expression * IDENT)) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) + IDENT)) ;) (return_statement return LIT ;) })))
(function_definition "int __regparm3 FUN_0002d700(int *param_1,int param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = param_2 + 7U & 0xfffffff8;\n  if ((int)uVar2 <= param_1[1]) {\n    iVar1 = param_1[1] - uVar2;\n    param_1[1] = iVar1;\n    return iVar1 + *param_1;\n  }\n  param_1[2] = param_1[2] + uVar2;\n  return 0;\n}" (primitive_type "int") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0002d700(int *param_1,int param_2)" (identifier "FUN_0002d700") (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  int iVar1;\n  uint uVar2;\n  \n  uVar2 = param_2 + 7U & 0xfffffff8;\n  if ((int)uVar2 <= param_1[1]) {\n    iVar1 = param_1[1] - uVar2;\n    param_1[1] = iVar1;\n    return iVar1 + *param_1;\n  }\n  param_1[2] = param_1[2] + uVar2;\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (expression_statement "uVar2 = param_2 + 7U & 0xfffffff8;" (assignment_expression "uVar2 = param_2 + 7U & 0xfffffff8" (identifier "uVar2") (= "=") (binary_expression "param_2 + 7U & 0xfffffff8" (binary_expression "param_2 + 7U" (identifier "param_2") (+ "+") (number_literal "7U")) (& "&") (number_literal "0xfffffff8"))) (; ";")) (if_statement "if ((int)uVar2 <= param_1[1]) {\n    iVar1 = param_1[1] - uVar2;\n    param_1[1] = iVar1;\n    return iVar1 + *param_1;\n  }" (if "if") (parenthesized_expression "((int)uVar2 <= param_1[1])" (( "(") (binary_expression "(int)uVar2 <= param_1[1]" (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2")) (<= "<=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) () ")")) (compound_statement "{\n    iVar1 = param_1[1] - uVar2;\n    param_1[1] = iVar1;\n    return iVar1 + *param_1;\n  }" ({ "{") (expression_statement "iVar1 = param_1[1] - uVar2;" (assignment_expression "iVar1 = param_1[1] - uVar2" (identifier "iVar1") (= "=") (binary_expression "param_1[1] - uVar2" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (- "-") (identifier "uVar2"))) (; ";")) (expression_statement "param_1[1] = iVar1;" (assignment_expression "param_1[1] = iVar1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "iVar1")) (; ";")) (return_statement "return iVar1 + *param_1;" (return "return") (binary_expression "iVar1 + *param_1" (identifier "iVar1") (+ "+") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (} "}"))) (expression_statement "param_1[2] = param_1[2] + uVar2;" (assignment_expression "param_1[2] = param_1[2] + uVar2" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (binary_expression "param_1[2] + uVar2" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (+ "+") (identifier "uVar2"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

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

{
  int var_2;
  type_2 var_1;
  
  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) (ERROR (identifier)) 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: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) 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: (identifier) right: (pointer_expression argument: (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 __regparm3 MASKED(int *param_1,int param_2)

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

