
void btreeEndTransaction(Btree *p)

{
  undefined *puVar1;
  int iVar2;
  BtLock *pBVar3;
  BtLock *pBVar4;
  sqlite3 *psVar5;
  BtShared *in_a1;
  BtShared *pBVar6;
  BtShared *pBVar7;
  BtLock **ppBVar8;
  
  pBVar6 = p->pBt;
  psVar5 = p->db;
  pBVar6->bDoTruncate = '\0';
  puVar1 = PTR_sqlite3_free_0019096c;
  if (p->inTrans != '\0') {
    pBVar7 = p->pBt;
    if (1 < psVar5->nVdbeRead) {
      if (p == pBVar7->pWriter) {
        pBVar4 = pBVar7->pLock;
        pBVar7->pWriter = (Btree *)0x0;
        pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;
        if (pBVar4 != (BtLock *)0x0) {
          do {
            pBVar4->eLock = '\x01';
            pBVar4 = pBVar4->pNext;
          } while (pBVar4 != (BtLock *)0x0);
          p->inTrans = '\x01';
          return;
        }
      }
      p->inTrans = '\x01';
      return;
    }
    ppBVar8 = &pBVar7->pLock;
    pBVar4 = pBVar7->pLock;
    while (pBVar3 = pBVar4, pBVar3 != (BtLock *)0x0) {
      pBVar4 = pBVar3->pNext;
      if (p == pBVar3->pBtree) {
        *ppBVar8 = pBVar4;
        if (pBVar3->iTable != 1) {
          (*(code *)puVar1)(pBVar3);
          pBVar4 = *ppBVar8;
        }
      }
      else {
        ppBVar8 = &pBVar3->pNext;
      }
    }
    if (p == pBVar7->pWriter) {
      pBVar7->pWriter = (Btree *)0x0;
      pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;
    }
    else if (pBVar7->nTransaction == 2) {
      pBVar7->btsFlags = pBVar7->btsFlags & 0xff7f;
    }
    iVar2 = pBVar6->nTransaction + -1;
    pBVar6->nTransaction = iVar2;
    if (iVar2 == 0) {
      pBVar6->inTransaction = '\0';
    }
  }
  p->inTrans = '\0';
  if (pBVar6->inTransaction != '\0') {
    return;
  }
  unlockBtreeIfUnused((BtShared *)&pBVar6->pPage1,in_a1);
  return;
}



void FUN_000c65e4(int *param_1)

{
  undefined *puVar1;
  undefined4 *puVar2;
  int iVar3;
  undefined4 *puVar4;
  int iVar5;
  int iVar6;
  int *piVar7;
  
  iVar5 = param_1[1];
  iVar3 = *param_1;
  *(undefined1 *)(iVar5 + 0x13) = 0;
  puVar1 = PTR_sqlite3_free_0019096c;
  if (*(char *)(param_1 + 2) != '\0') {
    iVar6 = param_1[1];
    if (1 < *(int *)(iVar3 + 0xac)) {
      if (param_1 == *(int **)(iVar6 + 0x4c)) {
        iVar3 = *(int *)(iVar6 + 0x48);
        *(undefined4 *)(iVar6 + 0x4c) = 0;
        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;
        if (iVar3 != 0) {
          do {
            *(undefined1 *)(iVar3 + 8) = 1;
            iVar3 = *(int *)(iVar3 + 0xc);
          } while (iVar3 != 0);
          *(undefined1 *)(param_1 + 2) = 1;
          return;
        }
      }
      *(undefined1 *)(param_1 + 2) = 1;
      return;
    }
    piVar7 = (int *)(iVar6 + 0x48);
    puVar4 = *(undefined4 **)(iVar6 + 0x48);
    while (puVar2 = puVar4, puVar2 != (undefined4 *)0x0) {
      puVar4 = (undefined4 *)puVar2[3];
      if (param_1 == (int *)*puVar2) {
        *piVar7 = (int)puVar4;
        if (puVar2[1] != 1) {
          (*(code *)puVar1)(puVar2);
          puVar4 = (undefined4 *)*piVar7;
        }
      }
      else {
        piVar7 = puVar2 + 3;
      }
    }
    if (param_1 == *(int **)(iVar6 + 0x4c)) {
      *(undefined4 *)(iVar6 + 0x4c) = 0;
      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;
    }
    else if (*(int *)(iVar6 + 0x28) == 2) {
      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;
    }
    iVar3 = *(int *)(iVar5 + 0x28) + -1;
    *(int *)(iVar5 + 0x28) = iVar3;
    if (iVar3 == 0) {
      *(undefined1 *)(iVar5 + 0x14) = 0;
    }
  }
  *(undefined1 *)(param_1 + 2) = 0;
  if (*(char *)(iVar5 + 0x14) != '\0') {
    return;
  }
  FUN_000c65b0(iVar5 + 0xc);
  return;
}


