
int btreeCellSizeCheck(MemPage *pPage)

{
  ushort uVar1;
  u32 uVar2;
  u8 *puVar3;
  u16 uVar4;
  uint uVar5;
  uint uVar6;
  ushort uVar7;
  int iVar8;
  int local_40;
  
  uVar1 = pPage->cellOffset;
  uVar5 = (uint)uVar1 + (uint)pPage->nCell * 2;
  uVar2 = pPage->pBt->usableSize;
  puVar3 = pPage->aData;
  local_40 = uVar2 - 5;
  if (pPage->leaf != '\0') {
    local_40 = uVar2 - 4;
  }
  if (pPage->nCell == 0) {
    iVar8 = 0;
  }
  else {
    uVar7 = *(ushort *)(puVar3 + uVar1) << 8 | *(ushort *)(puVar3 + uVar1) >> 8;
    uVar6 = (uint)uVar7;
    if ((uVar5 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {
      iVar8 = 0;
      do {
        uVar4 = (*pPage->xCellSize)(pPage,puVar3 + uVar7);
        if ((int)uVar2 < (int)(uVar6 + uVar4)) {
          iVar8 = sqlite3CorruptError(0x1039b);
          return iVar8;
        }
        iVar8 = iVar8 + 1;
        if ((int)(uint)pPage->nCell <= iVar8) {
          return 0;
        }
        uVar7 = *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) << 8 |
                *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) >> 8;
        uVar6 = (uint)uVar7;
      } while ((uVar5 <= uVar6) && ((int)uVar6 <= local_40));
    }
    iVar8 = sqlite3CorruptError(0x10396);
  }
  return iVar8;
}



undefined8 FUN_0012b136(long param_1)

