
/* WARNING: Removing unreachable block (ram,0x00068620) */

int __regparm3 sqlite3VdbeMemFromBtree(BtCursor *pCur,u32 offset,u32 amt,Mem *pMem)

{
  uint uVar1;
  uint uVar2;
  int iVar3;
  char *offset_00;
  uchar *in_stack_ffffffcc;
  int in_stack_ffffffd0;
  
  uVar1 = pCur->pBt->nPage;
  uVar2 = pCur->pBt->pageSize;
  pMem->flags = 1;
  if ((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) < (longlong)(ulonglong)(offset + amt)) {
    iVar3 = sqlite3CorruptError(0x12cd7);
    return iVar3;
  }
  if (pMem->szMalloc < (int)(amt + 1)) {
    in_stack_ffffffd0 = 0x68689;
    iVar3 = sqlite3VdbeMemGrow(pMem,amt + 1,0);
    if (iVar3 != 0) {
      return iVar3;
    }
    offset_00 = pMem->z;
  }
  else {
    offset_00 = pMem->zMalloc;
    pMem->z = offset_00;
  }
  iVar3 = accessPayload(pCur,(u32)offset_00,0,in_stack_ffffffcc,in_stack_ffffffd0);
  if (iVar3 != 0) {
    if (((pMem->flags & 0x2400) != 0) || (pMem->szMalloc != 0)) {
      vdbeMemClear(pMem);
    }
    return iVar3;
  }
  pMem->z[amt] = '\0';
  pMem->flags = 0x10;
  pMem->n = amt;
  return 0;
}



/* WARNING: Removing unreachable block (ram,0x00068620) */

int __regparm3 FUN_000685d0(int param_1,int param_2,int param_3,int param_4)