lui gp,0xd
addiu gp,gp,0x233c
addu gp,gp,t9
addiu sp,sp,-0x38
sw s0,0x1c(sp)
sw gp,0x10(sp)
sw ra,0x34(sp)
sw s5,0x30(sp)
sw s4,0x2c(sp)
sw s3,0x28(sp)
sw s2,0x24(sp)
sw s1,0x20(sp)
lw s1,0x4(a0)
lw v1,0x0(a0)
sb zero,0x13(s1)
lbu v0,0x8(a0)
beq v0,zero,0x000c66ac
_or s0,a0,zero
lw v0,0xac(v1)
slti v0,v0,0x2
bne v0,zero,0x000c66e8
_lw s2,0x4(a0)
lw v0,0x4c(s2)
beq a0,v0,0x000c6744
_nop
li v0,0x1
sb v0,0x8(s0)
lw ra,0x34(sp)
lw s5,0x30(sp)
lw s4,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x38
lw v0,0x4c(s2)
beq s0,v0,0x000c677c
_li v0,0x2
lw v1,0x28(s2)
bne v1,v0,0x000c6698
_nop
lhu v0,0x16(s2)
andi v0,v0,0xff7f
sh v0,0x16(s2)
lw v0,0x28(s1)
addiu v0,v0,-0x1
bne v0,zero,0x000c66ac
_sw v0,0x28(s1)
sb zero,0x14(s1)
sb zero,0x8(s0)
lbu v0,0x14(s1)
bne v0,zero,0x000c6654
_lw ra,0x34(sp)
lw t9,-0x7d54(gp)
addiu a0,s1,0xc
lw s5,0x30(sp)
lw s4,0x2c(sp)
addiu t9,t9,0x65b0
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
b 0x000c65b0
_addiu sp,sp,0x38
lw v0,0x48(s2)
addiu s3,s2,0x48
lw s4,-0x7fb4(gp)
li s5,0x1
beq v0,zero,0x000c6674
_nop
lw a0,0x0(v0)
beq s0,a0,0x000c6718
_lw v1,0xc(v0)
addiu s3,v0,0xc
b 0x000c66f8
_or v0,v1,zero
sw v1,0x0(s3)
or a0,v0,zero
lw v0,0x4(v0)
beq v0,s5,0x000c6710
_or t9,s4,zero
jalr t9
_nop
lw v1,0x0(s3)
lw gp,0x10(sp)
b 0x000c66f8
_or v0,v1,zero
lhu v1,0x16(s2)
lw v0,0x48(s2)
sw zero,0x4c(s2)
andi v1,v1,0xff3f
beq v0,zero,0x000c6648
_sh v1,0x16(s2)
li v1,0x1
sb v1,0x8(v0)
lw v0,0xc(v0)
bne v0,zero,0x000c6760
_nop
li v0,0x1
b 0x000c6650
_sb v0,0x8(s0)
lhu v0,0x16(s2)
sw zero,0x4c(s2)
andi v0,v0,0xff3f
b 0x000c6698
_sh v0,0x16(s2)
(translation_unit "void FUN_000c65e4(int *param_1)\n\n{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  \n  iVar5 = param_1[1];\n  iVar3 = *param_1;\n  *(undefined1 *)(iVar5 + 0x13) = 0;\n  puVar1 = PTR_sqlite3_free_0019096c;\n  if (*(char *)(param_1 + 2) != '\0') {\n    iVar6 = param_1[1];\n    if (1 < *(int *)(iVar3 + 0xac)) {\n      if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }\n      *(undefined1 *)(param_1 + 2) = 1;\n      return;\n    }\n    piVar7 = (int *)(iVar6 + 0x48);\n    puVar4 = *(undefined4 **)(iVar6 + 0x48);\n    while (puVar2 = puVar4, puVar2 != (undefined4 *)0x0) {\n      puVar4 = (undefined4 *)puVar2[3];\n      if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }\n    }\n    if (param_1 == *(int **)(iVar6 + 0x4c)) {\n      *(undefined4 *)(iVar6 + 0x4c) = 0;\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n    }\n    else if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }\n    iVar3 = *(int *)(iVar5 + 0x28) + -1;\n    *(int *)(iVar5 + 0x28) = iVar3;\n    if (iVar3 == 0) {\n      *(undefined1 *)(iVar5 + 0x14) = 0;\n    }\n  }\n  *(undefined1 *)(param_1 + 2) = 0;\n  if (*(char *)(iVar5 + 0x14) != '\0') {\n    return;\n  }\n  FUN_000c65b0(iVar5 + 0xc);\n  return;\n}\n\n" (function_definition "void FUN_000c65e4(int *param_1)\n\n{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  \n  iVar5 = param_1[1];\n  iVar3 = *param_1;\n  *(undefined1 *)(iVar5 + 0x13) = 0;\n  puVar1 = PTR_sqlite3_free_0019096c;\n  if (*(char *)(param_1 + 2) != '\0') {\n    iVar6 = param_1[1];\n    if (1 < *(int *)(iVar3 + 0xac)) {\n      if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }\n      *(undefined1 *)(param_1 + 2) = 1;\n      return;\n    }\n    piVar7 = (int *)(iVar6 + 0x48);\n    puVar4 = *(undefined4 **)(iVar6 + 0x48);\n    while (puVar2 = puVar4, puVar2 != (undefined4 *)0x0) {\n      puVar4 = (undefined4 *)puVar2[3];\n      if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }\n    }\n    if (param_1 == *(int **)(iVar6 + 0x4c)) {\n      *(undefined4 *)(iVar6 + 0x4c) = 0;\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n    }\n    else if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }\n    iVar3 = *(int *)(iVar5 + 0x28) + -1;\n    *(int *)(iVar5 + 0x28) = iVar3;\n    if (iVar3 == 0) {\n      *(undefined1 *)(iVar5 + 0x14) = 0;\n    }\n  }\n  *(undefined1 *)(param_1 + 2) = 0;\n  if (*(char *)(iVar5 + 0x14) != '\0') {\n    return;\n  }\n  FUN_000c65b0(iVar5 + 0xc);\n  return;\n}" primitive_type (function_declarator "FUN_000c65e4(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  \n  iVar5 = param_1[1];\n  iVar3 = *param_1;\n  *(undefined1 *)(iVar5 + 0x13) = 0;\n  puVar1 = PTR_sqlite3_free_0019096c;\n  if (*(char *)(param_1 + 2) != '\0') {\n    iVar6 = param_1[1];\n    if (1 < *(int *)(iVar3 + 0xac)) {\n      if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }\n      *(undefined1 *)(param_1 + 2) = 1;\n      return;\n    }\n    piVar7 = (int *)(iVar6 + 0x48);\n    puVar4 = *(undefined4 **)(iVar6 + 0x48);\n    while (puVar2 = puVar4, puVar2 != (undefined4 *)0x0) {\n      puVar4 = (undefined4 *)puVar2[3];\n      if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }\n    }\n    if (param_1 == *(int **)(iVar6 + 0x4c)) {\n      *(undefined4 *)(iVar6 + 0x4c) = 0;\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n    }\n    else if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }\n    iVar3 = *(int *)(iVar5 + 0x28) + -1;\n    *(int *)(iVar5 + 0x28) = iVar3;\n    if (iVar3 == 0) {\n      *(undefined1 *)(iVar5 + 0x14) = 0;\n    }\n  }\n  *(undefined1 *)(param_1 + 2) = 0;\n  if (*(char *)(iVar5 + 0x14) != '\0') {\n    return;\n  }\n  FUN_000c65b0(iVar5 + 0xc);\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (expression_statement "iVar5 = param_1[1];" (assignment_expression "iVar5 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "iVar3 = *param_1;" (assignment_expression "iVar3 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "*(undefined1 *)(iVar5 + 0x13) = 0;" (assignment_expression "*(undefined1 *)(iVar5 + 0x13) = 0" (pointer_expression "*(undefined1 *)(iVar5 + 0x13)" * (cast_expression "(undefined1 *)(iVar5 + 0x13)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x13)" ( (binary_expression "iVar5 + 0x13" identifier + number_literal) )))) = number_literal) ;) (expression_statement "puVar1 = PTR_sqlite3_free_0019096c;" (assignment_expression "puVar1 = PTR_sqlite3_free_0019096c" identifier = identifier) ;) (if_statement "if (*(char *)(param_1 + 2) != '\0') {\n    iVar6 = param_1[1];\n    if (1 < *(int *)(iVar3 + 0xac)) {\n      if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }\n      *(undefined1 *)(param_1 + 2) = 1;\n      return;\n    }\n    piVar7 = (int *)(iVar6 + 0x48);\n    puVar4 = *(undefined4 **)(iVar6 + 0x48);\n    while (puVar2 = puVar4, puVar2 != (undefined4 *)0x0) {\n      puVar4 = (undefined4 *)puVar2[3];\n      if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }\n    }\n    if (param_1 == *(int **)(iVar6 + 0x4c)) {\n      *(undefined4 *)(iVar6 + 0x4c) = 0;\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n    }\n    else if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }\n    iVar3 = *(int *)(iVar5 + 0x28) + -1;\n    *(int *)(iVar5 + 0x28) = iVar3;\n    if (iVar3 == 0) {\n      *(undefined1 *)(iVar5 + 0x14) = 0;\n    }\n  }" if (parenthesized_expression "(*(char *)(param_1 + 2) != '\0')" ( (binary_expression "*(char *)(param_1 + 2) != '\0'" (pointer_expression "*(char *)(param_1 + 2)" * (cast_expression "(char *)(param_1 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    iVar6 = param_1[1];\n    if (1 < *(int *)(iVar3 + 0xac)) {\n      if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }\n      *(undefined1 *)(param_1 + 2) = 1;\n      return;\n    }\n    piVar7 = (int *)(iVar6 + 0x48);\n    puVar4 = *(undefined4 **)(iVar6 + 0x48);\n    while (puVar2 = puVar4, puVar2 != (undefined4 *)0x0) {\n      puVar4 = (undefined4 *)puVar2[3];\n      if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }\n    }\n    if (param_1 == *(int **)(iVar6 + 0x4c)) {\n      *(undefined4 *)(iVar6 + 0x4c) = 0;\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n    }\n    else if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }\n    iVar3 = *(int *)(iVar5 + 0x28) + -1;\n    *(int *)(iVar5 + 0x28) = iVar3;\n    if (iVar3 == 0) {\n      *(undefined1 *)(iVar5 + 0x14) = 0;\n    }\n  }" { (expression_statement "iVar6 = param_1[1];" (assignment_expression "iVar6 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if (1 < *(int *)(iVar3 + 0xac)) {\n      if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }\n      *(undefined1 *)(param_1 + 2) = 1;\n      return;\n    }" if (parenthesized_expression "(1 < *(int *)(iVar3 + 0xac))" ( (binary_expression "1 < *(int *)(iVar3 + 0xac)" number_literal < (pointer_expression "*(int *)(iVar3 + 0xac)" * (cast_expression "(int *)(iVar3 + 0xac)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xac)" ( (binary_expression "iVar3 + 0xac" identifier + number_literal) ))))) )) (compound_statement "{\n      if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }\n      *(undefined1 *)(param_1 + 2) = 1;\n      return;\n    }" { (if_statement "if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }" if (parenthesized_expression "(param_1 == *(int **)(iVar6 + 0x4c))" ( (binary_expression "param_1 == *(int **)(iVar6 + 0x4c)" identifier == (pointer_expression "*(int **)(iVar6 + 0x4c)" * (cast_expression "(int **)(iVar6 + 0x4c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar6 + 0x4c)" ( (binary_expression "iVar6 + 0x4c" identifier + number_literal) ))))) )) (compound_statement "{\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }" { (expression_statement "iVar3 = *(int *)(iVar6 + 0x48);" (assignment_expression "iVar3 = *(int *)(iVar6 + 0x48)" identifier = (pointer_expression "*(int *)(iVar6 + 0x48)" * (cast_expression "(int *)(iVar6 + 0x48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x48)" ( (binary_expression "iVar6 + 0x48" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(iVar6 + 0x4c) = 0;" (assignment_expression "*(undefined4 *)(iVar6 + 0x4c) = 0" (pointer_expression "*(undefined4 *)(iVar6 + 0x4c)" * (cast_expression "(undefined4 *)(iVar6 + 0x4c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x4c)" ( (binary_expression "iVar6 + 0x4c" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;" (assignment_expression "*(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f" (pointer_expression "*(ushort *)(iVar6 + 0x16)" * (cast_expression "(ushort *)(iVar6 + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x16)" ( (binary_expression "iVar6 + 0x16" identifier + number_literal) )))) = (binary_expression "*(ushort *)(iVar6 + 0x16) & 0xff3f" (pointer_expression "*(ushort *)(iVar6 + 0x16)" * (cast_expression "(ushort *)(iVar6 + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x16)" ( (binary_expression "iVar6 + 0x16" identifier + number_literal) )))) & number_literal)) ;) (if_statement "if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }" { (do_statement "do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);" do (compound_statement "{\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          }" { (expression_statement "*(undefined1 *)(iVar3 + 8) = 1;" (assignment_expression "*(undefined1 *)(iVar3 + 8) = 1" (pointer_expression "*(undefined1 *)(iVar3 + 8)" * (cast_expression "(undefined1 *)(iVar3 + 8)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 8)" ( (binary_expression "iVar3 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar3 = *(int *)(iVar3 + 0xc);" (assignment_expression "iVar3 = *(int *)(iVar3 + 0xc)" identifier = (pointer_expression "*(int *)(iVar3 + 0xc)" * (cast_expression "(int *)(iVar3 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc)" ( (binary_expression "iVar3 + 0xc" identifier + number_literal) ))))) ;) }) while (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) ;) (expression_statement "*(undefined1 *)(param_1 + 2) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 2) = 1" (pointer_expression "*(undefined1 *)(param_1 + 2)" * (cast_expression "(undefined1 *)(param_1 + 2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) })) (expression_statement "*(undefined1 *)(param_1 + 2) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 2) = 1" (pointer_expression "*(undefined1 *)(param_1 + 2)" * (cast_expression "(undefined1 *)(param_1 + 2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "piVar7 = (int *)(iVar6 + 0x48);" (assignment_expression "piVar7 = (int *)(iVar6 + 0x48)" identifier = (cast_expression "(int *)(iVar6 + 0x48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x48)" ( (binary_expression "iVar6 + 0x48" identifier + number_literal) )))) ;) (expression_statement "puVar4 = *(undefined4 **)(iVar6 + 0x48);" (assignment_expression "puVar4 = *(undefined4 **)(iVar6 + 0x48)" identifier = (pointer_expression "*(undefined4 **)(iVar6 + 0x48)" * (cast_expression "(undefined4 **)(iVar6 + 0x48)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar6 + 0x48)" ( (binary_expression "iVar6 + 0x48" identifier + number_literal) ))))) ;) (while_statement "while (puVar2 = puVar4, puVar2 != (undefined4 *)0x0) {\n      puVar4 = (undefined4 *)puVar2[3];\n      if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }\n    }" while (parenthesized_expression "(puVar2 = puVar4, puVar2 != (undefined4 *)0x0)" ( (comma_expression "puVar2 = puVar4, puVar2 != (undefined4 *)0x0" (assignment_expression "puVar2 = puVar4" identifier = identifier) , (binary_expression "puVar2 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal))) )) (compound_statement "{\n      puVar4 = (undefined4 *)puVar2[3];\n      if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }\n    }" { (expression_statement "puVar4 = (undefined4 *)puVar2[3];" (assignment_expression "puVar4 = (undefined4 *)puVar2[3]" identifier = (cast_expression "(undefined4 *)puVar2[3]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar2[3]" identifier [ number_literal ]))) ;) (if_statement "if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }" if (parenthesized_expression "(param_1 == (int *)*puVar2)" ( (binary_expression "param_1 == (int *)*puVar2" identifier == (cast_expression "(int *)*puVar2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar2" * identifier))) )) (compound_statement "{\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }" { (expression_statement "*piVar7 = (int)puVar4;" (assignment_expression "*piVar7 = (int)puVar4" (pointer_expression "*piVar7" * identifier) = (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }" if (parenthesized_expression "(puVar2[1] != 1)" ( (binary_expression "puVar2[1] != 1" (subscript_expression "puVar2[1]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }" { (expression_statement "(*(code *)puVar1)(puVar2);" (call_expression "(*(code *)puVar1)(puVar2)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar2)" ( identifier ))) ;) (expression_statement "puVar4 = (undefined4 *)*piVar7;" (assignment_expression "puVar4 = (undefined4 *)*piVar7" identifier = (cast_expression "(undefined4 *)*piVar7" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar7" * identifier))) ;) })) }) (else_clause "else {\n        piVar7 = puVar2 + 3;\n      }" else (compound_statement "{\n        piVar7 = puVar2 + 3;\n      }" { (expression_statement "piVar7 = puVar2 + 3;" (assignment_expression "piVar7 = puVar2 + 3" identifier = (binary_expression "puVar2 + 3" identifier + number_literal)) ;) }))) })) (if_statement "if (param_1 == *(int **)(iVar6 + 0x4c)) {\n      *(undefined4 *)(iVar6 + 0x4c) = 0;\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n    }\n    else if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }" if (parenthesized_expression "(param_1 == *(int **)(iVar6 + 0x4c))" ( (binary_expression "param_1 == *(int **)(iVar6 + 0x4c)" identifier == (pointer_expression "*(int **)(iVar6 + 0x4c)" * (cast_expression "(int **)(iVar6 + 0x4c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar6 + 0x4c)" ( (binary_expression "iVar6 + 0x4c" identifier + number_literal) ))))) )) (compound_statement "{\n      *(undefined4 *)(iVar6 + 0x4c) = 0;\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n    }" { (expression_statement "*(undefined4 *)(iVar6 + 0x4c) = 0;" (assignment_expression "*(undefined4 *)(iVar6 + 0x4c) = 0" (pointer_expression "*(undefined4 *)(iVar6 + 0x4c)" * (cast_expression "(undefined4 *)(iVar6 + 0x4c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x4c)" ( (binary_expression "iVar6 + 0x4c" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;" (assignment_expression "*(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f" (pointer_expression "*(ushort *)(iVar6 + 0x16)" * (cast_expression "(ushort *)(iVar6 + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x16)" ( (binary_expression "iVar6 + 0x16" identifier + number_literal) )))) = (binary_expression "*(ushort *)(iVar6 + 0x16) & 0xff3f" (pointer_expression "*(ushort *)(iVar6 + 0x16)" * (cast_expression "(ushort *)(iVar6 + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x16)" ( (binary_expression "iVar6 + 0x16" identifier + number_literal) )))) & number_literal)) ;) }) (else_clause "else if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }" else (if_statement "if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }" if (parenthesized_expression "(*(int *)(iVar6 + 0x28) == 2)" ( (binary_expression "*(int *)(iVar6 + 0x28) == 2" (pointer_expression "*(int *)(iVar6 + 0x28)" * (cast_expression "(int *)(iVar6 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x28)" ( (binary_expression "iVar6 + 0x28" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }" { (expression_statement "*(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;" (assignment_expression "*(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f" (pointer_expression "*(ushort *)(iVar6 + 0x16)" * (cast_expression "(ushort *)(iVar6 + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x16)" ( (binary_expression "iVar6 + 0x16" identifier + number_literal) )))) = (binary_expression "*(ushort *)(iVar6 + 0x16) & 0xff7f" (pointer_expression "*(ushort *)(iVar6 + 0x16)" * (cast_expression "(ushort *)(iVar6 + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x16)" ( (binary_expression "iVar6 + 0x16" identifier + number_literal) )))) & number_literal)) ;) })))) (expression_statement "iVar3 = *(int *)(iVar5 + 0x28) + -1;" (assignment_expression "iVar3 = *(int *)(iVar5 + 0x28) + -1" identifier = (binary_expression "*(int *)(iVar5 + 0x28) + -1" (pointer_expression "*(int *)(iVar5 + 0x28)" * (cast_expression "(int *)(iVar5 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x28)" ( (binary_expression "iVar5 + 0x28" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "*(int *)(iVar5 + 0x28) = iVar3;" (assignment_expression "*(int *)(iVar5 + 0x28) = iVar3" (pointer_expression "*(int *)(iVar5 + 0x28)" * (cast_expression "(int *)(iVar5 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x28)" ( (binary_expression "iVar5 + 0x28" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar3 == 0) {\n      *(undefined1 *)(iVar5 + 0x14) = 0;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      *(undefined1 *)(iVar5 + 0x14) = 0;\n    }" { (expression_statement "*(undefined1 *)(iVar5 + 0x14) = 0;" (assignment_expression "*(undefined1 *)(iVar5 + 0x14) = 0" (pointer_expression "*(undefined1 *)(iVar5 + 0x14)" * (cast_expression "(undefined1 *)(iVar5 + 0x14)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x14)" ( (binary_expression "iVar5 + 0x14" identifier + number_literal) )))) = number_literal) ;) })) })) (expression_statement "*(undefined1 *)(param_1 + 2) = 0;" (assignment_expression "*(undefined1 *)(param_1 + 2) = 0" (pointer_expression "*(undefined1 *)(param_1 + 2)" * (cast_expression "(undefined1 *)(param_1 + 2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (*(char *)(iVar5 + 0x14) != '\0') {\n    return;\n  }" if (parenthesized_expression "(*(char *)(iVar5 + 0x14) != '\0')" ( (binary_expression "*(char *)(iVar5 + 0x14) != '\0'" (pointer_expression "*(char *)(iVar5 + 0x14)" * (cast_expression "(char *)(iVar5 + 0x14)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x14)" ( (binary_expression "iVar5 + 0x14" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_000c65b0(iVar5 + 0xc);" (call_expression "FUN_000c65b0(iVar5 + 0xc)" identifier (argument_list "(iVar5 + 0xc)" ( (binary_expression "iVar5 + 0xc" identifier + number_literal) ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void btreeEndTransaction(Btree *p)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  BtLock *pBVar3;\n  BtLock *pBVar4;\n  sqlite3 *psVar5;\n  BtShared *in_a1;\n  BtShared *pBVar6;\n  BtShared *pBVar7;\n  BtLock **ppBVar8;\n  \n  pBVar6 = p->pBt;\n  psVar5 = p->db;\n  pBVar6->bDoTruncate = '\0';\n  puVar1 = PTR_sqlite3_free_0019096c;\n  if (p->inTrans != '\0') {\n    pBVar7 = p->pBt;\n    if (1 < psVar5->nVdbeRead) {\n      if (p == pBVar7->pWriter) {\n        pBVar4 = pBVar7->pLock;\n        pBVar7->pWriter = (Btree *)0x0;\n        pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;\n        if (pBVar4 != (BtLock *)0x0) {\n          do {\n            pBVar4->eLock = '\x01';\n            pBVar4 = pBVar4->pNext;\n          } while (pBVar4 != (BtLock *)0x0);\n          p->inTrans = '\x01';\n          return;\n        }\n      }\n      p->inTrans = '\x01';\n      return;\n    }\n    ppBVar8 = &pBVar7->pLock;\n    pBVar4 = pBVar7->pLock;\n    while (pBVar3 = pBVar4, pBVar3 != (BtLock *)0x0) {\n      pBVar4 = pBVar3->pNext;\n      if (p == pBVar3->pBtree) {\n        *ppBVar8 = pBVar4;\n        if (pBVar3->iTable != 1) {\n          (*(code *)puVar1)(pBVar3);\n          pBVar4 = *ppBVar8;\n        }\n      }\n      else {\n        ppBVar8 = &pBVar3->pNext;\n      }\n    }\n    if (p == pBVar7->pWriter) {\n      pBVar7->pWriter = (Btree *)0x0;\n      pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;\n    }\n    else if (pBVar7->nTransaction == 2) {\n      pBVar7->btsFlags = pBVar7->btsFlags & 0xff7f;\n    }\n    iVar2 = pBVar6->nTransaction + -1;\n    pBVar6->nTransaction = iVar2;\n    if (iVar2 == 0) {\n      pBVar6->inTransaction = '\0';\n    }\n  }\n  p->inTrans = '\0';\n  if (pBVar6->inTransaction != '\0') {\n    return;\n  }\n  unlockBtreeIfUnused((BtShared *)&pBVar6->pPage1,in_a1);\n  return;\n}\n\n" (function_definition "void btreeEndTransaction(Btree *p)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  BtLock *pBVar3;\n  BtLock *pBVar4;\n  sqlite3 *psVar5;\n  BtShared *in_a1;\n  BtShared *pBVar6;\n  BtShared *pBVar7;\n  BtLock **ppBVar8;\n  \n  pBVar6 = p->pBt;\n  psVar5 = p->db;\n  pBVar6->bDoTruncate = '\0';\n  puVar1 = PTR_sqlite3_free_0019096c;\n  if (p->inTrans != '\0') {\n    pBVar7 = p->pBt;\n    if (1 < psVar5->nVdbeRead) {\n      if (p == pBVar7->pWriter) {\n        pBVar4 = pBVar7->pLock;\n        pBVar7->pWriter = (Btree *)0x0;\n        pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;\n        if (pBVar4 != (BtLock *)0x0) {\n          do {\n            pBVar4->eLock = '\x01';\n            pBVar4 = pBVar4->pNext;\n          } while (pBVar4 != (BtLock *)0x0);\n          p->inTrans = '\x01';\n          return;\n        }\n      }\n      p->inTrans = '\x01';\n      return;\n    }\n    ppBVar8 = &pBVar7->pLock;\n    pBVar4 = pBVar7->pLock;\n    while (pBVar3 = pBVar4, pBVar3 != (BtLock *)0x0) {\n      pBVar4 = pBVar3->pNext;\n      if (p == pBVar3->pBtree) {\n        *ppBVar8 = pBVar4;\n        if (pBVar3->iTable != 1) {\n          (*(code *)puVar1)(pBVar3);\n          pBVar4 = *ppBVar8;\n        }\n      }\n      else {\n        ppBVar8 = &pBVar3->pNext;\n      }\n    }\n    if (p == pBVar7->pWriter) {\n      pBVar7->pWriter = (Btree *)0x0;\n      pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;\n    }\n    else if (pBVar7->nTransaction == 2) {\n      pBVar7->btsFlags = pBVar7->btsFlags & 0xff7f;\n    }\n    iVar2 = pBVar6->nTransaction + -1;\n    pBVar6->nTransaction = iVar2;\n    if (iVar2 == 0) {\n      pBVar6->inTransaction = '\0';\n    }\n  }\n  p->inTrans = '\0';\n  if (pBVar6->inTransaction != '\0') {\n    return;\n  }\n  unlockBtreeIfUnused((BtShared *)&pBVar6->pPage1,in_a1);\n  return;\n}" primitive_type (function_declarator "btreeEndTransaction(Btree *p)" identifier (parameter_list "(Btree *p)" ( (parameter_declaration "Btree *p" type_identifier (pointer_declarator "*p" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  BtLock *pBVar3;\n  BtLock *pBVar4;\n  sqlite3 *psVar5;\n  BtShared *in_a1;\n  BtShared *pBVar6;\n  BtShared *pBVar7;\n  BtLock **ppBVar8;\n  \n  pBVar6 = p->pBt;\n  psVar5 = p->db;\n  pBVar6->bDoTruncate = '\0';\n  puVar1 = PTR_sqlite3_free_0019096c;\n  if (p->inTrans != '\0') {\n    pBVar7 = p->pBt;\n    if (1 < psVar5->nVdbeRead) {\n      if (p == pBVar7->pWriter) {\n        pBVar4 = pBVar7->pLock;\n        pBVar7->pWriter = (Btree *)0x0;\n        pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;\n        if (pBVar4 != (BtLock *)0x0) {\n          do {\n            pBVar4->eLock = '\x01';\n            pBVar4 = pBVar4->pNext;\n          } while (pBVar4 != (BtLock *)0x0);\n          p->inTrans = '\x01';\n          return;\n        }\n      }\n      p->inTrans = '\x01';\n      return;\n    }\n    ppBVar8 = &pBVar7->pLock;\n    pBVar4 = pBVar7->pLock;\n    while (pBVar3 = pBVar4, pBVar3 != (BtLock *)0x0) {\n      pBVar4 = pBVar3->pNext;\n      if (p == pBVar3->pBtree) {\n        *ppBVar8 = pBVar4;\n        if (pBVar3->iTable != 1) {\n          (*(code *)puVar1)(pBVar3);\n          pBVar4 = *ppBVar8;\n        }\n      }\n      else {\n        ppBVar8 = &pBVar3->pNext;\n      }\n    }\n    if (p == pBVar7->pWriter) {\n      pBVar7->pWriter = (Btree *)0x0;\n      pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;\n    }\n    else if (pBVar7->nTransaction == 2) {\n      pBVar7->btsFlags = pBVar7->btsFlags & 0xff7f;\n    }\n    iVar2 = pBVar6->nTransaction + -1;\n    pBVar6->nTransaction = iVar2;\n    if (iVar2 == 0) {\n      pBVar6->inTransaction = '\0';\n    }\n  }\n  p->inTrans = '\0';\n  if (pBVar6->inTransaction != '\0') {\n    return;\n  }\n  unlockBtreeIfUnused((BtShared *)&pBVar6->pPage1,in_a1);\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "BtLock *pBVar3;" type_identifier (pointer_declarator "*pBVar3" * identifier) ;) (declaration "BtLock *pBVar4;" type_identifier (pointer_declarator "*pBVar4" * identifier) ;) (declaration "sqlite3 *psVar5;" type_identifier (pointer_declarator "*psVar5" * identifier) ;) (declaration "BtShared *in_a1;" type_identifier (pointer_declarator "*in_a1" * identifier) ;) (declaration "BtShared *pBVar6;" type_identifier (pointer_declarator "*pBVar6" * identifier) ;) (declaration "BtShared *pBVar7;" type_identifier (pointer_declarator "*pBVar7" * identifier) ;) (declaration "BtLock **ppBVar8;" type_identifier (pointer_declarator "**ppBVar8" * (pointer_declarator "*ppBVar8" * identifier)) ;) (expression_statement "pBVar6 = p->pBt;" (assignment_expression "pBVar6 = p->pBt" identifier = (field_expression "p->pBt" identifier -> field_identifier)) ;) (expression_statement "psVar5 = p->db;" (assignment_expression "psVar5 = p->db" identifier = (field_expression "p->db" identifier -> field_identifier)) ;) (expression_statement "pBVar6->bDoTruncate = '\0';" (assignment_expression "pBVar6->bDoTruncate = '\0'" (field_expression "pBVar6->bDoTruncate" identifier -> field_identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar1 = PTR_sqlite3_free_0019096c;" (assignment_expression "puVar1 = PTR_sqlite3_free_0019096c" identifier = identifier) ;) (if_statement "if (p->inTrans != '\0') {\n    pBVar7 = p->pBt;\n    if (1 < psVar5->nVdbeRead) {\n      if (p == pBVar7->pWriter) {\n        pBVar4 = pBVar7->pLock;\n        pBVar7->pWriter = (Btree *)0x0;\n        pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;\n        if (pBVar4 != (BtLock *)0x0) {\n          do {\n            pBVar4->eLock = '\x01';\n            pBVar4 = pBVar4->pNext;\n          } while (pBVar4 != (BtLock *)0x0);\n          p->inTrans = '\x01';\n          return;\n        }\n      }\n      p->inTrans = '\x01';\n      return;\n    }\n    ppBVar8 = &pBVar7->pLock;\n    pBVar4 = pBVar7->pLock;\n    while (pBVar3 = pBVar4, pBVar3 != (BtLock *)0x0) {\n      pBVar4 = pBVar3->pNext;\n      if (p == pBVar3->pBtree) {\n        *ppBVar8 = pBVar4;\n        if (pBVar3->iTable != 1) {\n          (*(code *)puVar1)(pBVar3);\n          pBVar4 = *ppBVar8;\n        }\n      }\n      else {\n        ppBVar8 = &pBVar3->pNext;\n      }\n    }\n    if (p == pBVar7->pWriter) {\n      pBVar7->pWriter = (Btree *)0x0;\n      pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;\n    }\n    else if (pBVar7->nTransaction == 2) {\n      pBVar7->btsFlags = pBVar7->btsFlags & 0xff7f;\n    }\n    iVar2 = pBVar6->nTransaction + -1;\n    pBVar6->nTransaction = iVar2;\n    if (iVar2 == 0) {\n      pBVar6->inTransaction = '\0';\n    }\n  }" if (parenthesized_expression "(p->inTrans != '\0')" ( (binary_expression "p->inTrans != '\0'" (field_expression "p->inTrans" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    pBVar7 = p->pBt;\n    if (1 < psVar5->nVdbeRead) {\n      if (p == pBVar7->pWriter) {\n        pBVar4 = pBVar7->pLock;\n        pBVar7->pWriter = (Btree *)0x0;\n        pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;\n        if (pBVar4 != (BtLock *)0x0) {\n          do {\n            pBVar4->eLock = '\x01';\n            pBVar4 = pBVar4->pNext;\n          } while (pBVar4 != (BtLock *)0x0);\n          p->inTrans = '\x01';\n          return;\n        }\n      }\n      p->inTrans = '\x01';\n      return;\n    }\n    ppBVar8 = &pBVar7->pLock;\n    pBVar4 = pBVar7->pLock;\n    while (pBVar3 = pBVar4, pBVar3 != (BtLock *)0x0) {\n      pBVar4 = pBVar3->pNext;\n      if (p == pBVar3->pBtree) {\n        *ppBVar8 = pBVar4;\n        if (pBVar3->iTable != 1) {\n          (*(code *)puVar1)(pBVar3);\n          pBVar4 = *ppBVar8;\n        }\n      }\n      else {\n        ppBVar8 = &pBVar3->pNext;\n      }\n    }\n    if (p == pBVar7->pWriter) {\n      pBVar7->pWriter = (Btree *)0x0;\n      pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;\n    }\n    else if (pBVar7->nTransaction == 2) {\n      pBVar7->btsFlags = pBVar7->btsFlags & 0xff7f;\n    }\n    iVar2 = pBVar6->nTransaction + -1;\n    pBVar6->nTransaction = iVar2;\n    if (iVar2 == 0) {\n      pBVar6->inTransaction = '\0';\n    }\n  }" { (expression_statement "pBVar7 = p->pBt;" (assignment_expression "pBVar7 = p->pBt" identifier = (field_expression "p->pBt" identifier -> field_identifier)) ;) (if_statement "if (1 < psVar5->nVdbeRead) {\n      if (p == pBVar7->pWriter) {\n        pBVar4 = pBVar7->pLock;\n        pBVar7->pWriter = (Btree *)0x0;\n        pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;\n        if (pBVar4 != (BtLock *)0x0) {\n          do {\n            pBVar4->eLock = '\x01';\n            pBVar4 = pBVar4->pNext;\n          } while (pBVar4 != (BtLock *)0x0);\n          p->inTrans = '\x01';\n          return;\n        }\n      }\n      p->inTrans = '\x01';\n      return;\n    }" if (parenthesized_expression "(1 < psVar5->nVdbeRead)" ( (binary_expression "1 < psVar5->nVdbeRead" number_literal < (field_expression "psVar5->nVdbeRead" identifier -> field_identifier)) )) (compound_statement "{\n      if (p == pBVar7->pWriter) {\n        pBVar4 = pBVar7->pLock;\n        pBVar7->pWriter = (Btree *)0x0;\n        pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;\n        if (pBVar4 != (BtLock *)0x0) {\n          do {\n            pBVar4->eLock = '\x01';\n            pBVar4 = pBVar4->pNext;\n          } while (pBVar4 != (BtLock *)0x0);\n          p->inTrans = '\x01';\n          return;\n        }\n      }\n      p->inTrans = '\x01';\n      return;\n    }" { (if_statement "if (p == pBVar7->pWriter) {\n        pBVar4 = pBVar7->pLock;\n        pBVar7->pWriter = (Btree *)0x0;\n        pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;\n        if (pBVar4 != (BtLock *)0x0) {\n          do {\n            pBVar4->eLock = '\x01';\n            pBVar4 = pBVar4->pNext;\n          } while (pBVar4 != (BtLock *)0x0);\n          p->inTrans = '\x01';\n          return;\n        }\n      }" if (parenthesized_expression "(p == pBVar7->pWriter)" ( (binary_expression "p == pBVar7->pWriter" identifier == (field_expression "pBVar7->pWriter" identifier -> field_identifier)) )) (compound_statement "{\n        pBVar4 = pBVar7->pLock;\n        pBVar7->pWriter = (Btree *)0x0;\n        pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;\n        if (pBVar4 != (BtLock *)0x0) {\n          do {\n            pBVar4->eLock = '\x01';\n            pBVar4 = pBVar4->pNext;\n          } while (pBVar4 != (BtLock *)0x0);\n          p->inTrans = '\x01';\n          return;\n        }\n      }" { (expression_statement "pBVar4 = pBVar7->pLock;" (assignment_expression "pBVar4 = pBVar7->pLock" identifier = (field_expression "pBVar7->pLock" identifier -> field_identifier)) ;) (expression_statement "pBVar7->pWriter = (Btree *)0x0;" (assignment_expression "pBVar7->pWriter = (Btree *)0x0" (field_expression "pBVar7->pWriter" identifier -> field_identifier) = (cast_expression "(Btree *)0x0" ( (type_descriptor "Btree *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;" (assignment_expression "pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f" (field_expression "pBVar7->btsFlags" identifier -> field_identifier) = (binary_expression "pBVar7->btsFlags & 0xff3f" (field_expression "pBVar7->btsFlags" identifier -> field_identifier) & number_literal)) ;) (if_statement "if (pBVar4 != (BtLock *)0x0) {\n          do {\n            pBVar4->eLock = '\x01';\n            pBVar4 = pBVar4->pNext;\n          } while (pBVar4 != (BtLock *)0x0);\n          p->inTrans = '\x01';\n          return;\n        }" if (parenthesized_expression "(pBVar4 != (BtLock *)0x0)" ( (binary_expression "pBVar4 != (BtLock *)0x0" identifier != (cast_expression "(BtLock *)0x0" ( (type_descriptor "BtLock *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          do {\n            pBVar4->eLock = '\x01';\n            pBVar4 = pBVar4->pNext;\n          } while (pBVar4 != (BtLock *)0x0);\n          p->inTrans = '\x01';\n          return;\n        }" { (do_statement "do {\n            pBVar4->eLock = '\x01';\n            pBVar4 = pBVar4->pNext;\n          } while (pBVar4 != (BtLock *)0x0);" do (compound_statement "{\n            pBVar4->eLock = '\x01';\n            pBVar4 = pBVar4->pNext;\n          }" { (expression_statement "pBVar4->eLock = '\x01';" (assignment_expression "pBVar4->eLock = '\x01'" (field_expression "pBVar4->eLock" identifier -> field_identifier) = (char_literal "'\x01'" ' escape_sequence ')) ;) (expression_statement "pBVar4 = pBVar4->pNext;" (assignment_expression "pBVar4 = pBVar4->pNext" identifier = (field_expression "pBVar4->pNext" identifier -> field_identifier)) ;) }) while (parenthesized_expression "(pBVar4 != (BtLock *)0x0)" ( (binary_expression "pBVar4 != (BtLock *)0x0" identifier != (cast_expression "(BtLock *)0x0" ( (type_descriptor "BtLock *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (expression_statement "p->inTrans = '\x01';" (assignment_expression "p->inTrans = '\x01'" (field_expression "p->inTrans" identifier -> field_identifier) = (char_literal "'\x01'" ' escape_sequence ')) ;) (return_statement "return;" return ;) })) })) (expression_statement "p->inTrans = '\x01';" (assignment_expression "p->inTrans = '\x01'" (field_expression "p->inTrans" identifier -> field_identifier) = (char_literal "'\x01'" ' escape_sequence ')) ;) (return_statement "return;" return ;) })) (expression_statement "ppBVar8 = &pBVar7->pLock;" (assignment_expression "ppBVar8 = &pBVar7->pLock" identifier = (pointer_expression "&pBVar7->pLock" & (field_expression "pBVar7->pLock" identifier -> field_identifier))) ;) (expression_statement "pBVar4 = pBVar7->pLock;" (assignment_expression "pBVar4 = pBVar7->pLock" identifier = (field_expression "pBVar7->pLock" identifier -> field_identifier)) ;) (while_statement "while (pBVar3 = pBVar4, pBVar3 != (BtLock *)0x0) {\n      pBVar4 = pBVar3->pNext;\n      if (p == pBVar3->pBtree) {\n        *ppBVar8 = pBVar4;\n        if (pBVar3->iTable != 1) {\n          (*(code *)puVar1)(pBVar3);\n          pBVar4 = *ppBVar8;\n        }\n      }\n      else {\n        ppBVar8 = &pBVar3->pNext;\n      }\n    }" while (parenthesized_expression "(pBVar3 = pBVar4, pBVar3 != (BtLock *)0x0)" ( (comma_expression "pBVar3 = pBVar4, pBVar3 != (BtLock *)0x0" (assignment_expression "pBVar3 = pBVar4" identifier = identifier) , (binary_expression "pBVar3 != (BtLock *)0x0" identifier != (cast_expression "(BtLock *)0x0" ( (type_descriptor "BtLock *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal))) )) (compound_statement "{\n      pBVar4 = pBVar3->pNext;\n      if (p == pBVar3->pBtree) {\n        *ppBVar8 = pBVar4;\n        if (pBVar3->iTable != 1) {\n          (*(code *)puVar1)(pBVar3);\n          pBVar4 = *ppBVar8;\n        }\n      }\n      else {\n        ppBVar8 = &pBVar3->pNext;\n      }\n    }" { (expression_statement "pBVar4 = pBVar3->pNext;" (assignment_expression "pBVar4 = pBVar3->pNext" identifier = (field_expression "pBVar3->pNext" identifier -> field_identifier)) ;) (if_statement "if (p == pBVar3->pBtree) {\n        *ppBVar8 = pBVar4;\n        if (pBVar3->iTable != 1) {\n          (*(code *)puVar1)(pBVar3);\n          pBVar4 = *ppBVar8;\n        }\n      }\n      else {\n        ppBVar8 = &pBVar3->pNext;\n      }" if (parenthesized_expression "(p == pBVar3->pBtree)" ( (binary_expression "p == pBVar3->pBtree" identifier == (field_expression "pBVar3->pBtree" identifier -> field_identifier)) )) (compound_statement "{\n        *ppBVar8 = pBVar4;\n        if (pBVar3->iTable != 1) {\n          (*(code *)puVar1)(pBVar3);\n          pBVar4 = *ppBVar8;\n        }\n      }" { (expression_statement "*ppBVar8 = pBVar4;" (assignment_expression "*ppBVar8 = pBVar4" (pointer_expression "*ppBVar8" * identifier) = identifier) ;) (if_statement "if (pBVar3->iTable != 1) {\n          (*(code *)puVar1)(pBVar3);\n          pBVar4 = *ppBVar8;\n        }" if (parenthesized_expression "(pBVar3->iTable != 1)" ( (binary_expression "pBVar3->iTable != 1" (field_expression "pBVar3->iTable" identifier -> field_identifier) != number_literal) )) (compound_statement "{\n          (*(code *)puVar1)(pBVar3);\n          pBVar4 = *ppBVar8;\n        }" { (expression_statement "(*(code *)puVar1)(pBVar3);" (call_expression "(*(code *)puVar1)(pBVar3)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pBVar3)" ( identifier ))) ;) (expression_statement "pBVar4 = *ppBVar8;" (assignment_expression "pBVar4 = *ppBVar8" identifier = (pointer_expression "*ppBVar8" * identifier)) ;) })) }) (else_clause "else {\n        ppBVar8 = &pBVar3->pNext;\n      }" else (compound_statement "{\n        ppBVar8 = &pBVar3->pNext;\n      }" { (expression_statement "ppBVar8 = &pBVar3->pNext;" (assignment_expression "ppBVar8 = &pBVar3->pNext" identifier = (pointer_expression "&pBVar3->pNext" & (field_expression "pBVar3->pNext" identifier -> field_identifier))) ;) }))) })) (if_statement "if (p == pBVar7->pWriter) {\n      pBVar7->pWriter = (Btree *)0x0;\n      pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;\n    }\n    else if (pBVar7->nTransaction == 2) {\n      pBVar7->btsFlags = pBVar7->btsFlags & 0xff7f;\n    }" if (parenthesized_expression "(p == pBVar7->pWriter)" ( (binary_expression "p == pBVar7->pWriter" identifier == (field_expression "pBVar7->pWriter" identifier -> field_identifier)) )) (compound_statement "{\n      pBVar7->pWriter = (Btree *)0x0;\n      pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;\n    }" { (expression_statement "pBVar7->pWriter = (Btree *)0x0;" (assignment_expression "pBVar7->pWriter = (Btree *)0x0" (field_expression "pBVar7->pWriter" identifier -> field_identifier) = (cast_expression "(Btree *)0x0" ( (type_descriptor "Btree *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;" (assignment_expression "pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f" (field_expression "pBVar7->btsFlags" identifier -> field_identifier) = (binary_expression "pBVar7->btsFlags & 0xff3f" (field_expression "pBVar7->btsFlags" identifier -> field_identifier) & number_literal)) ;) }) (else_clause "else if (pBVar7->nTransaction == 2) {\n      pBVar7->btsFlags = pBVar7->btsFlags & 0xff7f;\n    }" else (if_statement "if (pBVar7->nTransaction == 2) {\n      pBVar7->btsFlags = pBVar7->btsFlags & 0xff7f;\n    }" if (parenthesized_expression "(pBVar7->nTransaction == 2)" ( (binary_expression "pBVar7->nTransaction == 2" (field_expression "pBVar7->nTransaction" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n      pBVar7->btsFlags = pBVar7->btsFlags & 0xff7f;\n    }" { (expression_statement "pBVar7->btsFlags = pBVar7->btsFlags & 0xff7f;" (assignment_expression "pBVar7->btsFlags = pBVar7->btsFlags & 0xff7f" (field_expression "pBVar7->btsFlags" identifier -> field_identifier) = (binary_expression "pBVar7->btsFlags & 0xff7f" (field_expression "pBVar7->btsFlags" identifier -> field_identifier) & number_literal)) ;) })))) (expression_statement "iVar2 = pBVar6->nTransaction + -1;" (assignment_expression "iVar2 = pBVar6->nTransaction + -1" identifier = (binary_expression "pBVar6->nTransaction + -1" (field_expression "pBVar6->nTransaction" identifier -> field_identifier) + number_literal)) ;) (expression_statement "pBVar6->nTransaction = iVar2;" (assignment_expression "pBVar6->nTransaction = iVar2" (field_expression "pBVar6->nTransaction" identifier -> field_identifier) = identifier) ;) (if_statement "if (iVar2 == 0) {\n      pBVar6->inTransaction = '\0';\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      pBVar6->inTransaction = '\0';\n    }" { (expression_statement "pBVar6->inTransaction = '\0';" (assignment_expression "pBVar6->inTransaction = '\0'" (field_expression "pBVar6->inTransaction" identifier -> field_identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) })) })) (expression_statement "p->inTrans = '\0';" (assignment_expression "p->inTrans = '\0'" (field_expression "p->inTrans" identifier -> field_identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (if_statement "if (pBVar6->inTransaction != '\0') {\n    return;\n  }" if (parenthesized_expression "(pBVar6->inTransaction != '\0')" ( (binary_expression "pBVar6->inTransaction != '\0'" (field_expression "pBVar6->inTransaction" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "unlockBtreeIfUnused((BtShared *)&pBVar6->pPage1,in_a1);" (call_expression "unlockBtreeIfUnused((BtShared *)&pBVar6->pPage1,in_a1)" identifier (argument_list "((BtShared *)&pBVar6->pPage1,in_a1)" ( (cast_expression "(BtShared *)&pBVar6->pPage1" ( (type_descriptor "BtShared *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pBVar6->pPage1" & (field_expression "pBVar6->pPage1" identifier -> field_identifier))) , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_000c65e4(int *param_1)\n\n{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  \n  iVar5 = param_1[1];\n  iVar3 = *param_1;\n  *(undefined1 *)(iVar5 + 0x13) = 0;\n  puVar1 = PTR_sqlite3_free_0019096c;\n  if (*(char *)(param_1 + 2) != '\0') {\n    iVar6 = param_1[1];\n    if (1 < *(int *)(iVar3 + 0xac)) {\n      if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }\n      *(undefined1 *)(param_1 + 2) = 1;\n      return;\n    }\n    piVar7 = (int *)(iVar6 + 0x48);\n    puVar4 = *(undefined4 **)(iVar6 + 0x48);\n    while (puVar2 = puVar4, puVar2 != (undefined4 *)0x0) {\n      puVar4 = (undefined4 *)puVar2[3];\n      if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }\n    }\n    if (param_1 == *(int **)(iVar6 + 0x4c)) {\n      *(undefined4 *)(iVar6 + 0x4c) = 0;\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n    }\n    else if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }\n    iVar3 = *(int *)(iVar5 + 0x28) + -1;\n    *(int *)(iVar5 + 0x28) = iVar3;\n    if (iVar3 == 0) {\n      *(undefined1 *)(iVar5 + 0x14) = 0;\n    }\n  }\n  *(undefined1 *)(param_1 + 2) = 0;\n  if (*(char *)(iVar5 + 0x14) != '\0') {\n    return;\n  }\n  FUN_000c65b0(iVar5 + 0xc);\n  return;\n}\n\n" (function_definition "void FUN_000c65e4(int *param_1)\n\n{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  \n  iVar5 = param_1[1];\n  iVar3 = *param_1;\n  *(undefined1 *)(iVar5 + 0x13) = 0;\n  puVar1 = PTR_sqlite3_free_0019096c;\n  if (*(char *)(param_1 + 2) != '\0') {\n    iVar6 = param_1[1];\n    if (1 < *(int *)(iVar3 + 0xac)) {\n      if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }\n      *(undefined1 *)(param_1 + 2) = 1;\n      return;\n    }\n    piVar7 = (int *)(iVar6 + 0x48);\n    puVar4 = *(undefined4 **)(iVar6 + 0x48);\n    while (puVar2 = puVar4, puVar2 != (undefined4 *)0x0) {\n      puVar4 = (undefined4 *)puVar2[3];\n      if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }\n    }\n    if (param_1 == *(int **)(iVar6 + 0x4c)) {\n      *(undefined4 *)(iVar6 + 0x4c) = 0;\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n    }\n    else if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }\n    iVar3 = *(int *)(iVar5 + 0x28) + -1;\n    *(int *)(iVar5 + 0x28) = iVar3;\n    if (iVar3 == 0) {\n      *(undefined1 *)(iVar5 + 0x14) = 0;\n    }\n  }\n  *(undefined1 *)(param_1 + 2) = 0;\n  if (*(char *)(iVar5 + 0x14) != '\0') {\n    return;\n  }\n  FUN_000c65b0(iVar5 + 0xc);\n  return;\n}" primitive_type (function_declarator "FUN_000c65e4(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  \n  iVar5 = param_1[1];\n  iVar3 = *param_1;\n  *(undefined1 *)(iVar5 + 0x13) = 0;\n  puVar1 = PTR_sqlite3_free_0019096c;\n  if (*(char *)(param_1 + 2) != '\0') {\n    iVar6 = param_1[1];\n    if (1 < *(int *)(iVar3 + 0xac)) {\n      if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }\n      *(undefined1 *)(param_1 + 2) = 1;\n      return;\n    }\n    piVar7 = (int *)(iVar6 + 0x48);\n    puVar4 = *(undefined4 **)(iVar6 + 0x48);\n    while (puVar2 = puVar4, puVar2 != (undefined4 *)0x0) {\n      puVar4 = (undefined4 *)puVar2[3];\n      if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }\n    }\n    if (param_1 == *(int **)(iVar6 + 0x4c)) {\n      *(undefined4 *)(iVar6 + 0x4c) = 0;\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n    }\n    else if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }\n    iVar3 = *(int *)(iVar5 + 0x28) + -1;\n    *(int *)(iVar5 + 0x28) = iVar3;\n    if (iVar3 == 0) {\n      *(undefined1 *)(iVar5 + 0x14) = 0;\n    }\n  }\n  *(undefined1 *)(param_1 + 2) = 0;\n  if (*(char *)(iVar5 + 0x14) != '\0') {\n    return;\n  }\n  FUN_000c65b0(iVar5 + 0xc);\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (expression_statement "iVar5 = param_1[1];" (assignment_expression "iVar5 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "iVar3 = *param_1;" (assignment_expression "iVar3 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "*(undefined1 *)(iVar5 + 0x13) = 0;" (assignment_expression "*(undefined1 *)(iVar5 + 0x13) = 0" (pointer_expression "*(undefined1 *)(iVar5 + 0x13)" * (cast_expression "(undefined1 *)(iVar5 + 0x13)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x13)" ( (binary_expression "iVar5 + 0x13" identifier + number_literal) )))) = number_literal) ;) (expression_statement "puVar1 = PTR_sqlite3_free_0019096c;" (assignment_expression "puVar1 = PTR_sqlite3_free_0019096c" identifier = identifier) ;) (if_statement "if (*(char *)(param_1 + 2) != '\0') {\n    iVar6 = param_1[1];\n    if (1 < *(int *)(iVar3 + 0xac)) {\n      if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }\n      *(undefined1 *)(param_1 + 2) = 1;\n      return;\n    }\n    piVar7 = (int *)(iVar6 + 0x48);\n    puVar4 = *(undefined4 **)(iVar6 + 0x48);\n    while (puVar2 = puVar4, puVar2 != (undefined4 *)0x0) {\n      puVar4 = (undefined4 *)puVar2[3];\n      if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }\n    }\n    if (param_1 == *(int **)(iVar6 + 0x4c)) {\n      *(undefined4 *)(iVar6 + 0x4c) = 0;\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n    }\n    else if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }\n    iVar3 = *(int *)(iVar5 + 0x28) + -1;\n    *(int *)(iVar5 + 0x28) = iVar3;\n    if (iVar3 == 0) {\n      *(undefined1 *)(iVar5 + 0x14) = 0;\n    }\n  }" if (parenthesized_expression "(*(char *)(param_1 + 2) != '\0')" ( (binary_expression "*(char *)(param_1 + 2) != '\0'" (pointer_expression "*(char *)(param_1 + 2)" * (cast_expression "(char *)(param_1 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    iVar6 = param_1[1];\n    if (1 < *(int *)(iVar3 + 0xac)) {\n      if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }\n      *(undefined1 *)(param_1 + 2) = 1;\n      return;\n    }\n    piVar7 = (int *)(iVar6 + 0x48);\n    puVar4 = *(undefined4 **)(iVar6 + 0x48);\n    while (puVar2 = puVar4, puVar2 != (undefined4 *)0x0) {\n      puVar4 = (undefined4 *)puVar2[3];\n      if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }\n    }\n    if (param_1 == *(int **)(iVar6 + 0x4c)) {\n      *(undefined4 *)(iVar6 + 0x4c) = 0;\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n    }\n    else if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }\n    iVar3 = *(int *)(iVar5 + 0x28) + -1;\n    *(int *)(iVar5 + 0x28) = iVar3;\n    if (iVar3 == 0) {\n      *(undefined1 *)(iVar5 + 0x14) = 0;\n    }\n  }" { (expression_statement "iVar6 = param_1[1];" (assignment_expression "iVar6 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if (1 < *(int *)(iVar3 + 0xac)) {\n      if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }\n      *(undefined1 *)(param_1 + 2) = 1;\n      return;\n    }" if (parenthesized_expression "(1 < *(int *)(iVar3 + 0xac))" ( (binary_expression "1 < *(int *)(iVar3 + 0xac)" number_literal < (pointer_expression "*(int *)(iVar3 + 0xac)" * (cast_expression "(int *)(iVar3 + 0xac)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xac)" ( (binary_expression "iVar3 + 0xac" identifier + number_literal) ))))) )) (compound_statement "{\n      if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }\n      *(undefined1 *)(param_1 + 2) = 1;\n      return;\n    }" { (if_statement "if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }" if (parenthesized_expression "(param_1 == *(int **)(iVar6 + 0x4c))" ( (binary_expression "param_1 == *(int **)(iVar6 + 0x4c)" identifier == (pointer_expression "*(int **)(iVar6 + 0x4c)" * (cast_expression "(int **)(iVar6 + 0x4c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar6 + 0x4c)" ( (binary_expression "iVar6 + 0x4c" identifier + number_literal) ))))) )) (compound_statement "{\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }" { (expression_statement "iVar3 = *(int *)(iVar6 + 0x48);" (assignment_expression "iVar3 = *(int *)(iVar6 + 0x48)" identifier = (pointer_expression "*(int *)(iVar6 + 0x48)" * (cast_expression "(int *)(iVar6 + 0x48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x48)" ( (binary_expression "iVar6 + 0x48" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(iVar6 + 0x4c) = 0;" (assignment_expression "*(undefined4 *)(iVar6 + 0x4c) = 0" (pointer_expression "*(undefined4 *)(iVar6 + 0x4c)" * (cast_expression "(undefined4 *)(iVar6 + 0x4c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x4c)" ( (binary_expression "iVar6 + 0x4c" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;" (assignment_expression "*(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f" (pointer_expression "*(ushort *)(iVar6 + 0x16)" * (cast_expression "(ushort *)(iVar6 + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x16)" ( (binary_expression "iVar6 + 0x16" identifier + number_literal) )))) = (binary_expression "*(ushort *)(iVar6 + 0x16) & 0xff3f" (pointer_expression "*(ushort *)(iVar6 + 0x16)" * (cast_expression "(ushort *)(iVar6 + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x16)" ( (binary_expression "iVar6 + 0x16" identifier + number_literal) )))) & number_literal)) ;) (if_statement "if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }" { (do_statement "do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);" do (compound_statement "{\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          }" { (expression_statement "*(undefined1 *)(iVar3 + 8) = 1;" (assignment_expression "*(undefined1 *)(iVar3 + 8) = 1" (pointer_expression "*(undefined1 *)(iVar3 + 8)" * (cast_expression "(undefined1 *)(iVar3 + 8)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 8)" ( (binary_expression "iVar3 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar3 = *(int *)(iVar3 + 0xc);" (assignment_expression "iVar3 = *(int *)(iVar3 + 0xc)" identifier = (pointer_expression "*(int *)(iVar3 + 0xc)" * (cast_expression "(int *)(iVar3 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc)" ( (binary_expression "iVar3 + 0xc" identifier + number_literal) ))))) ;) }) while (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) ;) (expression_statement "*(undefined1 *)(param_1 + 2) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 2) = 1" (pointer_expression "*(undefined1 *)(param_1 + 2)" * (cast_expression "(undefined1 *)(param_1 + 2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) })) (expression_statement "*(undefined1 *)(param_1 + 2) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 2) = 1" (pointer_expression "*(undefined1 *)(param_1 + 2)" * (cast_expression "(undefined1 *)(param_1 + 2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "piVar7 = (int *)(iVar6 + 0x48);" (assignment_expression "piVar7 = (int *)(iVar6 + 0x48)" identifier = (cast_expression "(int *)(iVar6 + 0x48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x48)" ( (binary_expression "iVar6 + 0x48" identifier + number_literal) )))) ;) (expression_statement "puVar4 = *(undefined4 **)(iVar6 + 0x48);" (assignment_expression "puVar4 = *(undefined4 **)(iVar6 + 0x48)" identifier = (pointer_expression "*(undefined4 **)(iVar6 + 0x48)" * (cast_expression "(undefined4 **)(iVar6 + 0x48)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar6 + 0x48)" ( (binary_expression "iVar6 + 0x48" identifier + number_literal) ))))) ;) (while_statement "while (puVar2 = puVar4, puVar2 != (undefined4 *)0x0) {\n      puVar4 = (undefined4 *)puVar2[3];\n      if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }\n    }" while (parenthesized_expression "(puVar2 = puVar4, puVar2 != (undefined4 *)0x0)" ( (comma_expression "puVar2 = puVar4, puVar2 != (undefined4 *)0x0" (assignment_expression "puVar2 = puVar4" identifier = identifier) , (binary_expression "puVar2 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal))) )) (compound_statement "{\n      puVar4 = (undefined4 *)puVar2[3];\n      if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }\n    }" { (expression_statement "puVar4 = (undefined4 *)puVar2[3];" (assignment_expression "puVar4 = (undefined4 *)puVar2[3]" identifier = (cast_expression "(undefined4 *)puVar2[3]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar2[3]" identifier [ number_literal ]))) ;) (if_statement "if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }" if (parenthesized_expression "(param_1 == (int *)*puVar2)" ( (binary_expression "param_1 == (int *)*puVar2" identifier == (cast_expression "(int *)*puVar2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar2" * identifier))) )) (compound_statement "{\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }" { (expression_statement "*piVar7 = (int)puVar4;" (assignment_expression "*piVar7 = (int)puVar4" (pointer_expression "*piVar7" * identifier) = (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }" if (parenthesized_expression "(puVar2[1] != 1)" ( (binary_expression "puVar2[1] != 1" (subscript_expression "puVar2[1]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }" { (expression_statement "(*(code *)puVar1)(puVar2);" (call_expression "(*(code *)puVar1)(puVar2)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar2)" ( identifier ))) ;) (expression_statement "puVar4 = (undefined4 *)*piVar7;" (assignment_expression "puVar4 = (undefined4 *)*piVar7" identifier = (cast_expression "(undefined4 *)*piVar7" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar7" * identifier))) ;) })) }) (else_clause "else {\n        piVar7 = puVar2 + 3;\n      }" else (compound_statement "{\n        piVar7 = puVar2 + 3;\n      }" { (expression_statement "piVar7 = puVar2 + 3;" (assignment_expression "piVar7 = puVar2 + 3" identifier = (binary_expression "puVar2 + 3" identifier + number_literal)) ;) }))) })) (if_statement "if (param_1 == *(int **)(iVar6 + 0x4c)) {\n      *(undefined4 *)(iVar6 + 0x4c) = 0;\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n    }\n    else if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }" if (parenthesized_expression "(param_1 == *(int **)(iVar6 + 0x4c))" ( (binary_expression "param_1 == *(int **)(iVar6 + 0x4c)" identifier == (pointer_expression "*(int **)(iVar6 + 0x4c)" * (cast_expression "(int **)(iVar6 + 0x4c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar6 + 0x4c)" ( (binary_expression "iVar6 + 0x4c" identifier + number_literal) ))))) )) (compound_statement "{\n      *(undefined4 *)(iVar6 + 0x4c) = 0;\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n    }" { (expression_statement "*(undefined4 *)(iVar6 + 0x4c) = 0;" (assignment_expression "*(undefined4 *)(iVar6 + 0x4c) = 0" (pointer_expression "*(undefined4 *)(iVar6 + 0x4c)" * (cast_expression "(undefined4 *)(iVar6 + 0x4c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x4c)" ( (binary_expression "iVar6 + 0x4c" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;" (assignment_expression "*(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f" (pointer_expression "*(ushort *)(iVar6 + 0x16)" * (cast_expression "(ushort *)(iVar6 + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x16)" ( (binary_expression "iVar6 + 0x16" identifier + number_literal) )))) = (binary_expression "*(ushort *)(iVar6 + 0x16) & 0xff3f" (pointer_expression "*(ushort *)(iVar6 + 0x16)" * (cast_expression "(ushort *)(iVar6 + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x16)" ( (binary_expression "iVar6 + 0x16" identifier + number_literal) )))) & number_literal)) ;) }) (else_clause "else if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }" else (if_statement "if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }" if (parenthesized_expression "(*(int *)(iVar6 + 0x28) == 2)" ( (binary_expression "*(int *)(iVar6 + 0x28) == 2" (pointer_expression "*(int *)(iVar6 + 0x28)" * (cast_expression "(int *)(iVar6 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x28)" ( (binary_expression "iVar6 + 0x28" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }" { (expression_statement "*(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;" (assignment_expression "*(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f" (pointer_expression "*(ushort *)(iVar6 + 0x16)" * (cast_expression "(ushort *)(iVar6 + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x16)" ( (binary_expression "iVar6 + 0x16" identifier + number_literal) )))) = (binary_expression "*(ushort *)(iVar6 + 0x16) & 0xff7f" (pointer_expression "*(ushort *)(iVar6 + 0x16)" * (cast_expression "(ushort *)(iVar6 + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x16)" ( (binary_expression "iVar6 + 0x16" identifier + number_literal) )))) & number_literal)) ;) })))) (expression_statement "iVar3 = *(int *)(iVar5 + 0x28) + -1;" (assignment_expression "iVar3 = *(int *)(iVar5 + 0x28) + -1" identifier = (binary_expression "*(int *)(iVar5 + 0x28) + -1" (pointer_expression "*(int *)(iVar5 + 0x28)" * (cast_expression "(int *)(iVar5 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x28)" ( (binary_expression "iVar5 + 0x28" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "*(int *)(iVar5 + 0x28) = iVar3;" (assignment_expression "*(int *)(iVar5 + 0x28) = iVar3" (pointer_expression "*(int *)(iVar5 + 0x28)" * (cast_expression "(int *)(iVar5 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x28)" ( (binary_expression "iVar5 + 0x28" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar3 == 0) {\n      *(undefined1 *)(iVar5 + 0x14) = 0;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      *(undefined1 *)(iVar5 + 0x14) = 0;\n    }" { (expression_statement "*(undefined1 *)(iVar5 + 0x14) = 0;" (assignment_expression "*(undefined1 *)(iVar5 + 0x14) = 0" (pointer_expression "*(undefined1 *)(iVar5 + 0x14)" * (cast_expression "(undefined1 *)(iVar5 + 0x14)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x14)" ( (binary_expression "iVar5 + 0x14" identifier + number_literal) )))) = number_literal) ;) })) })) (expression_statement "*(undefined1 *)(param_1 + 2) = 0;" (assignment_expression "*(undefined1 *)(param_1 + 2) = 0" (pointer_expression "*(undefined1 *)(param_1 + 2)" * (cast_expression "(undefined1 *)(param_1 + 2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (*(char *)(iVar5 + 0x14) != '\0') {\n    return;\n  }" if (parenthesized_expression "(*(char *)(iVar5 + 0x14) != '\0')" ( (binary_expression "*(char *)(iVar5 + 0x14) != '\0'" (pointer_expression "*(char *)(iVar5 + 0x14)" * (cast_expression "(char *)(iVar5 + 0x14)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x14)" ( (binary_expression "iVar5 + 0x14" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_000c65b0(iVar5 + 0xc);" (call_expression "FUN_000c65b0(iVar5 + 0xc)" identifier (argument_list "(iVar5 + 0xc)" ( (binary_expression "iVar5 + 0xc" identifier + number_literal) ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (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 = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (while_statement while (parenthesized_expression ( (comma_expression (assignment_expression IDENT = IDENT) , (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }))) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT)) ;) }) (else_clause else (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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT)) ;) })))) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) })) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = 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 { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))) ;) (return_statement return ;) })))
(function_definition "void FUN_000c65e4(int *param_1)\n\n{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  \n  iVar5 = param_1[1];\n  iVar3 = *param_1;\n  *(undefined1 *)(iVar5 + 0x13) = 0;\n  puVar1 = PTR_sqlite3_free_0019096c;\n  if (*(char *)(param_1 + 2) != '\0') {\n    iVar6 = param_1[1];\n    if (1 < *(int *)(iVar3 + 0xac)) {\n      if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }\n      *(undefined1 *)(param_1 + 2) = 1;\n      return;\n    }\n    piVar7 = (int *)(iVar6 + 0x48);\n    puVar4 = *(undefined4 **)(iVar6 + 0x48);\n    while (puVar2 = puVar4, puVar2 != (undefined4 *)0x0) {\n      puVar4 = (undefined4 *)puVar2[3];\n      if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }\n    }\n    if (param_1 == *(int **)(iVar6 + 0x4c)) {\n      *(undefined4 *)(iVar6 + 0x4c) = 0;\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n    }\n    else if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }\n    iVar3 = *(int *)(iVar5 + 0x28) + -1;\n    *(int *)(iVar5 + 0x28) = iVar3;\n    if (iVar3 == 0) {\n      *(undefined1 *)(iVar5 + 0x14) = 0;\n    }\n  }\n  *(undefined1 *)(param_1 + 2) = 0;\n  if (*(char *)(iVar5 + 0x14) != '\0') {\n    return;\n  }\n  FUN_000c65b0(iVar5 + 0xc);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_000c65e4(int *param_1)" (identifier "FUN_000c65e4") (parameter_list "(int *param_1)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  \n  iVar5 = param_1[1];\n  iVar3 = *param_1;\n  *(undefined1 *)(iVar5 + 0x13) = 0;\n  puVar1 = PTR_sqlite3_free_0019096c;\n  if (*(char *)(param_1 + 2) != '\0') {\n    iVar6 = param_1[1];\n    if (1 < *(int *)(iVar3 + 0xac)) {\n      if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }\n      *(undefined1 *)(param_1 + 2) = 1;\n      return;\n    }\n    piVar7 = (int *)(iVar6 + 0x48);\n    puVar4 = *(undefined4 **)(iVar6 + 0x48);\n    while (puVar2 = puVar4, puVar2 != (undefined4 *)0x0) {\n      puVar4 = (undefined4 *)puVar2[3];\n      if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }\n    }\n    if (param_1 == *(int **)(iVar6 + 0x4c)) {\n      *(undefined4 *)(iVar6 + 0x4c) = 0;\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n    }\n    else if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }\n    iVar3 = *(int *)(iVar5 + 0x28) + -1;\n    *(int *)(iVar5 + 0x28) = iVar3;\n    if (iVar3 == 0) {\n      *(undefined1 *)(iVar5 + 0x14) = 0;\n    }\n  }\n  *(undefined1 *)(param_1 + 2) = 0;\n  if (*(char *)(iVar5 + 0x14) != '\0') {\n    return;\n  }\n  FUN_000c65b0(iVar5 + 0xc);\n  return;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined4 *puVar2;" (type_identifier "undefined4") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined4 *puVar4;" (type_identifier "undefined4") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "int *piVar7;" (primitive_type "int") (pointer_declarator "*piVar7" (* "*") (identifier "piVar7")) (; ";")) (expression_statement "iVar5 = param_1[1];" (assignment_expression "iVar5 = param_1[1]" (identifier "iVar5") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "iVar3 = *param_1;" (assignment_expression "iVar3 = *param_1" (identifier "iVar3") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "*(undefined1 *)(iVar5 + 0x13) = 0;" (assignment_expression "*(undefined1 *)(iVar5 + 0x13) = 0" (pointer_expression "*(undefined1 *)(iVar5 + 0x13)" (* "*") (cast_expression "(undefined1 *)(iVar5 + 0x13)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x13)" (( "(") (binary_expression "iVar5 + 0x13" (identifier "iVar5") (+ "+") (number_literal "0x13")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar1 = PTR_sqlite3_free_0019096c;" (assignment_expression "puVar1 = PTR_sqlite3_free_0019096c" (identifier "puVar1") (= "=") (identifier "PTR_sqlite3_free_0019096c")) (; ";")) (if_statement "if (*(char *)(param_1 + 2) != '\0') {\n    iVar6 = param_1[1];\n    if (1 < *(int *)(iVar3 + 0xac)) {\n      if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }\n      *(undefined1 *)(param_1 + 2) = 1;\n      return;\n    }\n    piVar7 = (int *)(iVar6 + 0x48);\n    puVar4 = *(undefined4 **)(iVar6 + 0x48);\n    while (puVar2 = puVar4, puVar2 != (undefined4 *)0x0) {\n      puVar4 = (undefined4 *)puVar2[3];\n      if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }\n    }\n    if (param_1 == *(int **)(iVar6 + 0x4c)) {\n      *(undefined4 *)(iVar6 + 0x4c) = 0;\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n    }\n    else if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }\n    iVar3 = *(int *)(iVar5 + 0x28) + -1;\n    *(int *)(iVar5 + 0x28) = iVar3;\n    if (iVar3 == 0) {\n      *(undefined1 *)(iVar5 + 0x14) = 0;\n    }\n  }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 2) != '\0')" (( "(") (binary_expression "*(char *)(param_1 + 2) != '\0'" (pointer_expression "*(char *)(param_1 + 2)" (* "*") (cast_expression "(char *)(param_1 + 2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 2)" (( "(") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    iVar6 = param_1[1];\n    if (1 < *(int *)(iVar3 + 0xac)) {\n      if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }\n      *(undefined1 *)(param_1 + 2) = 1;\n      return;\n    }\n    piVar7 = (int *)(iVar6 + 0x48);\n    puVar4 = *(undefined4 **)(iVar6 + 0x48);\n    while (puVar2 = puVar4, puVar2 != (undefined4 *)0x0) {\n      puVar4 = (undefined4 *)puVar2[3];\n      if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }\n    }\n    if (param_1 == *(int **)(iVar6 + 0x4c)) {\n      *(undefined4 *)(iVar6 + 0x4c) = 0;\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n    }\n    else if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }\n    iVar3 = *(int *)(iVar5 + 0x28) + -1;\n    *(int *)(iVar5 + 0x28) = iVar3;\n    if (iVar3 == 0) {\n      *(undefined1 *)(iVar5 + 0x14) = 0;\n    }\n  }" ({ "{") (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 (1 < *(int *)(iVar3 + 0xac)) {\n      if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }\n      *(undefined1 *)(param_1 + 2) = 1;\n      return;\n    }" (if "if") (parenthesized_expression "(1 < *(int *)(iVar3 + 0xac))" (( "(") (binary_expression "1 < *(int *)(iVar3 + 0xac)" (number_literal "1") (< "<") (pointer_expression "*(int *)(iVar3 + 0xac)" (* "*") (cast_expression "(int *)(iVar3 + 0xac)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0xac)" (( "(") (binary_expression "iVar3 + 0xac" (identifier "iVar3") (+ "+") (number_literal "0xac")) () ")"))))) () ")")) (compound_statement "{\n      if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }\n      *(undefined1 *)(param_1 + 2) = 1;\n      return;\n    }" ({ "{") (if_statement "if (param_1 == *(int **)(iVar6 + 0x4c)) {\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }" (if "if") (parenthesized_expression "(param_1 == *(int **)(iVar6 + 0x4c))" (( "(") (binary_expression "param_1 == *(int **)(iVar6 + 0x4c)" (identifier "param_1") (== "==") (pointer_expression "*(int **)(iVar6 + 0x4c)" (* "*") (cast_expression "(int **)(iVar6 + 0x4c)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar6 + 0x4c)" (( "(") (binary_expression "iVar6 + 0x4c" (identifier "iVar6") (+ "+") (number_literal "0x4c")) () ")"))))) () ")")) (compound_statement "{\n        iVar3 = *(int *)(iVar6 + 0x48);\n        *(undefined4 *)(iVar6 + 0x4c) = 0;\n        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n        if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }\n      }" ({ "{") (expression_statement "iVar3 = *(int *)(iVar6 + 0x48);" (assignment_expression "iVar3 = *(int *)(iVar6 + 0x48)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(iVar6 + 0x48)" (* "*") (cast_expression "(int *)(iVar6 + 0x48)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + 0x48)" (( "(") (binary_expression "iVar6 + 0x48" (identifier "iVar6") (+ "+") (number_literal "0x48")) () ")"))))) (; ";")) (expression_statement "*(undefined4 *)(iVar6 + 0x4c) = 0;" (assignment_expression "*(undefined4 *)(iVar6 + 0x4c) = 0" (pointer_expression "*(undefined4 *)(iVar6 + 0x4c)" (* "*") (cast_expression "(undefined4 *)(iVar6 + 0x4c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + 0x4c)" (( "(") (binary_expression "iVar6 + 0x4c" (identifier "iVar6") (+ "+") (number_literal "0x4c")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;" (assignment_expression "*(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f" (pointer_expression "*(ushort *)(iVar6 + 0x16)" (* "*") (cast_expression "(ushort *)(iVar6 + 0x16)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + 0x16)" (( "(") (binary_expression "iVar6 + 0x16" (identifier "iVar6") (+ "+") (number_literal "0x16")) () ")")))) (= "=") (binary_expression "*(ushort *)(iVar6 + 0x16) & 0xff3f" (pointer_expression "*(ushort *)(iVar6 + 0x16)" (* "*") (cast_expression "(ushort *)(iVar6 + 0x16)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + 0x16)" (( "(") (binary_expression "iVar6 + 0x16" (identifier "iVar6") (+ "+") (number_literal "0x16")) () ")")))) (& "&") (number_literal "0xff3f"))) (; ";")) (if_statement "if (iVar3 != 0) {\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);\n          *(undefined1 *)(param_1 + 2) = 1;\n          return;\n        }" ({ "{") (do_statement "do {\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          } while (iVar3 != 0);" (do "do") (compound_statement "{\n            *(undefined1 *)(iVar3 + 8) = 1;\n            iVar3 = *(int *)(iVar3 + 0xc);\n          }" ({ "{") (expression_statement "*(undefined1 *)(iVar3 + 8) = 1;" (assignment_expression "*(undefined1 *)(iVar3 + 8) = 1" (pointer_expression "*(undefined1 *)(iVar3 + 8)" (* "*") (cast_expression "(undefined1 *)(iVar3 + 8)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 8)" (( "(") (binary_expression "iVar3 + 8" (identifier "iVar3") (+ "+") (number_literal "8")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "iVar3 = *(int *)(iVar3 + 0xc);" (assignment_expression "iVar3 = *(int *)(iVar3 + 0xc)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(iVar3 + 0xc)" (* "*") (cast_expression "(int *)(iVar3 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0xc)" (( "(") (binary_expression "iVar3 + 0xc" (identifier "iVar3") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (; ";")) (expression_statement "*(undefined1 *)(param_1 + 2) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 2) = 1" (pointer_expression "*(undefined1 *)(param_1 + 2)" (* "*") (cast_expression "(undefined1 *)(param_1 + 2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 2)" (( "(") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2")) () ")")))) (= "=") (number_literal "1")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}"))) (expression_statement "*(undefined1 *)(param_1 + 2) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 2) = 1" (pointer_expression "*(undefined1 *)(param_1 + 2)" (* "*") (cast_expression "(undefined1 *)(param_1 + 2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 2)" (( "(") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2")) () ")")))) (= "=") (number_literal "1")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "piVar7 = (int *)(iVar6 + 0x48);" (assignment_expression "piVar7 = (int *)(iVar6 + 0x48)" (identifier "piVar7") (= "=") (cast_expression "(int *)(iVar6 + 0x48)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + 0x48)" (( "(") (binary_expression "iVar6 + 0x48" (identifier "iVar6") (+ "+") (number_literal "0x48")) () ")")))) (; ";")) (expression_statement "puVar4 = *(undefined4 **)(iVar6 + 0x48);" (assignment_expression "puVar4 = *(undefined4 **)(iVar6 + 0x48)" (identifier "puVar4") (= "=") (pointer_expression "*(undefined4 **)(iVar6 + 0x48)" (* "*") (cast_expression "(undefined4 **)(iVar6 + 0x48)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar6 + 0x48)" (( "(") (binary_expression "iVar6 + 0x48" (identifier "iVar6") (+ "+") (number_literal "0x48")) () ")"))))) (; ";")) (while_statement "while (puVar2 = puVar4, puVar2 != (undefined4 *)0x0) {\n      puVar4 = (undefined4 *)puVar2[3];\n      if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }\n    }" (while "while") (parenthesized_expression "(puVar2 = puVar4, puVar2 != (undefined4 *)0x0)" (( "(") (comma_expression "puVar2 = puVar4, puVar2 != (undefined4 *)0x0" (assignment_expression "puVar2 = puVar4" (identifier "puVar2") (= "=") (identifier "puVar4")) (, ",") (binary_expression "puVar2 != (undefined4 *)0x0" (identifier "puVar2") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")))) () ")")) (compound_statement "{\n      puVar4 = (undefined4 *)puVar2[3];\n      if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }\n    }" ({ "{") (expression_statement "puVar4 = (undefined4 *)puVar2[3];" (assignment_expression "puVar4 = (undefined4 *)puVar2[3]" (identifier "puVar4") (= "=") (cast_expression "(undefined4 *)puVar2[3]" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar2[3]" (identifier "puVar2") ([ "[") (number_literal "3") (] "]")))) (; ";")) (if_statement "if (param_1 == (int *)*puVar2) {\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }\n      else {\n        piVar7 = puVar2 + 3;\n      }" (if "if") (parenthesized_expression "(param_1 == (int *)*puVar2)" (( "(") (binary_expression "param_1 == (int *)*puVar2" (identifier "param_1") (== "==") (cast_expression "(int *)*puVar2" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar2" (* "*") (identifier "puVar2")))) () ")")) (compound_statement "{\n        *piVar7 = (int)puVar4;\n        if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }\n      }" ({ "{") (expression_statement "*piVar7 = (int)puVar4;" (assignment_expression "*piVar7 = (int)puVar4" (pointer_expression "*piVar7" (* "*") (identifier "piVar7")) (= "=") (cast_expression "(int)puVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar4"))) (; ";")) (if_statement "if (puVar2[1] != 1) {\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }" (if "if") (parenthesized_expression "(puVar2[1] != 1)" (( "(") (binary_expression "puVar2[1] != 1" (subscript_expression "puVar2[1]" (identifier "puVar2") ([ "[") (number_literal "1") (] "]")) (!= "!=") (number_literal "1")) () ")")) (compound_statement "{\n          (*(code *)puVar1)(puVar2);\n          puVar4 = (undefined4 *)*piVar7;\n        }" ({ "{") (expression_statement "(*(code *)puVar1)(puVar2);" (call_expression "(*(code *)puVar1)(puVar2)" (parenthesized_expression "(*(code *)puVar1)" (( "(") (pointer_expression "*(code *)puVar1" (* "*") (cast_expression "(code *)puVar1" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1"))) () ")")) (argument_list "(puVar2)" (( "(") (identifier "puVar2") () ")"))) (; ";")) (expression_statement "puVar4 = (undefined4 *)*piVar7;" (assignment_expression "puVar4 = (undefined4 *)*piVar7" (identifier "puVar4") (= "=") (cast_expression "(undefined4 *)*piVar7" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar7" (* "*") (identifier "piVar7")))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n        piVar7 = puVar2 + 3;\n      }" (else "else") (compound_statement "{\n        piVar7 = puVar2 + 3;\n      }" ({ "{") (expression_statement "piVar7 = puVar2 + 3;" (assignment_expression "piVar7 = puVar2 + 3" (identifier "piVar7") (= "=") (binary_expression "puVar2 + 3" (identifier "puVar2") (+ "+") (number_literal "3"))) (; ";")) (} "}")))) (} "}"))) (if_statement "if (param_1 == *(int **)(iVar6 + 0x4c)) {\n      *(undefined4 *)(iVar6 + 0x4c) = 0;\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n    }\n    else if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }" (if "if") (parenthesized_expression "(param_1 == *(int **)(iVar6 + 0x4c))" (( "(") (binary_expression "param_1 == *(int **)(iVar6 + 0x4c)" (identifier "param_1") (== "==") (pointer_expression "*(int **)(iVar6 + 0x4c)" (* "*") (cast_expression "(int **)(iVar6 + 0x4c)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar6 + 0x4c)" (( "(") (binary_expression "iVar6 + 0x4c" (identifier "iVar6") (+ "+") (number_literal "0x4c")) () ")"))))) () ")")) (compound_statement "{\n      *(undefined4 *)(iVar6 + 0x4c) = 0;\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;\n    }" ({ "{") (expression_statement "*(undefined4 *)(iVar6 + 0x4c) = 0;" (assignment_expression "*(undefined4 *)(iVar6 + 0x4c) = 0" (pointer_expression "*(undefined4 *)(iVar6 + 0x4c)" (* "*") (cast_expression "(undefined4 *)(iVar6 + 0x4c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + 0x4c)" (( "(") (binary_expression "iVar6 + 0x4c" (identifier "iVar6") (+ "+") (number_literal "0x4c")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;" (assignment_expression "*(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f" (pointer_expression "*(ushort *)(iVar6 + 0x16)" (* "*") (cast_expression "(ushort *)(iVar6 + 0x16)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + 0x16)" (( "(") (binary_expression "iVar6 + 0x16" (identifier "iVar6") (+ "+") (number_literal "0x16")) () ")")))) (= "=") (binary_expression "*(ushort *)(iVar6 + 0x16) & 0xff3f" (pointer_expression "*(ushort *)(iVar6 + 0x16)" (* "*") (cast_expression "(ushort *)(iVar6 + 0x16)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + 0x16)" (( "(") (binary_expression "iVar6 + 0x16" (identifier "iVar6") (+ "+") (number_literal "0x16")) () ")")))) (& "&") (number_literal "0xff3f"))) (; ";")) (} "}")) (else_clause "else if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }" (else "else") (if_statement "if (*(int *)(iVar6 + 0x28) == 2) {\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }" (if "if") (parenthesized_expression "(*(int *)(iVar6 + 0x28) == 2)" (( "(") (binary_expression "*(int *)(iVar6 + 0x28) == 2" (pointer_expression "*(int *)(iVar6 + 0x28)" (* "*") (cast_expression "(int *)(iVar6 + 0x28)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + 0x28)" (( "(") (binary_expression "iVar6 + 0x28" (identifier "iVar6") (+ "+") (number_literal "0x28")) () ")")))) (== "==") (number_literal "2")) () ")")) (compound_statement "{\n      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;\n    }" ({ "{") (expression_statement "*(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;" (assignment_expression "*(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f" (pointer_expression "*(ushort *)(iVar6 + 0x16)" (* "*") (cast_expression "(ushort *)(iVar6 + 0x16)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + 0x16)" (( "(") (binary_expression "iVar6 + 0x16" (identifier "iVar6") (+ "+") (number_literal "0x16")) () ")")))) (= "=") (binary_expression "*(ushort *)(iVar6 + 0x16) & 0xff7f" (pointer_expression "*(ushort *)(iVar6 + 0x16)" (* "*") (cast_expression "(ushort *)(iVar6 + 0x16)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + 0x16)" (( "(") (binary_expression "iVar6 + 0x16" (identifier "iVar6") (+ "+") (number_literal "0x16")) () ")")))) (& "&") (number_literal "0xff7f"))) (; ";")) (} "}"))))) (expression_statement "iVar3 = *(int *)(iVar5 + 0x28) + -1;" (assignment_expression "iVar3 = *(int *)(iVar5 + 0x28) + -1" (identifier "iVar3") (= "=") (binary_expression "*(int *)(iVar5 + 0x28) + -1" (pointer_expression "*(int *)(iVar5 + 0x28)" (* "*") (cast_expression "(int *)(iVar5 + 0x28)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x28)" (( "(") (binary_expression "iVar5 + 0x28" (identifier "iVar5") (+ "+") (number_literal "0x28")) () ")")))) (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "*(int *)(iVar5 + 0x28) = iVar3;" (assignment_expression "*(int *)(iVar5 + 0x28) = iVar3" (pointer_expression "*(int *)(iVar5 + 0x28)" (* "*") (cast_expression "(int *)(iVar5 + 0x28)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x28)" (( "(") (binary_expression "iVar5 + 0x28" (identifier "iVar5") (+ "+") (number_literal "0x28")) () ")")))) (= "=") (identifier "iVar3")) (; ";")) (if_statement "if (iVar3 == 0) {\n      *(undefined1 *)(iVar5 + 0x14) = 0;\n    }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      *(undefined1 *)(iVar5 + 0x14) = 0;\n    }" ({ "{") (expression_statement "*(undefined1 *)(iVar5 + 0x14) = 0;" (assignment_expression "*(undefined1 *)(iVar5 + 0x14) = 0" (pointer_expression "*(undefined1 *)(iVar5 + 0x14)" (* "*") (cast_expression "(undefined1 *)(iVar5 + 0x14)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x14)" (( "(") (binary_expression "iVar5 + 0x14" (identifier "iVar5") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}"))) (} "}"))) (expression_statement "*(undefined1 *)(param_1 + 2) = 0;" (assignment_expression "*(undefined1 *)(param_1 + 2) = 0" (pointer_expression "*(undefined1 *)(param_1 + 2)" (* "*") (cast_expression "(undefined1 *)(param_1 + 2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 2)" (( "(") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2")) () ")")))) (= "=") (number_literal "0")) (; ";")) (if_statement "if (*(char *)(iVar5 + 0x14) != '\0') {\n    return;\n  }" (if "if") (parenthesized_expression "(*(char *)(iVar5 + 0x14) != '\0')" (( "(") (binary_expression "*(char *)(iVar5 + 0x14) != '\0'" (pointer_expression "*(char *)(iVar5 + 0x14)" (* "*") (cast_expression "(char *)(iVar5 + 0x14)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x14)" (( "(") (binary_expression "iVar5 + 0x14" (identifier "iVar5") (+ "+") (number_literal "0x14")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_000c65b0(iVar5 + 0xc);" (call_expression "FUN_000c65b0(iVar5 + 0xc)" (identifier "FUN_000c65b0") (argument_list "(iVar5 + 0xc)" (( "(") (binary_expression "iVar5 + 0xc" (identifier "iVar5") (+ "+") (number_literal "0xc")) () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 *var_1)

{
  type_2 *puVar1;
  int var_4;
  type_3 *var_3;
  type_3 *var_2;
  type_4 *psVar5;
  type_5 *in_a1;
  type_5 *pBVar6;
  type_5 *pBVar7;
  type_3 **ppBVar8;
  
  pBVar6 = var_1->pBt;
  psVar5 = var_1->db;
  pBVar6->bDoTruncate = '\0';
  puVar1 = PTR_sqlite3_free_0019096c;
  if (var_1->inTrans != '\0') {
    pBVar7 = var_1->pBt;
    if (1 < psVar5->nVdbeRead) {
      if (var_1 == pBVar7->pWriter) {
        var_2 = pBVar7->pLock;
        pBVar7->pWriter = (type_1 *)0x0;
        pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;
        if (var_2 != (type_3 *)0x0) {
          do {
            var_2->eLock = '\x01';
            var_2 = var_2->pNext;
          } while (var_2 != (type_3 *)0x0);
          var_1->inTrans = '\x01';
          return;
        }
      }
      var_1->inTrans = '\x01';
      return;
    }
    ppBVar8 = &pBVar7->pLock;
    var_2 = pBVar7->pLock;
    while (var_3 = var_2, var_3 != (type_3 *)0x0) {
      var_2 = var_3->pNext;
      if (var_1 == var_3->pBtree) {
        *ppBVar8 = var_2;
        if (var_3->iTable != 1) {
          (*(type_6 *)puVar1)(var_3);
          var_2 = *ppBVar8;
        }
      }
      else {
        ppBVar8 = &var_3->pNext;
      }
    }
    if (var_1 == pBVar7->pWriter) {
      pBVar7->pWriter = (type_1 *)0x0;
      pBVar7->btsFlags = pBVar7->btsFlags & 0xff3f;
    }
    else if (pBVar7->nTransaction == 2) {
      pBVar7->btsFlags = pBVar7->btsFlags & 0xff7f;
    }
    var_4 = pBVar6->nTransaction + -1;
    pBVar6->nTransaction = var_4;
    if (var_4 == 0) {
      pBVar6->inTransaction = '\0';
    }
  }
  var_1->inTrans = '\0';
  if (pBVar6->inTransaction != '\0') {
    return;
  }
  var_5((type_5 *)&pBVar6->pPage1,in_a1);
  return;
}


(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))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (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))))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (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: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (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: (number_literal))))) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (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)))))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (return_statement))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (while_statement condition: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal))))) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (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 (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier)))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (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: (number_literal))))) right: (number_literal))))) alternative: (else_clause (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: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (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 (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))) (return_statement))))

void MASKED(int *param_1)

{
  undefined *puVar1;
  undefined4 *puVar2;
  int iVar3;
  undefined4 *puVar4;
  int iVar5;
  int iVar6;
  int *piVar7;
  
  iVar5 = param_1[1];
  iVar3 = *param_1;
  *(undefined1 *)(iVar5 + 0x13) = 0;
  puVar1 = PTR_sqlite3_free_0019096c;
  if (*(char *)(param_1 + 2) != '\0') {
    iVar6 = param_1[1];
    if (1 < *(int *)(iVar3 + 0xac)) {
      if (param_1 == *(int **)(iVar6 + 0x4c)) {
        iVar3 = *(int *)(iVar6 + 0x48);
        *(undefined4 *)(iVar6 + 0x4c) = 0;
        *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;
        if (iVar3 != 0) {
          do {
            *(undefined1 *)(iVar3 + 8) = 1;
            iVar3 = *(int *)(iVar3 + 0xc);
          } while (iVar3 != 0);
          *(undefined1 *)(param_1 + 2) = 1;
          return;
        }
      }
      *(undefined1 *)(param_1 + 2) = 1;
      return;
    }
    piVar7 = (int *)(iVar6 + 0x48);
    puVar4 = *(undefined4 **)(iVar6 + 0x48);
    while (puVar2 = puVar4, puVar2 != (undefined4 *)0x0) {
      puVar4 = (undefined4 *)puVar2[3];
      if (param_1 == (int *)*puVar2) {
        *piVar7 = (int)puVar4;
        if (puVar2[1] != 1) {
          (*(code *)puVar1)(puVar2);
          puVar4 = (undefined4 *)*piVar7;
        }
      }
      else {
        piVar7 = puVar2 + 3;
      }
    }
    if (param_1 == *(int **)(iVar6 + 0x4c)) {
      *(undefined4 *)(iVar6 + 0x4c) = 0;
      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff3f;
    }
    else if (*(int *)(iVar6 + 0x28) == 2) {
      *(ushort *)(iVar6 + 0x16) = *(ushort *)(iVar6 + 0x16) & 0xff7f;
    }
    iVar3 = *(int *)(iVar5 + 0x28) + -1;
    *(int *)(iVar5 + 0x28) = iVar3;
    if (iVar3 == 0) {
      *(undefined1 *)(iVar5 + 0x14) = 0;
    }
  }
  *(undefined1 *)(param_1 + 2) = 0;
  if (*(char *)(iVar5 + 0x14) != '\0') {
    return;
  }
  FUN_000c65b0(iVar5 + 0xc);
  return;
}