{
  ushort uVar1;
  int iVar2;
  long lVar3;
  ushort uVar4;
  undefined8 uVar5;
  uint uVar6;
  ushort uVar7;
  int iVar8;
  int local_40;
  
  uVar1 = *(ushort *)(param_1 + 0x12);
  uVar6 = (uint)uVar1 + (uint)*(ushort *)(param_1 + 0x18) * 2;
  iVar2 = *(int *)(*(long *)(param_1 + 0x48) + 0x38);
  lVar3 = *(long *)(param_1 + 0x50);
  local_40 = iVar2 + -5;
  if (*(char *)(param_1 + 8) != '\0') {
    local_40 = iVar2 + -4;
  }
  if (*(ushort *)(param_1 + 0x18) == 0) {
    uVar5 = 0;
  }
  else {
    uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;
    if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {
      iVar8 = 0;
      do {
        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);
        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {
          uVar5 = FUN_00129d5f(0x1039b);
          return uVar5;
        }
        iVar8 = iVar8 + 1;
        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {
          return 0;
        }
        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));
        uVar7 = uVar7 << 8 | uVar7 >> 8;
      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));
    }
    uVar5 = FUN_00129d5f(0x10396);
  }
  return uVar5;
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOVZX R14D,word ptr [RDI + 0x12]
MOVZX EAX,word ptr [RDI + 0x18]
MOVZX EDX,R14W
LEA ECX,[RDX + RAX*0x2]
MOV dword ptr [RSP + 0xc],ECX
MOV RDX,qword ptr [RDI + 0x48]
MOV R15D,dword ptr [RDX + 0x38]
MOV R13,qword ptr [RDI + 0x50]
LEA ECX,[R15 + -0x5]
MOV dword ptr [RSP + 0x8],ECX
CMP byte ptr [RDI + 0x8],0x0
JZ 0x0012b17a
LEA EDX,[R15 + -0x4]
MOV dword ptr [RSP + 0x8],EDX
TEST EAX,EAX
JLE 0x0012b21a
MOV RBX,RDI
MOVZX EAX,R14W
MOVZX ESI,word ptr [R13 + RAX*0x1]
ROL SI,0x8
MOVZX EBP,SI
CMP dword ptr [RSP + 0xc],EBP
JG 0x0012b1ee
CMP dword ptr [RSP + 0x8],EBP
JL 0x0012b1ee
MOV R12D,0x0
MOVZX R14D,R14W
MOVZX ESI,SI
ADD RSI,R13
MOV RDI,RBX
CALL qword ptr [RBX + 0x78]
MOVZX EAX,AX
ADD EBP,EAX
CMP EBP,R15D
JG 0x0012b207
ADD R12D,0x1
MOVZX EAX,word ptr [RBX + 0x18]
CMP EAX,R12D
JLE 0x0012b213
LEA EAX,[R14 + R12*0x2]
CDQE
MOVZX ESI,word ptr [R13 + RAX*0x1]
ROL SI,0x8
MOVZX EBP,SI
CMP dword ptr [RSP + 0xc],EBP
JG 0x0012b1ee
CMP dword ptr [RSP + 0x8],EBP
JGE 0x0012b1ac
MOV EDI,0x10396
CALL 0x00129d5f
ADD RSP,0x18
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
MOV EDI,0x1039b
CALL 0x00129d5f
JMP 0x0012b1f8
MOV EAX,0x0
JMP 0x0012b1f8
MOV EAX,0x0
JMP 0x0012b1f8
(translation_unit "undefined8 FUN_0012b136(long param_1)\n\n{\n  ushort uVar1;\n  int iVar2;\n  long lVar3;\n  ushort uVar4;\n  undefined8 uVar5;\n  uint uVar6;\n  ushort uVar7;\n  int iVar8;\n  int local_40;\n  \n  uVar1 = *(ushort *)(param_1 + 0x12);\n  uVar6 = (uint)uVar1 + (uint)*(ushort *)(param_1 + 0x18) * 2;\n  iVar2 = *(int *)(*(long *)(param_1 + 0x48) + 0x38);\n  lVar3 = *(long *)(param_1 + 0x50);\n  local_40 = iVar2 + -5;\n  if (*(char *)(param_1 + 8) != '\0') {\n    local_40 = iVar2 + -4;\n  }\n  if (*(ushort *)(param_1 + 0x18) == 0) {\n    uVar5 = 0;\n  }\n  else {\n    uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;\n    if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }\n    uVar5 = FUN_00129d5f(0x10396);\n  }\n  return uVar5;\n}\n\n" (function_definition "undefined8 FUN_0012b136(long param_1)\n\n{\n  ushort uVar1;\n  int iVar2;\n  long lVar3;\n  ushort uVar4;\n  undefined8 uVar5;\n  uint uVar6;\n  ushort uVar7;\n  int iVar8;\n  int local_40;\n  \n  uVar1 = *(ushort *)(param_1 + 0x12);\n  uVar6 = (uint)uVar1 + (uint)*(ushort *)(param_1 + 0x18) * 2;\n  iVar2 = *(int *)(*(long *)(param_1 + 0x48) + 0x38);\n  lVar3 = *(long *)(param_1 + 0x50);\n  local_40 = iVar2 + -5;\n  if (*(char *)(param_1 + 8) != '\0') {\n    local_40 = iVar2 + -4;\n  }\n  if (*(ushort *)(param_1 + 0x18) == 0) {\n    uVar5 = 0;\n  }\n  else {\n    uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;\n    if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }\n    uVar5 = FUN_00129d5f(0x10396);\n  }\n  return uVar5;\n}" type_identifier (function_declarator "FUN_0012b136(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  ushort uVar1;\n  int iVar2;\n  long lVar3;\n  ushort uVar4;\n  undefined8 uVar5;\n  uint uVar6;\n  ushort uVar7;\n  int iVar8;\n  int local_40;\n  \n  uVar1 = *(ushort *)(param_1 + 0x12);\n  uVar6 = (uint)uVar1 + (uint)*(ushort *)(param_1 + 0x18) * 2;\n  iVar2 = *(int *)(*(long *)(param_1 + 0x48) + 0x38);\n  lVar3 = *(long *)(param_1 + 0x50);\n  local_40 = iVar2 + -5;\n  if (*(char *)(param_1 + 8) != '\0') {\n    local_40 = iVar2 + -4;\n  }\n  if (*(ushort *)(param_1 + 0x18) == 0) {\n    uVar5 = 0;\n  }\n  else {\n    uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;\n    if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }\n    uVar5 = FUN_00129d5f(0x10396);\n  }\n  return uVar5;\n}" { (declaration "ushort uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "ushort uVar4;" type_identifier identifier ;) (declaration "undefined8 uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "ushort uVar7;" type_identifier identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "int local_40;" primitive_type identifier ;) (expression_statement "uVar1 = *(ushort *)(param_1 + 0x12);" (assignment_expression "uVar1 = *(ushort *)(param_1 + 0x12)" identifier = (pointer_expression "*(ushort *)(param_1 + 0x12)" * (cast_expression "(ushort *)(param_1 + 0x12)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x12)" ( (binary_expression "param_1 + 0x12" identifier + number_literal) ))))) ;) (expression_statement "uVar6 = (uint)uVar1 + (uint)*(ushort *)(param_1 + 0x18) * 2;" (assignment_expression "uVar6 = (uint)uVar1 + (uint)*(ushort *)(param_1 + 0x18) * 2" identifier = (binary_expression "(uint)uVar1 + (uint)*(ushort *)(param_1 + 0x18) * 2" (cast_expression "(uint)uVar1" ( (type_descriptor "uint" type_identifier) ) identifier) + (binary_expression "(uint)*(ushort *)(param_1 + 0x18) * 2" (binary_expression "(uint)*(ushort *)(param_1 + 0x18)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(ushort *)(param_1 + 0x18)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) * number_literal))) ;) (expression_statement "iVar2 = *(int *)(*(long *)(param_1 + 0x48) + 0x38);" (assignment_expression "iVar2 = *(int *)(*(long *)(param_1 + 0x48) + 0x38)" identifier = (pointer_expression "*(int *)(*(long *)(param_1 + 0x48) + 0x38)" * (cast_expression "(int *)(*(long *)(param_1 + 0x48) + 0x38)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(param_1 + 0x48) + 0x38)" ( (binary_expression "*(long *)(param_1 + 0x48) + 0x38" (pointer_expression "*(long *)(param_1 + 0x48)" * (cast_expression "(long *)(param_1 + 0x48)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "lVar3 = *(long *)(param_1 + 0x50);" (assignment_expression "lVar3 = *(long *)(param_1 + 0x50)" identifier = (pointer_expression "*(long *)(param_1 + 0x50)" * (cast_expression "(long *)(param_1 + 0x50)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) ))))) ;) (expression_statement "local_40 = iVar2 + -5;" (assignment_expression "local_40 = iVar2 + -5" identifier = (binary_expression "iVar2 + -5" identifier + number_literal)) ;) (if_statement "if (*(char *)(param_1 + 8) != '\0') {\n    local_40 = iVar2 + -4;\n  }" if (parenthesized_expression "(*(char *)(param_1 + 8) != '\0')" ( (binary_expression "*(char *)(param_1 + 8) != '\0'" (pointer_expression "*(char *)(param_1 + 8)" * (cast_expression "(char *)(param_1 + 8)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    local_40 = iVar2 + -4;\n  }" { (expression_statement "local_40 = iVar2 + -4;" (assignment_expression "local_40 = iVar2 + -4" identifier = (binary_expression "iVar2 + -4" identifier + number_literal)) ;) })) (if_statement "if (*(ushort *)(param_1 + 0x18) == 0) {\n    uVar5 = 0;\n  }\n  else {\n    uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;\n    if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }\n    uVar5 = FUN_00129d5f(0x10396);\n  }" if (parenthesized_expression "(*(ushort *)(param_1 + 0x18) == 0)" ( (binary_expression "*(ushort *)(param_1 + 0x18) == 0" (pointer_expression "*(ushort *)(param_1 + 0x18)" * (cast_expression "(ushort *)(param_1 + 0x18)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    uVar5 = 0;\n  }" { (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;\n    if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }\n    uVar5 = FUN_00129d5f(0x10396);\n  }" else (compound_statement "{\n    uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;\n    if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }\n    uVar5 = FUN_00129d5f(0x10396);\n  }" { (expression_statement "uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;" (assignment_expression "uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8" identifier = (binary_expression "*(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8" (binary_expression "*(ushort *)(lVar3 + (ulong)uVar1) << 8" (pointer_expression "*(ushort *)(lVar3 + (ulong)uVar1)" * (cast_expression "(ushort *)(lVar3 + (ulong)uVar1)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + (ulong)uVar1)" ( (binary_expression "lVar3 + (ulong)uVar1" identifier + (cast_expression "(ulong)uVar1" ( (type_descriptor "ulong" type_identifier) ) identifier)) )))) << number_literal) | (binary_expression "*(ushort *)(lVar3 + (ulong)uVar1) >> 8" (pointer_expression "*(ushort *)(lVar3 + (ulong)uVar1)" * (cast_expression "(ushort *)(lVar3 + (ulong)uVar1)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + (ulong)uVar1)" ( (binary_expression "lVar3 + (ulong)uVar1" identifier + (cast_expression "(ulong)uVar1" ( (type_descriptor "ulong" type_identifier) ) identifier)) )))) >> number_literal))) ;) (if_statement "if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }" if (parenthesized_expression "((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40))" ( (binary_expression "(uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)" (parenthesized_expression "(uVar6 <= uVar7)" ( (binary_expression "uVar6 <= uVar7" identifier <= identifier) )) && (parenthesized_expression "((int)(uint)uVar7 <= local_40)" ( (binary_expression "(int)(uint)uVar7 <= local_40" (cast_expression "(int)(uint)uVar7" ( (type_descriptor "int" primitive_type) ) (cast_expression "(uint)uVar7" ( (type_descriptor "uint" type_identifier) ) identifier)) <= identifier) ))) )) (compound_statement "{\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }" { (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" identifier = number_literal) ;) (do_statement "do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));" do (compound_statement "{\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      }" { (expression_statement "uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);" (assignment_expression "uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3)" identifier = (call_expression "(**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3)" (parenthesized_expression "(**(code **)(param_1 + 0x78))" ( (pointer_expression "**(code **)(param_1 + 0x78)" * (pointer_expression "*(code **)(param_1 + 0x78)" * (cast_expression "(code **)(param_1 + 0x78)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x78)" ( (binary_expression "param_1 + 0x78" identifier + number_literal) ))))) )) (argument_list "(param_1,(ulong)uVar7 + lVar3)" ( identifier , (binary_expression "(ulong)uVar7 + lVar3" (cast_expression "(ulong)uVar7" ( (type_descriptor "ulong" type_identifier) ) identifier) + identifier) )))) ;) (if_statement "if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }" if (parenthesized_expression "(iVar2 < (int)((uint)uVar7 + (uint)uVar4))" ( (binary_expression "iVar2 < (int)((uint)uVar7 + (uint)uVar4)" identifier < (cast_expression "(int)((uint)uVar7 + (uint)uVar4)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)uVar7 + (uint)uVar4)" ( (binary_expression "(uint)uVar7 + (uint)uVar4" (cast_expression "(uint)uVar7" ( (type_descriptor "uint" type_identifier) ) identifier) + (cast_expression "(uint)uVar4" ( (type_descriptor "uint" type_identifier) ) identifier)) )))) )) (compound_statement "{\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }" { (expression_statement "uVar5 = FUN_00129d5f(0x1039b);" (assignment_expression "uVar5 = FUN_00129d5f(0x1039b)" identifier = (call_expression "FUN_00129d5f(0x1039b)" identifier (argument_list "(0x1039b)" ( number_literal )))) ;) (return_statement "return uVar5;" return identifier ;) })) (expression_statement "iVar8 = iVar8 + 1;" (assignment_expression "iVar8 = iVar8 + 1" identifier = (binary_expression "iVar8 + 1" identifier + number_literal)) ;) (if_statement "if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }" if (parenthesized_expression "((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8)" ( (binary_expression "(int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8" (binary_expression "(int)(uint)*(ushort *)(param_1 + 0x18)" (cast_expression "(int)(uint)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uint)" ( identifier ))) * (cast_expression "(ushort *)(param_1 + 0x18)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) <= identifier) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));" (assignment_expression "uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2))" identifier = (pointer_expression "*(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2))" * (cast_expression "(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2))" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + (int)((uint)uVar1 + iVar8 * 2))" ( (binary_expression "lVar3 + (int)((uint)uVar1 + iVar8 * 2)" identifier + (cast_expression "(int)((uint)uVar1 + iVar8 * 2)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)uVar1 + iVar8 * 2)" ( (binary_expression "(uint)uVar1 + iVar8 * 2" (cast_expression "(uint)uVar1" ( (type_descriptor "uint" type_identifier) ) identifier) + (binary_expression "iVar8 * 2" identifier * number_literal)) )))) ))))) ;) (expression_statement "uVar7 = uVar7 << 8 | uVar7 >> 8;" (assignment_expression "uVar7 = uVar7 << 8 | uVar7 >> 8" identifier = (binary_expression "uVar7 << 8 | uVar7 >> 8" (binary_expression "uVar7 << 8" identifier << number_literal) | (binary_expression "uVar7 >> 8" identifier >> number_literal))) ;) }) while (parenthesized_expression "((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40))" ( (binary_expression "(uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)" (parenthesized_expression "(uVar6 <= uVar7)" ( (binary_expression "uVar6 <= uVar7" identifier <= identifier) )) && (parenthesized_expression "((int)(uint)uVar7 <= local_40)" ( (binary_expression "(int)(uint)uVar7 <= local_40" (cast_expression "(int)(uint)uVar7" ( (type_descriptor "int" primitive_type) ) (cast_expression "(uint)uVar7" ( (type_descriptor "uint" type_identifier) ) identifier)) <= identifier) ))) )) ;) })) (expression_statement "uVar5 = FUN_00129d5f(0x10396);" (assignment_expression "uVar5 = FUN_00129d5f(0x10396)" identifier = (call_expression "FUN_00129d5f(0x10396)" identifier (argument_list "(0x10396)" ( number_literal )))) ;) }))) (return_statement "return uVar5;" return identifier ;) })))
(translation_unit "int btreeCellSizeCheck(MemPage *pPage)\n\n{\n  ushort uVar1;\n  u32 uVar2;\n  u8 *puVar3;\n  u16 uVar4;\n  uint uVar5;\n  uint uVar6;\n  ushort uVar7;\n  int iVar8;\n  int local_40;\n  \n  uVar1 = pPage->cellOffset;\n  uVar5 = (uint)uVar1 + (uint)pPage->nCell * 2;\n  uVar2 = pPage->pBt->usableSize;\n  puVar3 = pPage->aData;\n  local_40 = uVar2 - 5;\n  if (pPage->leaf != '\0') {\n    local_40 = uVar2 - 4;\n  }\n  if (pPage->nCell == 0) {\n    iVar8 = 0;\n  }\n  else {\n    uVar7 = *(ushort *)(puVar3 + uVar1) << 8 | *(ushort *)(puVar3 + uVar1) >> 8;\n    uVar6 = (uint)uVar7;\n    if ((uVar5 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (*pPage->xCellSize)(pPage,puVar3 + uVar7);\n        if ((int)uVar2 < (int)(uVar6 + uVar4)) {\n          iVar8 = sqlite3CorruptError(0x1039b);\n          return iVar8;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)pPage->nCell <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) << 8 |\n                *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) >> 8;\n        uVar6 = (uint)uVar7;\n      } while ((uVar5 <= uVar6) && ((int)uVar6 <= local_40));\n    }\n    iVar8 = sqlite3CorruptError(0x10396);\n  }\n  return iVar8;\n}\n\n" (function_definition "int btreeCellSizeCheck(MemPage *pPage)\n\n{\n  ushort uVar1;\n  u32 uVar2;\n  u8 *puVar3;\n  u16 uVar4;\n  uint uVar5;\n  uint uVar6;\n  ushort uVar7;\n  int iVar8;\n  int local_40;\n  \n  uVar1 = pPage->cellOffset;\n  uVar5 = (uint)uVar1 + (uint)pPage->nCell * 2;\n  uVar2 = pPage->pBt->usableSize;\n  puVar3 = pPage->aData;\n  local_40 = uVar2 - 5;\n  if (pPage->leaf != '\0') {\n    local_40 = uVar2 - 4;\n  }\n  if (pPage->nCell == 0) {\n    iVar8 = 0;\n  }\n  else {\n    uVar7 = *(ushort *)(puVar3 + uVar1) << 8 | *(ushort *)(puVar3 + uVar1) >> 8;\n    uVar6 = (uint)uVar7;\n    if ((uVar5 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (*pPage->xCellSize)(pPage,puVar3 + uVar7);\n        if ((int)uVar2 < (int)(uVar6 + uVar4)) {\n          iVar8 = sqlite3CorruptError(0x1039b);\n          return iVar8;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)pPage->nCell <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) << 8 |\n                *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) >> 8;\n        uVar6 = (uint)uVar7;\n      } while ((uVar5 <= uVar6) && ((int)uVar6 <= local_40));\n    }\n    iVar8 = sqlite3CorruptError(0x10396);\n  }\n  return iVar8;\n}" primitive_type (function_declarator "btreeCellSizeCheck(MemPage *pPage)" identifier (parameter_list "(MemPage *pPage)" ( (parameter_declaration "MemPage *pPage" type_identifier (pointer_declarator "*pPage" * identifier)) ))) (compound_statement "{\n  ushort uVar1;\n  u32 uVar2;\n  u8 *puVar3;\n  u16 uVar4;\n  uint uVar5;\n  uint uVar6;\n  ushort uVar7;\n  int iVar8;\n  int local_40;\n  \n  uVar1 = pPage->cellOffset;\n  uVar5 = (uint)uVar1 + (uint)pPage->nCell * 2;\n  uVar2 = pPage->pBt->usableSize;\n  puVar3 = pPage->aData;\n  local_40 = uVar2 - 5;\n  if (pPage->leaf != '\0') {\n    local_40 = uVar2 - 4;\n  }\n  if (pPage->nCell == 0) {\n    iVar8 = 0;\n  }\n  else {\n    uVar7 = *(ushort *)(puVar3 + uVar1) << 8 | *(ushort *)(puVar3 + uVar1) >> 8;\n    uVar6 = (uint)uVar7;\n    if ((uVar5 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (*pPage->xCellSize)(pPage,puVar3 + uVar7);\n        if ((int)uVar2 < (int)(uVar6 + uVar4)) {\n          iVar8 = sqlite3CorruptError(0x1039b);\n          return iVar8;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)pPage->nCell <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) << 8 |\n                *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) >> 8;\n        uVar6 = (uint)uVar7;\n      } while ((uVar5 <= uVar6) && ((int)uVar6 <= local_40));\n    }\n    iVar8 = sqlite3CorruptError(0x10396);\n  }\n  return iVar8;\n}" { (declaration "ushort uVar1;" type_identifier identifier ;) (declaration "u32 uVar2;" type_identifier identifier ;) (declaration "u8 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "u16 uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "ushort uVar7;" type_identifier identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "int local_40;" primitive_type identifier ;) (expression_statement "uVar1 = pPage->cellOffset;" (assignment_expression "uVar1 = pPage->cellOffset" identifier = (field_expression "pPage->cellOffset" identifier -> field_identifier)) ;) (expression_statement "uVar5 = (uint)uVar1 + (uint)pPage->nCell * 2;" (assignment_expression "uVar5 = (uint)uVar1 + (uint)pPage->nCell * 2" identifier = (binary_expression "(uint)uVar1 + (uint)pPage->nCell * 2" (cast_expression "(uint)uVar1" ( (type_descriptor "uint" type_identifier) ) identifier) + (binary_expression "(uint)pPage->nCell * 2" (cast_expression "(uint)pPage->nCell" ( (type_descriptor "uint" type_identifier) ) (field_expression "pPage->nCell" identifier -> field_identifier)) * number_literal))) ;) (expression_statement "uVar2 = pPage->pBt->usableSize;" (assignment_expression "uVar2 = pPage->pBt->usableSize" identifier = (field_expression "pPage->pBt->usableSize" (field_expression "pPage->pBt" identifier -> field_identifier) -> field_identifier)) ;) (expression_statement "puVar3 = pPage->aData;" (assignment_expression "puVar3 = pPage->aData" identifier = (field_expression "pPage->aData" identifier -> field_identifier)) ;) (expression_statement "local_40 = uVar2 - 5;" (assignment_expression "local_40 = uVar2 - 5" identifier = (binary_expression "uVar2 - 5" identifier - number_literal)) ;) (if_statement "if (pPage->leaf != '\0') {\n    local_40 = uVar2 - 4;\n  }" if (parenthesized_expression "(pPage->leaf != '\0')" ( (binary_expression "pPage->leaf != '\0'" (field_expression "pPage->leaf" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    local_40 = uVar2 - 4;\n  }" { (expression_statement "local_40 = uVar2 - 4;" (assignment_expression "local_40 = uVar2 - 4" identifier = (binary_expression "uVar2 - 4" identifier - number_literal)) ;) })) (if_statement "if (pPage->nCell == 0) {\n    iVar8 = 0;\n  }\n  else {\n    uVar7 = *(ushort *)(puVar3 + uVar1) << 8 | *(ushort *)(puVar3 + uVar1) >> 8;\n    uVar6 = (uint)uVar7;\n    if ((uVar5 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (*pPage->xCellSize)(pPage,puVar3 + uVar7);\n        if ((int)uVar2 < (int)(uVar6 + uVar4)) {\n          iVar8 = sqlite3CorruptError(0x1039b);\n          return iVar8;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)pPage->nCell <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) << 8 |\n                *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) >> 8;\n        uVar6 = (uint)uVar7;\n      } while ((uVar5 <= uVar6) && ((int)uVar6 <= local_40));\n    }\n    iVar8 = sqlite3CorruptError(0x10396);\n  }" if (parenthesized_expression "(pPage->nCell == 0)" ( (binary_expression "pPage->nCell == 0" (field_expression "pPage->nCell" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n    iVar8 = 0;\n  }" { (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    uVar7 = *(ushort *)(puVar3 + uVar1) << 8 | *(ushort *)(puVar3 + uVar1) >> 8;\n    uVar6 = (uint)uVar7;\n    if ((uVar5 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (*pPage->xCellSize)(pPage,puVar3 + uVar7);\n        if ((int)uVar2 < (int)(uVar6 + uVar4)) {\n          iVar8 = sqlite3CorruptError(0x1039b);\n          return iVar8;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)pPage->nCell <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) << 8 |\n                *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) >> 8;\n        uVar6 = (uint)uVar7;\n      } while ((uVar5 <= uVar6) && ((int)uVar6 <= local_40));\n    }\n    iVar8 = sqlite3CorruptError(0x10396);\n  }" else (compound_statement "{\n    uVar7 = *(ushort *)(puVar3 + uVar1) << 8 | *(ushort *)(puVar3 + uVar1) >> 8;\n    uVar6 = (uint)uVar7;\n    if ((uVar5 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (*pPage->xCellSize)(pPage,puVar3 + uVar7);\n        if ((int)uVar2 < (int)(uVar6 + uVar4)) {\n          iVar8 = sqlite3CorruptError(0x1039b);\n          return iVar8;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)pPage->nCell <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) << 8 |\n                *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) >> 8;\n        uVar6 = (uint)uVar7;\n      } while ((uVar5 <= uVar6) && ((int)uVar6 <= local_40));\n    }\n    iVar8 = sqlite3CorruptError(0x10396);\n  }" { (expression_statement "uVar7 = *(ushort *)(puVar3 + uVar1) << 8 | *(ushort *)(puVar3 + uVar1) >> 8;" (assignment_expression "uVar7 = *(ushort *)(puVar3 + uVar1) << 8 | *(ushort *)(puVar3 + uVar1) >> 8" identifier = (binary_expression "*(ushort *)(puVar3 + uVar1) << 8 | *(ushort *)(puVar3 + uVar1) >> 8" (binary_expression "*(ushort *)(puVar3 + uVar1) << 8" (pointer_expression "*(ushort *)(puVar3 + uVar1)" * (cast_expression "(ushort *)(puVar3 + uVar1)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + uVar1)" ( (binary_expression "puVar3 + uVar1" identifier + identifier) )))) << number_literal) | (binary_expression "*(ushort *)(puVar3 + uVar1) >> 8" (pointer_expression "*(ushort *)(puVar3 + uVar1)" * (cast_expression "(ushort *)(puVar3 + uVar1)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + uVar1)" ( (binary_expression "puVar3 + uVar1" identifier + identifier) )))) >> number_literal))) ;) (expression_statement "uVar6 = (uint)uVar7;" (assignment_expression "uVar6 = (uint)uVar7" identifier = (cast_expression "(uint)uVar7" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (if_statement "if ((uVar5 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (*pPage->xCellSize)(pPage,puVar3 + uVar7);\n        if ((int)uVar2 < (int)(uVar6 + uVar4)) {\n          iVar8 = sqlite3CorruptError(0x1039b);\n          return iVar8;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)pPage->nCell <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) << 8 |\n                *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) >> 8;\n        uVar6 = (uint)uVar7;\n      } while ((uVar5 <= uVar6) && ((int)uVar6 <= local_40));\n    }" if (parenthesized_expression "((uVar5 <= uVar7) && ((int)(uint)uVar7 <= local_40))" ( (binary_expression "(uVar5 <= uVar7) && ((int)(uint)uVar7 <= local_40)" (parenthesized_expression "(uVar5 <= uVar7)" ( (binary_expression "uVar5 <= uVar7" identifier <= identifier) )) && (parenthesized_expression "((int)(uint)uVar7 <= local_40)" ( (binary_expression "(int)(uint)uVar7 <= local_40" (cast_expression "(int)(uint)uVar7" ( (type_descriptor "int" primitive_type) ) (cast_expression "(uint)uVar7" ( (type_descriptor "uint" type_identifier) ) identifier)) <= identifier) ))) )) (compound_statement "{\n      iVar8 = 0;\n      do {\n        uVar4 = (*pPage->xCellSize)(pPage,puVar3 + uVar7);\n        if ((int)uVar2 < (int)(uVar6 + uVar4)) {\n          iVar8 = sqlite3CorruptError(0x1039b);\n          return iVar8;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)pPage->nCell <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) << 8 |\n                *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) >> 8;\n        uVar6 = (uint)uVar7;\n      } while ((uVar5 <= uVar6) && ((int)uVar6 <= local_40));\n    }" { (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" identifier = number_literal) ;) (do_statement "do {\n        uVar4 = (*pPage->xCellSize)(pPage,puVar3 + uVar7);\n        if ((int)uVar2 < (int)(uVar6 + uVar4)) {\n          iVar8 = sqlite3CorruptError(0x1039b);\n          return iVar8;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)pPage->nCell <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) << 8 |\n                *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) >> 8;\n        uVar6 = (uint)uVar7;\n      } while ((uVar5 <= uVar6) && ((int)uVar6 <= local_40));" do (compound_statement "{\n        uVar4 = (*pPage->xCellSize)(pPage,puVar3 + uVar7);\n        if ((int)uVar2 < (int)(uVar6 + uVar4)) {\n          iVar8 = sqlite3CorruptError(0x1039b);\n          return iVar8;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)pPage->nCell <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) << 8 |\n                *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) >> 8;\n        uVar6 = (uint)uVar7;\n      }" { (expression_statement "uVar4 = (*pPage->xCellSize)(pPage,puVar3 + uVar7);" (assignment_expression "uVar4 = (*pPage->xCellSize)(pPage,puVar3 + uVar7)" identifier = (call_expression "(*pPage->xCellSize)(pPage,puVar3 + uVar7)" (parenthesized_expression "(*pPage->xCellSize)" ( (pointer_expression "*pPage->xCellSize" * (field_expression "pPage->xCellSize" identifier -> field_identifier)) )) (argument_list "(pPage,puVar3 + uVar7)" ( identifier , (binary_expression "puVar3 + uVar7" identifier + identifier) )))) ;) (if_statement "if ((int)uVar2 < (int)(uVar6 + uVar4)) {\n          iVar8 = sqlite3CorruptError(0x1039b);\n          return iVar8;\n        }" if (parenthesized_expression "((int)uVar2 < (int)(uVar6 + uVar4))" ( (binary_expression "(int)uVar2 < (int)(uVar6 + uVar4)" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) < (cast_expression "(int)(uVar6 + uVar4)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar6 + uVar4)" ( (binary_expression "uVar6 + uVar4" identifier + identifier) )))) )) (compound_statement "{\n          iVar8 = sqlite3CorruptError(0x1039b);\n          return iVar8;\n        }" { (expression_statement "iVar8 = sqlite3CorruptError(0x1039b);" (assignment_expression "iVar8 = sqlite3CorruptError(0x1039b)" identifier = (call_expression "sqlite3CorruptError(0x1039b)" identifier (argument_list "(0x1039b)" ( number_literal )))) ;) (return_statement "return iVar8;" return identifier ;) })) (expression_statement "iVar8 = iVar8 + 1;" (assignment_expression "iVar8 = iVar8 + 1" identifier = (binary_expression "iVar8 + 1" identifier + number_literal)) ;) (if_statement "if ((int)(uint)pPage->nCell <= iVar8) {\n          return 0;\n        }" if (parenthesized_expression "((int)(uint)pPage->nCell <= iVar8)" ( (binary_expression "(int)(uint)pPage->nCell <= iVar8" (cast_expression "(int)(uint)pPage->nCell" ( (type_descriptor "int" primitive_type) ) (cast_expression "(uint)pPage->nCell" ( (type_descriptor "uint" type_identifier) ) (field_expression "pPage->nCell" identifier -> field_identifier))) <= identifier) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar7 = *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) << 8 |\n                *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) >> 8;" (assignment_expression "uVar7 = *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) << 8 |\n                *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) >> 8" identifier = (binary_expression "*(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) << 8 |\n                *(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) >> 8" (binary_expression "*(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) << 8" (pointer_expression "*(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2))" * (cast_expression "(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2))" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + (int)((uint)uVar1 + iVar8 * 2))" ( (binary_expression "puVar3 + (int)((uint)uVar1 + iVar8 * 2)" identifier + (cast_expression "(int)((uint)uVar1 + iVar8 * 2)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)uVar1 + iVar8 * 2)" ( (binary_expression "(uint)uVar1 + iVar8 * 2" (cast_expression "(uint)uVar1" ( (type_descriptor "uint" type_identifier) ) identifier) + (binary_expression "iVar8 * 2" identifier * number_literal)) )))) )))) << number_literal) | (binary_expression "*(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2)) >> 8" (pointer_expression "*(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2))" * (cast_expression "(ushort *)(puVar3 + (int)((uint)uVar1 + iVar8 * 2))" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + (int)((uint)uVar1 + iVar8 * 2))" ( (binary_expression "puVar3 + (int)((uint)uVar1 + iVar8 * 2)" identifier + (cast_expression "(int)((uint)uVar1 + iVar8 * 2)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)uVar1 + iVar8 * 2)" ( (binary_expression "(uint)uVar1 + iVar8 * 2" (cast_expression "(uint)uVar1" ( (type_descriptor "uint" type_identifier) ) identifier) + (binary_expression "iVar8 * 2" identifier * number_literal)) )))) )))) >> number_literal))) ;) (expression_statement "uVar6 = (uint)uVar7;" (assignment_expression "uVar6 = (uint)uVar7" identifier = (cast_expression "(uint)uVar7" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) }) while (parenthesized_expression "((uVar5 <= uVar6) && ((int)uVar6 <= local_40))" ( (binary_expression "(uVar5 <= uVar6) && ((int)uVar6 <= local_40)" (parenthesized_expression "(uVar5 <= uVar6)" ( (binary_expression "uVar5 <= uVar6" identifier <= identifier) )) && (parenthesized_expression "((int)uVar6 <= local_40)" ( (binary_expression "(int)uVar6 <= local_40" (cast_expression "(int)uVar6" ( (type_descriptor "int" primitive_type) ) identifier) <= identifier) ))) )) ;) })) (expression_statement "iVar8 = sqlite3CorruptError(0x10396);" (assignment_expression "iVar8 = sqlite3CorruptError(0x10396)" identifier = (call_expression "sqlite3CorruptError(0x10396)" identifier (argument_list "(0x10396)" ( number_literal )))) ;) }))) (return_statement "return iVar8;" return identifier ;) })))
(translation_unit "undefined8 FUN_0012b136(long param_1)\n\n{\n  ushort uVar1;\n  int iVar2;\n  long lVar3;\n  ushort uVar4;\n  undefined8 uVar5;\n  uint uVar6;\n  ushort uVar7;\n  int iVar8;\n  int local_40;\n  \n  uVar1 = *(ushort *)(param_1 + 0x12);\n  uVar6 = (uint)uVar1 + (uint)*(ushort *)(param_1 + 0x18) * 2;\n  iVar2 = *(int *)(*(long *)(param_1 + 0x48) + 0x38);\n  lVar3 = *(long *)(param_1 + 0x50);\n  local_40 = iVar2 + -5;\n  if (*(char *)(param_1 + 8) != '\0') {\n    local_40 = iVar2 + -4;\n  }\n  if (*(ushort *)(param_1 + 0x18) == 0) {\n    uVar5 = 0;\n  }\n  else {\n    uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;\n    if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }\n    uVar5 = FUN_00129d5f(0x10396);\n  }\n  return uVar5;\n}\n\n" (function_definition "undefined8 FUN_0012b136(long param_1)\n\n{\n  ushort uVar1;\n  int iVar2;\n  long lVar3;\n  ushort uVar4;\n  undefined8 uVar5;\n  uint uVar6;\n  ushort uVar7;\n  int iVar8;\n  int local_40;\n  \n  uVar1 = *(ushort *)(param_1 + 0x12);\n  uVar6 = (uint)uVar1 + (uint)*(ushort *)(param_1 + 0x18) * 2;\n  iVar2 = *(int *)(*(long *)(param_1 + 0x48) + 0x38);\n  lVar3 = *(long *)(param_1 + 0x50);\n  local_40 = iVar2 + -5;\n  if (*(char *)(param_1 + 8) != '\0') {\n    local_40 = iVar2 + -4;\n  }\n  if (*(ushort *)(param_1 + 0x18) == 0) {\n    uVar5 = 0;\n  }\n  else {\n    uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;\n    if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }\n    uVar5 = FUN_00129d5f(0x10396);\n  }\n  return uVar5;\n}" type_identifier (function_declarator "FUN_0012b136(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  ushort uVar1;\n  int iVar2;\n  long lVar3;\n  ushort uVar4;\n  undefined8 uVar5;\n  uint uVar6;\n  ushort uVar7;\n  int iVar8;\n  int local_40;\n  \n  uVar1 = *(ushort *)(param_1 + 0x12);\n  uVar6 = (uint)uVar1 + (uint)*(ushort *)(param_1 + 0x18) * 2;\n  iVar2 = *(int *)(*(long *)(param_1 + 0x48) + 0x38);\n  lVar3 = *(long *)(param_1 + 0x50);\n  local_40 = iVar2 + -5;\n  if (*(char *)(param_1 + 8) != '\0') {\n    local_40 = iVar2 + -4;\n  }\n  if (*(ushort *)(param_1 + 0x18) == 0) {\n    uVar5 = 0;\n  }\n  else {\n    uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;\n    if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }\n    uVar5 = FUN_00129d5f(0x10396);\n  }\n  return uVar5;\n}" { (declaration "ushort uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "ushort uVar4;" type_identifier identifier ;) (declaration "undefined8 uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "ushort uVar7;" type_identifier identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "int local_40;" primitive_type identifier ;) (expression_statement "uVar1 = *(ushort *)(param_1 + 0x12);" (assignment_expression "uVar1 = *(ushort *)(param_1 + 0x12)" identifier = (pointer_expression "*(ushort *)(param_1 + 0x12)" * (cast_expression "(ushort *)(param_1 + 0x12)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x12)" ( (binary_expression "param_1 + 0x12" identifier + number_literal) ))))) ;) (expression_statement "uVar6 = (uint)uVar1 + (uint)*(ushort *)(param_1 + 0x18) * 2;" (assignment_expression "uVar6 = (uint)uVar1 + (uint)*(ushort *)(param_1 + 0x18) * 2" identifier = (binary_expression "(uint)uVar1 + (uint)*(ushort *)(param_1 + 0x18) * 2" (cast_expression "(uint)uVar1" ( (type_descriptor "uint" type_identifier) ) identifier) + (binary_expression "(uint)*(ushort *)(param_1 + 0x18) * 2" (binary_expression "(uint)*(ushort *)(param_1 + 0x18)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(ushort *)(param_1 + 0x18)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) * number_literal))) ;) (expression_statement "iVar2 = *(int *)(*(long *)(param_1 + 0x48) + 0x38);" (assignment_expression "iVar2 = *(int *)(*(long *)(param_1 + 0x48) + 0x38)" identifier = (pointer_expression "*(int *)(*(long *)(param_1 + 0x48) + 0x38)" * (cast_expression "(int *)(*(long *)(param_1 + 0x48) + 0x38)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(param_1 + 0x48) + 0x38)" ( (binary_expression "*(long *)(param_1 + 0x48) + 0x38" (pointer_expression "*(long *)(param_1 + 0x48)" * (cast_expression "(long *)(param_1 + 0x48)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "lVar3 = *(long *)(param_1 + 0x50);" (assignment_expression "lVar3 = *(long *)(param_1 + 0x50)" identifier = (pointer_expression "*(long *)(param_1 + 0x50)" * (cast_expression "(long *)(param_1 + 0x50)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) ))))) ;) (expression_statement "local_40 = iVar2 + -5;" (assignment_expression "local_40 = iVar2 + -5" identifier = (binary_expression "iVar2 + -5" identifier + number_literal)) ;) (if_statement "if (*(char *)(param_1 + 8) != '\0') {\n    local_40 = iVar2 + -4;\n  }" if (parenthesized_expression "(*(char *)(param_1 + 8) != '\0')" ( (binary_expression "*(char *)(param_1 + 8) != '\0'" (pointer_expression "*(char *)(param_1 + 8)" * (cast_expression "(char *)(param_1 + 8)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    local_40 = iVar2 + -4;\n  }" { (expression_statement "local_40 = iVar2 + -4;" (assignment_expression "local_40 = iVar2 + -4" identifier = (binary_expression "iVar2 + -4" identifier + number_literal)) ;) })) (if_statement "if (*(ushort *)(param_1 + 0x18) == 0) {\n    uVar5 = 0;\n  }\n  else {\n    uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;\n    if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }\n    uVar5 = FUN_00129d5f(0x10396);\n  }" if (parenthesized_expression "(*(ushort *)(param_1 + 0x18) == 0)" ( (binary_expression "*(ushort *)(param_1 + 0x18) == 0" (pointer_expression "*(ushort *)(param_1 + 0x18)" * (cast_expression "(ushort *)(param_1 + 0x18)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    uVar5 = 0;\n  }" { (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;\n    if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }\n    uVar5 = FUN_00129d5f(0x10396);\n  }" else (compound_statement "{\n    uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;\n    if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }\n    uVar5 = FUN_00129d5f(0x10396);\n  }" { (expression_statement "uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;" (assignment_expression "uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8" identifier = (binary_expression "*(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8" (binary_expression "*(ushort *)(lVar3 + (ulong)uVar1) << 8" (pointer_expression "*(ushort *)(lVar3 + (ulong)uVar1)" * (cast_expression "(ushort *)(lVar3 + (ulong)uVar1)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + (ulong)uVar1)" ( (binary_expression "lVar3 + (ulong)uVar1" identifier + (cast_expression "(ulong)uVar1" ( (type_descriptor "ulong" type_identifier) ) identifier)) )))) << number_literal) | (binary_expression "*(ushort *)(lVar3 + (ulong)uVar1) >> 8" (pointer_expression "*(ushort *)(lVar3 + (ulong)uVar1)" * (cast_expression "(ushort *)(lVar3 + (ulong)uVar1)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + (ulong)uVar1)" ( (binary_expression "lVar3 + (ulong)uVar1" identifier + (cast_expression "(ulong)uVar1" ( (type_descriptor "ulong" type_identifier) ) identifier)) )))) >> number_literal))) ;) (if_statement "if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }" if (parenthesized_expression "((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40))" ( (binary_expression "(uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)" (parenthesized_expression "(uVar6 <= uVar7)" ( (binary_expression "uVar6 <= uVar7" identifier <= identifier) )) && (parenthesized_expression "((int)(uint)uVar7 <= local_40)" ( (binary_expression "(int)(uint)uVar7 <= local_40" (cast_expression "(int)(uint)uVar7" ( (type_descriptor "int" primitive_type) ) (cast_expression "(uint)uVar7" ( (type_descriptor "uint" type_identifier) ) identifier)) <= identifier) ))) )) (compound_statement "{\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }" { (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" identifier = number_literal) ;) (do_statement "do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));" do (compound_statement "{\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      }" { (expression_statement "uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);" (assignment_expression "uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3)" identifier = (call_expression "(**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3)" (parenthesized_expression "(**(code **)(param_1 + 0x78))" ( (pointer_expression "**(code **)(param_1 + 0x78)" * (pointer_expression "*(code **)(param_1 + 0x78)" * (cast_expression "(code **)(param_1 + 0x78)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x78)" ( (binary_expression "param_1 + 0x78" identifier + number_literal) ))))) )) (argument_list "(param_1,(ulong)uVar7 + lVar3)" ( identifier , (binary_expression "(ulong)uVar7 + lVar3" (cast_expression "(ulong)uVar7" ( (type_descriptor "ulong" type_identifier) ) identifier) + identifier) )))) ;) (if_statement "if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }" if (parenthesized_expression "(iVar2 < (int)((uint)uVar7 + (uint)uVar4))" ( (binary_expression "iVar2 < (int)((uint)uVar7 + (uint)uVar4)" identifier < (cast_expression "(int)((uint)uVar7 + (uint)uVar4)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)uVar7 + (uint)uVar4)" ( (binary_expression "(uint)uVar7 + (uint)uVar4" (cast_expression "(uint)uVar7" ( (type_descriptor "uint" type_identifier) ) identifier) + (cast_expression "(uint)uVar4" ( (type_descriptor "uint" type_identifier) ) identifier)) )))) )) (compound_statement "{\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }" { (expression_statement "uVar5 = FUN_00129d5f(0x1039b);" (assignment_expression "uVar5 = FUN_00129d5f(0x1039b)" identifier = (call_expression "FUN_00129d5f(0x1039b)" identifier (argument_list "(0x1039b)" ( number_literal )))) ;) (return_statement "return uVar5;" return identifier ;) })) (expression_statement "iVar8 = iVar8 + 1;" (assignment_expression "iVar8 = iVar8 + 1" identifier = (binary_expression "iVar8 + 1" identifier + number_literal)) ;) (if_statement "if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }" if (parenthesized_expression "((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8)" ( (binary_expression "(int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8" (binary_expression "(int)(uint)*(ushort *)(param_1 + 0x18)" (cast_expression "(int)(uint)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uint)" ( identifier ))) * (cast_expression "(ushort *)(param_1 + 0x18)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) <= identifier) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));" (assignment_expression "uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2))" identifier = (pointer_expression "*(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2))" * (cast_expression "(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2))" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + (int)((uint)uVar1 + iVar8 * 2))" ( (binary_expression "lVar3 + (int)((uint)uVar1 + iVar8 * 2)" identifier + (cast_expression "(int)((uint)uVar1 + iVar8 * 2)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)uVar1 + iVar8 * 2)" ( (binary_expression "(uint)uVar1 + iVar8 * 2" (cast_expression "(uint)uVar1" ( (type_descriptor "uint" type_identifier) ) identifier) + (binary_expression "iVar8 * 2" identifier * number_literal)) )))) ))))) ;) (expression_statement "uVar7 = uVar7 << 8 | uVar7 >> 8;" (assignment_expression "uVar7 = uVar7 << 8 | uVar7 >> 8" identifier = (binary_expression "uVar7 << 8 | uVar7 >> 8" (binary_expression "uVar7 << 8" identifier << number_literal) | (binary_expression "uVar7 >> 8" identifier >> number_literal))) ;) }) while (parenthesized_expression "((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40))" ( (binary_expression "(uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)" (parenthesized_expression "(uVar6 <= uVar7)" ( (binary_expression "uVar6 <= uVar7" identifier <= identifier) )) && (parenthesized_expression "((int)(uint)uVar7 <= local_40)" ( (binary_expression "(int)(uint)uVar7 <= local_40" (cast_expression "(int)(uint)uVar7" ( (type_descriptor "int" primitive_type) ) (cast_expression "(uint)uVar7" ( (type_descriptor "uint" type_identifier) ) identifier)) <= identifier) ))) )) ;) })) (expression_statement "uVar5 = FUN_00129d5f(0x10396);" (assignment_expression "uVar5 = FUN_00129d5f(0x10396)" identifier = (call_expression "FUN_00129d5f(0x10396)" identifier (argument_list "(0x10396)" ( number_literal )))) ;) }))) (return_statement "return uVar5;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (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 IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (binary_expression (binary_expression (parenthesized_expression ( IDENT )) * (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 (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (if_statement if (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 (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) << LIT) | (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) >> LIT))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) && (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)) <= IDENT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( IDENT ))) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) <= IDENT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (binary_expression IDENT * LIT)) )))) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT << LIT) | (binary_expression IDENT >> LIT))) ;) }) while (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) && (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)) <= IDENT) ))) )) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "undefined8 FUN_0012b136(long param_1)\n\n{\n  ushort uVar1;\n  int iVar2;\n  long lVar3;\n  ushort uVar4;\n  undefined8 uVar5;\n  uint uVar6;\n  ushort uVar7;\n  int iVar8;\n  int local_40;\n  \n  uVar1 = *(ushort *)(param_1 + 0x12);\n  uVar6 = (uint)uVar1 + (uint)*(ushort *)(param_1 + 0x18) * 2;\n  iVar2 = *(int *)(*(long *)(param_1 + 0x48) + 0x38);\n  lVar3 = *(long *)(param_1 + 0x50);\n  local_40 = iVar2 + -5;\n  if (*(char *)(param_1 + 8) != '\0') {\n    local_40 = iVar2 + -4;\n  }\n  if (*(ushort *)(param_1 + 0x18) == 0) {\n    uVar5 = 0;\n  }\n  else {\n    uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;\n    if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }\n    uVar5 = FUN_00129d5f(0x10396);\n  }\n  return uVar5;\n}" (type_identifier "undefined8") (function_declarator "FUN_0012b136(long param_1)" (identifier "FUN_0012b136") (parameter_list "(long param_1)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) () ")"))) (compound_statement "{\n  ushort uVar1;\n  int iVar2;\n  long lVar3;\n  ushort uVar4;\n  undefined8 uVar5;\n  uint uVar6;\n  ushort uVar7;\n  int iVar8;\n  int local_40;\n  \n  uVar1 = *(ushort *)(param_1 + 0x12);\n  uVar6 = (uint)uVar1 + (uint)*(ushort *)(param_1 + 0x18) * 2;\n  iVar2 = *(int *)(*(long *)(param_1 + 0x48) + 0x38);\n  lVar3 = *(long *)(param_1 + 0x50);\n  local_40 = iVar2 + -5;\n  if (*(char *)(param_1 + 8) != '\0') {\n    local_40 = iVar2 + -4;\n  }\n  if (*(ushort *)(param_1 + 0x18) == 0) {\n    uVar5 = 0;\n  }\n  else {\n    uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;\n    if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }\n    uVar5 = FUN_00129d5f(0x10396);\n  }\n  return uVar5;\n}" ({ "{") (declaration "ushort uVar1;" (type_identifier "ushort") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "long lVar3;" (sized_type_specifier "long" (long "long")) (identifier "lVar3") (; ";")) (declaration "ushort uVar4;" (type_identifier "ushort") (identifier "uVar4") (; ";")) (declaration "undefined8 uVar5;" (type_identifier "undefined8") (identifier "uVar5") (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (declaration "ushort uVar7;" (type_identifier "ushort") (identifier "uVar7") (; ";")) (declaration "int iVar8;" (primitive_type "int") (identifier "iVar8") (; ";")) (declaration "int local_40;" (primitive_type "int") (identifier "local_40") (; ";")) (expression_statement "uVar1 = *(ushort *)(param_1 + 0x12);" (assignment_expression "uVar1 = *(ushort *)(param_1 + 0x12)" (identifier "uVar1") (= "=") (pointer_expression "*(ushort *)(param_1 + 0x12)" (* "*") (cast_expression "(ushort *)(param_1 + 0x12)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x12)" (( "(") (binary_expression "param_1 + 0x12" (identifier "param_1") (+ "+") (number_literal "0x12")) () ")"))))) (; ";")) (expression_statement "uVar6 = (uint)uVar1 + (uint)*(ushort *)(param_1 + 0x18) * 2;" (assignment_expression "uVar6 = (uint)uVar1 + (uint)*(ushort *)(param_1 + 0x18) * 2" (identifier "uVar6") (= "=") (binary_expression "(uint)uVar1 + (uint)*(ushort *)(param_1 + 0x18) * 2" (cast_expression "(uint)uVar1" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "uVar1")) (+ "+") (binary_expression "(uint)*(ushort *)(param_1 + 0x18) * 2" (binary_expression "(uint)*(ushort *)(param_1 + 0x18)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(ushort *)(param_1 + 0x18)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (* "*") (number_literal "2")))) (; ";")) (expression_statement "iVar2 = *(int *)(*(long *)(param_1 + 0x48) + 0x38);" (assignment_expression "iVar2 = *(int *)(*(long *)(param_1 + 0x48) + 0x38)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(*(long *)(param_1 + 0x48) + 0x38)" (* "*") (cast_expression "(int *)(*(long *)(param_1 + 0x48) + 0x38)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(long *)(param_1 + 0x48) + 0x38)" (( "(") (binary_expression "*(long *)(param_1 + 0x48) + 0x38" (pointer_expression "*(long *)(param_1 + 0x48)" (* "*") (cast_expression "(long *)(param_1 + 0x48)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x48)" (( "(") (binary_expression "param_1 + 0x48" (identifier "param_1") (+ "+") (number_literal "0x48")) () ")")))) (+ "+") (number_literal "0x38")) () ")"))))) (; ";")) (expression_statement "lVar3 = *(long *)(param_1 + 0x50);" (assignment_expression "lVar3 = *(long *)(param_1 + 0x50)" (identifier "lVar3") (= "=") (pointer_expression "*(long *)(param_1 + 0x50)" (* "*") (cast_expression "(long *)(param_1 + 0x50)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x50)" (( "(") (binary_expression "param_1 + 0x50" (identifier "param_1") (+ "+") (number_literal "0x50")) () ")"))))) (; ";")) (expression_statement "local_40 = iVar2 + -5;" (assignment_expression "local_40 = iVar2 + -5" (identifier "local_40") (= "=") (binary_expression "iVar2 + -5" (identifier "iVar2") (+ "+") (number_literal "-5"))) (; ";")) (if_statement "if (*(char *)(param_1 + 8) != '\0') {\n    local_40 = iVar2 + -4;\n  }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 8) != '\0')" (( "(") (binary_expression "*(char *)(param_1 + 8) != '\0'" (pointer_expression "*(char *)(param_1 + 8)" (* "*") (cast_expression "(char *)(param_1 + 8)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    local_40 = iVar2 + -4;\n  }" ({ "{") (expression_statement "local_40 = iVar2 + -4;" (assignment_expression "local_40 = iVar2 + -4" (identifier "local_40") (= "=") (binary_expression "iVar2 + -4" (identifier "iVar2") (+ "+") (number_literal "-4"))) (; ";")) (} "}"))) (if_statement "if (*(ushort *)(param_1 + 0x18) == 0) {\n    uVar5 = 0;\n  }\n  else {\n    uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;\n    if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }\n    uVar5 = FUN_00129d5f(0x10396);\n  }" (if "if") (parenthesized_expression "(*(ushort *)(param_1 + 0x18) == 0)" (( "(") (binary_expression "*(ushort *)(param_1 + 0x18) == 0" (pointer_expression "*(ushort *)(param_1 + 0x18)" (* "*") (cast_expression "(ushort *)(param_1 + 0x18)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar5 = 0;\n  }" ({ "{") (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;\n    if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }\n    uVar5 = FUN_00129d5f(0x10396);\n  }" (else "else") (compound_statement "{\n    uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;\n    if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }\n    uVar5 = FUN_00129d5f(0x10396);\n  }" ({ "{") (expression_statement "uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;" (assignment_expression "uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8" (identifier "uVar7") (= "=") (binary_expression "*(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8" (binary_expression "*(ushort *)(lVar3 + (ulong)uVar1) << 8" (pointer_expression "*(ushort *)(lVar3 + (ulong)uVar1)" (* "*") (cast_expression "(ushort *)(lVar3 + (ulong)uVar1)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + (ulong)uVar1)" (( "(") (binary_expression "lVar3 + (ulong)uVar1" (identifier "lVar3") (+ "+") (cast_expression "(ulong)uVar1" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar1"))) () ")")))) (<< "<<") (number_literal "8")) (| "|") (binary_expression "*(ushort *)(lVar3 + (ulong)uVar1) >> 8" (pointer_expression "*(ushort *)(lVar3 + (ulong)uVar1)" (* "*") (cast_expression "(ushort *)(lVar3 + (ulong)uVar1)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + (ulong)uVar1)" (( "(") (binary_expression "lVar3 + (ulong)uVar1" (identifier "lVar3") (+ "+") (cast_expression "(ulong)uVar1" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar1"))) () ")")))) (>> ">>") (number_literal "8")))) (; ";")) (if_statement "if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }" (if "if") (parenthesized_expression "((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40))" (( "(") (binary_expression "(uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)" (parenthesized_expression "(uVar6 <= uVar7)" (( "(") (binary_expression "uVar6 <= uVar7" (identifier "uVar6") (<= "<=") (identifier "uVar7")) () ")")) (&& "&&") (parenthesized_expression "((int)(uint)uVar7 <= local_40)" (( "(") (binary_expression "(int)(uint)uVar7 <= local_40" (cast_expression "(int)(uint)uVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (cast_expression "(uint)uVar7" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "uVar7"))) (<= "<=") (identifier "local_40")) () ")"))) () ")")) (compound_statement "{\n      iVar8 = 0;\n      do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));\n    }" ({ "{") (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" (identifier "iVar8") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));" (do "do") (compound_statement "{\n        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);\n        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }\n        iVar8 = iVar8 + 1;\n        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }\n        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));\n        uVar7 = uVar7 << 8 | uVar7 >> 8;\n      }" ({ "{") (expression_statement "uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);" (assignment_expression "uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3)" (identifier "uVar4") (= "=") (call_expression "(**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3)" (parenthesized_expression "(**(code **)(param_1 + 0x78))" (( "(") (pointer_expression "**(code **)(param_1 + 0x78)" (* "*") (pointer_expression "*(code **)(param_1 + 0x78)" (* "*") (cast_expression "(code **)(param_1 + 0x78)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x78)" (( "(") (binary_expression "param_1 + 0x78" (identifier "param_1") (+ "+") (number_literal "0x78")) () ")"))))) () ")")) (argument_list "(param_1,(ulong)uVar7 + lVar3)" (( "(") (identifier "param_1") (, ",") (binary_expression "(ulong)uVar7 + lVar3" (cast_expression "(ulong)uVar7" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar7")) (+ "+") (identifier "lVar3")) () ")")))) (; ";")) (if_statement "if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }" (if "if") (parenthesized_expression "(iVar2 < (int)((uint)uVar7 + (uint)uVar4))" (( "(") (binary_expression "iVar2 < (int)((uint)uVar7 + (uint)uVar4)" (identifier "iVar2") (< "<") (cast_expression "(int)((uint)uVar7 + (uint)uVar4)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((uint)uVar7 + (uint)uVar4)" (( "(") (binary_expression "(uint)uVar7 + (uint)uVar4" (cast_expression "(uint)uVar7" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "uVar7")) (+ "+") (cast_expression "(uint)uVar4" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "uVar4"))) () ")")))) () ")")) (compound_statement "{\n          uVar5 = FUN_00129d5f(0x1039b);\n          return uVar5;\n        }" ({ "{") (expression_statement "uVar5 = FUN_00129d5f(0x1039b);" (assignment_expression "uVar5 = FUN_00129d5f(0x1039b)" (identifier "uVar5") (= "=") (call_expression "FUN_00129d5f(0x1039b)" (identifier "FUN_00129d5f") (argument_list "(0x1039b)" (( "(") (number_literal "0x1039b") () ")")))) (; ";")) (return_statement "return uVar5;" (return "return") (identifier "uVar5") (; ";")) (} "}"))) (expression_statement "iVar8 = iVar8 + 1;" (assignment_expression "iVar8 = iVar8 + 1" (identifier "iVar8") (= "=") (binary_expression "iVar8 + 1" (identifier "iVar8") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {\n          return 0;\n        }" (if "if") (parenthesized_expression "((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8)" (( "(") (binary_expression "(int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8" (binary_expression "(int)(uint)*(ushort *)(param_1 + 0x18)" (cast_expression "(int)(uint)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")"))) (* "*") (cast_expression "(ushort *)(param_1 + 0x18)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (<= "<=") (identifier "iVar8")) () ")")) (compound_statement "{\n          return 0;\n        }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));" (assignment_expression "uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2))" (identifier "uVar7") (= "=") (pointer_expression "*(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2))" (* "*") (cast_expression "(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2))" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + (int)((uint)uVar1 + iVar8 * 2))" (( "(") (binary_expression "lVar3 + (int)((uint)uVar1 + iVar8 * 2)" (identifier "lVar3") (+ "+") (cast_expression "(int)((uint)uVar1 + iVar8 * 2)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((uint)uVar1 + iVar8 * 2)" (( "(") (binary_expression "(uint)uVar1 + iVar8 * 2" (cast_expression "(uint)uVar1" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "uVar1")) (+ "+") (binary_expression "iVar8 * 2" (identifier "iVar8") (* "*") (number_literal "2"))) () ")")))) () ")"))))) (; ";")) (expression_statement "uVar7 = uVar7 << 8 | uVar7 >> 8;" (assignment_expression "uVar7 = uVar7 << 8 | uVar7 >> 8" (identifier "uVar7") (= "=") (binary_expression "uVar7 << 8 | uVar7 >> 8" (binary_expression "uVar7 << 8" (identifier "uVar7") (<< "<<") (number_literal "8")) (| "|") (binary_expression "uVar7 >> 8" (identifier "uVar7") (>> ">>") (number_literal "8")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40))" (( "(") (binary_expression "(uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)" (parenthesized_expression "(uVar6 <= uVar7)" (( "(") (binary_expression "uVar6 <= uVar7" (identifier "uVar6") (<= "<=") (identifier "uVar7")) () ")")) (&& "&&") (parenthesized_expression "((int)(uint)uVar7 <= local_40)" (( "(") (binary_expression "(int)(uint)uVar7 <= local_40" (cast_expression "(int)(uint)uVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (cast_expression "(uint)uVar7" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "uVar7"))) (<= "<=") (identifier "local_40")) () ")"))) () ")")) (; ";")) (} "}"))) (expression_statement "uVar5 = FUN_00129d5f(0x10396);" (assignment_expression "uVar5 = FUN_00129d5f(0x10396)" (identifier "uVar5") (= "=") (call_expression "FUN_00129d5f(0x10396)" (identifier "FUN_00129d5f") (argument_list "(0x10396)" (( "(") (number_literal "0x10396") () ")")))) (; ";")) (} "}")))) (return_statement "return uVar5;" (return "return") (identifier "uVar5") (; ";")) (} "}")))

