
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

int sqlite3_file_control(sqlite3 *db,char *zDbName,int op,void *pArg)

{
  int *piVar1;
  u8 uVar2;
  Pager *pPVar3;
  Btree *p;
  sqlite3_file *psVar4;
  int iVar5;
  
  iVar5 = 1;
  sqlite3_mutex_enter(db->mutex);
  p = sqlite3DbNameToBtree(db,zDbName);
  if (p == (Btree *)0x0) goto LAB_0002b66e;
  if (p->sharable != '\0') {
    sqlite3BtreeEnter(p);
  }
  pPVar3 = p->pBt->pPager;
  psVar4 = pPVar3->fd;
  if (op == 7) {
LAB_0002b698:
    iVar5 = 0;
    *(sqlite3_file **)pArg = psVar4;
LAB_0002b6a0:
    uVar2 = p->sharable;
  }
  else {
    if (op == 0x1b) {
      iVar5 = 0;
      *(sqlite3_vfs **)pArg = pPVar3->pVfs;
      goto LAB_0002b6a0;
    }
    if (op == 0x1c) {
      psVar4 = pPVar3->jfd;
      if (pPVar3->pWal != (Wal *)0x0) {
        psVar4 = pPVar3->pWal->pWalFd;
      }
      goto LAB_0002b698;
    }
    if (op == 0x23) {
      iVar5 = 0;
      *(u32 *)pArg = pPVar3->iDataVersion;
      goto LAB_0002b6a0;
    }
    if (psVar4->pMethods == (sqlite3_io_methods *)0x0) {
      iVar5 = 0xc;
      goto LAB_0002b6a0;
    }
    iVar5 = (*psVar4->pMethods->xFileControl)(psVar4,op,pArg);
    uVar2 = p->sharable;
  }
  if (uVar2 != '\0') {
    piVar1 = &p->wantToLock;
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      sqlite3BtreeLeave(p);
    }
  }
LAB_0002b66e:
  sqlite3_mutex_leave(db->mutex);
  return iVar5;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 FUN_0002b5e0(int param_1,undefined4 param_2,int param_3,undefined4 *param_4)

{
  char cVar1;
  undefined4 *puVar2;
  int iVar3;
  int *piVar4;
  undefined4 uVar5;
  
  uVar5 = 1;
  FUN_000197c0(*(undefined4 *)(param_1 + 0xc));
  iVar3 = FUN_00027e20();
  if (iVar3 == 0) goto LAB_0002b66e;
  if (*(char *)(iVar3 + 9) != '\0') {
    FUN_0002b330();
  }
  puVar2 = (undefined4 *)**(int **)(iVar3 + 4);
  piVar4 = (int *)puVar2[0xf];
  if (param_3 == 7) {
LAB_0002b698:
    uVar5 = 0;
    *param_4 = piVar4;
LAB_0002b6a0:
    cVar1 = *(char *)(iVar3 + 9);
  }
  else {
    if (param_3 == 0x1b) {
      uVar5 = 0;
      *param_4 = *puVar2;
      goto LAB_0002b6a0;
    }
    if (param_3 == 0x1c) {
      piVar4 = (int *)puVar2[0x10];
      if (puVar2[0x35] != 0) {
        piVar4 = *(int **)(puVar2[0x35] + 8);
      }
      goto LAB_0002b698;
    }
    if (param_3 == 0x23) {
      uVar5 = 0;
      *param_4 = puVar2[0x19];
      goto LAB_0002b6a0;
    }
    if (*piVar4 == 0) {
      uVar5 = 0xc;
      goto LAB_0002b6a0;
    }
    uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);
    cVar1 = *(char *)(iVar3 + 9);
  }
  if (cVar1 != '\0') {
    piVar4 = (int *)(iVar3 + 0xc);
    *piVar4 = *piVar4 + -1;
    if (*piVar4 == 0) {
      FUN_0002b3c0();
    }
  }
LAB_0002b66e:
  FUN_000197f0(*(undefined4 *)(param_1 + 0xc));
  return uVar5;
}


