
int sessionBufferGrow(SessionBuffer *p,int nByte,int *pRc)

{
  u8 *puVar1;
  uint uVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  int iVar6;
  
  if (*pRc != 0) {
    return 1;
  }
  uVar2 = p->nAlloc;
  iVar6 = p->nBuf;
  if (nByte <= (int)(uVar2 - iVar6)) {
    return 0;
  }
  if (uVar2 == 0) {
    uVar2 = 0x80;
  }
  uVar5 = (int)uVar2 >> 0x1f;
  do {
    do {
      uVar3 = uVar2 >> 0x1f;
      uVar2 = uVar2 * 2;
      uVar5 = uVar3 | uVar5 << 1;
      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);
    } while (iVar4 < nByte >> 0x1f);
  } while ((nByte >> 0x1f == iVar4) && (uVar2 - iVar6 < (uint)nByte));
  puVar1 = (u8 *)(*(code *)PTR_sqlite3_realloc64_0015c768)(p->aBuf,nByte,uVar5,uVar2);
  if (puVar1 == (u8 *)0x0) {
    uVar2 = 1;
    *pRc = 7;
  }
  else {
    p->aBuf = puVar1;
    p->nAlloc = uVar2;
    uVar2 = (uint)(*pRc != 0);
  }
  return uVar2;
}



bool FUN_0008ea04(int *param_1,uint param_2,int *param_3)

{
  bool bVar1;
  uint uVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  int iVar6;
  
  if (*param_3 != 0) {
    return true;
  }
  uVar2 = param_1[2];
  iVar6 = param_1[1];
  if ((int)param_2 <= (int)(uVar2 - iVar6)) {
    return false;
  }
  if (uVar2 == 0) {
    uVar2 = 0x80;
  }
  uVar5 = (int)uVar2 >> 0x1f;
  do {
    do {
      uVar3 = uVar2 >> 0x1f;
      uVar2 = uVar2 * 2;
      uVar5 = uVar3 | uVar5 << 1;
      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);
    } while (iVar4 < (int)param_2 >> 0x1f);
  } while (((int)param_2 >> 0x1f == iVar4) && (uVar2 - iVar6 < param_2));
  iVar6 = (*(code *)PTR_sqlite3_realloc64_0015c768)(*param_1,param_2,uVar5,uVar2);
  if (iVar6 == 0) {
    bVar1 = true;
    *param_3 = 7;
  }
  else {
    *param_1 = iVar6;
    param_1[2] = uVar2;
    bVar1 = *param_3 != 0;
  }
  return bVar1;
}