int function_1(type_1 *pPage)

{
  type_2 var_3;
  type_3 var_1;
  type_4 *var_2;
  type_5 var_8;
  type_6 var_4;
  type_6 var_7;
  type_2 var_5;
  int var_10;
  int var_6;
  
  var_3 = pPage->cellOffset;
  var_4 = (type_6)var_3 + (type_6)pPage->nCell * 2;
  var_1 = pPage->pBt->usableSize;
  var_2 = pPage->aData;
  var_6 = var_1 - 5;
  if (pPage->leaf != '\0') {
    var_6 = var_1 - 4;
  }
  if (pPage->nCell == 0) {
    var_10 = 0;
  }
  else {
    var_5 = *(type_2 *)(var_2 + var_3) << 8 | *(type_2 *)(var_2 + var_3) >> 8;
    var_7 = (type_6)var_5;
    if ((var_4 <= var_5) && ((int)(type_6)var_5 <= var_6)) {
      var_10 = 0;
      do {
        var_8 = (*pPage->xCellSize)(pPage,var_2 + var_5);
        if ((int)var_1 < (int)(var_7 + var_8)) {
          var_10 = var_9(0x1039b);
          return var_10;
        }
        var_10 = var_10 + 1;
        if ((int)(type_6)pPage->nCell <= var_10) {
          return 0;
        }
        var_5 = *(type_2 *)(var_2 + (int)((type_6)var_3 + var_10 * 2)) << 8 |
                *(type_2 *)(var_2 + (int)((type_6)var_3 + var_10 * 2)) >> 8;
        var_7 = (type_6)var_5;
      } while ((var_4 <= var_7) && ((int)var_7 <= var_6));
    }
    var_10 = var_9(0x10396);
  }
  return var_10;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) 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: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (binary_expression left: (binary_expression left: (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))))) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (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: (sized_type_specifier) 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: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (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: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (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))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (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: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))))) right: (number_literal)) right: (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: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))))) right: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier))) right: (identifier))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) arguments: (argument_list (identifier) (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal))))) (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (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))))) right: (identifier))) consequence: (compound_statement (return_statement (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: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (binary_expression left: (identifier) right: (number_literal))))))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))))) condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier))) right: (identifier)))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal)))))))) (return_statement (identifier)))))

