
void __regparm3 btreeParseCellAdjustSizeForOverflow(MemPage *pPage,u8 *pCell,CellInfo *pInfo)

{
  int iVar1;
  ushort uVar2;
  
  uVar2 = pPage->minLocal;
  iVar1 = (pInfo->nPayload - (uint)uVar2) % (pPage->pBt->usableSize - 4) + (uint)uVar2;
  if (iVar1 <= (int)(uint)pPage->maxLocal) {
    uVar2 = (ushort)iVar1;
  }
  pInfo->nLocal = uVar2;
  pInfo->nSize = ((uVar2 + (short)pInfo->pPayload) - (short)pCell) + 4;
  return;
}



void __regparm3 FUN_0001b2e0(int param_1,short param_2,int param_3)

{
  int iVar1;
  ushort uVar2;
  
  uVar2 = *(ushort *)(param_1 + 0x10);
  iVar1 = (*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)
          + (uint)uVar2;
  if (iVar1 <= (int)(uint)*(ushort *)(param_1 + 0xe)) {
    uVar2 = (ushort)iVar1;
  }
  *(ushort *)(param_3 + 0x10) = uVar2;
  *(ushort *)(param_3 + 0x12) = ((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2) + 4;
  return;
}


PUSH EBP
PUSH EDI
MOV EDI,EDX
PUSH ESI
MOV ESI,EAX
PUSH EBX
SUB ESP,0x4
MOV EDX,dword ptr [ESI + 0x34]
MOVZX EBX,word ptr [EAX + 0x10]
MOV EAX,dword ptr [ECX + 0xc]
MOV EDX,dword ptr [EDX + 0x24]
MOV EBP,EBX
SUB EAX,EBX
SUB EDX,0x4
MOV dword ptr [ESP],EDX
XOR EDX,EDX
DIV dword ptr [ESP]
MOVZX EAX,word ptr [ESI + 0xe]
ADD EDX,EBX
CMP EAX,EDX
JL 0x0001b316
MOV EBP,EDX
MOVZX EBX,DX
ADD EBX,dword ptr [ECX + 0x8]
MOV word ptr [ECX + 0x10],BP
SUB EBX,EDI
ADD EBX,0x4
MOV word ptr [ECX + 0x12],BX
ADD ESP,0x4
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "void __regparm3 FUN_0001b2e0(int param_1,short param_2,int param_3)\n\n{\n  int iVar1;\n  ushort uVar2;\n  \n  uVar2 = *(ushort *)(param_1 + 0x10);\n  iVar1 = (*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)\n          + (uint)uVar2;\n  if (iVar1 <= (int)(uint)*(ushort *)(param_1 + 0xe)) {\n    uVar2 = (ushort)iVar1;\n  }\n  *(ushort *)(param_3 + 0x10) = uVar2;\n  *(ushort *)(param_3 + 0x12) = ((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2) + 4;\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_0001b2e0(int param_1,short param_2,int param_3)\n\n{\n  int iVar1;\n  ushort uVar2;\n  \n  uVar2 = *(ushort *)(param_1 + 0x10);\n  iVar1 = (*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)\n          + (uint)uVar2;\n  if (iVar1 <= (int)(uint)*(ushort *)(param_1 + 0xe)) {\n    uVar2 = (ushort)iVar1;\n  }\n  *(ushort *)(param_3 + 0x10) = uVar2;\n  *(ushort *)(param_3 + 0x12) = ((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2) + 4;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0001b2e0(int param_1,short param_2,int param_3)" identifier (parameter_list "(int param_1,short param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "short param_2" (sized_type_specifier "short" short) identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  ushort uVar2;\n  \n  uVar2 = *(ushort *)(param_1 + 0x10);\n  iVar1 = (*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)\n          + (uint)uVar2;\n  if (iVar1 <= (int)(uint)*(ushort *)(param_1 + 0xe)) {\n    uVar2 = (ushort)iVar1;\n  }\n  *(ushort *)(param_3 + 0x10) = uVar2;\n  *(ushort *)(param_3 + 0x12) = ((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2) + 4;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "ushort uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = *(ushort *)(param_1 + 0x10);" (assignment_expression "uVar2 = *(ushort *)(param_1 + 0x10)" identifier = (pointer_expression "*(ushort *)(param_1 + 0x10)" * (cast_expression "(ushort *)(param_1 + 0x10)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = (*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)\n          + (uint)uVar2;" (assignment_expression "iVar1 = (*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)\n          + (uint)uVar2" identifier = (binary_expression "(*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)\n          + (uint)uVar2" (binary_expression "(*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)" (parenthesized_expression "(*(int *)(param_3 + 0xc) - (uint)uVar2)" ( (binary_expression "*(int *)(param_3 + 0xc) - (uint)uVar2" (pointer_expression "*(int *)(param_3 + 0xc)" * (cast_expression "(int *)(param_3 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc)" ( (binary_expression "param_3 + 0xc" identifier + number_literal) )))) - (cast_expression "(uint)uVar2" ( (type_descriptor "uint" type_identifier) ) identifier)) )) % (parenthesized_expression "(*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)" ( (binary_expression "*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U" (pointer_expression "*(int *)(*(int *)(param_1 + 0x34) + 0x24)" * (cast_expression "(int *)(*(int *)(param_1 + 0x34) + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x24)" ( (binary_expression "*(int *)(param_1 + 0x34) + 0x24" (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) + number_literal) )))) - number_literal) ))) + (cast_expression "(uint)uVar2" ( (type_descriptor "uint" type_identifier) ) identifier))) ;) (if_statement "if (iVar1 <= (int)(uint)*(ushort *)(param_1 + 0xe)) {\n    uVar2 = (ushort)iVar1;\n  }" if (parenthesized_expression "(iVar1 <= (int)(uint)*(ushort *)(param_1 + 0xe))" ( (binary_expression "iVar1 <= (int)(uint)*(ushort *)(param_1 + 0xe)" identifier <= (binary_expression "(int)(uint)*(ushort *)(param_1 + 0xe)" (cast_expression "(int)(uint)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uint)" ( identifier ))) * (cast_expression "(ushort *)(param_1 + 0xe)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe)" ( (binary_expression "param_1 + 0xe" identifier + number_literal) ))))) )) (compound_statement "{\n    uVar2 = (ushort)iVar1;\n  }" { (expression_statement "uVar2 = (ushort)iVar1;" (assignment_expression "uVar2 = (ushort)iVar1" identifier = (cast_expression "(ushort)iVar1" ( (type_descriptor "ushort" type_identifier) ) identifier)) ;) })) (expression_statement "*(ushort *)(param_3 + 0x10) = uVar2;" (assignment_expression "*(ushort *)(param_3 + 0x10) = uVar2" (pointer_expression "*(ushort *)(param_3 + 0x10)" * (cast_expression "(ushort *)(param_3 + 0x10)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x10)" ( (binary_expression "param_3 + 0x10" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(ushort *)(param_3 + 0x12) = ((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2) + 4;" (assignment_expression "*(ushort *)(param_3 + 0x12) = ((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2) + 4" (pointer_expression "*(ushort *)(param_3 + 0x12)" * (cast_expression "(ushort *)(param_3 + 0x12)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x12)" ( (binary_expression "param_3 + 0x12" identifier + number_literal) )))) = (binary_expression "((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2) + 4" (parenthesized_expression "((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2)" ( (binary_expression "(uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2" (parenthesized_expression "(uVar2 + (short)*(undefined4 *)(param_3 + 8))" ( (binary_expression "uVar2 + (short)*(undefined4 *)(param_3 + 8)" identifier + (cast_expression "(short)*(undefined4 *)(param_3 + 8)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (pointer_expression "*(undefined4 *)(param_3 + 8)" * (cast_expression "(undefined4 *)(param_3 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 8)" ( (binary_expression "param_3 + 8" identifier + number_literal) )))))) )) - identifier) )) + number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 btreeParseCellAdjustSizeForOverflow(MemPage *pPage,u8 *pCell,CellInfo *pInfo)\n\n{\n  int iVar1;\n  ushort uVar2;\n  \n  uVar2 = pPage->minLocal;\n  iVar1 = (pInfo->nPayload - (uint)uVar2) % (pPage->pBt->usableSize - 4) + (uint)uVar2;\n  if (iVar1 <= (int)(uint)pPage->maxLocal) {\n    uVar2 = (ushort)iVar1;\n  }\n  pInfo->nLocal = uVar2;\n  pInfo->nSize = ((uVar2 + (short)pInfo->pPayload) - (short)pCell) + 4;\n  return;\n}\n\n" (function_definition "void __regparm3 btreeParseCellAdjustSizeForOverflow(MemPage *pPage,u8 *pCell,CellInfo *pInfo)\n\n{\n  int iVar1;\n  ushort uVar2;\n  \n  uVar2 = pPage->minLocal;\n  iVar1 = (pInfo->nPayload - (uint)uVar2) % (pPage->pBt->usableSize - 4) + (uint)uVar2;\n  if (iVar1 <= (int)(uint)pPage->maxLocal) {\n    uVar2 = (ushort)iVar1;\n  }\n  pInfo->nLocal = uVar2;\n  pInfo->nSize = ((uVar2 + (short)pInfo->pPayload) - (short)pCell) + 4;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "btreeParseCellAdjustSizeForOverflow(MemPage *pPage,u8 *pCell,CellInfo *pInfo)" identifier (parameter_list "(MemPage *pPage,u8 *pCell,CellInfo *pInfo)" ( (parameter_declaration "MemPage *pPage" type_identifier (pointer_declarator "*pPage" * identifier)) , (parameter_declaration "u8 *pCell" type_identifier (pointer_declarator "*pCell" * identifier)) , (parameter_declaration "CellInfo *pInfo" type_identifier (pointer_declarator "*pInfo" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  ushort uVar2;\n  \n  uVar2 = pPage->minLocal;\n  iVar1 = (pInfo->nPayload - (uint)uVar2) % (pPage->pBt->usableSize - 4) + (uint)uVar2;\n  if (iVar1 <= (int)(uint)pPage->maxLocal) {\n    uVar2 = (ushort)iVar1;\n  }\n  pInfo->nLocal = uVar2;\n  pInfo->nSize = ((uVar2 + (short)pInfo->pPayload) - (short)pCell) + 4;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "ushort uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = pPage->minLocal;" (assignment_expression "uVar2 = pPage->minLocal" identifier = (field_expression "pPage->minLocal" identifier -> field_identifier)) ;) (expression_statement "iVar1 = (pInfo->nPayload - (uint)uVar2) % (pPage->pBt->usableSize - 4) + (uint)uVar2;" (assignment_expression "iVar1 = (pInfo->nPayload - (uint)uVar2) % (pPage->pBt->usableSize - 4) + (uint)uVar2" identifier = (binary_expression "(pInfo->nPayload - (uint)uVar2) % (pPage->pBt->usableSize - 4) + (uint)uVar2" (binary_expression "(pInfo->nPayload - (uint)uVar2) % (pPage->pBt->usableSize - 4)" (parenthesized_expression "(pInfo->nPayload - (uint)uVar2)" ( (binary_expression "pInfo->nPayload - (uint)uVar2" (field_expression "pInfo->nPayload" identifier -> field_identifier) - (cast_expression "(uint)uVar2" ( (type_descriptor "uint" type_identifier) ) identifier)) )) % (parenthesized_expression "(pPage->pBt->usableSize - 4)" ( (binary_expression "pPage->pBt->usableSize - 4" (field_expression "pPage->pBt->usableSize" (field_expression "pPage->pBt" identifier -> field_identifier) -> field_identifier) - number_literal) ))) + (cast_expression "(uint)uVar2" ( (type_descriptor "uint" type_identifier) ) identifier))) ;) (if_statement "if (iVar1 <= (int)(uint)pPage->maxLocal) {\n    uVar2 = (ushort)iVar1;\n  }" if (parenthesized_expression "(iVar1 <= (int)(uint)pPage->maxLocal)" ( (binary_expression "iVar1 <= (int)(uint)pPage->maxLocal" identifier <= (cast_expression "(int)(uint)pPage->maxLocal" ( (type_descriptor "int" primitive_type) ) (cast_expression "(uint)pPage->maxLocal" ( (type_descriptor "uint" type_identifier) ) (field_expression "pPage->maxLocal" identifier -> field_identifier)))) )) (compound_statement "{\n    uVar2 = (ushort)iVar1;\n  }" { (expression_statement "uVar2 = (ushort)iVar1;" (assignment_expression "uVar2 = (ushort)iVar1" identifier = (cast_expression "(ushort)iVar1" ( (type_descriptor "ushort" type_identifier) ) identifier)) ;) })) (expression_statement "pInfo->nLocal = uVar2;" (assignment_expression "pInfo->nLocal = uVar2" (field_expression "pInfo->nLocal" identifier -> field_identifier) = identifier) ;) (expression_statement "pInfo->nSize = ((uVar2 + (short)pInfo->pPayload) - (short)pCell) + 4;" (assignment_expression "pInfo->nSize = ((uVar2 + (short)pInfo->pPayload) - (short)pCell) + 4" (field_expression "pInfo->nSize" identifier -> field_identifier) = (binary_expression "((uVar2 + (short)pInfo->pPayload) - (short)pCell) + 4" (parenthesized_expression "((uVar2 + (short)pInfo->pPayload) - (short)pCell)" ( (binary_expression "(uVar2 + (short)pInfo->pPayload) - (short)pCell" (parenthesized_expression "(uVar2 + (short)pInfo->pPayload)" ( (binary_expression "uVar2 + (short)pInfo->pPayload" identifier + (cast_expression "(short)pInfo->pPayload" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (field_expression "pInfo->pPayload" identifier -> field_identifier))) )) - (cast_expression "(short)pCell" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) )) + number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_0001b2e0(int param_1,short param_2,int param_3)\n\n{\n  int iVar1;\n  ushort uVar2;\n  \n  uVar2 = *(ushort *)(param_1 + 0x10);\n  iVar1 = (*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)\n          + (uint)uVar2;\n  if (iVar1 <= (int)(uint)*(ushort *)(param_1 + 0xe)) {\n    uVar2 = (ushort)iVar1;\n  }\n  *(ushort *)(param_3 + 0x10) = uVar2;\n  *(ushort *)(param_3 + 0x12) = ((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2) + 4;\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_0001b2e0(int param_1,short param_2,int param_3)\n\n{\n  int iVar1;\n  ushort uVar2;\n  \n  uVar2 = *(ushort *)(param_1 + 0x10);\n  iVar1 = (*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)\n          + (uint)uVar2;\n  if (iVar1 <= (int)(uint)*(ushort *)(param_1 + 0xe)) {\n    uVar2 = (ushort)iVar1;\n  }\n  *(ushort *)(param_3 + 0x10) = uVar2;\n  *(ushort *)(param_3 + 0x12) = ((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2) + 4;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0001b2e0(int param_1,short param_2,int param_3)" identifier (parameter_list "(int param_1,short param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "short param_2" (sized_type_specifier "short" short) identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  ushort uVar2;\n  \n  uVar2 = *(ushort *)(param_1 + 0x10);\n  iVar1 = (*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)\n          + (uint)uVar2;\n  if (iVar1 <= (int)(uint)*(ushort *)(param_1 + 0xe)) {\n    uVar2 = (ushort)iVar1;\n  }\n  *(ushort *)(param_3 + 0x10) = uVar2;\n  *(ushort *)(param_3 + 0x12) = ((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2) + 4;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "ushort uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = *(ushort *)(param_1 + 0x10);" (assignment_expression "uVar2 = *(ushort *)(param_1 + 0x10)" identifier = (pointer_expression "*(ushort *)(param_1 + 0x10)" * (cast_expression "(ushort *)(param_1 + 0x10)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = (*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)\n          + (uint)uVar2;" (assignment_expression "iVar1 = (*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)\n          + (uint)uVar2" identifier = (binary_expression "(*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)\n          + (uint)uVar2" (binary_expression "(*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)" (parenthesized_expression "(*(int *)(param_3 + 0xc) - (uint)uVar2)" ( (binary_expression "*(int *)(param_3 + 0xc) - (uint)uVar2" (pointer_expression "*(int *)(param_3 + 0xc)" * (cast_expression "(int *)(param_3 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc)" ( (binary_expression "param_3 + 0xc" identifier + number_literal) )))) - (cast_expression "(uint)uVar2" ( (type_descriptor "uint" type_identifier) ) identifier)) )) % (parenthesized_expression "(*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)" ( (binary_expression "*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U" (pointer_expression "*(int *)(*(int *)(param_1 + 0x34) + 0x24)" * (cast_expression "(int *)(*(int *)(param_1 + 0x34) + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x24)" ( (binary_expression "*(int *)(param_1 + 0x34) + 0x24" (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) + number_literal) )))) - number_literal) ))) + (cast_expression "(uint)uVar2" ( (type_descriptor "uint" type_identifier) ) identifier))) ;) (if_statement "if (iVar1 <= (int)(uint)*(ushort *)(param_1 + 0xe)) {\n    uVar2 = (ushort)iVar1;\n  }" if (parenthesized_expression "(iVar1 <= (int)(uint)*(ushort *)(param_1 + 0xe))" ( (binary_expression "iVar1 <= (int)(uint)*(ushort *)(param_1 + 0xe)" identifier <= (binary_expression "(int)(uint)*(ushort *)(param_1 + 0xe)" (cast_expression "(int)(uint)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uint)" ( identifier ))) * (cast_expression "(ushort *)(param_1 + 0xe)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe)" ( (binary_expression "param_1 + 0xe" identifier + number_literal) ))))) )) (compound_statement "{\n    uVar2 = (ushort)iVar1;\n  }" { (expression_statement "uVar2 = (ushort)iVar1;" (assignment_expression "uVar2 = (ushort)iVar1" identifier = (cast_expression "(ushort)iVar1" ( (type_descriptor "ushort" type_identifier) ) identifier)) ;) })) (expression_statement "*(ushort *)(param_3 + 0x10) = uVar2;" (assignment_expression "*(ushort *)(param_3 + 0x10) = uVar2" (pointer_expression "*(ushort *)(param_3 + 0x10)" * (cast_expression "(ushort *)(param_3 + 0x10)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x10)" ( (binary_expression "param_3 + 0x10" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(ushort *)(param_3 + 0x12) = ((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2) + 4;" (assignment_expression "*(ushort *)(param_3 + 0x12) = ((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2) + 4" (pointer_expression "*(ushort *)(param_3 + 0x12)" * (cast_expression "(ushort *)(param_3 + 0x12)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x12)" ( (binary_expression "param_3 + 0x12" identifier + number_literal) )))) = (binary_expression "((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2) + 4" (parenthesized_expression "((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2)" ( (binary_expression "(uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2" (parenthesized_expression "(uVar2 + (short)*(undefined4 *)(param_3 + 8))" ( (binary_expression "uVar2 + (short)*(undefined4 *)(param_3 + 8)" identifier + (cast_expression "(short)*(undefined4 *)(param_3 + 8)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (pointer_expression "*(undefined4 *)(param_3 + 8)" * (cast_expression "(undefined4 *)(param_3 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 8)" ( (binary_expression "param_3 + 8" identifier + number_literal) )))))) )) - identifier) )) + number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier short) IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) % (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) - LIT) ))) + (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( IDENT ))) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT + (cast_expression ( (type_descriptor (sized_type_specifier short)) ) (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) )) - IDENT) )) + LIT)) ;) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_0001b2e0(int param_1,short param_2,int param_3)\n\n{\n  int iVar1;\n  ushort uVar2;\n  \n  uVar2 = *(ushort *)(param_1 + 0x10);\n  iVar1 = (*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)\n          + (uint)uVar2;\n  if (iVar1 <= (int)(uint)*(ushort *)(param_1 + 0xe)) {\n    uVar2 = (ushort)iVar1;\n  }\n  *(ushort *)(param_3 + 0x10) = uVar2;\n  *(ushort *)(param_3 + 0x12) = ((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2) + 4;\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0001b2e0(int param_1,short param_2,int param_3)" (identifier "FUN_0001b2e0") (parameter_list "(int param_1,short param_2,int param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "short param_2" (sized_type_specifier "short" (short "short")) (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  ushort uVar2;\n  \n  uVar2 = *(ushort *)(param_1 + 0x10);\n  iVar1 = (*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)\n          + (uint)uVar2;\n  if (iVar1 <= (int)(uint)*(ushort *)(param_1 + 0xe)) {\n    uVar2 = (ushort)iVar1;\n  }\n  *(ushort *)(param_3 + 0x10) = uVar2;\n  *(ushort *)(param_3 + 0x12) = ((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2) + 4;\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "ushort uVar2;" (type_identifier "ushort") (identifier "uVar2") (; ";")) (expression_statement "uVar2 = *(ushort *)(param_1 + 0x10);" (assignment_expression "uVar2 = *(ushort *)(param_1 + 0x10)" (identifier "uVar2") (= "=") (pointer_expression "*(ushort *)(param_1 + 0x10)" (* "*") (cast_expression "(ushort *)(param_1 + 0x10)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (expression_statement "iVar1 = (*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)\n          + (uint)uVar2;" (assignment_expression "iVar1 = (*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)\n          + (uint)uVar2" (identifier "iVar1") (= "=") (binary_expression "(*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)\n          + (uint)uVar2" (binary_expression "(*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)" (parenthesized_expression "(*(int *)(param_3 + 0xc) - (uint)uVar2)" (( "(") (binary_expression "*(int *)(param_3 + 0xc) - (uint)uVar2" (pointer_expression "*(int *)(param_3 + 0xc)" (* "*") (cast_expression "(int *)(param_3 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0xc)" (( "(") (binary_expression "param_3 + 0xc" (identifier "param_3") (+ "+") (number_literal "0xc")) () ")")))) (- "-") (cast_expression "(uint)uVar2" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "uVar2"))) () ")")) (% "%") (parenthesized_expression "(*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)" (( "(") (binary_expression "*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U" (pointer_expression "*(int *)(*(int *)(param_1 + 0x34) + 0x24)" (* "*") (cast_expression "(int *)(*(int *)(param_1 + 0x34) + 0x24)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x24)" (( "(") (binary_expression "*(int *)(param_1 + 0x34) + 0x24" (pointer_expression "*(int *)(param_1 + 0x34)" (* "*") (cast_expression "(int *)(param_1 + 0x34)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x34)" (( "(") (binary_expression "param_1 + 0x34" (identifier "param_1") (+ "+") (number_literal "0x34")) () ")")))) (+ "+") (number_literal "0x24")) () ")")))) (- "-") (number_literal "4U")) () ")"))) (+ "+") (cast_expression "(uint)uVar2" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "uVar2")))) (; ";")) (if_statement "if (iVar1 <= (int)(uint)*(ushort *)(param_1 + 0xe)) {\n    uVar2 = (ushort)iVar1;\n  }" (if "if") (parenthesized_expression "(iVar1 <= (int)(uint)*(ushort *)(param_1 + 0xe))" (( "(") (binary_expression "iVar1 <= (int)(uint)*(ushort *)(param_1 + 0xe)" (identifier "iVar1") (<= "<=") (binary_expression "(int)(uint)*(ushort *)(param_1 + 0xe)" (cast_expression "(int)(uint)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")"))) (* "*") (cast_expression "(ushort *)(param_1 + 0xe)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xe)" (( "(") (binary_expression "param_1 + 0xe" (identifier "param_1") (+ "+") (number_literal "0xe")) () ")"))))) () ")")) (compound_statement "{\n    uVar2 = (ushort)iVar1;\n  }" ({ "{") (expression_statement "uVar2 = (ushort)iVar1;" (assignment_expression "uVar2 = (ushort)iVar1" (identifier "uVar2") (= "=") (cast_expression "(ushort)iVar1" (( "(") (type_descriptor "ushort" (type_identifier "ushort")) () ")") (identifier "iVar1"))) (; ";")) (} "}"))) (expression_statement "*(ushort *)(param_3 + 0x10) = uVar2;" (assignment_expression "*(ushort *)(param_3 + 0x10) = uVar2" (pointer_expression "*(ushort *)(param_3 + 0x10)" (* "*") (cast_expression "(ushort *)(param_3 + 0x10)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0x10)" (( "(") (binary_expression "param_3 + 0x10" (identifier "param_3") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "*(ushort *)(param_3 + 0x12) = ((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2) + 4;" (assignment_expression "*(ushort *)(param_3 + 0x12) = ((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2) + 4" (pointer_expression "*(ushort *)(param_3 + 0x12)" (* "*") (cast_expression "(ushort *)(param_3 + 0x12)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0x12)" (( "(") (binary_expression "param_3 + 0x12" (identifier "param_3") (+ "+") (number_literal "0x12")) () ")")))) (= "=") (binary_expression "((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2) + 4" (parenthesized_expression "((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2)" (( "(") (binary_expression "(uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2" (parenthesized_expression "(uVar2 + (short)*(undefined4 *)(param_3 + 8))" (( "(") (binary_expression "uVar2 + (short)*(undefined4 *)(param_3 + 8)" (identifier "uVar2") (+ "+") (cast_expression "(short)*(undefined4 *)(param_3 + 8)" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (pointer_expression "*(undefined4 *)(param_3 + 8)" (* "*") (cast_expression "(undefined4 *)(param_3 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 8)" (( "(") (binary_expression "param_3 + 8" (identifier "param_3") (+ "+") (number_literal "8")) () ")")))))) () ")")) (- "-") (identifier "param_2")) () ")")) (+ "+") (number_literal "4"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

void __regparm3 function_1(type_1 *pPage,type_2 *pCell,type_3 *pInfo)

{
  int var_1;
  type_4 var_2;
  
  var_2 = pPage->minLocal;
  var_1 = (pInfo->nPayload - (type_5)var_2) % (pPage->pBt->usableSize - 4) + (type_5)var_2;
  if (var_1 <= (int)(type_5)pPage->maxLocal) {
    var_2 = (type_4)var_1;
  }
  pInfo->nLocal = var_2;
  pInfo->nSize = ((var_2 + (short)pInfo->pPayload) - (short)pCell) + 4;
  return;
}


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

void __regparm3 MASKED(int param_1,short param_2,int param_3)

{
  int iVar1;
  ushort uVar2;
  
  uVar2 = *(ushort *)(param_1 + 0x10);
  iVar1 = (*(int *)(param_3 + 0xc) - (uint)uVar2) % (*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4U)
          + (uint)uVar2;
  if (iVar1 <= (int)(uint)*(ushort *)(param_1 + 0xe)) {
    uVar2 = (ushort)iVar1;
  }
  *(ushort *)(param_3 + 0x10) = uVar2;
  *(ushort *)(param_3 + 0x12) = ((uVar2 + (short)*(undefined4 *)(param_3 + 8)) - param_2) + 4;
  return;
}