{
  uint uVar1;
  uint uVar2;
  int iVar3;
  undefined4 uVar4;
  
  uVar1 = *(uint *)(*(int *)(param_1 + 0x14) + 0x30);
  uVar2 = *(uint *)(*(int *)(param_1 + 0x14) + 0x24);
  *(undefined2 *)(param_4 + 8) = 1;
  if ((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) <
      (longlong)(ulonglong)(uint)(param_2 + param_3)) {
    iVar3 = FUN_000383f0();
    return iVar3;
  }
  if (*(int *)(param_4 + 0x18) < param_3 + 1) {
    iVar3 = FUN_000307e0();
    if (iVar3 != 0) {
      return iVar3;
    }
    uVar4 = *(undefined4 *)(param_4 + 0x10);
  }
  else {
    uVar4 = *(undefined4 *)(param_4 + 0x14);
    *(undefined4 *)(param_4 + 0x10) = uVar4;
  }
  iVar3 = FUN_00067520(uVar4,0);
  if (iVar3 != 0) {
    if (((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)) {
      FUN_00024b80();
    }
    return iVar3;
  }
  *(undefined1 *)(*(int *)(param_4 + 0x10) + param_3) = 0;
  *(undefined2 *)(param_4 + 8) = 0x10;
  *(int *)(param_4 + 0xc) = param_3;
  return 0;
}


PUSH EBP
PUSH EDI
MOV EDI,EDX
PUSH ESI
PUSH EBX
MOV ESI,EAX
MOV EBP,0x1
SUB ESP,0x1c
MOV EDX,dword ptr [EAX + 0x14]
MOV EBX,dword ptr [ESP + 0x30]
MOV dword ptr [ESP + 0xc],0x0
MOV EAX,dword ptr [EDX + 0x30]
MUL dword ptr [EDX + 0x24]
MOV word ptr [EBX + 0x8],BP
LEA EBP,[EDI + ECX*0x1]
CMP dword ptr [ESP + 0xc],EDX
MOV dword ptr [ESP + 0x8],EBP
JL 0x00068624
JLE 0x00068620
ADD ESP,0x1c
MOV EAX,0x12cd7
POP EBX
POP ESI
POP EDI
POP EBP
JMP 0x000383f0
CMP EBP,EAX
JA 0x00068608
LEA EDX,[ECX + 0x1]
CMP EDX,dword ptr [EBX + 0x18]
MOV EBP,ECX
JG 0x00068680
MOV EAX,dword ptr [EBX + 0x14]
MOV dword ptr [EBX + 0x10],EAX
SUB ESP,0x8
MOV EDX,EDI
MOV ECX,EBP
PUSH 0x0
PUSH EAX
MOV EAX,ESI
CALL 0x00067520
ADD ESP,0x10
TEST EAX,EAX
MOV EDX,EAX
JZ 0x00068698
TEST word ptr [EBX + 0x8],0x2400
JNZ 0x0006865d
MOV EAX,dword ptr [EBX + 0x18]
TEST EAX,EAX
JZ 0x0006866c
MOV EAX,EBX
MOV dword ptr [ESP + 0x8],EDX
CALL 0x00024b80
MOV EDX,dword ptr [ESP + 0x8]
ADD ESP,0x1c
MOV EAX,EDX
POP EBX
POP ESI
POP EDI
POP EBP
RET
XOR ECX,ECX
MOV EAX,EBX
CALL 0x000307e0
TEST EAX,EAX
MOV EDX,EAX
JNZ 0x0006866c
MOV EAX,dword ptr [EBX + 0x10]
JMP 0x00068634
MOV EAX,dword ptr [EBX + 0x10]
MOV ECX,0x10
MOV byte ptr [EAX + EBP*0x1],0x0
MOV word ptr [EBX + 0x8],CX
MOV EAX,EDX
MOV dword ptr [EBX + 0xc],EBP
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Removing unreachable block (ram,0x00068620) */\n\nint __regparm3 FUN_000685d0(int param_1,int param_2,int param_3,int param_4)\n\n{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  uVar1 = *(uint *)(*(int *)(param_1 + 0x14) + 0x30);\n  uVar2 = *(uint *)(*(int *)(param_1 + 0x14) + 0x24);\n  *(undefined2 *)(param_4 + 8) = 1;\n  if ((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) <\n      (longlong)(ulonglong)(uint)(param_2 + param_3)) {\n    iVar3 = FUN_000383f0();\n    return iVar3;\n  }\n  if (*(int *)(param_4 + 0x18) < param_3 + 1) {\n    iVar3 = FUN_000307e0();\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    uVar4 = *(undefined4 *)(param_4 + 0x10);\n  }\n  else {\n    uVar4 = *(undefined4 *)(param_4 + 0x14);\n    *(undefined4 *)(param_4 + 0x10) = uVar4;\n  }\n  iVar3 = FUN_00067520(uVar4,0);\n  if (iVar3 != 0) {\n    if (((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)) {\n      FUN_00024b80();\n    }\n    return iVar3;\n  }\n  *(undefined1 *)(*(int *)(param_4 + 0x10) + param_3) = 0;\n  *(undefined2 *)(param_4 + 8) = 0x10;\n  *(int *)(param_4 + 0xc) = param_3;\n  return 0;\n}\n\n" comment (function_definition "int __regparm3 FUN_000685d0(int param_1,int param_2,int param_3,int param_4)\n\n{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  uVar1 = *(uint *)(*(int *)(param_1 + 0x14) + 0x30);\n  uVar2 = *(uint *)(*(int *)(param_1 + 0x14) + 0x24);\n  *(undefined2 *)(param_4 + 8) = 1;\n  if ((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) <\n      (longlong)(ulonglong)(uint)(param_2 + param_3)) {\n    iVar3 = FUN_000383f0();\n    return iVar3;\n  }\n  if (*(int *)(param_4 + 0x18) < param_3 + 1) {\n    iVar3 = FUN_000307e0();\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    uVar4 = *(undefined4 *)(param_4 + 0x10);\n  }\n  else {\n    uVar4 = *(undefined4 *)(param_4 + 0x14);\n    *(undefined4 *)(param_4 + 0x10) = uVar4;\n  }\n  iVar3 = FUN_00067520(uVar4,0);\n  if (iVar3 != 0) {\n    if (((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)) {\n      FUN_00024b80();\n    }\n    return iVar3;\n  }\n  *(undefined1 *)(*(int *)(param_4 + 0x10) + param_3) = 0;\n  *(undefined2 *)(param_4 + 8) = 0x10;\n  *(int *)(param_4 + 0xc) = param_3;\n  return 0;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_000685d0(int param_1,int param_2,int param_3,int param_4)" identifier (parameter_list "(int param_1,int param_2,int param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  uVar1 = *(uint *)(*(int *)(param_1 + 0x14) + 0x30);\n  uVar2 = *(uint *)(*(int *)(param_1 + 0x14) + 0x24);\n  *(undefined2 *)(param_4 + 8) = 1;\n  if ((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) <\n      (longlong)(ulonglong)(uint)(param_2 + param_3)) {\n    iVar3 = FUN_000383f0();\n    return iVar3;\n  }\n  if (*(int *)(param_4 + 0x18) < param_3 + 1) {\n    iVar3 = FUN_000307e0();\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    uVar4 = *(undefined4 *)(param_4 + 0x10);\n  }\n  else {\n    uVar4 = *(undefined4 *)(param_4 + 0x14);\n    *(undefined4 *)(param_4 + 0x10) = uVar4;\n  }\n  iVar3 = FUN_00067520(uVar4,0);\n  if (iVar3 != 0) {\n    if (((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)) {\n      FUN_00024b80();\n    }\n    return iVar3;\n  }\n  *(undefined1 *)(*(int *)(param_4 + 0x10) + param_3) = 0;\n  *(undefined2 *)(param_4 + 8) = 0x10;\n  *(int *)(param_4 + 0xc) = param_3;\n  return 0;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (expression_statement "uVar1 = *(uint *)(*(int *)(param_1 + 0x14) + 0x30);" (assignment_expression "uVar1 = *(uint *)(*(int *)(param_1 + 0x14) + 0x30)" identifier = (pointer_expression "*(uint *)(*(int *)(param_1 + 0x14) + 0x30)" * (cast_expression "(uint *)(*(int *)(param_1 + 0x14) + 0x30)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x14) + 0x30)" ( (binary_expression "*(int *)(param_1 + 0x14) + 0x30" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "uVar2 = *(uint *)(*(int *)(param_1 + 0x14) + 0x24);" (assignment_expression "uVar2 = *(uint *)(*(int *)(param_1 + 0x14) + 0x24)" identifier = (pointer_expression "*(uint *)(*(int *)(param_1 + 0x14) + 0x24)" * (cast_expression "(uint *)(*(int *)(param_1 + 0x14) + 0x24)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x14) + 0x24)" ( (binary_expression "*(int *)(param_1 + 0x14) + 0x24" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "*(undefined2 *)(param_4 + 8) = 1;" (assignment_expression "*(undefined2 *)(param_4 + 8) = 1" (pointer_expression "*(undefined2 *)(param_4 + 8)" * (cast_expression "(undefined2 *)(param_4 + 8)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 8)" ( (binary_expression "param_4 + 8" identifier + number_literal) )))) = number_literal) ;) (if_statement "if ((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) <\n      (longlong)(ulonglong)(uint)(param_2 + param_3)) {\n    iVar3 = FUN_000383f0();\n    return iVar3;\n  }" if (parenthesized_expression "((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) <\n      (longlong)(ulonglong)(uint)(param_2 + param_3))" ( (binary_expression "(longlong)((ulonglong)uVar1 * (ulonglong)uVar2) <\n      (longlong)(ulonglong)(uint)(param_2 + param_3)" (call_expression "(longlong)((ulonglong)uVar1 * (ulonglong)uVar2)" (parenthesized_expression "(longlong)" ( identifier )) (argument_list "((ulonglong)uVar1 * (ulonglong)uVar2)" ( (binary_expression "(ulonglong)uVar1 * (ulonglong)uVar2" (cast_expression "(ulonglong)uVar1" ( (type_descriptor "ulonglong" type_identifier) ) identifier) * (cast_expression "(ulonglong)uVar2" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) ))) < (call_expression "(longlong)(ulonglong)(uint)(param_2 + param_3)" (call_expression "(longlong)(ulonglong)(uint)" (call_expression "(longlong)(ulonglong)" (parenthesized_expression "(longlong)" ( identifier )) (argument_list "(ulonglong)" ( identifier ))) (argument_list "(uint)" ( identifier ))) (argument_list "(param_2 + param_3)" ( (binary_expression "param_2 + param_3" identifier + identifier) )))) )) (compound_statement "{\n    iVar3 = FUN_000383f0();\n    return iVar3;\n  }" { (expression_statement "iVar3 = FUN_000383f0();" (assignment_expression "iVar3 = FUN_000383f0()" identifier = (call_expression "FUN_000383f0()" identifier (argument_list "()" ( )))) ;) (return_statement "return iVar3;" return identifier ;) })) (if_statement "if (*(int *)(param_4 + 0x18) < param_3 + 1) {\n    iVar3 = FUN_000307e0();\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    uVar4 = *(undefined4 *)(param_4 + 0x10);\n  }\n  else {\n    uVar4 = *(undefined4 *)(param_4 + 0x14);\n    *(undefined4 *)(param_4 + 0x10) = uVar4;\n  }" if (parenthesized_expression "(*(int *)(param_4 + 0x18) < param_3 + 1)" ( (binary_expression "*(int *)(param_4 + 0x18) < param_3 + 1" (pointer_expression "*(int *)(param_4 + 0x18)" * (cast_expression "(int *)(param_4 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x18)" ( (binary_expression "param_4 + 0x18" identifier + number_literal) )))) < (binary_expression "param_3 + 1" identifier + number_literal)) )) (compound_statement "{\n    iVar3 = FUN_000307e0();\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    uVar4 = *(undefined4 *)(param_4 + 0x10);\n  }" { (expression_statement "iVar3 = FUN_000307e0();" (assignment_expression "iVar3 = FUN_000307e0()" identifier = (call_expression "FUN_000307e0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar3 != 0) {\n      return iVar3;\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      return iVar3;\n    }" { (return_statement "return iVar3;" return identifier ;) })) (expression_statement "uVar4 = *(undefined4 *)(param_4 + 0x10);" (assignment_expression "uVar4 = *(undefined4 *)(param_4 + 0x10)" identifier = (pointer_expression "*(undefined4 *)(param_4 + 0x10)" * (cast_expression "(undefined4 *)(param_4 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x10)" ( (binary_expression "param_4 + 0x10" identifier + number_literal) ))))) ;) }) (else_clause "else {\n    uVar4 = *(undefined4 *)(param_4 + 0x14);\n    *(undefined4 *)(param_4 + 0x10) = uVar4;\n  }" else (compound_statement "{\n    uVar4 = *(undefined4 *)(param_4 + 0x14);\n    *(undefined4 *)(param_4 + 0x10) = uVar4;\n  }" { (expression_statement "uVar4 = *(undefined4 *)(param_4 + 0x14);" (assignment_expression "uVar4 = *(undefined4 *)(param_4 + 0x14)" identifier = (pointer_expression "*(undefined4 *)(param_4 + 0x14)" * (cast_expression "(undefined4 *)(param_4 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x14)" ( (binary_expression "param_4 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(param_4 + 0x10) = uVar4;" (assignment_expression "*(undefined4 *)(param_4 + 0x10) = uVar4" (pointer_expression "*(undefined4 *)(param_4 + 0x10)" * (cast_expression "(undefined4 *)(param_4 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x10)" ( (binary_expression "param_4 + 0x10" identifier + number_literal) )))) = identifier) ;) }))) (expression_statement "iVar3 = FUN_00067520(uVar4,0);" (assignment_expression "iVar3 = FUN_00067520(uVar4,0)" identifier = (call_expression "FUN_00067520(uVar4,0)" identifier (argument_list "(uVar4,0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar3 != 0) {\n    if (((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)) {\n      FUN_00024b80();\n    }\n    return iVar3;\n  }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n    if (((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)) {\n      FUN_00024b80();\n    }\n    return iVar3;\n  }" { (if_statement "if (((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)) {\n      FUN_00024b80();\n    }" if (parenthesized_expression "(((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0))" ( (binary_expression "((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)" (parenthesized_expression "((*(ushort *)(param_4 + 8) & 0x2400) != 0)" ( (binary_expression "(*(ushort *)(param_4 + 8) & 0x2400) != 0" (parenthesized_expression "(*(ushort *)(param_4 + 8) & 0x2400)" ( (binary_expression "*(ushort *)(param_4 + 8) & 0x2400" (pointer_expression "*(ushort *)(param_4 + 8)" * (cast_expression "(ushort *)(param_4 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 8)" ( (binary_expression "param_4 + 8" identifier + number_literal) )))) & number_literal) )) != number_literal) )) || (parenthesized_expression "(*(int *)(param_4 + 0x18) != 0)" ( (binary_expression "*(int *)(param_4 + 0x18) != 0" (pointer_expression "*(int *)(param_4 + 0x18)" * (cast_expression "(int *)(param_4 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x18)" ( (binary_expression "param_4 + 0x18" identifier + number_literal) )))) != number_literal) ))) )) (compound_statement "{\n      FUN_00024b80();\n    }" { (expression_statement "FUN_00024b80();" (call_expression "FUN_00024b80()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return iVar3;" return identifier ;) })) (expression_statement "*(undefined1 *)(*(int *)(param_4 + 0x10) + param_3) = 0;" (assignment_expression "*(undefined1 *)(*(int *)(param_4 + 0x10) + param_3) = 0" (pointer_expression "*(undefined1 *)(*(int *)(param_4 + 0x10) + param_3)" * (cast_expression "(undefined1 *)(*(int *)(param_4 + 0x10) + param_3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_4 + 0x10) + param_3)" ( (binary_expression "*(int *)(param_4 + 0x10) + param_3" (pointer_expression "*(int *)(param_4 + 0x10)" * (cast_expression "(int *)(param_4 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x10)" ( (binary_expression "param_4 + 0x10" identifier + number_literal) )))) + identifier) )))) = number_literal) ;) (expression_statement "*(undefined2 *)(param_4 + 8) = 0x10;" (assignment_expression "*(undefined2 *)(param_4 + 8) = 0x10" (pointer_expression "*(undefined2 *)(param_4 + 8)" * (cast_expression "(undefined2 *)(param_4 + 8)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 8)" ( (binary_expression "param_4 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(int *)(param_4 + 0xc) = param_3;" (assignment_expression "*(int *)(param_4 + 0xc) = param_3" (pointer_expression "*(int *)(param_4 + 0xc)" * (cast_expression "(int *)(param_4 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0xc)" ( (binary_expression "param_4 + 0xc" identifier + number_literal) )))) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Removing unreachable block (ram,0x00068620) */\n\nint __regparm3 sqlite3VdbeMemFromBtree(BtCursor *pCur,u32 offset,u32 amt,Mem *pMem)\n\n{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  char *offset_00;\n  uchar *in_stack_ffffffcc;\n  int in_stack_ffffffd0;\n  \n  uVar1 = pCur->pBt->nPage;\n  uVar2 = pCur->pBt->pageSize;\n  pMem->flags = 1;\n  if ((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) < (longlong)(ulonglong)(offset + amt)) {\n    iVar3 = sqlite3CorruptError(0x12cd7);\n    return iVar3;\n  }\n  if (pMem->szMalloc < (int)(amt + 1)) {\n    in_stack_ffffffd0 = 0x68689;\n    iVar3 = sqlite3VdbeMemGrow(pMem,amt + 1,0);\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    offset_00 = pMem->z;\n  }\n  else {\n    offset_00 = pMem->zMalloc;\n    pMem->z = offset_00;\n  }\n  iVar3 = accessPayload(pCur,(u32)offset_00,0,in_stack_ffffffcc,in_stack_ffffffd0);\n  if (iVar3 != 0) {\n    if (((pMem->flags & 0x2400) != 0) || (pMem->szMalloc != 0)) {\n      vdbeMemClear(pMem);\n    }\n    return iVar3;\n  }\n  pMem->z[amt] = '\0';\n  pMem->flags = 0x10;\n  pMem->n = amt;\n  return 0;\n}\n\n" comment (function_definition "int __regparm3 sqlite3VdbeMemFromBtree(BtCursor *pCur,u32 offset,u32 amt,Mem *pMem)\n\n{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  char *offset_00;\n  uchar *in_stack_ffffffcc;\n  int in_stack_ffffffd0;\n  \n  uVar1 = pCur->pBt->nPage;\n  uVar2 = pCur->pBt->pageSize;\n  pMem->flags = 1;\n  if ((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) < (longlong)(ulonglong)(offset + amt)) {\n    iVar3 = sqlite3CorruptError(0x12cd7);\n    return iVar3;\n  }\n  if (pMem->szMalloc < (int)(amt + 1)) {\n    in_stack_ffffffd0 = 0x68689;\n    iVar3 = sqlite3VdbeMemGrow(pMem,amt + 1,0);\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    offset_00 = pMem->z;\n  }\n  else {\n    offset_00 = pMem->zMalloc;\n    pMem->z = offset_00;\n  }\n  iVar3 = accessPayload(pCur,(u32)offset_00,0,in_stack_ffffffcc,in_stack_ffffffd0);\n  if (iVar3 != 0) {\n    if (((pMem->flags & 0x2400) != 0) || (pMem->szMalloc != 0)) {\n      vdbeMemClear(pMem);\n    }\n    return iVar3;\n  }\n  pMem->z[amt] = '\0';\n  pMem->flags = 0x10;\n  pMem->n = amt;\n  return 0;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "sqlite3VdbeMemFromBtree(BtCursor *pCur,u32 offset,u32 amt,Mem *pMem)" identifier (parameter_list "(BtCursor *pCur,u32 offset,u32 amt,Mem *pMem)" ( (parameter_declaration "BtCursor *pCur" type_identifier (pointer_declarator "*pCur" * identifier)) , (parameter_declaration "u32 offset" type_identifier identifier) , (parameter_declaration "u32 amt" type_identifier identifier) , (parameter_declaration "Mem *pMem" type_identifier (pointer_declarator "*pMem" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  char *offset_00;\n  uchar *in_stack_ffffffcc;\n  int in_stack_ffffffd0;\n  \n  uVar1 = pCur->pBt->nPage;\n  uVar2 = pCur->pBt->pageSize;\n  pMem->flags = 1;\n  if ((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) < (longlong)(ulonglong)(offset + amt)) {\n    iVar3 = sqlite3CorruptError(0x12cd7);\n    return iVar3;\n  }\n  if (pMem->szMalloc < (int)(amt + 1)) {\n    in_stack_ffffffd0 = 0x68689;\n    iVar3 = sqlite3VdbeMemGrow(pMem,amt + 1,0);\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    offset_00 = pMem->z;\n  }\n  else {\n    offset_00 = pMem->zMalloc;\n    pMem->z = offset_00;\n  }\n  iVar3 = accessPayload(pCur,(u32)offset_00,0,in_stack_ffffffcc,in_stack_ffffffd0);\n  if (iVar3 != 0) {\n    if (((pMem->flags & 0x2400) != 0) || (pMem->szMalloc != 0)) {\n      vdbeMemClear(pMem);\n    }\n    return iVar3;\n  }\n  pMem->z[amt] = '\0';\n  pMem->flags = 0x10;\n  pMem->n = amt;\n  return 0;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "char *offset_00;" primitive_type (pointer_declarator "*offset_00" * identifier) ;) (declaration "uchar *in_stack_ffffffcc;" type_identifier (pointer_declarator "*in_stack_ffffffcc" * identifier) ;) (declaration "int in_stack_ffffffd0;" primitive_type identifier ;) (expression_statement "uVar1 = pCur->pBt->nPage;" (assignment_expression "uVar1 = pCur->pBt->nPage" identifier = (field_expression "pCur->pBt->nPage" (field_expression "pCur->pBt" identifier -> field_identifier) -> field_identifier)) ;) (expression_statement "uVar2 = pCur->pBt->pageSize;" (assignment_expression "uVar2 = pCur->pBt->pageSize" identifier = (field_expression "pCur->pBt->pageSize" (field_expression "pCur->pBt" identifier -> field_identifier) -> field_identifier)) ;) (expression_statement "pMem->flags = 1;" (assignment_expression "pMem->flags = 1" (field_expression "pMem->flags" identifier -> field_identifier) = number_literal) ;) (if_statement "if ((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) < (longlong)(ulonglong)(offset + amt)) {\n    iVar3 = sqlite3CorruptError(0x12cd7);\n    return iVar3;\n  }" if (parenthesized_expression "((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) < (longlong)(ulonglong)(offset + amt))" ( (binary_expression "(longlong)((ulonglong)uVar1 * (ulonglong)uVar2) < (longlong)(ulonglong)(offset + amt)" (call_expression "(longlong)((ulonglong)uVar1 * (ulonglong)uVar2)" (parenthesized_expression "(longlong)" ( identifier )) (argument_list "((ulonglong)uVar1 * (ulonglong)uVar2)" ( (binary_expression "(ulonglong)uVar1 * (ulonglong)uVar2" (cast_expression "(ulonglong)uVar1" ( (type_descriptor "ulonglong" type_identifier) ) identifier) * (cast_expression "(ulonglong)uVar2" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) ))) < (call_expression "(longlong)(ulonglong)(offset + amt)" (call_expression "(longlong)(ulonglong)" (parenthesized_expression "(longlong)" ( identifier )) (argument_list "(ulonglong)" ( identifier ))) (argument_list "(offset + amt)" ( (binary_expression "offset + amt" identifier + identifier) )))) )) (compound_statement "{\n    iVar3 = sqlite3CorruptError(0x12cd7);\n    return iVar3;\n  }" { (expression_statement "iVar3 = sqlite3CorruptError(0x12cd7);" (assignment_expression "iVar3 = sqlite3CorruptError(0x12cd7)" identifier = (call_expression "sqlite3CorruptError(0x12cd7)" identifier (argument_list "(0x12cd7)" ( number_literal )))) ;) (return_statement "return iVar3;" return identifier ;) })) (if_statement "if (pMem->szMalloc < (int)(amt + 1)) {\n    in_stack_ffffffd0 = 0x68689;\n    iVar3 = sqlite3VdbeMemGrow(pMem,amt + 1,0);\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    offset_00 = pMem->z;\n  }\n  else {\n    offset_00 = pMem->zMalloc;\n    pMem->z = offset_00;\n  }" if (parenthesized_expression "(pMem->szMalloc < (int)(amt + 1))" ( (binary_expression "pMem->szMalloc < (int)(amt + 1)" (field_expression "pMem->szMalloc" identifier -> field_identifier) < (cast_expression "(int)(amt + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(amt + 1)" ( (binary_expression "amt + 1" identifier + number_literal) )))) )) (compound_statement "{\n    in_stack_ffffffd0 = 0x68689;\n    iVar3 = sqlite3VdbeMemGrow(pMem,amt + 1,0);\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    offset_00 = pMem->z;\n  }" { (expression_statement "in_stack_ffffffd0 = 0x68689;" (assignment_expression "in_stack_ffffffd0 = 0x68689" identifier = number_literal) ;) (expression_statement "iVar3 = sqlite3VdbeMemGrow(pMem,amt + 1,0);" (assignment_expression "iVar3 = sqlite3VdbeMemGrow(pMem,amt + 1,0)" identifier = (call_expression "sqlite3VdbeMemGrow(pMem,amt + 1,0)" identifier (argument_list "(pMem,amt + 1,0)" ( identifier , (binary_expression "amt + 1" identifier + number_literal) , number_literal )))) ;) (if_statement "if (iVar3 != 0) {\n      return iVar3;\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      return iVar3;\n    }" { (return_statement "return iVar3;" return identifier ;) })) (expression_statement "offset_00 = pMem->z;" (assignment_expression "offset_00 = pMem->z" identifier = (field_expression "pMem->z" identifier -> field_identifier)) ;) }) (else_clause "else {\n    offset_00 = pMem->zMalloc;\n    pMem->z = offset_00;\n  }" else (compound_statement "{\n    offset_00 = pMem->zMalloc;\n    pMem->z = offset_00;\n  }" { (expression_statement "offset_00 = pMem->zMalloc;" (assignment_expression "offset_00 = pMem->zMalloc" identifier = (field_expression "pMem->zMalloc" identifier -> field_identifier)) ;) (expression_statement "pMem->z = offset_00;" (assignment_expression "pMem->z = offset_00" (field_expression "pMem->z" identifier -> field_identifier) = identifier) ;) }))) (expression_statement "iVar3 = accessPayload(pCur,(u32)offset_00,0,in_stack_ffffffcc,in_stack_ffffffd0);" (assignment_expression "iVar3 = accessPayload(pCur,(u32)offset_00,0,in_stack_ffffffcc,in_stack_ffffffd0)" identifier = (call_expression "accessPayload(pCur,(u32)offset_00,0,in_stack_ffffffcc,in_stack_ffffffd0)" identifier (argument_list "(pCur,(u32)offset_00,0,in_stack_ffffffcc,in_stack_ffffffd0)" ( identifier , (cast_expression "(u32)offset_00" ( (type_descriptor "u32" type_identifier) ) identifier) , number_literal , identifier , identifier )))) ;) (if_statement "if (iVar3 != 0) {\n    if (((pMem->flags & 0x2400) != 0) || (pMem->szMalloc != 0)) {\n      vdbeMemClear(pMem);\n    }\n    return iVar3;\n  }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n    if (((pMem->flags & 0x2400) != 0) || (pMem->szMalloc != 0)) {\n      vdbeMemClear(pMem);\n    }\n    return iVar3;\n  }" { (if_statement "if (((pMem->flags & 0x2400) != 0) || (pMem->szMalloc != 0)) {\n      vdbeMemClear(pMem);\n    }" if (parenthesized_expression "(((pMem->flags & 0x2400) != 0) || (pMem->szMalloc != 0))" ( (binary_expression "((pMem->flags & 0x2400) != 0) || (pMem->szMalloc != 0)" (parenthesized_expression "((pMem->flags & 0x2400) != 0)" ( (binary_expression "(pMem->flags & 0x2400) != 0" (parenthesized_expression "(pMem->flags & 0x2400)" ( (binary_expression "pMem->flags & 0x2400" (field_expression "pMem->flags" identifier -> field_identifier) & number_literal) )) != number_literal) )) || (parenthesized_expression "(pMem->szMalloc != 0)" ( (binary_expression "pMem->szMalloc != 0" (field_expression "pMem->szMalloc" identifier -> field_identifier) != number_literal) ))) )) (compound_statement "{\n      vdbeMemClear(pMem);\n    }" { (expression_statement "vdbeMemClear(pMem);" (call_expression "vdbeMemClear(pMem)" identifier (argument_list "(pMem)" ( identifier ))) ;) })) (return_statement "return iVar3;" return identifier ;) })) (expression_statement "pMem->z[amt] = '\0';" (assignment_expression "pMem->z[amt] = '\0'" (subscript_expression "pMem->z[amt]" (field_expression "pMem->z" identifier -> field_identifier) [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "pMem->flags = 0x10;" (assignment_expression "pMem->flags = 0x10" (field_expression "pMem->flags" identifier -> field_identifier) = number_literal) ;) (expression_statement "pMem->n = amt;" (assignment_expression "pMem->n = amt" (field_expression "pMem->n" identifier -> field_identifier) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "int __regparm3 FUN_000685d0(int param_1,int param_2,int param_3,int param_4)\n\n{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  uVar1 = *(uint *)(*(int *)(param_1 + 0x14) + 0x30);\n  uVar2 = *(uint *)(*(int *)(param_1 + 0x14) + 0x24);\n  *(undefined2 *)(param_4 + 8) = 1;\n  if ((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) <\n      (longlong)(ulonglong)(uint)(param_2 + param_3)) {\n    iVar3 = FUN_000383f0();\n    return iVar3;\n  }\n  if (*(int *)(param_4 + 0x18) < param_3 + 1) {\n    iVar3 = FUN_000307e0();\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    uVar4 = *(undefined4 *)(param_4 + 0x10);\n  }\n  else {\n    uVar4 = *(undefined4 *)(param_4 + 0x14);\n    *(undefined4 *)(param_4 + 0x10) = uVar4;\n  }\n  iVar3 = FUN_00067520(uVar4,0);\n  if (iVar3 != 0) {\n    if (((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)) {\n      FUN_00024b80();\n    }\n    return iVar3;\n  }\n  *(undefined1 *)(*(int *)(param_4 + 0x10) + param_3) = 0;\n  *(undefined2 *)(param_4 + 8) = 0x10;\n  *(int *)(param_4 + 0xc) = param_3;\n  return 0;\n}\n\n" (function_definition "int __regparm3 FUN_000685d0(int param_1,int param_2,int param_3,int param_4)\n\n{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  uVar1 = *(uint *)(*(int *)(param_1 + 0x14) + 0x30);\n  uVar2 = *(uint *)(*(int *)(param_1 + 0x14) + 0x24);\n  *(undefined2 *)(param_4 + 8) = 1;\n  if ((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) <\n      (longlong)(ulonglong)(uint)(param_2 + param_3)) {\n    iVar3 = FUN_000383f0();\n    return iVar3;\n  }\n  if (*(int *)(param_4 + 0x18) < param_3 + 1) {\n    iVar3 = FUN_000307e0();\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    uVar4 = *(undefined4 *)(param_4 + 0x10);\n  }\n  else {\n    uVar4 = *(undefined4 *)(param_4 + 0x14);\n    *(undefined4 *)(param_4 + 0x10) = uVar4;\n  }\n  iVar3 = FUN_00067520(uVar4,0);\n  if (iVar3 != 0) {\n    if (((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)) {\n      FUN_00024b80();\n    }\n    return iVar3;\n  }\n  *(undefined1 *)(*(int *)(param_4 + 0x10) + param_3) = 0;\n  *(undefined2 *)(param_4 + 8) = 0x10;\n  *(int *)(param_4 + 0xc) = param_3;\n  return 0;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_000685d0(int param_1,int param_2,int param_3,int param_4)" identifier (parameter_list "(int param_1,int param_2,int param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  uVar1 = *(uint *)(*(int *)(param_1 + 0x14) + 0x30);\n  uVar2 = *(uint *)(*(int *)(param_1 + 0x14) + 0x24);\n  *(undefined2 *)(param_4 + 8) = 1;\n  if ((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) <\n      (longlong)(ulonglong)(uint)(param_2 + param_3)) {\n    iVar3 = FUN_000383f0();\n    return iVar3;\n  }\n  if (*(int *)(param_4 + 0x18) < param_3 + 1) {\n    iVar3 = FUN_000307e0();\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    uVar4 = *(undefined4 *)(param_4 + 0x10);\n  }\n  else {\n    uVar4 = *(undefined4 *)(param_4 + 0x14);\n    *(undefined4 *)(param_4 + 0x10) = uVar4;\n  }\n  iVar3 = FUN_00067520(uVar4,0);\n  if (iVar3 != 0) {\n    if (((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)) {\n      FUN_00024b80();\n    }\n    return iVar3;\n  }\n  *(undefined1 *)(*(int *)(param_4 + 0x10) + param_3) = 0;\n  *(undefined2 *)(param_4 + 8) = 0x10;\n  *(int *)(param_4 + 0xc) = param_3;\n  return 0;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (expression_statement "uVar1 = *(uint *)(*(int *)(param_1 + 0x14) + 0x30);" (assignment_expression "uVar1 = *(uint *)(*(int *)(param_1 + 0x14) + 0x30)" identifier = (pointer_expression "*(uint *)(*(int *)(param_1 + 0x14) + 0x30)" * (cast_expression "(uint *)(*(int *)(param_1 + 0x14) + 0x30)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x14) + 0x30)" ( (binary_expression "*(int *)(param_1 + 0x14) + 0x30" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "uVar2 = *(uint *)(*(int *)(param_1 + 0x14) + 0x24);" (assignment_expression "uVar2 = *(uint *)(*(int *)(param_1 + 0x14) + 0x24)" identifier = (pointer_expression "*(uint *)(*(int *)(param_1 + 0x14) + 0x24)" * (cast_expression "(uint *)(*(int *)(param_1 + 0x14) + 0x24)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x14) + 0x24)" ( (binary_expression "*(int *)(param_1 + 0x14) + 0x24" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "*(undefined2 *)(param_4 + 8) = 1;" (assignment_expression "*(undefined2 *)(param_4 + 8) = 1" (pointer_expression "*(undefined2 *)(param_4 + 8)" * (cast_expression "(undefined2 *)(param_4 + 8)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 8)" ( (binary_expression "param_4 + 8" identifier + number_literal) )))) = number_literal) ;) (if_statement "if ((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) <\n      (longlong)(ulonglong)(uint)(param_2 + param_3)) {\n    iVar3 = FUN_000383f0();\n    return iVar3;\n  }" if (parenthesized_expression "((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) <\n      (longlong)(ulonglong)(uint)(param_2 + param_3))" ( (binary_expression "(longlong)((ulonglong)uVar1 * (ulonglong)uVar2) <\n      (longlong)(ulonglong)(uint)(param_2 + param_3)" (call_expression "(longlong)((ulonglong)uVar1 * (ulonglong)uVar2)" (parenthesized_expression "(longlong)" ( identifier )) (argument_list "((ulonglong)uVar1 * (ulonglong)uVar2)" ( (binary_expression "(ulonglong)uVar1 * (ulonglong)uVar2" (cast_expression "(ulonglong)uVar1" ( (type_descriptor "ulonglong" type_identifier) ) identifier) * (cast_expression "(ulonglong)uVar2" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) ))) < (call_expression "(longlong)(ulonglong)(uint)(param_2 + param_3)" (call_expression "(longlong)(ulonglong)(uint)" (call_expression "(longlong)(ulonglong)" (parenthesized_expression "(longlong)" ( identifier )) (argument_list "(ulonglong)" ( identifier ))) (argument_list "(uint)" ( identifier ))) (argument_list "(param_2 + param_3)" ( (binary_expression "param_2 + param_3" identifier + identifier) )))) )) (compound_statement "{\n    iVar3 = FUN_000383f0();\n    return iVar3;\n  }" { (expression_statement "iVar3 = FUN_000383f0();" (assignment_expression "iVar3 = FUN_000383f0()" identifier = (call_expression "FUN_000383f0()" identifier (argument_list "()" ( )))) ;) (return_statement "return iVar3;" return identifier ;) })) (if_statement "if (*(int *)(param_4 + 0x18) < param_3 + 1) {\n    iVar3 = FUN_000307e0();\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    uVar4 = *(undefined4 *)(param_4 + 0x10);\n  }\n  else {\n    uVar4 = *(undefined4 *)(param_4 + 0x14);\n    *(undefined4 *)(param_4 + 0x10) = uVar4;\n  }" if (parenthesized_expression "(*(int *)(param_4 + 0x18) < param_3 + 1)" ( (binary_expression "*(int *)(param_4 + 0x18) < param_3 + 1" (pointer_expression "*(int *)(param_4 + 0x18)" * (cast_expression "(int *)(param_4 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x18)" ( (binary_expression "param_4 + 0x18" identifier + number_literal) )))) < (binary_expression "param_3 + 1" identifier + number_literal)) )) (compound_statement "{\n    iVar3 = FUN_000307e0();\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    uVar4 = *(undefined4 *)(param_4 + 0x10);\n  }" { (expression_statement "iVar3 = FUN_000307e0();" (assignment_expression "iVar3 = FUN_000307e0()" identifier = (call_expression "FUN_000307e0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar3 != 0) {\n      return iVar3;\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      return iVar3;\n    }" { (return_statement "return iVar3;" return identifier ;) })) (expression_statement "uVar4 = *(undefined4 *)(param_4 + 0x10);" (assignment_expression "uVar4 = *(undefined4 *)(param_4 + 0x10)" identifier = (pointer_expression "*(undefined4 *)(param_4 + 0x10)" * (cast_expression "(undefined4 *)(param_4 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x10)" ( (binary_expression "param_4 + 0x10" identifier + number_literal) ))))) ;) }) (else_clause "else {\n    uVar4 = *(undefined4 *)(param_4 + 0x14);\n    *(undefined4 *)(param_4 + 0x10) = uVar4;\n  }" else (compound_statement "{\n    uVar4 = *(undefined4 *)(param_4 + 0x14);\n    *(undefined4 *)(param_4 + 0x10) = uVar4;\n  }" { (expression_statement "uVar4 = *(undefined4 *)(param_4 + 0x14);" (assignment_expression "uVar4 = *(undefined4 *)(param_4 + 0x14)" identifier = (pointer_expression "*(undefined4 *)(param_4 + 0x14)" * (cast_expression "(undefined4 *)(param_4 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x14)" ( (binary_expression "param_4 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(param_4 + 0x10) = uVar4;" (assignment_expression "*(undefined4 *)(param_4 + 0x10) = uVar4" (pointer_expression "*(undefined4 *)(param_4 + 0x10)" * (cast_expression "(undefined4 *)(param_4 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x10)" ( (binary_expression "param_4 + 0x10" identifier + number_literal) )))) = identifier) ;) }))) (expression_statement "iVar3 = FUN_00067520(uVar4,0);" (assignment_expression "iVar3 = FUN_00067520(uVar4,0)" identifier = (call_expression "FUN_00067520(uVar4,0)" identifier (argument_list "(uVar4,0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar3 != 0) {\n    if (((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)) {\n      FUN_00024b80();\n    }\n    return iVar3;\n  }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n    if (((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)) {\n      FUN_00024b80();\n    }\n    return iVar3;\n  }" { (if_statement "if (((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)) {\n      FUN_00024b80();\n    }" if (parenthesized_expression "(((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0))" ( (binary_expression "((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)" (parenthesized_expression "((*(ushort *)(param_4 + 8) & 0x2400) != 0)" ( (binary_expression "(*(ushort *)(param_4 + 8) & 0x2400) != 0" (parenthesized_expression "(*(ushort *)(param_4 + 8) & 0x2400)" ( (binary_expression "*(ushort *)(param_4 + 8) & 0x2400" (pointer_expression "*(ushort *)(param_4 + 8)" * (cast_expression "(ushort *)(param_4 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 8)" ( (binary_expression "param_4 + 8" identifier + number_literal) )))) & number_literal) )) != number_literal) )) || (parenthesized_expression "(*(int *)(param_4 + 0x18) != 0)" ( (binary_expression "*(int *)(param_4 + 0x18) != 0" (pointer_expression "*(int *)(param_4 + 0x18)" * (cast_expression "(int *)(param_4 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x18)" ( (binary_expression "param_4 + 0x18" identifier + number_literal) )))) != number_literal) ))) )) (compound_statement "{\n      FUN_00024b80();\n    }" { (expression_statement "FUN_00024b80();" (call_expression "FUN_00024b80()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return iVar3;" return identifier ;) })) (expression_statement "*(undefined1 *)(*(int *)(param_4 + 0x10) + param_3) = 0;" (assignment_expression "*(undefined1 *)(*(int *)(param_4 + 0x10) + param_3) = 0" (pointer_expression "*(undefined1 *)(*(int *)(param_4 + 0x10) + param_3)" * (cast_expression "(undefined1 *)(*(int *)(param_4 + 0x10) + param_3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_4 + 0x10) + param_3)" ( (binary_expression "*(int *)(param_4 + 0x10) + param_3" (pointer_expression "*(int *)(param_4 + 0x10)" * (cast_expression "(int *)(param_4 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x10)" ( (binary_expression "param_4 + 0x10" identifier + number_literal) )))) + identifier) )))) = number_literal) ;) (expression_statement "*(undefined2 *)(param_4 + 8) = 0x10;" (assignment_expression "*(undefined2 *)(param_4 + 8) = 0x10" (pointer_expression "*(undefined2 *)(param_4 + 8)" * (cast_expression "(undefined2 *)(param_4 + 8)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 8)" ( (binary_expression "param_4 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(int *)(param_4 + 0xc) = param_3;" (assignment_expression "*(int *)(param_4 + 0xc) = param_3" (pointer_expression "*(int *)(param_4 + 0xc)" * (cast_expression "(int *)(param_4 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0xc)" ( (binary_expression "param_4 + 0xc" 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 IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (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) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) < (call_expression (call_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( IDENT ))) (argument_list ( IDENT ))) (argument_list ( (binary_expression IDENT + IDENT) )))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < (binary_expression IDENT + LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }) (else_clause else (compound_statement { (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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) != LIT) )) || (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return IDENT ;) })) (expression_statement (assignment_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) )))) + IDENT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return LIT ;) })))
(function_definition "int __regparm3 FUN_000685d0(int param_1,int param_2,int param_3,int param_4)\n\n{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  uVar1 = *(uint *)(*(int *)(param_1 + 0x14) + 0x30);\n  uVar2 = *(uint *)(*(int *)(param_1 + 0x14) + 0x24);\n  *(undefined2 *)(param_4 + 8) = 1;\n  if ((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) <\n      (longlong)(ulonglong)(uint)(param_2 + param_3)) {\n    iVar3 = FUN_000383f0();\n    return iVar3;\n  }\n  if (*(int *)(param_4 + 0x18) < param_3 + 1) {\n    iVar3 = FUN_000307e0();\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    uVar4 = *(undefined4 *)(param_4 + 0x10);\n  }\n  else {\n    uVar4 = *(undefined4 *)(param_4 + 0x14);\n    *(undefined4 *)(param_4 + 0x10) = uVar4;\n  }\n  iVar3 = FUN_00067520(uVar4,0);\n  if (iVar3 != 0) {\n    if (((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)) {\n      FUN_00024b80();\n    }\n    return iVar3;\n  }\n  *(undefined1 *)(*(int *)(param_4 + 0x10) + param_3) = 0;\n  *(undefined2 *)(param_4 + 8) = 0x10;\n  *(int *)(param_4 + 0xc) = param_3;\n  return 0;\n}" (primitive_type "int") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_000685d0(int param_1,int param_2,int param_3,int param_4)" (identifier "FUN_000685d0") (parameter_list "(int param_1,int param_2,int param_3,int param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  uVar1 = *(uint *)(*(int *)(param_1 + 0x14) + 0x30);\n  uVar2 = *(uint *)(*(int *)(param_1 + 0x14) + 0x24);\n  *(undefined2 *)(param_4 + 8) = 1;\n  if ((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) <\n      (longlong)(ulonglong)(uint)(param_2 + param_3)) {\n    iVar3 = FUN_000383f0();\n    return iVar3;\n  }\n  if (*(int *)(param_4 + 0x18) < param_3 + 1) {\n    iVar3 = FUN_000307e0();\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    uVar4 = *(undefined4 *)(param_4 + 0x10);\n  }\n  else {\n    uVar4 = *(undefined4 *)(param_4 + 0x14);\n    *(undefined4 *)(param_4 + 0x10) = uVar4;\n  }\n  iVar3 = FUN_00067520(uVar4,0);\n  if (iVar3 != 0) {\n    if (((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)) {\n      FUN_00024b80();\n    }\n    return iVar3;\n  }\n  *(undefined1 *)(*(int *)(param_4 + 0x10) + param_3) = 0;\n  *(undefined2 *)(param_4 + 8) = 0x10;\n  *(int *)(param_4 + 0xc) = param_3;\n  return 0;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (expression_statement "uVar1 = *(uint *)(*(int *)(param_1 + 0x14) + 0x30);" (assignment_expression "uVar1 = *(uint *)(*(int *)(param_1 + 0x14) + 0x30)" (identifier "uVar1") (= "=") (pointer_expression "*(uint *)(*(int *)(param_1 + 0x14) + 0x30)" (* "*") (cast_expression "(uint *)(*(int *)(param_1 + 0x14) + 0x30)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x14) + 0x30)" (( "(") (binary_expression "*(int *)(param_1 + 0x14) + 0x30" (pointer_expression "*(int *)(param_1 + 0x14)" (* "*") (cast_expression "(int *)(param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (+ "+") (number_literal "0x30")) () ")"))))) (; ";")) (expression_statement "uVar2 = *(uint *)(*(int *)(param_1 + 0x14) + 0x24);" (assignment_expression "uVar2 = *(uint *)(*(int *)(param_1 + 0x14) + 0x24)" (identifier "uVar2") (= "=") (pointer_expression "*(uint *)(*(int *)(param_1 + 0x14) + 0x24)" (* "*") (cast_expression "(uint *)(*(int *)(param_1 + 0x14) + 0x24)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x14) + 0x24)" (( "(") (binary_expression "*(int *)(param_1 + 0x14) + 0x24" (pointer_expression "*(int *)(param_1 + 0x14)" (* "*") (cast_expression "(int *)(param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (+ "+") (number_literal "0x24")) () ")"))))) (; ";")) (expression_statement "*(undefined2 *)(param_4 + 8) = 1;" (assignment_expression "*(undefined2 *)(param_4 + 8) = 1" (pointer_expression "*(undefined2 *)(param_4 + 8)" (* "*") (cast_expression "(undefined2 *)(param_4 + 8)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 8)" (( "(") (binary_expression "param_4 + 8" (identifier "param_4") (+ "+") (number_literal "8")) () ")")))) (= "=") (number_literal "1")) (; ";")) (if_statement "if ((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) <\n      (longlong)(ulonglong)(uint)(param_2 + param_3)) {\n    iVar3 = FUN_000383f0();\n    return iVar3;\n  }" (if "if") (parenthesized_expression "((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) <\n      (longlong)(ulonglong)(uint)(param_2 + param_3))" (( "(") (binary_expression "(longlong)((ulonglong)uVar1 * (ulonglong)uVar2) <\n      (longlong)(ulonglong)(uint)(param_2 + param_3)" (call_expression "(longlong)((ulonglong)uVar1 * (ulonglong)uVar2)" (parenthesized_expression "(longlong)" (( "(") (identifier "longlong") () ")")) (argument_list "((ulonglong)uVar1 * (ulonglong)uVar2)" (( "(") (binary_expression "(ulonglong)uVar1 * (ulonglong)uVar2" (cast_expression "(ulonglong)uVar1" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "uVar1")) (* "*") (cast_expression "(ulonglong)uVar2" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "uVar2"))) () ")"))) (< "<") (call_expression "(longlong)(ulonglong)(uint)(param_2 + param_3)" (call_expression "(longlong)(ulonglong)(uint)" (call_expression "(longlong)(ulonglong)" (parenthesized_expression "(longlong)" (( "(") (identifier "longlong") () ")")) (argument_list "(ulonglong)" (( "(") (identifier "ulonglong") () ")"))) (argument_list "(uint)" (( "(") (identifier "uint") () ")"))) (argument_list "(param_2 + param_3)" (( "(") (binary_expression "param_2 + param_3" (identifier "param_2") (+ "+") (identifier "param_3")) () ")")))) () ")")) (compound_statement "{\n    iVar3 = FUN_000383f0();\n    return iVar3;\n  }" ({ "{") (expression_statement "iVar3 = FUN_000383f0();" (assignment_expression "iVar3 = FUN_000383f0()" (identifier "iVar3") (= "=") (call_expression "FUN_000383f0()" (identifier "FUN_000383f0") (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}"))) (if_statement "if (*(int *)(param_4 + 0x18) < param_3 + 1) {\n    iVar3 = FUN_000307e0();\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    uVar4 = *(undefined4 *)(param_4 + 0x10);\n  }\n  else {\n    uVar4 = *(undefined4 *)(param_4 + 0x14);\n    *(undefined4 *)(param_4 + 0x10) = uVar4;\n  }" (if "if") (parenthesized_expression "(*(int *)(param_4 + 0x18) < param_3 + 1)" (( "(") (binary_expression "*(int *)(param_4 + 0x18) < param_3 + 1" (pointer_expression "*(int *)(param_4 + 0x18)" (* "*") (cast_expression "(int *)(param_4 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 0x18)" (( "(") (binary_expression "param_4 + 0x18" (identifier "param_4") (+ "+") (number_literal "0x18")) () ")")))) (< "<") (binary_expression "param_3 + 1" (identifier "param_3") (+ "+") (number_literal "1"))) () ")")) (compound_statement "{\n    iVar3 = FUN_000307e0();\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    uVar4 = *(undefined4 *)(param_4 + 0x10);\n  }" ({ "{") (expression_statement "iVar3 = FUN_000307e0();" (assignment_expression "iVar3 = FUN_000307e0()" (identifier "iVar3") (= "=") (call_expression "FUN_000307e0()" (identifier "FUN_000307e0") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar3 != 0) {\n      return iVar3;\n    }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      return iVar3;\n    }" ({ "{") (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}"))) (expression_statement "uVar4 = *(undefined4 *)(param_4 + 0x10);" (assignment_expression "uVar4 = *(undefined4 *)(param_4 + 0x10)" (identifier "uVar4") (= "=") (pointer_expression "*(undefined4 *)(param_4 + 0x10)" (* "*") (cast_expression "(undefined4 *)(param_4 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 0x10)" (( "(") (binary_expression "param_4 + 0x10" (identifier "param_4") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (} "}")) (else_clause "else {\n    uVar4 = *(undefined4 *)(param_4 + 0x14);\n    *(undefined4 *)(param_4 + 0x10) = uVar4;\n  }" (else "else") (compound_statement "{\n    uVar4 = *(undefined4 *)(param_4 + 0x14);\n    *(undefined4 *)(param_4 + 0x10) = uVar4;\n  }" ({ "{") (expression_statement "uVar4 = *(undefined4 *)(param_4 + 0x14);" (assignment_expression "uVar4 = *(undefined4 *)(param_4 + 0x14)" (identifier "uVar4") (= "=") (pointer_expression "*(undefined4 *)(param_4 + 0x14)" (* "*") (cast_expression "(undefined4 *)(param_4 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 0x14)" (( "(") (binary_expression "param_4 + 0x14" (identifier "param_4") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "*(undefined4 *)(param_4 + 0x10) = uVar4;" (assignment_expression "*(undefined4 *)(param_4 + 0x10) = uVar4" (pointer_expression "*(undefined4 *)(param_4 + 0x10)" (* "*") (cast_expression "(undefined4 *)(param_4 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 0x10)" (( "(") (binary_expression "param_4 + 0x10" (identifier "param_4") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (identifier "uVar4")) (; ";")) (} "}")))) (expression_statement "iVar3 = FUN_00067520(uVar4,0);" (assignment_expression "iVar3 = FUN_00067520(uVar4,0)" (identifier "iVar3") (= "=") (call_expression "FUN_00067520(uVar4,0)" (identifier "FUN_00067520") (argument_list "(uVar4,0)" (( "(") (identifier "uVar4") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar3 != 0) {\n    if (((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)) {\n      FUN_00024b80();\n    }\n    return iVar3;\n  }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)) {\n      FUN_00024b80();\n    }\n    return iVar3;\n  }" ({ "{") (if_statement "if (((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)) {\n      FUN_00024b80();\n    }" (if "if") (parenthesized_expression "(((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0))" (( "(") (binary_expression "((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)" (parenthesized_expression "((*(ushort *)(param_4 + 8) & 0x2400) != 0)" (( "(") (binary_expression "(*(ushort *)(param_4 + 8) & 0x2400) != 0" (parenthesized_expression "(*(ushort *)(param_4 + 8) & 0x2400)" (( "(") (binary_expression "*(ushort *)(param_4 + 8) & 0x2400" (pointer_expression "*(ushort *)(param_4 + 8)" (* "*") (cast_expression "(ushort *)(param_4 + 8)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 8)" (( "(") (binary_expression "param_4 + 8" (identifier "param_4") (+ "+") (number_literal "8")) () ")")))) (& "&") (number_literal "0x2400")) () ")")) (!= "!=") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(*(int *)(param_4 + 0x18) != 0)" (( "(") (binary_expression "*(int *)(param_4 + 0x18) != 0" (pointer_expression "*(int *)(param_4 + 0x18)" (* "*") (cast_expression "(int *)(param_4 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 0x18)" (( "(") (binary_expression "param_4 + 0x18" (identifier "param_4") (+ "+") (number_literal "0x18")) () ")")))) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n      FUN_00024b80();\n    }" ({ "{") (expression_statement "FUN_00024b80();" (call_expression "FUN_00024b80()" (identifier "FUN_00024b80") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}"))) (expression_statement "*(undefined1 *)(*(int *)(param_4 + 0x10) + param_3) = 0;" (assignment_expression "*(undefined1 *)(*(int *)(param_4 + 0x10) + param_3) = 0" (pointer_expression "*(undefined1 *)(*(int *)(param_4 + 0x10) + param_3)" (* "*") (cast_expression "(undefined1 *)(*(int *)(param_4 + 0x10) + param_3)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_4 + 0x10) + param_3)" (( "(") (binary_expression "*(int *)(param_4 + 0x10) + param_3" (pointer_expression "*(int *)(param_4 + 0x10)" (* "*") (cast_expression "(int *)(param_4 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 0x10)" (( "(") (binary_expression "param_4 + 0x10" (identifier "param_4") (+ "+") (number_literal "0x10")) () ")")))) (+ "+") (identifier "param_3")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined2 *)(param_4 + 8) = 0x10;" (assignment_expression "*(undefined2 *)(param_4 + 8) = 0x10" (pointer_expression "*(undefined2 *)(param_4 + 8)" (* "*") (cast_expression "(undefined2 *)(param_4 + 8)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 8)" (( "(") (binary_expression "param_4 + 8" (identifier "param_4") (+ "+") (number_literal "8")) () ")")))) (= "=") (number_literal "0x10")) (; ";")) (expression_statement "*(int *)(param_4 + 0xc) = param_3;" (assignment_expression "*(int *)(param_4 + 0xc) = param_3" (pointer_expression "*(int *)(param_4 + 0xc)" (* "*") (cast_expression "(int *)(param_4 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 0xc)" (( "(") (binary_expression "param_4 + 0xc" (identifier "param_4") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (identifier "param_3")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

/* WARNING: Removing unreachable block (ram,0x00068620) */

int __regparm3 function_1(type_1 *pCur,type_2 var_1,type_2 var_2,type_3 *pMem)

{
  type_4 uVar1;
  type_4 uVar2;
  int var_5;
  char *offset_00;
  type_5 *in_stack_ffffffcc;
  int in_stack_ffffffd0;
  
  uVar1 = pCur->pBt->nPage;
  uVar2 = pCur->pBt->pageSize;
  pMem->flags = 1;
  if ((longlong)((type_6)uVar1 * (type_6)uVar2) < (longlong)(type_6)(var_1 + var_2)) {
    var_5 = var_3(0x12cd7);
    return var_5;
  }
  if (pMem->szMalloc < (int)(var_2 + 1)) {
    in_stack_ffffffd0 = 0x68689;
    var_5 = var_4(pMem,var_2 + 1,0);
    if (var_5 != 0) {
      return var_5;
    }
    offset_00 = pMem->z;
  }
  else {
    offset_00 = pMem->zMalloc;
    pMem->z = offset_00;
  }
  var_5 = var_6(pCur,(type_2)offset_00,0,in_stack_ffffffcc,in_stack_ffffffd0);
  if (var_5 != 0) {
    if (((pMem->flags & 0x2400) != 0) || (pMem->szMalloc != 0)) {
      var_7(pMem);
    }
    return var_5;
  }
  pMem->z[var_2] = '\0';
  pMem->flags = 0x10;
  pMem->n = var_2;
  return 0;
}


(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: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (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: (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))))))) (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: (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))))))) (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: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier))))) right: (call_expression function: (call_expression function: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (identifier))) arguments: (argument_list (identifier))) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (return_statement (identifier)))) (if_statement condition: (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: (binary_expression left: (identifier) right: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (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)))))))) alternative: (else_clause (compound_statement (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: (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: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_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: (number_literal))) right: (number_literal))) 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: (identifier) right: (number_literal))))) right: (number_literal))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (return_statement (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: (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: (identifier))))) right: (number_literal))) (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: (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: (identifier))) (return_statement (number_literal)))))

/* WARNING: Removing unreachable block (ram,0x00068620) */

int __regparm3 MASKED(int param_1,int param_2,int param_3,int param_4)

{
  uint uVar1;
  uint uVar2;
  int iVar3;
  undefined4 uVar4;
  
  uVar1 = *(uint *)(*(int *)(param_1 + 0x14) + 0x30);
  uVar2 = *(uint *)(*(int *)(param_1 + 0x14) + 0x24);
  *(undefined2 *)(param_4 + 8) = 1;
  if ((longlong)((ulonglong)uVar1 * (ulonglong)uVar2) <
      (longlong)(ulonglong)(uint)(param_2 + param_3)) {
    iVar3 = FUN_000383f0();
    return iVar3;
  }
  if (*(int *)(param_4 + 0x18) < param_3 + 1) {
    iVar3 = FUN_000307e0();
    if (iVar3 != 0) {
      return iVar3;
    }
    uVar4 = *(undefined4 *)(param_4 + 0x10);
  }
  else {
    uVar4 = *(undefined4 *)(param_4 + 0x14);
    *(undefined4 *)(param_4 + 0x10) = uVar4;
  }
  iVar3 = FUN_00067520(uVar4,0);
  if (iVar3 != 0) {
    if (((*(ushort *)(param_4 + 8) & 0x2400) != 0) || (*(int *)(param_4 + 0x18) != 0)) {
      FUN_00024b80();
    }
    return iVar3;
  }
  *(undefined1 *)(*(int *)(param_4 + 0x10) + param_3) = 0;
  *(undefined2 *)(param_4 + 8) = 0x10;
  *(int *)(param_4 + 0xc) = param_3;
  return 0;
}