undefined8 MASKED(long param_1)

{
  ushort uVar1;
  int iVar2;
  long lVar3;
  ushort uVar4;
  undefined8 uVar5;
  uint uVar6;
  ushort uVar7;
  int iVar8;
  int local_40;
  
  uVar1 = *(ushort *)(param_1 + 0x12);
  uVar6 = (uint)uVar1 + (uint)*(ushort *)(param_1 + 0x18) * 2;
  iVar2 = *(int *)(*(long *)(param_1 + 0x48) + 0x38);
  lVar3 = *(long *)(param_1 + 0x50);
  local_40 = iVar2 + -5;
  if (*(char *)(param_1 + 8) != '\0') {
    local_40 = iVar2 + -4;
  }
  if (*(ushort *)(param_1 + 0x18) == 0) {
    uVar5 = 0;
  }
  else {
    uVar7 = *(ushort *)(lVar3 + (ulong)uVar1) << 8 | *(ushort *)(lVar3 + (ulong)uVar1) >> 8;
    if ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40)) {
      iVar8 = 0;
      do {
        uVar4 = (**(code **)(param_1 + 0x78))(param_1,(ulong)uVar7 + lVar3);
        if (iVar2 < (int)((uint)uVar7 + (uint)uVar4)) {
          uVar5 = FUN_00129d5f(0x1039b);
          return uVar5;
        }
        iVar8 = iVar8 + 1;
        if ((int)(uint)*(ushort *)(param_1 + 0x18) <= iVar8) {
          return 0;
        }
        uVar7 = *(ushort *)(lVar3 + (int)((uint)uVar1 + iVar8 * 2));
        uVar7 = uVar7 << 8 | uVar7 >> 8;
      } while ((uVar6 <= uVar7) && ((int)(uint)uVar7 <= local_40));
    }
    uVar5 = FUN_00129d5f(0x10396);
  }
  return uVar5;
}