lui gp,0xd
addiu gp,gp,0x5bac
addu gp,gp,t9
lw v0,0x0(a2)
bne v0,zero,0x0008eaec
_nop
lw v1,0x8(a0)
lw t3,0x4(a0)
subu a3,v1,t3
slt a3,a3,a1
beq a3,zero,0x0008eaf4
_nop
addiu sp,sp,-0x28
sw gp,0x10(sp)
sw ra,0x24(sp)
sw s2,0x20(sp)
sw s1,0x1c(sp)
beq v1,zero,0x0008eafc
_sw s0,0x18(sp)
sra t0,v1,0x1f
sra t5,t3,0x1f
sra t4,a1,0x1f
or v0,v1,zero
srl a3,v0,0x1f
sll s0,v0,0x1
sll v1,t0,0x1
subu t1,s0,t3
or v1,a3,v1
subu a3,v1,t5
sltu t2,s0,t1
subu a3,a3,t2
or v0,s0,zero
slt t2,a3,t4
bne t2,zero,0x0008ea60
_or t0,v1,zero
bne t4,a3,0x0008eaa0
_sltu t1,t1,a1
bne t1,zero,0x0008ea64
_srl a3,v0,0x1f
lw t9,-0x7e48(gp)
or s1,a0,zero
lw a0,0x0(a0)
or s2,a2,zero
or a3,s0,zero
jalr t9
_or a2,v1,zero
beq v0,zero,0x0008eb04
_li v1,0x7
sw v0,0x0(s1)
sw s0,0x8(s1)
lw v0,0x0(s2)
sltu v0,zero,v0
lw ra,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
jr ra
_li v0,0x1
jr ra
_nop
b 0x0008ea50
_li v1,0x80
li v0,0x1
b 0x0008ead4
_sw v1,0x0(s2)
(translation_unit "bool FUN_0008ea04(int *param_1,uint param_2,int *param_3)\n\n{\n  bool bVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  \n  if (*param_3 != 0) {\n    return true;\n  }\n  uVar2 = param_1[2];\n  iVar6 = param_1[1];\n  if ((int)param_2 <= (int)(uVar2 - iVar6)) {\n    return false;\n  }\n  if (uVar2 == 0) {\n    uVar2 = 0x80;\n  }\n  uVar5 = (int)uVar2 >> 0x1f;\n  do {\n    do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < (int)param_2 >> 0x1f);\n  } while (((int)param_2 >> 0x1f == iVar4) && (uVar2 - iVar6 < param_2));\n  iVar6 = (*(code *)PTR_sqlite3_realloc64_0015c768)(*param_1,param_2,uVar5,uVar2);\n  if (iVar6 == 0) {\n    bVar1 = true;\n    *param_3 = 7;\n  }\n  else {\n    *param_1 = iVar6;\n    param_1[2] = uVar2;\n    bVar1 = *param_3 != 0;\n  }\n  return bVar1;\n}\n\n" (function_definition "bool FUN_0008ea04(int *param_1,uint param_2,int *param_3)\n\n{\n  bool bVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  \n  if (*param_3 != 0) {\n    return true;\n  }\n  uVar2 = param_1[2];\n  iVar6 = param_1[1];\n  if ((int)param_2 <= (int)(uVar2 - iVar6)) {\n    return false;\n  }\n  if (uVar2 == 0) {\n    uVar2 = 0x80;\n  }\n  uVar5 = (int)uVar2 >> 0x1f;\n  do {\n    do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < (int)param_2 >> 0x1f);\n  } while (((int)param_2 >> 0x1f == iVar4) && (uVar2 - iVar6 < param_2));\n  iVar6 = (*(code *)PTR_sqlite3_realloc64_0015c768)(*param_1,param_2,uVar5,uVar2);\n  if (iVar6 == 0) {\n    bVar1 = true;\n    *param_3 = 7;\n  }\n  else {\n    *param_1 = iVar6;\n    param_1[2] = uVar2;\n    bVar1 = *param_3 != 0;\n  }\n  return bVar1;\n}" primitive_type (function_declarator "FUN_0008ea04(int *param_1,uint param_2,int *param_3)" identifier (parameter_list "(int *param_1,uint param_2,int *param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  bool bVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  \n  if (*param_3 != 0) {\n    return true;\n  }\n  uVar2 = param_1[2];\n  iVar6 = param_1[1];\n  if ((int)param_2 <= (int)(uVar2 - iVar6)) {\n    return false;\n  }\n  if (uVar2 == 0) {\n    uVar2 = 0x80;\n  }\n  uVar5 = (int)uVar2 >> 0x1f;\n  do {\n    do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < (int)param_2 >> 0x1f);\n  } while (((int)param_2 >> 0x1f == iVar4) && (uVar2 - iVar6 < param_2));\n  iVar6 = (*(code *)PTR_sqlite3_realloc64_0015c768)(*param_1,param_2,uVar5,uVar2);\n  if (iVar6 == 0) {\n    bVar1 = true;\n    *param_3 = 7;\n  }\n  else {\n    *param_1 = iVar6;\n    param_1[2] = uVar2;\n    bVar1 = *param_3 != 0;\n  }\n  return bVar1;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (if_statement "if (*param_3 != 0) {\n    return true;\n  }" if (parenthesized_expression "(*param_3 != 0)" ( (binary_expression "*param_3 != 0" (pointer_expression "*param_3" * identifier) != number_literal) )) (compound_statement "{\n    return true;\n  }" { (return_statement "return true;" return true ;) })) (expression_statement "uVar2 = param_1[2];" (assignment_expression "uVar2 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) (expression_statement "iVar6 = param_1[1];" (assignment_expression "iVar6 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if ((int)param_2 <= (int)(uVar2 - iVar6)) {\n    return false;\n  }" if (parenthesized_expression "((int)param_2 <= (int)(uVar2 - iVar6))" ( (binary_expression "(int)param_2 <= (int)(uVar2 - iVar6)" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) <= (cast_expression "(int)(uVar2 - iVar6)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar2 - iVar6)" ( (binary_expression "uVar2 - iVar6" identifier - identifier) )))) )) (compound_statement "{\n    return false;\n  }" { (return_statement "return false;" return false ;) })) (if_statement "if (uVar2 == 0) {\n    uVar2 = 0x80;\n  }" if (parenthesized_expression "(uVar2 == 0)" ( (binary_expression "uVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar2 = 0x80;\n  }" { (expression_statement "uVar2 = 0x80;" (assignment_expression "uVar2 = 0x80" identifier = number_literal) ;) })) (expression_statement "uVar5 = (int)uVar2 >> 0x1f;" (assignment_expression "uVar5 = (int)uVar2 >> 0x1f" identifier = (binary_expression "(int)uVar2 >> 0x1f" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal)) ;) (do_statement "do {\n    do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < (int)param_2 >> 0x1f);\n  } while (((int)param_2 >> 0x1f == iVar4) && (uVar2 - iVar6 < param_2));" do (compound_statement "{\n    do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < (int)param_2 >> 0x1f);\n  }" { (do_statement "do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < (int)param_2 >> 0x1f);" do (compound_statement "{\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    }" { (expression_statement "uVar3 = uVar2 >> 0x1f;" (assignment_expression "uVar3 = uVar2 >> 0x1f" identifier = (binary_expression "uVar2 >> 0x1f" identifier >> number_literal)) ;) (expression_statement "uVar2 = uVar2 * 2;" (assignment_expression "uVar2 = uVar2 * 2" identifier = (binary_expression "uVar2 * 2" identifier * number_literal)) ;) (expression_statement "uVar5 = uVar3 | uVar5 << 1;" (assignment_expression "uVar5 = uVar3 | uVar5 << 1" identifier = (binary_expression "uVar3 | uVar5 << 1" identifier | (binary_expression "uVar5 << 1" identifier << number_literal))) ;) (expression_statement "iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);" (assignment_expression "iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6)" identifier = (binary_expression "(uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6)" (parenthesized_expression "(uVar5 - (iVar6 >> 0x1f))" ( (binary_expression "uVar5 - (iVar6 >> 0x1f)" identifier - (parenthesized_expression "(iVar6 >> 0x1f)" ( (binary_expression "iVar6 >> 0x1f" identifier >> number_literal) ))) )) - (call_expression "(uint)(uVar2 < uVar2 - iVar6)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar2 < uVar2 - iVar6)" ( (binary_expression "uVar2 < uVar2 - iVar6" identifier < (binary_expression "uVar2 - iVar6" identifier - identifier)) ))))) ;) }) while (parenthesized_expression "(iVar4 < (int)param_2 >> 0x1f)" ( (binary_expression "iVar4 < (int)param_2 >> 0x1f" identifier < (binary_expression "(int)param_2 >> 0x1f" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal)) )) ;) }) while (parenthesized_expression "(((int)param_2 >> 0x1f == iVar4) && (uVar2 - iVar6 < param_2))" ( (binary_expression "((int)param_2 >> 0x1f == iVar4) && (uVar2 - iVar6 < param_2)" (parenthesized_expression "((int)param_2 >> 0x1f == iVar4)" ( (binary_expression "(int)param_2 >> 0x1f == iVar4" (binary_expression "(int)param_2 >> 0x1f" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) == identifier) )) && (parenthesized_expression "(uVar2 - iVar6 < param_2)" ( (binary_expression "uVar2 - iVar6 < param_2" (binary_expression "uVar2 - iVar6" identifier - identifier) < identifier) ))) )) ;) (expression_statement "iVar6 = (*(code *)PTR_sqlite3_realloc64_0015c768)(*param_1,param_2,uVar5,uVar2);" (assignment_expression "iVar6 = (*(code *)PTR_sqlite3_realloc64_0015c768)(*param_1,param_2,uVar5,uVar2)" identifier = (call_expression "(*(code *)PTR_sqlite3_realloc64_0015c768)(*param_1,param_2,uVar5,uVar2)" (parenthesized_expression "(*(code *)PTR_sqlite3_realloc64_0015c768)" ( (pointer_expression "*(code *)PTR_sqlite3_realloc64_0015c768" * (cast_expression "(code *)PTR_sqlite3_realloc64_0015c768" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*param_1,param_2,uVar5,uVar2)" ( (pointer_expression "*param_1" * identifier) , identifier , identifier , identifier )))) ;) (if_statement "if (iVar6 == 0) {\n    bVar1 = true;\n    *param_3 = 7;\n  }\n  else {\n    *param_1 = iVar6;\n    param_1[2] = uVar2;\n    bVar1 = *param_3 != 0;\n  }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n    bVar1 = true;\n    *param_3 = 7;\n  }" { (expression_statement "bVar1 = true;" (assignment_expression "bVar1 = true" identifier = true) ;) (expression_statement "*param_3 = 7;" (assignment_expression "*param_3 = 7" (pointer_expression "*param_3" * identifier) = number_literal) ;) }) (else_clause "else {\n    *param_1 = iVar6;\n    param_1[2] = uVar2;\n    bVar1 = *param_3 != 0;\n  }" else (compound_statement "{\n    *param_1 = iVar6;\n    param_1[2] = uVar2;\n    bVar1 = *param_3 != 0;\n  }" { (expression_statement "*param_1 = iVar6;" (assignment_expression "*param_1 = iVar6" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "param_1[2] = uVar2;" (assignment_expression "param_1[2] = uVar2" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "bVar1 = *param_3 != 0;" (assignment_expression "bVar1 = *param_3 != 0" identifier = (binary_expression "*param_3 != 0" (pointer_expression "*param_3" * identifier) != number_literal)) ;) }))) (return_statement "return bVar1;" return identifier ;) })))
(translation_unit "int sessionBufferGrow(SessionBuffer *p,int nByte,int *pRc)\n\n{\n  u8 *puVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  \n  if (*pRc != 0) {\n    return 1;\n  }\n  uVar2 = p->nAlloc;\n  iVar6 = p->nBuf;\n  if (nByte <= (int)(uVar2 - iVar6)) {\n    return 0;\n  }\n  if (uVar2 == 0) {\n    uVar2 = 0x80;\n  }\n  uVar5 = (int)uVar2 >> 0x1f;\n  do {\n    do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < nByte >> 0x1f);\n  } while ((nByte >> 0x1f == iVar4) && (uVar2 - iVar6 < (uint)nByte));\n  puVar1 = (u8 *)(*(code *)PTR_sqlite3_realloc64_0015c768)(p->aBuf,nByte,uVar5,uVar2);\n  if (puVar1 == (u8 *)0x0) {\n    uVar2 = 1;\n    *pRc = 7;\n  }\n  else {\n    p->aBuf = puVar1;\n    p->nAlloc = uVar2;\n    uVar2 = (uint)(*pRc != 0);\n  }\n  return uVar2;\n}\n\n" (function_definition "int sessionBufferGrow(SessionBuffer *p,int nByte,int *pRc)\n\n{\n  u8 *puVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  \n  if (*pRc != 0) {\n    return 1;\n  }\n  uVar2 = p->nAlloc;\n  iVar6 = p->nBuf;\n  if (nByte <= (int)(uVar2 - iVar6)) {\n    return 0;\n  }\n  if (uVar2 == 0) {\n    uVar2 = 0x80;\n  }\n  uVar5 = (int)uVar2 >> 0x1f;\n  do {\n    do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < nByte >> 0x1f);\n  } while ((nByte >> 0x1f == iVar4) && (uVar2 - iVar6 < (uint)nByte));\n  puVar1 = (u8 *)(*(code *)PTR_sqlite3_realloc64_0015c768)(p->aBuf,nByte,uVar5,uVar2);\n  if (puVar1 == (u8 *)0x0) {\n    uVar2 = 1;\n    *pRc = 7;\n  }\n  else {\n    p->aBuf = puVar1;\n    p->nAlloc = uVar2;\n    uVar2 = (uint)(*pRc != 0);\n  }\n  return uVar2;\n}" primitive_type (function_declarator "sessionBufferGrow(SessionBuffer *p,int nByte,int *pRc)" identifier (parameter_list "(SessionBuffer *p,int nByte,int *pRc)" ( (parameter_declaration "SessionBuffer *p" type_identifier (pointer_declarator "*p" * identifier)) , (parameter_declaration "int nByte" primitive_type identifier) , (parameter_declaration "int *pRc" primitive_type (pointer_declarator "*pRc" * identifier)) ))) (compound_statement "{\n  u8 *puVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  \n  if (*pRc != 0) {\n    return 1;\n  }\n  uVar2 = p->nAlloc;\n  iVar6 = p->nBuf;\n  if (nByte <= (int)(uVar2 - iVar6)) {\n    return 0;\n  }\n  if (uVar2 == 0) {\n    uVar2 = 0x80;\n  }\n  uVar5 = (int)uVar2 >> 0x1f;\n  do {\n    do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < nByte >> 0x1f);\n  } while ((nByte >> 0x1f == iVar4) && (uVar2 - iVar6 < (uint)nByte));\n  puVar1 = (u8 *)(*(code *)PTR_sqlite3_realloc64_0015c768)(p->aBuf,nByte,uVar5,uVar2);\n  if (puVar1 == (u8 *)0x0) {\n    uVar2 = 1;\n    *pRc = 7;\n  }\n  else {\n    p->aBuf = puVar1;\n    p->nAlloc = uVar2;\n    uVar2 = (uint)(*pRc != 0);\n  }\n  return uVar2;\n}" { (declaration "u8 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (if_statement "if (*pRc != 0) {\n    return 1;\n  }" if (parenthesized_expression "(*pRc != 0)" ( (binary_expression "*pRc != 0" (pointer_expression "*pRc" * identifier) != number_literal) )) (compound_statement "{\n    return 1;\n  }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "uVar2 = p->nAlloc;" (assignment_expression "uVar2 = p->nAlloc" identifier = (field_expression "p->nAlloc" identifier -> field_identifier)) ;) (expression_statement "iVar6 = p->nBuf;" (assignment_expression "iVar6 = p->nBuf" identifier = (field_expression "p->nBuf" identifier -> field_identifier)) ;) (if_statement "if (nByte <= (int)(uVar2 - iVar6)) {\n    return 0;\n  }" if (parenthesized_expression "(nByte <= (int)(uVar2 - iVar6))" ( (binary_expression "nByte <= (int)(uVar2 - iVar6)" identifier <= (cast_expression "(int)(uVar2 - iVar6)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar2 - iVar6)" ( (binary_expression "uVar2 - iVar6" identifier - identifier) )))) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (uVar2 == 0) {\n    uVar2 = 0x80;\n  }" if (parenthesized_expression "(uVar2 == 0)" ( (binary_expression "uVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar2 = 0x80;\n  }" { (expression_statement "uVar2 = 0x80;" (assignment_expression "uVar2 = 0x80" identifier = number_literal) ;) })) (expression_statement "uVar5 = (int)uVar2 >> 0x1f;" (assignment_expression "uVar5 = (int)uVar2 >> 0x1f" identifier = (binary_expression "(int)uVar2 >> 0x1f" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal)) ;) (do_statement "do {\n    do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < nByte >> 0x1f);\n  } while ((nByte >> 0x1f == iVar4) && (uVar2 - iVar6 < (uint)nByte));" do (compound_statement "{\n    do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < nByte >> 0x1f);\n  }" { (do_statement "do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < nByte >> 0x1f);" do (compound_statement "{\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    }" { (expression_statement "uVar3 = uVar2 >> 0x1f;" (assignment_expression "uVar3 = uVar2 >> 0x1f" identifier = (binary_expression "uVar2 >> 0x1f" identifier >> number_literal)) ;) (expression_statement "uVar2 = uVar2 * 2;" (assignment_expression "uVar2 = uVar2 * 2" identifier = (binary_expression "uVar2 * 2" identifier * number_literal)) ;) (expression_statement "uVar5 = uVar3 | uVar5 << 1;" (assignment_expression "uVar5 = uVar3 | uVar5 << 1" identifier = (binary_expression "uVar3 | uVar5 << 1" identifier | (binary_expression "uVar5 << 1" identifier << number_literal))) ;) (expression_statement "iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);" (assignment_expression "iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6)" identifier = (binary_expression "(uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6)" (parenthesized_expression "(uVar5 - (iVar6 >> 0x1f))" ( (binary_expression "uVar5 - (iVar6 >> 0x1f)" identifier - (parenthesized_expression "(iVar6 >> 0x1f)" ( (binary_expression "iVar6 >> 0x1f" identifier >> number_literal) ))) )) - (call_expression "(uint)(uVar2 < uVar2 - iVar6)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar2 < uVar2 - iVar6)" ( (binary_expression "uVar2 < uVar2 - iVar6" identifier < (binary_expression "uVar2 - iVar6" identifier - identifier)) ))))) ;) }) while (parenthesized_expression "(iVar4 < nByte >> 0x1f)" ( (binary_expression "iVar4 < nByte >> 0x1f" identifier < (binary_expression "nByte >> 0x1f" identifier >> number_literal)) )) ;) }) while (parenthesized_expression "((nByte >> 0x1f == iVar4) && (uVar2 - iVar6 < (uint)nByte))" ( (binary_expression "(nByte >> 0x1f == iVar4) && (uVar2 - iVar6 < (uint)nByte)" (parenthesized_expression "(nByte >> 0x1f == iVar4)" ( (binary_expression "nByte >> 0x1f == iVar4" (binary_expression "nByte >> 0x1f" identifier >> number_literal) == identifier) )) && (parenthesized_expression "(uVar2 - iVar6 < (uint)nByte)" ( (binary_expression "uVar2 - iVar6 < (uint)nByte" (binary_expression "uVar2 - iVar6" identifier - identifier) < (cast_expression "(uint)nByte" ( (type_descriptor "uint" type_identifier) ) identifier)) ))) )) ;) (expression_statement "puVar1 = (u8 *)(*(code *)PTR_sqlite3_realloc64_0015c768)(p->aBuf,nByte,uVar5,uVar2);" (assignment_expression "puVar1 = (u8 *)(*(code *)PTR_sqlite3_realloc64_0015c768)(p->aBuf,nByte,uVar5,uVar2)" identifier = (cast_expression "(u8 *)(*(code *)PTR_sqlite3_realloc64_0015c768)(p->aBuf,nByte,uVar5,uVar2)" ( (type_descriptor "u8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_sqlite3_realloc64_0015c768)(p->aBuf,nByte,uVar5,uVar2)" (parenthesized_expression "(*(code *)PTR_sqlite3_realloc64_0015c768)" ( (pointer_expression "*(code *)PTR_sqlite3_realloc64_0015c768" * (cast_expression "(code *)PTR_sqlite3_realloc64_0015c768" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(p->aBuf,nByte,uVar5,uVar2)" ( (field_expression "p->aBuf" identifier -> field_identifier) , identifier , identifier , identifier ))))) ;) (if_statement "if (puVar1 == (u8 *)0x0) {\n    uVar2 = 1;\n    *pRc = 7;\n  }\n  else {\n    p->aBuf = puVar1;\n    p->nAlloc = uVar2;\n    uVar2 = (uint)(*pRc != 0);\n  }" if (parenthesized_expression "(puVar1 == (u8 *)0x0)" ( (binary_expression "puVar1 == (u8 *)0x0" identifier == (cast_expression "(u8 *)0x0" ( (type_descriptor "u8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar2 = 1;\n    *pRc = 7;\n  }" { (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) (expression_statement "*pRc = 7;" (assignment_expression "*pRc = 7" (pointer_expression "*pRc" * identifier) = number_literal) ;) }) (else_clause "else {\n    p->aBuf = puVar1;\n    p->nAlloc = uVar2;\n    uVar2 = (uint)(*pRc != 0);\n  }" else (compound_statement "{\n    p->aBuf = puVar1;\n    p->nAlloc = uVar2;\n    uVar2 = (uint)(*pRc != 0);\n  }" { (expression_statement "p->aBuf = puVar1;" (assignment_expression "p->aBuf = puVar1" (field_expression "p->aBuf" identifier -> field_identifier) = identifier) ;) (expression_statement "p->nAlloc = uVar2;" (assignment_expression "p->nAlloc = uVar2" (field_expression "p->nAlloc" identifier -> field_identifier) = identifier) ;) (expression_statement "uVar2 = (uint)(*pRc != 0);" (assignment_expression "uVar2 = (uint)(*pRc != 0)" identifier = (call_expression "(uint)(*pRc != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*pRc != 0)" ( (binary_expression "*pRc != 0" (pointer_expression "*pRc" * identifier) != number_literal) )))) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "bool FUN_0008ea04(int *param_1,uint param_2,int *param_3)\n\n{\n  bool bVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  \n  if (*param_3 != 0) {\n    return true;\n  }\n  uVar2 = param_1[2];\n  iVar6 = param_1[1];\n  if ((int)param_2 <= (int)(uVar2 - iVar6)) {\n    return false;\n  }\n  if (uVar2 == 0) {\n    uVar2 = 0x80;\n  }\n  uVar5 = (int)uVar2 >> 0x1f;\n  do {\n    do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < (int)param_2 >> 0x1f);\n  } while (((int)param_2 >> 0x1f == iVar4) && (uVar2 - iVar6 < param_2));\n  iVar6 = (*(code *)PTR_sqlite3_realloc64_0015c768)(*param_1,param_2,uVar5,uVar2);\n  if (iVar6 == 0) {\n    bVar1 = true;\n    *param_3 = 7;\n  }\n  else {\n    *param_1 = iVar6;\n    param_1[2] = uVar2;\n    bVar1 = *param_3 != 0;\n  }\n  return bVar1;\n}\n\n" (function_definition "bool FUN_0008ea04(int *param_1,uint param_2,int *param_3)\n\n{\n  bool bVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  \n  if (*param_3 != 0) {\n    return true;\n  }\n  uVar2 = param_1[2];\n  iVar6 = param_1[1];\n  if ((int)param_2 <= (int)(uVar2 - iVar6)) {\n    return false;\n  }\n  if (uVar2 == 0) {\n    uVar2 = 0x80;\n  }\n  uVar5 = (int)uVar2 >> 0x1f;\n  do {\n    do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < (int)param_2 >> 0x1f);\n  } while (((int)param_2 >> 0x1f == iVar4) && (uVar2 - iVar6 < param_2));\n  iVar6 = (*(code *)PTR_sqlite3_realloc64_0015c768)(*param_1,param_2,uVar5,uVar2);\n  if (iVar6 == 0) {\n    bVar1 = true;\n    *param_3 = 7;\n  }\n  else {\n    *param_1 = iVar6;\n    param_1[2] = uVar2;\n    bVar1 = *param_3 != 0;\n  }\n  return bVar1;\n}" primitive_type (function_declarator "FUN_0008ea04(int *param_1,uint param_2,int *param_3)" identifier (parameter_list "(int *param_1,uint param_2,int *param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  bool bVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  \n  if (*param_3 != 0) {\n    return true;\n  }\n  uVar2 = param_1[2];\n  iVar6 = param_1[1];\n  if ((int)param_2 <= (int)(uVar2 - iVar6)) {\n    return false;\n  }\n  if (uVar2 == 0) {\n    uVar2 = 0x80;\n  }\n  uVar5 = (int)uVar2 >> 0x1f;\n  do {\n    do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < (int)param_2 >> 0x1f);\n  } while (((int)param_2 >> 0x1f == iVar4) && (uVar2 - iVar6 < param_2));\n  iVar6 = (*(code *)PTR_sqlite3_realloc64_0015c768)(*param_1,param_2,uVar5,uVar2);\n  if (iVar6 == 0) {\n    bVar1 = true;\n    *param_3 = 7;\n  }\n  else {\n    *param_1 = iVar6;\n    param_1[2] = uVar2;\n    bVar1 = *param_3 != 0;\n  }\n  return bVar1;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (if_statement "if (*param_3 != 0) {\n    return true;\n  }" if (parenthesized_expression "(*param_3 != 0)" ( (binary_expression "*param_3 != 0" (pointer_expression "*param_3" * identifier) != number_literal) )) (compound_statement "{\n    return true;\n  }" { (return_statement "return true;" return true ;) })) (expression_statement "uVar2 = param_1[2];" (assignment_expression "uVar2 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) (expression_statement "iVar6 = param_1[1];" (assignment_expression "iVar6 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if ((int)param_2 <= (int)(uVar2 - iVar6)) {\n    return false;\n  }" if (parenthesized_expression "((int)param_2 <= (int)(uVar2 - iVar6))" ( (binary_expression "(int)param_2 <= (int)(uVar2 - iVar6)" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) <= (cast_expression "(int)(uVar2 - iVar6)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar2 - iVar6)" ( (binary_expression "uVar2 - iVar6" identifier - identifier) )))) )) (compound_statement "{\n    return false;\n  }" { (return_statement "return false;" return false ;) })) (if_statement "if (uVar2 == 0) {\n    uVar2 = 0x80;\n  }" if (parenthesized_expression "(uVar2 == 0)" ( (binary_expression "uVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar2 = 0x80;\n  }" { (expression_statement "uVar2 = 0x80;" (assignment_expression "uVar2 = 0x80" identifier = number_literal) ;) })) (expression_statement "uVar5 = (int)uVar2 >> 0x1f;" (assignment_expression "uVar5 = (int)uVar2 >> 0x1f" identifier = (binary_expression "(int)uVar2 >> 0x1f" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal)) ;) (do_statement "do {\n    do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < (int)param_2 >> 0x1f);\n  } while (((int)param_2 >> 0x1f == iVar4) && (uVar2 - iVar6 < param_2));" do (compound_statement "{\n    do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < (int)param_2 >> 0x1f);\n  }" { (do_statement "do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < (int)param_2 >> 0x1f);" do (compound_statement "{\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    }" { (expression_statement "uVar3 = uVar2 >> 0x1f;" (assignment_expression "uVar3 = uVar2 >> 0x1f" identifier = (binary_expression "uVar2 >> 0x1f" identifier >> number_literal)) ;) (expression_statement "uVar2 = uVar2 * 2;" (assignment_expression "uVar2 = uVar2 * 2" identifier = (binary_expression "uVar2 * 2" identifier * number_literal)) ;) (expression_statement "uVar5 = uVar3 | uVar5 << 1;" (assignment_expression "uVar5 = uVar3 | uVar5 << 1" identifier = (binary_expression "uVar3 | uVar5 << 1" identifier | (binary_expression "uVar5 << 1" identifier << number_literal))) ;) (expression_statement "iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);" (assignment_expression "iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6)" identifier = (binary_expression "(uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6)" (parenthesized_expression "(uVar5 - (iVar6 >> 0x1f))" ( (binary_expression "uVar5 - (iVar6 >> 0x1f)" identifier - (parenthesized_expression "(iVar6 >> 0x1f)" ( (binary_expression "iVar6 >> 0x1f" identifier >> number_literal) ))) )) - (call_expression "(uint)(uVar2 < uVar2 - iVar6)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar2 < uVar2 - iVar6)" ( (binary_expression "uVar2 < uVar2 - iVar6" identifier < (binary_expression "uVar2 - iVar6" identifier - identifier)) ))))) ;) }) while (parenthesized_expression "(iVar4 < (int)param_2 >> 0x1f)" ( (binary_expression "iVar4 < (int)param_2 >> 0x1f" identifier < (binary_expression "(int)param_2 >> 0x1f" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal)) )) ;) }) while (parenthesized_expression "(((int)param_2 >> 0x1f == iVar4) && (uVar2 - iVar6 < param_2))" ( (binary_expression "((int)param_2 >> 0x1f == iVar4) && (uVar2 - iVar6 < param_2)" (parenthesized_expression "((int)param_2 >> 0x1f == iVar4)" ( (binary_expression "(int)param_2 >> 0x1f == iVar4" (binary_expression "(int)param_2 >> 0x1f" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) == identifier) )) && (parenthesized_expression "(uVar2 - iVar6 < param_2)" ( (binary_expression "uVar2 - iVar6 < param_2" (binary_expression "uVar2 - iVar6" identifier - identifier) < identifier) ))) )) ;) (expression_statement "iVar6 = (*(code *)PTR_sqlite3_realloc64_0015c768)(*param_1,param_2,uVar5,uVar2);" (assignment_expression "iVar6 = (*(code *)PTR_sqlite3_realloc64_0015c768)(*param_1,param_2,uVar5,uVar2)" identifier = (call_expression "(*(code *)PTR_sqlite3_realloc64_0015c768)(*param_1,param_2,uVar5,uVar2)" (parenthesized_expression "(*(code *)PTR_sqlite3_realloc64_0015c768)" ( (pointer_expression "*(code *)PTR_sqlite3_realloc64_0015c768" * (cast_expression "(code *)PTR_sqlite3_realloc64_0015c768" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*param_1,param_2,uVar5,uVar2)" ( (pointer_expression "*param_1" * identifier) , identifier , identifier , identifier )))) ;) (if_statement "if (iVar6 == 0) {\n    bVar1 = true;\n    *param_3 = 7;\n  }\n  else {\n    *param_1 = iVar6;\n    param_1[2] = uVar2;\n    bVar1 = *param_3 != 0;\n  }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n    bVar1 = true;\n    *param_3 = 7;\n  }" { (expression_statement "bVar1 = true;" (assignment_expression "bVar1 = true" identifier = true) ;) (expression_statement "*param_3 = 7;" (assignment_expression "*param_3 = 7" (pointer_expression "*param_3" * identifier) = number_literal) ;) }) (else_clause "else {\n    *param_1 = iVar6;\n    param_1[2] = uVar2;\n    bVar1 = *param_3 != 0;\n  }" else (compound_statement "{\n    *param_1 = iVar6;\n    param_1[2] = uVar2;\n    bVar1 = *param_3 != 0;\n  }" { (expression_statement "*param_1 = iVar6;" (assignment_expression "*param_1 = iVar6" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "param_1[2] = uVar2;" (assignment_expression "param_1[2] = uVar2" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "bVar1 = *param_3 != 0;" (assignment_expression "bVar1 = *param_3 != 0" identifier = (binary_expression "*param_3 != 0" (pointer_expression "*param_3" * identifier) != number_literal)) ;) }))) (return_statement "return bVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) (compound_statement { (return_statement return BOOL ;) })) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) <= (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT - IDENT) )))) )) (compound_statement { (return_statement return BOOL ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT)) ;) (do_statement do (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT | (binary_expression IDENT << LIT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT - (parenthesized_expression ( (binary_expression IDENT >> LIT) ))) )) - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT < (binary_expression IDENT - IDENT)) ))))) ;) }) while (parenthesized_expression ( (binary_expression IDENT < (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT)) )) ;) }) while (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) == IDENT) )) && (parenthesized_expression ( (binary_expression (binary_expression IDENT - IDENT) < IDENT) ))) )) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * IDENT) , IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) != LIT)) ;) }))) (return_statement return IDENT ;) })))
(function_definition "bool FUN_0008ea04(int *param_1,uint param_2,int *param_3)\n\n{\n  bool bVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  \n  if (*param_3 != 0) {\n    return true;\n  }\n  uVar2 = param_1[2];\n  iVar6 = param_1[1];\n  if ((int)param_2 <= (int)(uVar2 - iVar6)) {\n    return false;\n  }\n  if (uVar2 == 0) {\n    uVar2 = 0x80;\n  }\n  uVar5 = (int)uVar2 >> 0x1f;\n  do {\n    do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < (int)param_2 >> 0x1f);\n  } while (((int)param_2 >> 0x1f == iVar4) && (uVar2 - iVar6 < param_2));\n  iVar6 = (*(code *)PTR_sqlite3_realloc64_0015c768)(*param_1,param_2,uVar5,uVar2);\n  if (iVar6 == 0) {\n    bVar1 = true;\n    *param_3 = 7;\n  }\n  else {\n    *param_1 = iVar6;\n    param_1[2] = uVar2;\n    bVar1 = *param_3 != 0;\n  }\n  return bVar1;\n}" (primitive_type "bool") (function_declarator "FUN_0008ea04(int *param_1,uint param_2,int *param_3)" (identifier "FUN_0008ea04") (parameter_list "(int *param_1,uint param_2,int *param_3)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "int *param_3" (primitive_type "int") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  bool bVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  \n  if (*param_3 != 0) {\n    return true;\n  }\n  uVar2 = param_1[2];\n  iVar6 = param_1[1];\n  if ((int)param_2 <= (int)(uVar2 - iVar6)) {\n    return false;\n  }\n  if (uVar2 == 0) {\n    uVar2 = 0x80;\n  }\n  uVar5 = (int)uVar2 >> 0x1f;\n  do {\n    do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < (int)param_2 >> 0x1f);\n  } while (((int)param_2 >> 0x1f == iVar4) && (uVar2 - iVar6 < param_2));\n  iVar6 = (*(code *)PTR_sqlite3_realloc64_0015c768)(*param_1,param_2,uVar5,uVar2);\n  if (iVar6 == 0) {\n    bVar1 = true;\n    *param_3 = 7;\n  }\n  else {\n    *param_1 = iVar6;\n    param_1[2] = uVar2;\n    bVar1 = *param_3 != 0;\n  }\n  return bVar1;\n}" ({ "{") (declaration "bool bVar1;" (primitive_type "bool") (identifier "bVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (if_statement "if (*param_3 != 0) {\n    return true;\n  }" (if "if") (parenthesized_expression "(*param_3 != 0)" (( "(") (binary_expression "*param_3 != 0" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    return true;\n  }" ({ "{") (return_statement "return true;" (return "return") (true "true") (; ";")) (} "}"))) (expression_statement "uVar2 = param_1[2];" (assignment_expression "uVar2 = param_1[2]" (identifier "uVar2") (= "=") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (; ";")) (expression_statement "iVar6 = param_1[1];" (assignment_expression "iVar6 = param_1[1]" (identifier "iVar6") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (if_statement "if ((int)param_2 <= (int)(uVar2 - iVar6)) {\n    return false;\n  }" (if "if") (parenthesized_expression "((int)param_2 <= (int)(uVar2 - iVar6))" (( "(") (binary_expression "(int)param_2 <= (int)(uVar2 - iVar6)" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (<= "<=") (cast_expression "(int)(uVar2 - iVar6)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(uVar2 - iVar6)" (( "(") (binary_expression "uVar2 - iVar6" (identifier "uVar2") (- "-") (identifier "iVar6")) () ")")))) () ")")) (compound_statement "{\n    return false;\n  }" ({ "{") (return_statement "return false;" (return "return") (false "false") (; ";")) (} "}"))) (if_statement "if (uVar2 == 0) {\n    uVar2 = 0x80;\n  }" (if "if") (parenthesized_expression "(uVar2 == 0)" (( "(") (binary_expression "uVar2 == 0" (identifier "uVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar2 = 0x80;\n  }" ({ "{") (expression_statement "uVar2 = 0x80;" (assignment_expression "uVar2 = 0x80" (identifier "uVar2") (= "=") (number_literal "0x80")) (; ";")) (} "}"))) (expression_statement "uVar5 = (int)uVar2 >> 0x1f;" (assignment_expression "uVar5 = (int)uVar2 >> 0x1f" (identifier "uVar5") (= "=") (binary_expression "(int)uVar2 >> 0x1f" (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2")) (>> ">>") (number_literal "0x1f"))) (; ";")) (do_statement "do {\n    do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < (int)param_2 >> 0x1f);\n  } while (((int)param_2 >> 0x1f == iVar4) && (uVar2 - iVar6 < param_2));" (do "do") (compound_statement "{\n    do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < (int)param_2 >> 0x1f);\n  }" ({ "{") (do_statement "do {\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    } while (iVar4 < (int)param_2 >> 0x1f);" (do "do") (compound_statement "{\n      uVar3 = uVar2 >> 0x1f;\n      uVar2 = uVar2 * 2;\n      uVar5 = uVar3 | uVar5 << 1;\n      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);\n    }" ({ "{") (expression_statement "uVar3 = uVar2 >> 0x1f;" (assignment_expression "uVar3 = uVar2 >> 0x1f" (identifier "uVar3") (= "=") (binary_expression "uVar2 >> 0x1f" (identifier "uVar2") (>> ">>") (number_literal "0x1f"))) (; ";")) (expression_statement "uVar2 = uVar2 * 2;" (assignment_expression "uVar2 = uVar2 * 2" (identifier "uVar2") (= "=") (binary_expression "uVar2 * 2" (identifier "uVar2") (* "*") (number_literal "2"))) (; ";")) (expression_statement "uVar5 = uVar3 | uVar5 << 1;" (assignment_expression "uVar5 = uVar3 | uVar5 << 1" (identifier "uVar5") (= "=") (binary_expression "uVar3 | uVar5 << 1" (identifier "uVar3") (| "|") (binary_expression "uVar5 << 1" (identifier "uVar5") (<< "<<") (number_literal "1")))) (; ";")) (expression_statement "iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);" (assignment_expression "iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6)" (identifier "iVar4") (= "=") (binary_expression "(uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6)" (parenthesized_expression "(uVar5 - (iVar6 >> 0x1f))" (( "(") (binary_expression "uVar5 - (iVar6 >> 0x1f)" (identifier "uVar5") (- "-") (parenthesized_expression "(iVar6 >> 0x1f)" (( "(") (binary_expression "iVar6 >> 0x1f" (identifier "iVar6") (>> ">>") (number_literal "0x1f")) () ")"))) () ")")) (- "-") (call_expression "(uint)(uVar2 < uVar2 - iVar6)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(uVar2 < uVar2 - iVar6)" (( "(") (binary_expression "uVar2 < uVar2 - iVar6" (identifier "uVar2") (< "<") (binary_expression "uVar2 - iVar6" (identifier "uVar2") (- "-") (identifier "iVar6"))) () ")"))))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar4 < (int)param_2 >> 0x1f)" (( "(") (binary_expression "iVar4 < (int)param_2 >> 0x1f" (identifier "iVar4") (< "<") (binary_expression "(int)param_2 >> 0x1f" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (>> ">>") (number_literal "0x1f"))) () ")")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(((int)param_2 >> 0x1f == iVar4) && (uVar2 - iVar6 < param_2))" (( "(") (binary_expression "((int)param_2 >> 0x1f == iVar4) && (uVar2 - iVar6 < param_2)" (parenthesized_expression "((int)param_2 >> 0x1f == iVar4)" (( "(") (binary_expression "(int)param_2 >> 0x1f == iVar4" (binary_expression "(int)param_2 >> 0x1f" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (>> ">>") (number_literal "0x1f")) (== "==") (identifier "iVar4")) () ")")) (&& "&&") (parenthesized_expression "(uVar2 - iVar6 < param_2)" (( "(") (binary_expression "uVar2 - iVar6 < param_2" (binary_expression "uVar2 - iVar6" (identifier "uVar2") (- "-") (identifier "iVar6")) (< "<") (identifier "param_2")) () ")"))) () ")")) (; ";")) (expression_statement "iVar6 = (*(code *)PTR_sqlite3_realloc64_0015c768)(*param_1,param_2,uVar5,uVar2);" (assignment_expression "iVar6 = (*(code *)PTR_sqlite3_realloc64_0015c768)(*param_1,param_2,uVar5,uVar2)" (identifier "iVar6") (= "=") (call_expression "(*(code *)PTR_sqlite3_realloc64_0015c768)(*param_1,param_2,uVar5,uVar2)" (parenthesized_expression "(*(code *)PTR_sqlite3_realloc64_0015c768)" (( "(") (pointer_expression "*(code *)PTR_sqlite3_realloc64_0015c768" (* "*") (cast_expression "(code *)PTR_sqlite3_realloc64_0015c768" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sqlite3_realloc64_0015c768"))) () ")")) (argument_list "(*param_1,param_2,uVar5,uVar2)" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) (, ",") (identifier "param_2") (, ",") (identifier "uVar5") (, ",") (identifier "uVar2") () ")")))) (; ";")) (if_statement "if (iVar6 == 0) {\n    bVar1 = true;\n    *param_3 = 7;\n  }\n  else {\n    *param_1 = iVar6;\n    param_1[2] = uVar2;\n    bVar1 = *param_3 != 0;\n  }" (if "if") (parenthesized_expression "(iVar6 == 0)" (( "(") (binary_expression "iVar6 == 0" (identifier "iVar6") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    bVar1 = true;\n    *param_3 = 7;\n  }" ({ "{") (expression_statement "bVar1 = true;" (assignment_expression "bVar1 = true" (identifier "bVar1") (= "=") (true "true")) (; ";")) (expression_statement "*param_3 = 7;" (assignment_expression "*param_3 = 7" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (number_literal "7")) (; ";")) (} "}")) (else_clause "else {\n    *param_1 = iVar6;\n    param_1[2] = uVar2;\n    bVar1 = *param_3 != 0;\n  }" (else "else") (compound_statement "{\n    *param_1 = iVar6;\n    param_1[2] = uVar2;\n    bVar1 = *param_3 != 0;\n  }" ({ "{") (expression_statement "*param_1 = iVar6;" (assignment_expression "*param_1 = iVar6" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "iVar6")) (; ";")) (expression_statement "param_1[2] = uVar2;" (assignment_expression "param_1[2] = uVar2" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "bVar1 = *param_3 != 0;" (assignment_expression "bVar1 = *param_3 != 0" (identifier "bVar1") (= "=") (binary_expression "*param_3 != 0" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (!= "!=") (number_literal "0"))) (; ";")) (} "}")))) (return_statement "return bVar1;" (return "return") (identifier "bVar1") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (compound_statement (return_statement (true)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))) consequence: (compound_statement (return_statement (false)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))) (do_statement body: (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))))))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))))) condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)) right: (identifier))) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (pointer_expression argument: (identifier)) (identifier) (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (true))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))))) (return_statement (identifier)))))

bool MASKED(int *param_1,uint param_2,int *param_3)

{
  bool bVar1;
  uint uVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  int iVar6;
  
  if (*param_3 != 0) {
    return true;
  }
  uVar2 = param_1[2];
  iVar6 = param_1[1];
  if ((int)param_2 <= (int)(uVar2 - iVar6)) {
    return false;
  }
  if (uVar2 == 0) {
    uVar2 = 0x80;
  }
  uVar5 = (int)uVar2 >> 0x1f;
  do {
    do {
      uVar3 = uVar2 >> 0x1f;
      uVar2 = uVar2 * 2;
      uVar5 = uVar3 | uVar5 << 1;
      iVar4 = (uVar5 - (iVar6 >> 0x1f)) - (uint)(uVar2 < uVar2 - iVar6);
    } while (iVar4 < (int)param_2 >> 0x1f);
  } while (((int)param_2 >> 0x1f == iVar4) && (uVar2 - iVar6 < param_2));
  iVar6 = (*(code *)PTR_sqlite3_realloc64_0015c768)(*param_1,param_2,uVar5,uVar2);
  if (iVar6 == 0) {
    bVar1 = true;
    *param_3 = 7;
  }
  else {
    *param_1 = iVar6;
    param_1[2] = uVar2;
    bVar1 = *param_3 != 0;
  }
  return bVar1;
}