PUSH EBP
MOV EBP,0x1
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014cf0
ADD EBX,0x11d8e6
SUB ESP,0x18
MOV EDI,dword ptr [ESP + 0x2c]
PUSH dword ptr [EDI + 0xc]
CALL 0x000197c0
MOV EDX,dword ptr [ESP + 0x34]
MOV EAX,EDI
CALL 0x00027e20
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0002b66e
CMP byte ptr [EAX + 0x9],0x0
MOV ESI,EAX
JZ 0x0002b622
CALL 0x0002b330
MOV EAX,dword ptr [ESI + 0x4]
CMP dword ptr [ESP + 0x28],0x7
MOV EAX,dword ptr [EAX]
MOV EDX,dword ptr [EAX + 0x3c]
JZ 0x0002b698
CMP dword ptr [ESP + 0x28],0x1b
JZ 0x0002b6c8
CMP dword ptr [ESP + 0x28],0x1c
JZ 0x0002b688
CMP dword ptr [ESP + 0x28],0x23
JZ 0x0002b6b8
MOV EAX,dword ptr [EDX]
TEST EAX,EAX
JZ 0x0002b6d8
SUB ESP,0x4
PUSH dword ptr [ESP + 0x30]
PUSH dword ptr [ESP + 0x30]
PUSH EDX
CALL dword ptr [EAX + 0x28]
MOV EBP,EAX
ADD ESP,0x10
CMP byte ptr [ESI + 0x9],0x0
JNZ 0x0002b6a6
SUB ESP,0xc
PUSH dword ptr [EDI + 0xc]
CALL 0x000197f0
ADD ESP,0x1c
MOV EAX,EBP
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EDX,dword ptr [EAX + 0x40]
MOV EAX,dword ptr [EAX + 0xd4]
TEST EAX,EAX
JZ 0x0002b698
MOV EDX,dword ptr [EAX + 0x8]
MOV EAX,dword ptr [ESP + 0x2c]
XOR EBP,EBP
MOV dword ptr [EAX],EDX
CMP byte ptr [ESI + 0x9],0x0
JZ 0x0002b66e
SUB dword ptr [ESI + 0xc],0x1
JNZ 0x0002b66e
MOV EAX,ESI
CALL 0x0002b3c0
JMP 0x0002b66e
MOV EAX,dword ptr [EAX + 0x64]
MOV ECX,dword ptr [ESP + 0x2c]
XOR EBP,EBP
MOV dword ptr [ECX],EAX
JMP 0x0002b6a0
MOV EAX,dword ptr [EAX]
MOV ECX,dword ptr [ESP + 0x2c]
XOR EBP,EBP
MOV dword ptr [ECX],EAX
JMP 0x0002b6a0
MOV EBP,0xc
JMP 0x0002b6a0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_0002b5e0(int param_1,undefined4 param_2,int param_3,undefined4 *param_4)\n\n{\n  char cVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  \n  uVar5 = 1;\n  FUN_000197c0(*(undefined4 *)(param_1 + 0xc));\n  iVar3 = FUN_00027e20();\n  if (iVar3 == 0) goto LAB_0002b66e;\n  if (*(char *)(iVar3 + 9) != '\0') {\n    FUN_0002b330();\n  }\n  puVar2 = (undefined4 *)**(int **)(iVar3 + 4);\n  piVar4 = (int *)puVar2[0xf];\n  if (param_3 == 7) {\nLAB_0002b698:\n    uVar5 = 0;\n    *param_4 = piVar4;\nLAB_0002b6a0:\n    cVar1 = *(char *)(iVar3 + 9);\n  }\n  else {\n    if (param_3 == 0x1b) {\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }\n    if (param_3 == 0x1c) {\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }\n    if (param_3 == 0x23) {\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }\n    if (*piVar4 == 0) {\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);\n    cVar1 = *(char *)(iVar3 + 9);\n  }\n  if (cVar1 != '\0') {\n    piVar4 = (int *)(iVar3 + 0xc);\n    *piVar4 = *piVar4 + -1;\n    if (*piVar4 == 0) {\n      FUN_0002b3c0();\n    }\n  }\nLAB_0002b66e:\n  FUN_000197f0(*(undefined4 *)(param_1 + 0xc));\n  return uVar5;\n}\n\n" comment (function_definition "undefined4 FUN_0002b5e0(int param_1,undefined4 param_2,int param_3,undefined4 *param_4)\n\n{\n  char cVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  \n  uVar5 = 1;\n  FUN_000197c0(*(undefined4 *)(param_1 + 0xc));\n  iVar3 = FUN_00027e20();\n  if (iVar3 == 0) goto LAB_0002b66e;\n  if (*(char *)(iVar3 + 9) != '\0') {\n    FUN_0002b330();\n  }\n  puVar2 = (undefined4 *)**(int **)(iVar3 + 4);\n  piVar4 = (int *)puVar2[0xf];\n  if (param_3 == 7) {\nLAB_0002b698:\n    uVar5 = 0;\n    *param_4 = piVar4;\nLAB_0002b6a0:\n    cVar1 = *(char *)(iVar3 + 9);\n  }\n  else {\n    if (param_3 == 0x1b) {\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }\n    if (param_3 == 0x1c) {\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }\n    if (param_3 == 0x23) {\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }\n    if (*piVar4 == 0) {\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);\n    cVar1 = *(char *)(iVar3 + 9);\n  }\n  if (cVar1 != '\0') {\n    piVar4 = (int *)(iVar3 + 0xc);\n    *piVar4 = *piVar4 + -1;\n    if (*piVar4 == 0) {\n      FUN_0002b3c0();\n    }\n  }\nLAB_0002b66e:\n  FUN_000197f0(*(undefined4 *)(param_1 + 0xc));\n  return uVar5;\n}" type_identifier (function_declarator "FUN_0002b5e0(int param_1,undefined4 param_2,int param_3,undefined4 *param_4)" identifier (parameter_list "(int param_1,undefined4 param_2,int param_3,undefined4 *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  \n  uVar5 = 1;\n  FUN_000197c0(*(undefined4 *)(param_1 + 0xc));\n  iVar3 = FUN_00027e20();\n  if (iVar3 == 0) goto LAB_0002b66e;\n  if (*(char *)(iVar3 + 9) != '\0') {\n    FUN_0002b330();\n  }\n  puVar2 = (undefined4 *)**(int **)(iVar3 + 4);\n  piVar4 = (int *)puVar2[0xf];\n  if (param_3 == 7) {\nLAB_0002b698:\n    uVar5 = 0;\n    *param_4 = piVar4;\nLAB_0002b6a0:\n    cVar1 = *(char *)(iVar3 + 9);\n  }\n  else {\n    if (param_3 == 0x1b) {\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }\n    if (param_3 == 0x1c) {\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }\n    if (param_3 == 0x23) {\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }\n    if (*piVar4 == 0) {\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);\n    cVar1 = *(char *)(iVar3 + 9);\n  }\n  if (cVar1 != '\0') {\n    piVar4 = (int *)(iVar3 + 0xc);\n    *piVar4 = *piVar4 + -1;\n    if (*piVar4 == 0) {\n      FUN_0002b3c0();\n    }\n  }\nLAB_0002b66e:\n  FUN_000197f0(*(undefined4 *)(param_1 + 0xc));\n  return uVar5;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (expression_statement "uVar5 = 1;" (assignment_expression "uVar5 = 1" identifier = number_literal) ;) (expression_statement "FUN_000197c0(*(undefined4 *)(param_1 + 0xc));" (call_expression "FUN_000197c0(*(undefined4 *)(param_1 + 0xc))" identifier (argument_list "(*(undefined4 *)(param_1 + 0xc))" ( (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ))) ;) (expression_statement "iVar3 = FUN_00027e20();" (assignment_expression "iVar3 = FUN_00027e20()" identifier = (call_expression "FUN_00027e20()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar3 == 0) goto LAB_0002b66e;" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0002b66e;" goto statement_identifier ;)) (if_statement "if (*(char *)(iVar3 + 9) != '\0') {\n    FUN_0002b330();\n  }" if (parenthesized_expression "(*(char *)(iVar3 + 9) != '\0')" ( (binary_expression "*(char *)(iVar3 + 9) != '\0'" (pointer_expression "*(char *)(iVar3 + 9)" * (cast_expression "(char *)(iVar3 + 9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 9)" ( (binary_expression "iVar3 + 9" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    FUN_0002b330();\n  }" { (expression_statement "FUN_0002b330();" (call_expression "FUN_0002b330()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "puVar2 = (undefined4 *)**(int **)(iVar3 + 4);" (assignment_expression "puVar2 = (undefined4 *)**(int **)(iVar3 + 4)" identifier = (cast_expression "(undefined4 *)**(int **)(iVar3 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "**(int **)(iVar3 + 4)" * (pointer_expression "*(int **)(iVar3 + 4)" * (cast_expression "(int **)(iVar3 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 4)" ( (binary_expression "iVar3 + 4" identifier + number_literal) ))))))) ;) (expression_statement "piVar4 = (int *)puVar2[0xf];" (assignment_expression "piVar4 = (int *)puVar2[0xf]" identifier = (cast_expression "(int *)puVar2[0xf]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar2[0xf]" identifier [ number_literal ]))) ;) (if_statement "if (param_3 == 7) {\nLAB_0002b698:\n    uVar5 = 0;\n    *param_4 = piVar4;\nLAB_0002b6a0:\n    cVar1 = *(char *)(iVar3 + 9);\n  }\n  else {\n    if (param_3 == 0x1b) {\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }\n    if (param_3 == 0x1c) {\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }\n    if (param_3 == 0x23) {\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }\n    if (*piVar4 == 0) {\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);\n    cVar1 = *(char *)(iVar3 + 9);\n  }" if (parenthesized_expression "(param_3 == 7)" ( (binary_expression "param_3 == 7" identifier == number_literal) )) (compound_statement "{\nLAB_0002b698:\n    uVar5 = 0;\n    *param_4 = piVar4;\nLAB_0002b6a0:\n    cVar1 = *(char *)(iVar3 + 9);\n  }" { (labeled_statement "LAB_0002b698:\n    uVar5 = 0;" statement_identifier : (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;)) (expression_statement "*param_4 = piVar4;" (assignment_expression "*param_4 = piVar4" (pointer_expression "*param_4" * identifier) = identifier) ;) (labeled_statement "LAB_0002b6a0:\n    cVar1 = *(char *)(iVar3 + 9);" statement_identifier : (expression_statement "cVar1 = *(char *)(iVar3 + 9);" (assignment_expression "cVar1 = *(char *)(iVar3 + 9)" identifier = (pointer_expression "*(char *)(iVar3 + 9)" * (cast_expression "(char *)(iVar3 + 9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 9)" ( (binary_expression "iVar3 + 9" identifier + number_literal) ))))) ;)) }) (else_clause "else {\n    if (param_3 == 0x1b) {\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }\n    if (param_3 == 0x1c) {\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }\n    if (param_3 == 0x23) {\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }\n    if (*piVar4 == 0) {\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);\n    cVar1 = *(char *)(iVar3 + 9);\n  }" else (compound_statement "{\n    if (param_3 == 0x1b) {\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }\n    if (param_3 == 0x1c) {\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }\n    if (param_3 == 0x23) {\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }\n    if (*piVar4 == 0) {\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);\n    cVar1 = *(char *)(iVar3 + 9);\n  }" { (if_statement "if (param_3 == 0x1b) {\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }" if (parenthesized_expression "(param_3 == 0x1b)" ( (binary_expression "param_3 == 0x1b" identifier == number_literal) )) (compound_statement "{\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }" { (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (expression_statement "*param_4 = *puVar2;" (assignment_expression "*param_4 = *puVar2" (pointer_expression "*param_4" * identifier) = (pointer_expression "*puVar2" * identifier)) ;) (goto_statement "goto LAB_0002b6a0;" goto statement_identifier ;) })) (if_statement "if (param_3 == 0x1c) {\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }" if (parenthesized_expression "(param_3 == 0x1c)" ( (binary_expression "param_3 == 0x1c" identifier == number_literal) )) (compound_statement "{\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }" { (expression_statement "piVar4 = (int *)puVar2[0x10];" (assignment_expression "piVar4 = (int *)puVar2[0x10]" identifier = (cast_expression "(int *)puVar2[0x10]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar2[0x10]" identifier [ number_literal ]))) ;) (if_statement "if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }" if (parenthesized_expression "(puVar2[0x35] != 0)" ( (binary_expression "puVar2[0x35] != 0" (subscript_expression "puVar2[0x35]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }" { (expression_statement "piVar4 = *(int **)(puVar2[0x35] + 8);" (assignment_expression "piVar4 = *(int **)(puVar2[0x35] + 8)" identifier = (pointer_expression "*(int **)(puVar2[0x35] + 8)" * (cast_expression "(int **)(puVar2[0x35] + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar2[0x35] + 8)" ( (binary_expression "puVar2[0x35] + 8" (subscript_expression "puVar2[0x35]" identifier [ number_literal ]) + number_literal) ))))) ;) })) (goto_statement "goto LAB_0002b698;" goto statement_identifier ;) })) (if_statement "if (param_3 == 0x23) {\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }" if (parenthesized_expression "(param_3 == 0x23)" ( (binary_expression "param_3 == 0x23" identifier == number_literal) )) (compound_statement "{\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }" { (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (expression_statement "*param_4 = puVar2[0x19];" (assignment_expression "*param_4 = puVar2[0x19]" (pointer_expression "*param_4" * identifier) = (subscript_expression "puVar2[0x19]" identifier [ number_literal ])) ;) (goto_statement "goto LAB_0002b6a0;" goto statement_identifier ;) })) (if_statement "if (*piVar4 == 0) {\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }" if (parenthesized_expression "(*piVar4 == 0)" ( (binary_expression "*piVar4 == 0" (pointer_expression "*piVar4" * identifier) == number_literal) )) (compound_statement "{\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }" { (expression_statement "uVar5 = 0xc;" (assignment_expression "uVar5 = 0xc" identifier = number_literal) ;) (goto_statement "goto LAB_0002b6a0;" goto statement_identifier ;) })) (expression_statement "uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);" (assignment_expression "uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4)" identifier = (call_expression "(**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4)" (parenthesized_expression "(**(code **)(*piVar4 + 0x28))" ( (pointer_expression "**(code **)(*piVar4 + 0x28)" * (pointer_expression "*(code **)(*piVar4 + 0x28)" * (cast_expression "(code **)(*piVar4 + 0x28)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar4 + 0x28)" ( (binary_expression "*piVar4 + 0x28" (pointer_expression "*piVar4" * identifier) + number_literal) ))))) )) (argument_list "(piVar4,param_3,param_4)" ( identifier , identifier , identifier )))) ;) (expression_statement "cVar1 = *(char *)(iVar3 + 9);" (assignment_expression "cVar1 = *(char *)(iVar3 + 9)" identifier = (pointer_expression "*(char *)(iVar3 + 9)" * (cast_expression "(char *)(iVar3 + 9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 9)" ( (binary_expression "iVar3 + 9" identifier + number_literal) ))))) ;) }))) (if_statement "if (cVar1 != '\0') {\n    piVar4 = (int *)(iVar3 + 0xc);\n    *piVar4 = *piVar4 + -1;\n    if (*piVar4 == 0) {\n      FUN_0002b3c0();\n    }\n  }" if (parenthesized_expression "(cVar1 != '\0')" ( (binary_expression "cVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    piVar4 = (int *)(iVar3 + 0xc);\n    *piVar4 = *piVar4 + -1;\n    if (*piVar4 == 0) {\n      FUN_0002b3c0();\n    }\n  }" { (expression_statement "piVar4 = (int *)(iVar3 + 0xc);" (assignment_expression "piVar4 = (int *)(iVar3 + 0xc)" identifier = (cast_expression "(int *)(iVar3 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc)" ( (binary_expression "iVar3 + 0xc" identifier + number_literal) )))) ;) (expression_statement "*piVar4 = *piVar4 + -1;" (assignment_expression "*piVar4 = *piVar4 + -1" (pointer_expression "*piVar4" * identifier) = (binary_expression "*piVar4 + -1" (pointer_expression "*piVar4" * identifier) + number_literal)) ;) (if_statement "if (*piVar4 == 0) {\n      FUN_0002b3c0();\n    }" if (parenthesized_expression "(*piVar4 == 0)" ( (binary_expression "*piVar4 == 0" (pointer_expression "*piVar4" * identifier) == number_literal) )) (compound_statement "{\n      FUN_0002b3c0();\n    }" { (expression_statement "FUN_0002b3c0();" (call_expression "FUN_0002b3c0()" identifier (argument_list "()" ( ))) ;) })) })) (labeled_statement "LAB_0002b66e:\n  FUN_000197f0(*(undefined4 *)(param_1 + 0xc));" statement_identifier : (expression_statement "FUN_000197f0(*(undefined4 *)(param_1 + 0xc));" (call_expression "FUN_000197f0(*(undefined4 *)(param_1 + 0xc))" identifier (argument_list "(*(undefined4 *)(param_1 + 0xc))" ( (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ))) ;)) (return_statement "return uVar5;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint sqlite3_file_control(sqlite3 *db,char *zDbName,int op,void *pArg)\n\n{\n  int *piVar1;\n  u8 uVar2;\n  Pager *pPVar3;\n  Btree *p;\n  sqlite3_file *psVar4;\n  int iVar5;\n  \n  iVar5 = 1;\n  sqlite3_mutex_enter(db->mutex);\n  p = sqlite3DbNameToBtree(db,zDbName);\n  if (p == (Btree *)0x0) goto LAB_0002b66e;\n  if (p->sharable != '\0') {\n    sqlite3BtreeEnter(p);\n  }\n  pPVar3 = p->pBt->pPager;\n  psVar4 = pPVar3->fd;\n  if (op == 7) {\nLAB_0002b698:\n    iVar5 = 0;\n    *(sqlite3_file **)pArg = psVar4;\nLAB_0002b6a0:\n    uVar2 = p->sharable;\n  }\n  else {\n    if (op == 0x1b) {\n      iVar5 = 0;\n      *(sqlite3_vfs **)pArg = pPVar3->pVfs;\n      goto LAB_0002b6a0;\n    }\n    if (op == 0x1c) {\n      psVar4 = pPVar3->jfd;\n      if (pPVar3->pWal != (Wal *)0x0) {\n        psVar4 = pPVar3->pWal->pWalFd;\n      }\n      goto LAB_0002b698;\n    }\n    if (op == 0x23) {\n      iVar5 = 0;\n      *(u32 *)pArg = pPVar3->iDataVersion;\n      goto LAB_0002b6a0;\n    }\n    if (psVar4->pMethods == (sqlite3_io_methods *)0x0) {\n      iVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    iVar5 = (*psVar4->pMethods->xFileControl)(psVar4,op,pArg);\n    uVar2 = p->sharable;\n  }\n  if (uVar2 != '\0') {\n    piVar1 = &p->wantToLock;\n    *piVar1 = *piVar1 + -1;\n    if (*piVar1 == 0) {\n      sqlite3BtreeLeave(p);\n    }\n  }\nLAB_0002b66e:\n  sqlite3_mutex_leave(db->mutex);\n  return iVar5;\n}\n\n" comment (function_definition "int sqlite3_file_control(sqlite3 *db,char *zDbName,int op,void *pArg)\n\n{\n  int *piVar1;\n  u8 uVar2;\n  Pager *pPVar3;\n  Btree *p;\n  sqlite3_file *psVar4;\n  int iVar5;\n  \n  iVar5 = 1;\n  sqlite3_mutex_enter(db->mutex);\n  p = sqlite3DbNameToBtree(db,zDbName);\n  if (p == (Btree *)0x0) goto LAB_0002b66e;\n  if (p->sharable != '\0') {\n    sqlite3BtreeEnter(p);\n  }\n  pPVar3 = p->pBt->pPager;\n  psVar4 = pPVar3->fd;\n  if (op == 7) {\nLAB_0002b698:\n    iVar5 = 0;\n    *(sqlite3_file **)pArg = psVar4;\nLAB_0002b6a0:\n    uVar2 = p->sharable;\n  }\n  else {\n    if (op == 0x1b) {\n      iVar5 = 0;\n      *(sqlite3_vfs **)pArg = pPVar3->pVfs;\n      goto LAB_0002b6a0;\n    }\n    if (op == 0x1c) {\n      psVar4 = pPVar3->jfd;\n      if (pPVar3->pWal != (Wal *)0x0) {\n        psVar4 = pPVar3->pWal->pWalFd;\n      }\n      goto LAB_0002b698;\n    }\n    if (op == 0x23) {\n      iVar5 = 0;\n      *(u32 *)pArg = pPVar3->iDataVersion;\n      goto LAB_0002b6a0;\n    }\n    if (psVar4->pMethods == (sqlite3_io_methods *)0x0) {\n      iVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    iVar5 = (*psVar4->pMethods->xFileControl)(psVar4,op,pArg);\n    uVar2 = p->sharable;\n  }\n  if (uVar2 != '\0') {\n    piVar1 = &p->wantToLock;\n    *piVar1 = *piVar1 + -1;\n    if (*piVar1 == 0) {\n      sqlite3BtreeLeave(p);\n    }\n  }\nLAB_0002b66e:\n  sqlite3_mutex_leave(db->mutex);\n  return iVar5;\n}" primitive_type (function_declarator "sqlite3_file_control(sqlite3 *db,char *zDbName,int op,void *pArg)" identifier (parameter_list "(sqlite3 *db,char *zDbName,int op,void *pArg)" ( (parameter_declaration "sqlite3 *db" type_identifier (pointer_declarator "*db" * identifier)) , (parameter_declaration "char *zDbName" primitive_type (pointer_declarator "*zDbName" * identifier)) , (parameter_declaration "int op" primitive_type identifier) , (parameter_declaration "void *pArg" primitive_type (pointer_declarator "*pArg" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  u8 uVar2;\n  Pager *pPVar3;\n  Btree *p;\n  sqlite3_file *psVar4;\n  int iVar5;\n  \n  iVar5 = 1;\n  sqlite3_mutex_enter(db->mutex);\n  p = sqlite3DbNameToBtree(db,zDbName);\n  if (p == (Btree *)0x0) goto LAB_0002b66e;\n  if (p->sharable != '\0') {\n    sqlite3BtreeEnter(p);\n  }\n  pPVar3 = p->pBt->pPager;\n  psVar4 = pPVar3->fd;\n  if (op == 7) {\nLAB_0002b698:\n    iVar5 = 0;\n    *(sqlite3_file **)pArg = psVar4;\nLAB_0002b6a0:\n    uVar2 = p->sharable;\n  }\n  else {\n    if (op == 0x1b) {\n      iVar5 = 0;\n      *(sqlite3_vfs **)pArg = pPVar3->pVfs;\n      goto LAB_0002b6a0;\n    }\n    if (op == 0x1c) {\n      psVar4 = pPVar3->jfd;\n      if (pPVar3->pWal != (Wal *)0x0) {\n        psVar4 = pPVar3->pWal->pWalFd;\n      }\n      goto LAB_0002b698;\n    }\n    if (op == 0x23) {\n      iVar5 = 0;\n      *(u32 *)pArg = pPVar3->iDataVersion;\n      goto LAB_0002b6a0;\n    }\n    if (psVar4->pMethods == (sqlite3_io_methods *)0x0) {\n      iVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    iVar5 = (*psVar4->pMethods->xFileControl)(psVar4,op,pArg);\n    uVar2 = p->sharable;\n  }\n  if (uVar2 != '\0') {\n    piVar1 = &p->wantToLock;\n    *piVar1 = *piVar1 + -1;\n    if (*piVar1 == 0) {\n      sqlite3BtreeLeave(p);\n    }\n  }\nLAB_0002b66e:\n  sqlite3_mutex_leave(db->mutex);\n  return iVar5;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "u8 uVar2;" type_identifier identifier ;) (declaration "Pager *pPVar3;" type_identifier (pointer_declarator "*pPVar3" * identifier) ;) (declaration "Btree *p;" type_identifier (pointer_declarator "*p" * identifier) ;) (declaration "sqlite3_file *psVar4;" type_identifier (pointer_declarator "*psVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "iVar5 = 1;" (assignment_expression "iVar5 = 1" identifier = number_literal) ;) (expression_statement "sqlite3_mutex_enter(db->mutex);" (call_expression "sqlite3_mutex_enter(db->mutex)" identifier (argument_list "(db->mutex)" ( (field_expression "db->mutex" identifier -> field_identifier) ))) ;) (expression_statement "p = sqlite3DbNameToBtree(db,zDbName);" (assignment_expression "p = sqlite3DbNameToBtree(db,zDbName)" identifier = (call_expression "sqlite3DbNameToBtree(db,zDbName)" identifier (argument_list "(db,zDbName)" ( identifier , identifier )))) ;) (if_statement "if (p == (Btree *)0x0) goto LAB_0002b66e;" if (parenthesized_expression "(p == (Btree *)0x0)" ( (binary_expression "p == (Btree *)0x0" identifier == (cast_expression "(Btree *)0x0" ( (type_descriptor "Btree *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0002b66e;" goto statement_identifier ;)) (if_statement "if (p->sharable != '\0') {\n    sqlite3BtreeEnter(p);\n  }" if (parenthesized_expression "(p->sharable != '\0')" ( (binary_expression "p->sharable != '\0'" (field_expression "p->sharable" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    sqlite3BtreeEnter(p);\n  }" { (expression_statement "sqlite3BtreeEnter(p);" (call_expression "sqlite3BtreeEnter(p)" identifier (argument_list "(p)" ( identifier ))) ;) })) (expression_statement "pPVar3 = p->pBt->pPager;" (assignment_expression "pPVar3 = p->pBt->pPager" identifier = (field_expression "p->pBt->pPager" (field_expression "p->pBt" identifier -> field_identifier) -> field_identifier)) ;) (expression_statement "psVar4 = pPVar3->fd;" (assignment_expression "psVar4 = pPVar3->fd" identifier = (field_expression "pPVar3->fd" identifier -> field_identifier)) ;) (if_statement "if (op == 7) {\nLAB_0002b698:\n    iVar5 = 0;\n    *(sqlite3_file **)pArg = psVar4;\nLAB_0002b6a0:\n    uVar2 = p->sharable;\n  }\n  else {\n    if (op == 0x1b) {\n      iVar5 = 0;\n      *(sqlite3_vfs **)pArg = pPVar3->pVfs;\n      goto LAB_0002b6a0;\n    }\n    if (op == 0x1c) {\n      psVar4 = pPVar3->jfd;\n      if (pPVar3->pWal != (Wal *)0x0) {\n        psVar4 = pPVar3->pWal->pWalFd;\n      }\n      goto LAB_0002b698;\n    }\n    if (op == 0x23) {\n      iVar5 = 0;\n      *(u32 *)pArg = pPVar3->iDataVersion;\n      goto LAB_0002b6a0;\n    }\n    if (psVar4->pMethods == (sqlite3_io_methods *)0x0) {\n      iVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    iVar5 = (*psVar4->pMethods->xFileControl)(psVar4,op,pArg);\n    uVar2 = p->sharable;\n  }" if (parenthesized_expression "(op == 7)" ( (binary_expression "op == 7" identifier == number_literal) )) (compound_statement "{\nLAB_0002b698:\n    iVar5 = 0;\n    *(sqlite3_file **)pArg = psVar4;\nLAB_0002b6a0:\n    uVar2 = p->sharable;\n  }" { (labeled_statement "LAB_0002b698:\n    iVar5 = 0;" statement_identifier : (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;)) (expression_statement "*(sqlite3_file **)pArg = psVar4;" (assignment_expression "*(sqlite3_file **)pArg = psVar4" (pointer_expression "*(sqlite3_file **)pArg" * (cast_expression "(sqlite3_file **)pArg" ( (type_descriptor "sqlite3_file **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (labeled_statement "LAB_0002b6a0:\n    uVar2 = p->sharable;" statement_identifier : (expression_statement "uVar2 = p->sharable;" (assignment_expression "uVar2 = p->sharable" identifier = (field_expression "p->sharable" identifier -> field_identifier)) ;)) }) (else_clause "else {\n    if (op == 0x1b) {\n      iVar5 = 0;\n      *(sqlite3_vfs **)pArg = pPVar3->pVfs;\n      goto LAB_0002b6a0;\n    }\n    if (op == 0x1c) {\n      psVar4 = pPVar3->jfd;\n      if (pPVar3->pWal != (Wal *)0x0) {\n        psVar4 = pPVar3->pWal->pWalFd;\n      }\n      goto LAB_0002b698;\n    }\n    if (op == 0x23) {\n      iVar5 = 0;\n      *(u32 *)pArg = pPVar3->iDataVersion;\n      goto LAB_0002b6a0;\n    }\n    if (psVar4->pMethods == (sqlite3_io_methods *)0x0) {\n      iVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    iVar5 = (*psVar4->pMethods->xFileControl)(psVar4,op,pArg);\n    uVar2 = p->sharable;\n  }" else (compound_statement "{\n    if (op == 0x1b) {\n      iVar5 = 0;\n      *(sqlite3_vfs **)pArg = pPVar3->pVfs;\n      goto LAB_0002b6a0;\n    }\n    if (op == 0x1c) {\n      psVar4 = pPVar3->jfd;\n      if (pPVar3->pWal != (Wal *)0x0) {\n        psVar4 = pPVar3->pWal->pWalFd;\n      }\n      goto LAB_0002b698;\n    }\n    if (op == 0x23) {\n      iVar5 = 0;\n      *(u32 *)pArg = pPVar3->iDataVersion;\n      goto LAB_0002b6a0;\n    }\n    if (psVar4->pMethods == (sqlite3_io_methods *)0x0) {\n      iVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    iVar5 = (*psVar4->pMethods->xFileControl)(psVar4,op,pArg);\n    uVar2 = p->sharable;\n  }" { (if_statement "if (op == 0x1b) {\n      iVar5 = 0;\n      *(sqlite3_vfs **)pArg = pPVar3->pVfs;\n      goto LAB_0002b6a0;\n    }" if (parenthesized_expression "(op == 0x1b)" ( (binary_expression "op == 0x1b" identifier == number_literal) )) (compound_statement "{\n      iVar5 = 0;\n      *(sqlite3_vfs **)pArg = pPVar3->pVfs;\n      goto LAB_0002b6a0;\n    }" { (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (expression_statement "*(sqlite3_vfs **)pArg = pPVar3->pVfs;" (assignment_expression "*(sqlite3_vfs **)pArg = pPVar3->pVfs" (pointer_expression "*(sqlite3_vfs **)pArg" * (cast_expression "(sqlite3_vfs **)pArg" ( (type_descriptor "sqlite3_vfs **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = (field_expression "pPVar3->pVfs" identifier -> field_identifier)) ;) (goto_statement "goto LAB_0002b6a0;" goto statement_identifier ;) })) (if_statement "if (op == 0x1c) {\n      psVar4 = pPVar3->jfd;\n      if (pPVar3->pWal != (Wal *)0x0) {\n        psVar4 = pPVar3->pWal->pWalFd;\n      }\n      goto LAB_0002b698;\n    }" if (parenthesized_expression "(op == 0x1c)" ( (binary_expression "op == 0x1c" identifier == number_literal) )) (compound_statement "{\n      psVar4 = pPVar3->jfd;\n      if (pPVar3->pWal != (Wal *)0x0) {\n        psVar4 = pPVar3->pWal->pWalFd;\n      }\n      goto LAB_0002b698;\n    }" { (expression_statement "psVar4 = pPVar3->jfd;" (assignment_expression "psVar4 = pPVar3->jfd" identifier = (field_expression "pPVar3->jfd" identifier -> field_identifier)) ;) (if_statement "if (pPVar3->pWal != (Wal *)0x0) {\n        psVar4 = pPVar3->pWal->pWalFd;\n      }" if (parenthesized_expression "(pPVar3->pWal != (Wal *)0x0)" ( (binary_expression "pPVar3->pWal != (Wal *)0x0" (field_expression "pPVar3->pWal" identifier -> field_identifier) != (cast_expression "(Wal *)0x0" ( (type_descriptor "Wal *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        psVar4 = pPVar3->pWal->pWalFd;\n      }" { (expression_statement "psVar4 = pPVar3->pWal->pWalFd;" (assignment_expression "psVar4 = pPVar3->pWal->pWalFd" identifier = (field_expression "pPVar3->pWal->pWalFd" (field_expression "pPVar3->pWal" identifier -> field_identifier) -> field_identifier)) ;) })) (goto_statement "goto LAB_0002b698;" goto statement_identifier ;) })) (if_statement "if (op == 0x23) {\n      iVar5 = 0;\n      *(u32 *)pArg = pPVar3->iDataVersion;\n      goto LAB_0002b6a0;\n    }" if (parenthesized_expression "(op == 0x23)" ( (binary_expression "op == 0x23" identifier == number_literal) )) (compound_statement "{\n      iVar5 = 0;\n      *(u32 *)pArg = pPVar3->iDataVersion;\n      goto LAB_0002b6a0;\n    }" { (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (expression_statement "*(u32 *)pArg = pPVar3->iDataVersion;" (assignment_expression "*(u32 *)pArg = pPVar3->iDataVersion" (pointer_expression "*(u32 *)pArg" * (cast_expression "(u32 *)pArg" ( (type_descriptor "u32 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = (field_expression "pPVar3->iDataVersion" identifier -> field_identifier)) ;) (goto_statement "goto LAB_0002b6a0;" goto statement_identifier ;) })) (if_statement "if (psVar4->pMethods == (sqlite3_io_methods *)0x0) {\n      iVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }" if (parenthesized_expression "(psVar4->pMethods == (sqlite3_io_methods *)0x0)" ( (binary_expression "psVar4->pMethods == (sqlite3_io_methods *)0x0" (field_expression "psVar4->pMethods" identifier -> field_identifier) == (cast_expression "(sqlite3_io_methods *)0x0" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }" { (expression_statement "iVar5 = 0xc;" (assignment_expression "iVar5 = 0xc" identifier = number_literal) ;) (goto_statement "goto LAB_0002b6a0;" goto statement_identifier ;) })) (expression_statement "iVar5 = (*psVar4->pMethods->xFileControl)(psVar4,op,pArg);" (assignment_expression "iVar5 = (*psVar4->pMethods->xFileControl)(psVar4,op,pArg)" identifier = (call_expression "(*psVar4->pMethods->xFileControl)(psVar4,op,pArg)" (parenthesized_expression "(*psVar4->pMethods->xFileControl)" ( (pointer_expression "*psVar4->pMethods->xFileControl" * (field_expression "psVar4->pMethods->xFileControl" (field_expression "psVar4->pMethods" identifier -> field_identifier) -> field_identifier)) )) (argument_list "(psVar4,op,pArg)" ( identifier , identifier , identifier )))) ;) (expression_statement "uVar2 = p->sharable;" (assignment_expression "uVar2 = p->sharable" identifier = (field_expression "p->sharable" identifier -> field_identifier)) ;) }))) (if_statement "if (uVar2 != '\0') {\n    piVar1 = &p->wantToLock;\n    *piVar1 = *piVar1 + -1;\n    if (*piVar1 == 0) {\n      sqlite3BtreeLeave(p);\n    }\n  }" if (parenthesized_expression "(uVar2 != '\0')" ( (binary_expression "uVar2 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    piVar1 = &p->wantToLock;\n    *piVar1 = *piVar1 + -1;\n    if (*piVar1 == 0) {\n      sqlite3BtreeLeave(p);\n    }\n  }" { (expression_statement "piVar1 = &p->wantToLock;" (assignment_expression "piVar1 = &p->wantToLock" identifier = (pointer_expression "&p->wantToLock" & (field_expression "p->wantToLock" identifier -> field_identifier))) ;) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (if_statement "if (*piVar1 == 0) {\n      sqlite3BtreeLeave(p);\n    }" if (parenthesized_expression "(*piVar1 == 0)" ( (binary_expression "*piVar1 == 0" (pointer_expression "*piVar1" * identifier) == number_literal) )) (compound_statement "{\n      sqlite3BtreeLeave(p);\n    }" { (expression_statement "sqlite3BtreeLeave(p);" (call_expression "sqlite3BtreeLeave(p)" identifier (argument_list "(p)" ( identifier ))) ;) })) })) (labeled_statement "LAB_0002b66e:\n  sqlite3_mutex_leave(db->mutex);" statement_identifier : (expression_statement "sqlite3_mutex_leave(db->mutex);" (call_expression "sqlite3_mutex_leave(db->mutex)" identifier (argument_list "(db->mutex)" ( (field_expression "db->mutex" identifier -> field_identifier) ))) ;)) (return_statement "return iVar5;" return identifier ;) })))
(translation_unit "undefined4 FUN_0002b5e0(int param_1,undefined4 param_2,int param_3,undefined4 *param_4)\n\n{\n  char cVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  \n  uVar5 = 1;\n  FUN_000197c0(*(undefined4 *)(param_1 + 0xc));\n  iVar3 = FUN_00027e20();\n  if (iVar3 == 0) goto LAB_0002b66e;\n  if (*(char *)(iVar3 + 9) != '\0') {\n    FUN_0002b330();\n  }\n  puVar2 = (undefined4 *)**(int **)(iVar3 + 4);\n  piVar4 = (int *)puVar2[0xf];\n  if (param_3 == 7) {\nLAB_0002b698:\n    uVar5 = 0;\n    *param_4 = piVar4;\nLAB_0002b6a0:\n    cVar1 = *(char *)(iVar3 + 9);\n  }\n  else {\n    if (param_3 == 0x1b) {\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }\n    if (param_3 == 0x1c) {\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }\n    if (param_3 == 0x23) {\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }\n    if (*piVar4 == 0) {\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);\n    cVar1 = *(char *)(iVar3 + 9);\n  }\n  if (cVar1 != '\0') {\n    piVar4 = (int *)(iVar3 + 0xc);\n    *piVar4 = *piVar4 + -1;\n    if (*piVar4 == 0) {\n      FUN_0002b3c0();\n    }\n  }\nLAB_0002b66e:\n  FUN_000197f0(*(undefined4 *)(param_1 + 0xc));\n  return uVar5;\n}\n\n" (function_definition "undefined4 FUN_0002b5e0(int param_1,undefined4 param_2,int param_3,undefined4 *param_4)\n\n{\n  char cVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  \n  uVar5 = 1;\n  FUN_000197c0(*(undefined4 *)(param_1 + 0xc));\n  iVar3 = FUN_00027e20();\n  if (iVar3 == 0) goto LAB_0002b66e;\n  if (*(char *)(iVar3 + 9) != '\0') {\n    FUN_0002b330();\n  }\n  puVar2 = (undefined4 *)**(int **)(iVar3 + 4);\n  piVar4 = (int *)puVar2[0xf];\n  if (param_3 == 7) {\nLAB_0002b698:\n    uVar5 = 0;\n    *param_4 = piVar4;\nLAB_0002b6a0:\n    cVar1 = *(char *)(iVar3 + 9);\n  }\n  else {\n    if (param_3 == 0x1b) {\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }\n    if (param_3 == 0x1c) {\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }\n    if (param_3 == 0x23) {\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }\n    if (*piVar4 == 0) {\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);\n    cVar1 = *(char *)(iVar3 + 9);\n  }\n  if (cVar1 != '\0') {\n    piVar4 = (int *)(iVar3 + 0xc);\n    *piVar4 = *piVar4 + -1;\n    if (*piVar4 == 0) {\n      FUN_0002b3c0();\n    }\n  }\nLAB_0002b66e:\n  FUN_000197f0(*(undefined4 *)(param_1 + 0xc));\n  return uVar5;\n}" type_identifier (function_declarator "FUN_0002b5e0(int param_1,undefined4 param_2,int param_3,undefined4 *param_4)" identifier (parameter_list "(int param_1,undefined4 param_2,int param_3,undefined4 *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  \n  uVar5 = 1;\n  FUN_000197c0(*(undefined4 *)(param_1 + 0xc));\n  iVar3 = FUN_00027e20();\n  if (iVar3 == 0) goto LAB_0002b66e;\n  if (*(char *)(iVar3 + 9) != '\0') {\n    FUN_0002b330();\n  }\n  puVar2 = (undefined4 *)**(int **)(iVar3 + 4);\n  piVar4 = (int *)puVar2[0xf];\n  if (param_3 == 7) {\nLAB_0002b698:\n    uVar5 = 0;\n    *param_4 = piVar4;\nLAB_0002b6a0:\n    cVar1 = *(char *)(iVar3 + 9);\n  }\n  else {\n    if (param_3 == 0x1b) {\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }\n    if (param_3 == 0x1c) {\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }\n    if (param_3 == 0x23) {\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }\n    if (*piVar4 == 0) {\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);\n    cVar1 = *(char *)(iVar3 + 9);\n  }\n  if (cVar1 != '\0') {\n    piVar4 = (int *)(iVar3 + 0xc);\n    *piVar4 = *piVar4 + -1;\n    if (*piVar4 == 0) {\n      FUN_0002b3c0();\n    }\n  }\nLAB_0002b66e:\n  FUN_000197f0(*(undefined4 *)(param_1 + 0xc));\n  return uVar5;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (expression_statement "uVar5 = 1;" (assignment_expression "uVar5 = 1" identifier = number_literal) ;) (expression_statement "FUN_000197c0(*(undefined4 *)(param_1 + 0xc));" (call_expression "FUN_000197c0(*(undefined4 *)(param_1 + 0xc))" identifier (argument_list "(*(undefined4 *)(param_1 + 0xc))" ( (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ))) ;) (expression_statement "iVar3 = FUN_00027e20();" (assignment_expression "iVar3 = FUN_00027e20()" identifier = (call_expression "FUN_00027e20()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar3 == 0) goto LAB_0002b66e;" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0002b66e;" goto statement_identifier ;)) (if_statement "if (*(char *)(iVar3 + 9) != '\0') {\n    FUN_0002b330();\n  }" if (parenthesized_expression "(*(char *)(iVar3 + 9) != '\0')" ( (binary_expression "*(char *)(iVar3 + 9) != '\0'" (pointer_expression "*(char *)(iVar3 + 9)" * (cast_expression "(char *)(iVar3 + 9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 9)" ( (binary_expression "iVar3 + 9" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    FUN_0002b330();\n  }" { (expression_statement "FUN_0002b330();" (call_expression "FUN_0002b330()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "puVar2 = (undefined4 *)**(int **)(iVar3 + 4);" (assignment_expression "puVar2 = (undefined4 *)**(int **)(iVar3 + 4)" identifier = (cast_expression "(undefined4 *)**(int **)(iVar3 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "**(int **)(iVar3 + 4)" * (pointer_expression "*(int **)(iVar3 + 4)" * (cast_expression "(int **)(iVar3 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 4)" ( (binary_expression "iVar3 + 4" identifier + number_literal) ))))))) ;) (expression_statement "piVar4 = (int *)puVar2[0xf];" (assignment_expression "piVar4 = (int *)puVar2[0xf]" identifier = (cast_expression "(int *)puVar2[0xf]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar2[0xf]" identifier [ number_literal ]))) ;) (if_statement "if (param_3 == 7) {\nLAB_0002b698:\n    uVar5 = 0;\n    *param_4 = piVar4;\nLAB_0002b6a0:\n    cVar1 = *(char *)(iVar3 + 9);\n  }\n  else {\n    if (param_3 == 0x1b) {\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }\n    if (param_3 == 0x1c) {\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }\n    if (param_3 == 0x23) {\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }\n    if (*piVar4 == 0) {\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);\n    cVar1 = *(char *)(iVar3 + 9);\n  }" if (parenthesized_expression "(param_3 == 7)" ( (binary_expression "param_3 == 7" identifier == number_literal) )) (compound_statement "{\nLAB_0002b698:\n    uVar5 = 0;\n    *param_4 = piVar4;\nLAB_0002b6a0:\n    cVar1 = *(char *)(iVar3 + 9);\n  }" { (labeled_statement "LAB_0002b698:\n    uVar5 = 0;" statement_identifier : (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;)) (expression_statement "*param_4 = piVar4;" (assignment_expression "*param_4 = piVar4" (pointer_expression "*param_4" * identifier) = identifier) ;) (labeled_statement "LAB_0002b6a0:\n    cVar1 = *(char *)(iVar3 + 9);" statement_identifier : (expression_statement "cVar1 = *(char *)(iVar3 + 9);" (assignment_expression "cVar1 = *(char *)(iVar3 + 9)" identifier = (pointer_expression "*(char *)(iVar3 + 9)" * (cast_expression "(char *)(iVar3 + 9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 9)" ( (binary_expression "iVar3 + 9" identifier + number_literal) ))))) ;)) }) (else_clause "else {\n    if (param_3 == 0x1b) {\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }\n    if (param_3 == 0x1c) {\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }\n    if (param_3 == 0x23) {\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }\n    if (*piVar4 == 0) {\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);\n    cVar1 = *(char *)(iVar3 + 9);\n  }" else (compound_statement "{\n    if (param_3 == 0x1b) {\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }\n    if (param_3 == 0x1c) {\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }\n    if (param_3 == 0x23) {\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }\n    if (*piVar4 == 0) {\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);\n    cVar1 = *(char *)(iVar3 + 9);\n  }" { (if_statement "if (param_3 == 0x1b) {\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }" if (parenthesized_expression "(param_3 == 0x1b)" ( (binary_expression "param_3 == 0x1b" identifier == number_literal) )) (compound_statement "{\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }" { (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (expression_statement "*param_4 = *puVar2;" (assignment_expression "*param_4 = *puVar2" (pointer_expression "*param_4" * identifier) = (pointer_expression "*puVar2" * identifier)) ;) (goto_statement "goto LAB_0002b6a0;" goto statement_identifier ;) })) (if_statement "if (param_3 == 0x1c) {\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }" if (parenthesized_expression "(param_3 == 0x1c)" ( (binary_expression "param_3 == 0x1c" identifier == number_literal) )) (compound_statement "{\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }" { (expression_statement "piVar4 = (int *)puVar2[0x10];" (assignment_expression "piVar4 = (int *)puVar2[0x10]" identifier = (cast_expression "(int *)puVar2[0x10]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar2[0x10]" identifier [ number_literal ]))) ;) (if_statement "if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }" if (parenthesized_expression "(puVar2[0x35] != 0)" ( (binary_expression "puVar2[0x35] != 0" (subscript_expression "puVar2[0x35]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }" { (expression_statement "piVar4 = *(int **)(puVar2[0x35] + 8);" (assignment_expression "piVar4 = *(int **)(puVar2[0x35] + 8)" identifier = (pointer_expression "*(int **)(puVar2[0x35] + 8)" * (cast_expression "(int **)(puVar2[0x35] + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar2[0x35] + 8)" ( (binary_expression "puVar2[0x35] + 8" (subscript_expression "puVar2[0x35]" identifier [ number_literal ]) + number_literal) ))))) ;) })) (goto_statement "goto LAB_0002b698;" goto statement_identifier ;) })) (if_statement "if (param_3 == 0x23) {\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }" if (parenthesized_expression "(param_3 == 0x23)" ( (binary_expression "param_3 == 0x23" identifier == number_literal) )) (compound_statement "{\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }" { (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (expression_statement "*param_4 = puVar2[0x19];" (assignment_expression "*param_4 = puVar2[0x19]" (pointer_expression "*param_4" * identifier) = (subscript_expression "puVar2[0x19]" identifier [ number_literal ])) ;) (goto_statement "goto LAB_0002b6a0;" goto statement_identifier ;) })) (if_statement "if (*piVar4 == 0) {\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }" if (parenthesized_expression "(*piVar4 == 0)" ( (binary_expression "*piVar4 == 0" (pointer_expression "*piVar4" * identifier) == number_literal) )) (compound_statement "{\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }" { (expression_statement "uVar5 = 0xc;" (assignment_expression "uVar5 = 0xc" identifier = number_literal) ;) (goto_statement "goto LAB_0002b6a0;" goto statement_identifier ;) })) (expression_statement "uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);" (assignment_expression "uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4)" identifier = (call_expression "(**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4)" (parenthesized_expression "(**(code **)(*piVar4 + 0x28))" ( (pointer_expression "**(code **)(*piVar4 + 0x28)" * (pointer_expression "*(code **)(*piVar4 + 0x28)" * (cast_expression "(code **)(*piVar4 + 0x28)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar4 + 0x28)" ( (binary_expression "*piVar4 + 0x28" (pointer_expression "*piVar4" * identifier) + number_literal) ))))) )) (argument_list "(piVar4,param_3,param_4)" ( identifier , identifier , identifier )))) ;) (expression_statement "cVar1 = *(char *)(iVar3 + 9);" (assignment_expression "cVar1 = *(char *)(iVar3 + 9)" identifier = (pointer_expression "*(char *)(iVar3 + 9)" * (cast_expression "(char *)(iVar3 + 9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 9)" ( (binary_expression "iVar3 + 9" identifier + number_literal) ))))) ;) }))) (if_statement "if (cVar1 != '\0') {\n    piVar4 = (int *)(iVar3 + 0xc);\n    *piVar4 = *piVar4 + -1;\n    if (*piVar4 == 0) {\n      FUN_0002b3c0();\n    }\n  }" if (parenthesized_expression "(cVar1 != '\0')" ( (binary_expression "cVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    piVar4 = (int *)(iVar3 + 0xc);\n    *piVar4 = *piVar4 + -1;\n    if (*piVar4 == 0) {\n      FUN_0002b3c0();\n    }\n  }" { (expression_statement "piVar4 = (int *)(iVar3 + 0xc);" (assignment_expression "piVar4 = (int *)(iVar3 + 0xc)" identifier = (cast_expression "(int *)(iVar3 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc)" ( (binary_expression "iVar3 + 0xc" identifier + number_literal) )))) ;) (expression_statement "*piVar4 = *piVar4 + -1;" (assignment_expression "*piVar4 = *piVar4 + -1" (pointer_expression "*piVar4" * identifier) = (binary_expression "*piVar4 + -1" (pointer_expression "*piVar4" * identifier) + number_literal)) ;) (if_statement "if (*piVar4 == 0) {\n      FUN_0002b3c0();\n    }" if (parenthesized_expression "(*piVar4 == 0)" ( (binary_expression "*piVar4 == 0" (pointer_expression "*piVar4" * identifier) == number_literal) )) (compound_statement "{\n      FUN_0002b3c0();\n    }" { (expression_statement "FUN_0002b3c0();" (call_expression "FUN_0002b3c0()" identifier (argument_list "()" ( ))) ;) })) })) (labeled_statement "LAB_0002b66e:\n  FUN_000197f0(*(undefined4 *)(param_1 + 0xc));" statement_identifier : (expression_statement "FUN_000197f0(*(undefined4 *)(param_1 + 0xc));" (call_expression "FUN_000197f0(*(undefined4 *)(param_1 + 0xc))" identifier (argument_list "(*(undefined4 *)(param_1 + 0xc))" ( (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ))) ;)) (return_statement "return uVar5;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (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 (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))))) ;) (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 == LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;)) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == 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 (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))))) ;) })) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (subscript_expression IDENT [ LIT ])) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( IDENT , IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) })) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;)) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_0002b5e0(int param_1,undefined4 param_2,int param_3,undefined4 *param_4)\n\n{\n  char cVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  \n  uVar5 = 1;\n  FUN_000197c0(*(undefined4 *)(param_1 + 0xc));\n  iVar3 = FUN_00027e20();\n  if (iVar3 == 0) goto LAB_0002b66e;\n  if (*(char *)(iVar3 + 9) != '\0') {\n    FUN_0002b330();\n  }\n  puVar2 = (undefined4 *)**(int **)(iVar3 + 4);\n  piVar4 = (int *)puVar2[0xf];\n  if (param_3 == 7) {\nLAB_0002b698:\n    uVar5 = 0;\n    *param_4 = piVar4;\nLAB_0002b6a0:\n    cVar1 = *(char *)(iVar3 + 9);\n  }\n  else {\n    if (param_3 == 0x1b) {\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }\n    if (param_3 == 0x1c) {\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }\n    if (param_3 == 0x23) {\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }\n    if (*piVar4 == 0) {\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);\n    cVar1 = *(char *)(iVar3 + 9);\n  }\n  if (cVar1 != '\0') {\n    piVar4 = (int *)(iVar3 + 0xc);\n    *piVar4 = *piVar4 + -1;\n    if (*piVar4 == 0) {\n      FUN_0002b3c0();\n    }\n  }\nLAB_0002b66e:\n  FUN_000197f0(*(undefined4 *)(param_1 + 0xc));\n  return uVar5;\n}" (type_identifier "undefined4") (function_declarator "FUN_0002b5e0(int param_1,undefined4 param_2,int param_3,undefined4 *param_4)" (identifier "FUN_0002b5e0") (parameter_list "(int param_1,undefined4 param_2,int param_3,undefined4 *param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 *param_4" (type_identifier "undefined4") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  char cVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  \n  uVar5 = 1;\n  FUN_000197c0(*(undefined4 *)(param_1 + 0xc));\n  iVar3 = FUN_00027e20();\n  if (iVar3 == 0) goto LAB_0002b66e;\n  if (*(char *)(iVar3 + 9) != '\0') {\n    FUN_0002b330();\n  }\n  puVar2 = (undefined4 *)**(int **)(iVar3 + 4);\n  piVar4 = (int *)puVar2[0xf];\n  if (param_3 == 7) {\nLAB_0002b698:\n    uVar5 = 0;\n    *param_4 = piVar4;\nLAB_0002b6a0:\n    cVar1 = *(char *)(iVar3 + 9);\n  }\n  else {\n    if (param_3 == 0x1b) {\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }\n    if (param_3 == 0x1c) {\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }\n    if (param_3 == 0x23) {\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }\n    if (*piVar4 == 0) {\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);\n    cVar1 = *(char *)(iVar3 + 9);\n  }\n  if (cVar1 != '\0') {\n    piVar4 = (int *)(iVar3 + 0xc);\n    *piVar4 = *piVar4 + -1;\n    if (*piVar4 == 0) {\n      FUN_0002b3c0();\n    }\n  }\nLAB_0002b66e:\n  FUN_000197f0(*(undefined4 *)(param_1 + 0xc));\n  return uVar5;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "undefined4 *puVar2;" (type_identifier "undefined4") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "undefined4 uVar5;" (type_identifier "undefined4") (identifier "uVar5") (; ";")) (expression_statement "uVar5 = 1;" (assignment_expression "uVar5 = 1" (identifier "uVar5") (= "=") (number_literal "1")) (; ";")) (expression_statement "FUN_000197c0(*(undefined4 *)(param_1 + 0xc));" (call_expression "FUN_000197c0(*(undefined4 *)(param_1 + 0xc))" (identifier "FUN_000197c0") (argument_list "(*(undefined4 *)(param_1 + 0xc))" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) () ")"))) (; ";")) (expression_statement "iVar3 = FUN_00027e20();" (assignment_expression "iVar3 = FUN_00027e20()" (identifier "iVar3") (= "=") (call_expression "FUN_00027e20()" (identifier "FUN_00027e20") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar3 == 0) goto LAB_0002b66e;" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_0002b66e;" (goto "goto") (statement_identifier "LAB_0002b66e") (; ";"))) (if_statement "if (*(char *)(iVar3 + 9) != '\0') {\n    FUN_0002b330();\n  }" (if "if") (parenthesized_expression "(*(char *)(iVar3 + 9) != '\0')" (( "(") (binary_expression "*(char *)(iVar3 + 9) != '\0'" (pointer_expression "*(char *)(iVar3 + 9)" (* "*") (cast_expression "(char *)(iVar3 + 9)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 9)" (( "(") (binary_expression "iVar3 + 9" (identifier "iVar3") (+ "+") (number_literal "9")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    FUN_0002b330();\n  }" ({ "{") (expression_statement "FUN_0002b330();" (call_expression "FUN_0002b330()" (identifier "FUN_0002b330") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "puVar2 = (undefined4 *)**(int **)(iVar3 + 4);" (assignment_expression "puVar2 = (undefined4 *)**(int **)(iVar3 + 4)" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)**(int **)(iVar3 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "**(int **)(iVar3 + 4)" (* "*") (pointer_expression "*(int **)(iVar3 + 4)" (* "*") (cast_expression "(int **)(iVar3 + 4)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar3 + 4)" (( "(") (binary_expression "iVar3 + 4" (identifier "iVar3") (+ "+") (number_literal "4")) () ")"))))))) (; ";")) (expression_statement "piVar4 = (int *)puVar2[0xf];" (assignment_expression "piVar4 = (int *)puVar2[0xf]" (identifier "piVar4") (= "=") (cast_expression "(int *)puVar2[0xf]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar2[0xf]" (identifier "puVar2") ([ "[") (number_literal "0xf") (] "]")))) (; ";")) (if_statement "if (param_3 == 7) {\nLAB_0002b698:\n    uVar5 = 0;\n    *param_4 = piVar4;\nLAB_0002b6a0:\n    cVar1 = *(char *)(iVar3 + 9);\n  }\n  else {\n    if (param_3 == 0x1b) {\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }\n    if (param_3 == 0x1c) {\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }\n    if (param_3 == 0x23) {\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }\n    if (*piVar4 == 0) {\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);\n    cVar1 = *(char *)(iVar3 + 9);\n  }" (if "if") (parenthesized_expression "(param_3 == 7)" (( "(") (binary_expression "param_3 == 7" (identifier "param_3") (== "==") (number_literal "7")) () ")")) (compound_statement "{\nLAB_0002b698:\n    uVar5 = 0;\n    *param_4 = piVar4;\nLAB_0002b6a0:\n    cVar1 = *(char *)(iVar3 + 9);\n  }" ({ "{") (labeled_statement "LAB_0002b698:\n    uVar5 = 0;" (statement_identifier "LAB_0002b698") (: ":") (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";"))) (expression_statement "*param_4 = piVar4;" (assignment_expression "*param_4 = piVar4" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (identifier "piVar4")) (; ";")) (labeled_statement "LAB_0002b6a0:\n    cVar1 = *(char *)(iVar3 + 9);" (statement_identifier "LAB_0002b6a0") (: ":") (expression_statement "cVar1 = *(char *)(iVar3 + 9);" (assignment_expression "cVar1 = *(char *)(iVar3 + 9)" (identifier "cVar1") (= "=") (pointer_expression "*(char *)(iVar3 + 9)" (* "*") (cast_expression "(char *)(iVar3 + 9)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 9)" (( "(") (binary_expression "iVar3 + 9" (identifier "iVar3") (+ "+") (number_literal "9")) () ")"))))) (; ";"))) (} "}")) (else_clause "else {\n    if (param_3 == 0x1b) {\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }\n    if (param_3 == 0x1c) {\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }\n    if (param_3 == 0x23) {\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }\n    if (*piVar4 == 0) {\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);\n    cVar1 = *(char *)(iVar3 + 9);\n  }" (else "else") (compound_statement "{\n    if (param_3 == 0x1b) {\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }\n    if (param_3 == 0x1c) {\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }\n    if (param_3 == 0x23) {\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }\n    if (*piVar4 == 0) {\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }\n    uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);\n    cVar1 = *(char *)(iVar3 + 9);\n  }" ({ "{") (if_statement "if (param_3 == 0x1b) {\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }" (if "if") (parenthesized_expression "(param_3 == 0x1b)" (( "(") (binary_expression "param_3 == 0x1b" (identifier "param_3") (== "==") (number_literal "0x1b")) () ")")) (compound_statement "{\n      uVar5 = 0;\n      *param_4 = *puVar2;\n      goto LAB_0002b6a0;\n    }" ({ "{") (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (expression_statement "*param_4 = *puVar2;" (assignment_expression "*param_4 = *puVar2" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (pointer_expression "*puVar2" (* "*") (identifier "puVar2"))) (; ";")) (goto_statement "goto LAB_0002b6a0;" (goto "goto") (statement_identifier "LAB_0002b6a0") (; ";")) (} "}"))) (if_statement "if (param_3 == 0x1c) {\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }" (if "if") (parenthesized_expression "(param_3 == 0x1c)" (( "(") (binary_expression "param_3 == 0x1c" (identifier "param_3") (== "==") (number_literal "0x1c")) () ")")) (compound_statement "{\n      piVar4 = (int *)puVar2[0x10];\n      if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }\n      goto LAB_0002b698;\n    }" ({ "{") (expression_statement "piVar4 = (int *)puVar2[0x10];" (assignment_expression "piVar4 = (int *)puVar2[0x10]" (identifier "piVar4") (= "=") (cast_expression "(int *)puVar2[0x10]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar2[0x10]" (identifier "puVar2") ([ "[") (number_literal "0x10") (] "]")))) (; ";")) (if_statement "if (puVar2[0x35] != 0) {\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }" (if "if") (parenthesized_expression "(puVar2[0x35] != 0)" (( "(") (binary_expression "puVar2[0x35] != 0" (subscript_expression "puVar2[0x35]" (identifier "puVar2") ([ "[") (number_literal "0x35") (] "]")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        piVar4 = *(int **)(puVar2[0x35] + 8);\n      }" ({ "{") (expression_statement "piVar4 = *(int **)(puVar2[0x35] + 8);" (assignment_expression "piVar4 = *(int **)(puVar2[0x35] + 8)" (identifier "piVar4") (= "=") (pointer_expression "*(int **)(puVar2[0x35] + 8)" (* "*") (cast_expression "(int **)(puVar2[0x35] + 8)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar2[0x35] + 8)" (( "(") (binary_expression "puVar2[0x35] + 8" (subscript_expression "puVar2[0x35]" (identifier "puVar2") ([ "[") (number_literal "0x35") (] "]")) (+ "+") (number_literal "8")) () ")"))))) (; ";")) (} "}"))) (goto_statement "goto LAB_0002b698;" (goto "goto") (statement_identifier "LAB_0002b698") (; ";")) (} "}"))) (if_statement "if (param_3 == 0x23) {\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }" (if "if") (parenthesized_expression "(param_3 == 0x23)" (( "(") (binary_expression "param_3 == 0x23" (identifier "param_3") (== "==") (number_literal "0x23")) () ")")) (compound_statement "{\n      uVar5 = 0;\n      *param_4 = puVar2[0x19];\n      goto LAB_0002b6a0;\n    }" ({ "{") (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (expression_statement "*param_4 = puVar2[0x19];" (assignment_expression "*param_4 = puVar2[0x19]" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (subscript_expression "puVar2[0x19]" (identifier "puVar2") ([ "[") (number_literal "0x19") (] "]"))) (; ";")) (goto_statement "goto LAB_0002b6a0;" (goto "goto") (statement_identifier "LAB_0002b6a0") (; ";")) (} "}"))) (if_statement "if (*piVar4 == 0) {\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }" (if "if") (parenthesized_expression "(*piVar4 == 0)" (( "(") (binary_expression "*piVar4 == 0" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar5 = 0xc;\n      goto LAB_0002b6a0;\n    }" ({ "{") (expression_statement "uVar5 = 0xc;" (assignment_expression "uVar5 = 0xc" (identifier "uVar5") (= "=") (number_literal "0xc")) (; ";")) (goto_statement "goto LAB_0002b6a0;" (goto "goto") (statement_identifier "LAB_0002b6a0") (; ";")) (} "}"))) (expression_statement "uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);" (assignment_expression "uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4)" (identifier "uVar5") (= "=") (call_expression "(**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4)" (parenthesized_expression "(**(code **)(*piVar4 + 0x28))" (( "(") (pointer_expression "**(code **)(*piVar4 + 0x28)" (* "*") (pointer_expression "*(code **)(*piVar4 + 0x28)" (* "*") (cast_expression "(code **)(*piVar4 + 0x28)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar4 + 0x28)" (( "(") (binary_expression "*piVar4 + 0x28" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (argument_list "(piVar4,param_3,param_4)" (( "(") (identifier "piVar4") (, ",") (identifier "param_3") (, ",") (identifier "param_4") () ")")))) (; ";")) (expression_statement "cVar1 = *(char *)(iVar3 + 9);" (assignment_expression "cVar1 = *(char *)(iVar3 + 9)" (identifier "cVar1") (= "=") (pointer_expression "*(char *)(iVar3 + 9)" (* "*") (cast_expression "(char *)(iVar3 + 9)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 9)" (( "(") (binary_expression "iVar3 + 9" (identifier "iVar3") (+ "+") (number_literal "9")) () ")"))))) (; ";")) (} "}")))) (if_statement "if (cVar1 != '\0') {\n    piVar4 = (int *)(iVar3 + 0xc);\n    *piVar4 = *piVar4 + -1;\n    if (*piVar4 == 0) {\n      FUN_0002b3c0();\n    }\n  }" (if "if") (parenthesized_expression "(cVar1 != '\0')" (( "(") (binary_expression "cVar1 != '\0'" (identifier "cVar1") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    piVar4 = (int *)(iVar3 + 0xc);\n    *piVar4 = *piVar4 + -1;\n    if (*piVar4 == 0) {\n      FUN_0002b3c0();\n    }\n  }" ({ "{") (expression_statement "piVar4 = (int *)(iVar3 + 0xc);" (assignment_expression "piVar4 = (int *)(iVar3 + 0xc)" (identifier "piVar4") (= "=") (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")) () ")")))) (; ";")) (expression_statement "*piVar4 = *piVar4 + -1;" (assignment_expression "*piVar4 = *piVar4 + -1" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (binary_expression "*piVar4 + -1" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (+ "+") (number_literal "-1"))) (; ";")) (if_statement "if (*piVar4 == 0) {\n      FUN_0002b3c0();\n    }" (if "if") (parenthesized_expression "(*piVar4 == 0)" (( "(") (binary_expression "*piVar4 == 0" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_0002b3c0();\n    }" ({ "{") (expression_statement "FUN_0002b3c0();" (call_expression "FUN_0002b3c0()" (identifier "FUN_0002b3c0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (} "}"))) (labeled_statement "LAB_0002b66e:\n  FUN_000197f0(*(undefined4 *)(param_1 + 0xc));" (statement_identifier "LAB_0002b66e") (: ":") (expression_statement "FUN_000197f0(*(undefined4 *)(param_1 + 0xc));" (call_expression "FUN_000197f0(*(undefined4 *)(param_1 + 0xc))" (identifier "FUN_000197f0") (argument_list "(*(undefined4 *)(param_1 + 0xc))" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) () ")"))) (; ";"))) (return_statement "return uVar5;" (return "return") (identifier "uVar5") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

int function_1(type_1 *db,char *zDbName,int var_5,void *pArg)

{
  int *piVar1;
  type_2 var_6;
  type_3 *pPVar3;
  type_4 *var_3;
  type_5 *psVar4;
  int iVar5;
  
  iVar5 = 1;
  var_1(db->mutex);
  var_3 = var_2(db,zDbName);
  if (var_3 == (type_4 *)0x0) goto LAB_0002b66e;
  if (var_3->sharable != '\0') {
    var_4(var_3);
  }
  pPVar3 = var_3->pBt->pPager;
  psVar4 = pPVar3->fd;
  if (var_5 == 7) {
LAB_0002b698:
    iVar5 = 0;
    *(type_5 **)pArg = psVar4;
LAB_0002b6a0:
    var_6 = var_3->sharable;
  }
  else {
    if (var_5 == 0x1b) {
      iVar5 = 0;
      *(type_6 **)pArg = pPVar3->pVfs;
      goto LAB_0002b6a0;
    }
    if (var_5 == 0x1c) {
      psVar4 = pPVar3->jfd;
      if (pPVar3->pWal != (type_7 *)0x0) {
        psVar4 = pPVar3->pWal->pWalFd;
      }
      goto LAB_0002b698;
    }
    if (var_5 == 0x23) {
      iVar5 = 0;
      *(type_8 *)pArg = pPVar3->iDataVersion;
      goto LAB_0002b6a0;
    }
    if (psVar4->pMethods == (type_9 *)0x0) {
      iVar5 = 0xc;
      goto LAB_0002b6a0;
    }
    iVar5 = (*psVar4->pMethods->xFileControl)(psVar4,var_5,pArg);
    var_6 = var_3->sharable;
  }
  if (var_6 != '\0') {
    piVar1 = &var_3->wantToLock;
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      var_7(var_3);
    }
  }
LAB_0002b66e:
  var_8(db->mutex);
  return iVar5;
}


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

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 MASKED(int param_1,undefined4 param_2,int param_3,undefined4 *param_4)

{
  char cVar1;
  undefined4 *puVar2;
  int iVar3;
  int *piVar4;
  undefined4 uVar5;
  
  uVar5 = 1;
  FUN_000197c0(*(undefined4 *)(param_1 + 0xc));
  iVar3 = FUN_00027e20();
  if (iVar3 == 0) goto LAB_0002b66e;
  if (*(char *)(iVar3 + 9) != '\0') {
    FUN_0002b330();
  }
  puVar2 = (undefined4 *)**(int **)(iVar3 + 4);
  piVar4 = (int *)puVar2[0xf];
  if (param_3 == 7) {
LAB_0002b698:
    uVar5 = 0;
    *param_4 = piVar4;
LAB_0002b6a0:
    cVar1 = *(char *)(iVar3 + 9);
  }
  else {
    if (param_3 == 0x1b) {
      uVar5 = 0;
      *param_4 = *puVar2;
      goto LAB_0002b6a0;
    }
    if (param_3 == 0x1c) {
      piVar4 = (int *)puVar2[0x10];
      if (puVar2[0x35] != 0) {
        piVar4 = *(int **)(puVar2[0x35] + 8);
      }
      goto LAB_0002b698;
    }
    if (param_3 == 0x23) {
      uVar5 = 0;
      *param_4 = puVar2[0x19];
      goto LAB_0002b6a0;
    }
    if (*piVar4 == 0) {
      uVar5 = 0xc;
      goto LAB_0002b6a0;
    }
    uVar5 = (**(code **)(*piVar4 + 0x28))(piVar4,param_3,param_4);
    cVar1 = *(char *)(iVar3 + 9);
  }
  if (cVar1 != '\0') {
    piVar4 = (int *)(iVar3 + 0xc);
    *piVar4 = *piVar4 + -1;
    if (*piVar4 == 0) {
      FUN_0002b3c0();
    }
  }
LAB_0002b66e:
  FUN_000197f0(*(undefined4 *)(param_1 + 0xc));
  return uVar5;
}

