
/* WARNING: Function: __x86.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */
/* WARNING: Unknown calling convention */

int sqlite3_clear_bindings(sqlite3_stmt *pStmt)

{
  sqlite3_mutex *psVar1;
  Mem *p;
  int iVar2;
  
  psVar1 = *(sqlite3_mutex **)(*(int *)pStmt + 0xc);
  if (psVar1 != (sqlite3_mutex *)0x0) {
    (*sqlite3Config.mutex.xMutexEnter)(psVar1);
  }
  iVar2 = 0;
  if (0 < *(int *)(pStmt + 0x10)) {
    do {
      p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28);
      if (((p->flags & 0x2400) != 0) || (p->szMalloc != 0)) {
        vdbeMemClear(p);
        p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28);
      }
      iVar2 = iVar2 + 1;
      p->flags = 1;
    } while (iVar2 < *(int *)(pStmt + 0x10));
  }
  if (*(int *)(pStmt + 200) != 0) {
    pStmt[0x8d] = (sqlite3_stmt)((byte)pStmt[0x8d] & 0xfc | 1);
  }
  if (psVar1 != (sqlite3_mutex *)0x0) {
    (*sqlite3Config.mutex.xMutexLeave)(psVar1);
  }
  return 0;
}



/* WARNING: Function: __i686.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */

undefined4 FUN_000612e0(int *param_1)

{
  int iVar1;
  int iVar2;
  int iVar3;
  
  iVar1 = *(int *)(*param_1 + 0xc);
  if (iVar1 != 0) {
    (*DAT_001bb43c)(iVar1);
  }
  iVar3 = 0;
  if (0 < param_1[4]) {
    do {
      iVar2 = param_1[0x18] + iVar3 * 0x28;
      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {
        FUN_00060f90();
        iVar2 = param_1[0x18] + iVar3 * 0x28;
      }
      iVar3 = iVar3 + 1;
      *(undefined2 *)(iVar2 + 8) = 1;
    } while (iVar3 < param_1[4]);
  }
  if (param_1[0x32] != 0) {
    *(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1;
  }
  if (iVar1 != 0) {
    (*DAT_001bb444)(iVar1);
  }
  return 0;
}


CALL 0x00017415
ADD EDX,0x159b43
PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0x1c
MOV EDI,dword ptr [ESP + 0x30]
MOV dword ptr [ESP + 0xc],EDX
MOV EAX,dword ptr [EDI]
MOV ESI,dword ptr [EAX + 0xc]
TEST ESI,ESI
JZ 0x00061310
SUB ESP,0xc
PUSH ESI
CALL dword ptr [EDX + 0x614]
ADD ESP,0x10
MOV EBP,dword ptr [EDI + 0x10]
XOR EBX,EBX
TEST EBP,EBP
JLE 0x00061355
LEA ESI,[ESI]
LEA EBP,[EBX + EBX*0x4]
MOV EAX,dword ptr [EDI + 0x60]
SHL EBP,0x3
ADD EAX,EBP
TEST word ptr [EAX + 0x8],0x2400
JNZ 0x0006133a
MOV ECX,dword ptr [EAX + 0x18]
TEST ECX,ECX
JZ 0x00061344
CALL 0x00060f90
MOV EAX,dword ptr [EDI + 0x60]
ADD EAX,EBP
MOV EDX,0x1
ADD EBX,0x1
MOV word ptr [EAX + 0x8],DX
CMP dword ptr [EDI + 0x10],EBX
JG 0x00061320
MOV EBX,dword ptr [EDI + 0xc8]
TEST EBX,EBX
JZ 0x00061372
MOVZX EAX,byte ptr [EDI + 0x8d]
AND EAX,0xfffffffc
OR EAX,0x1
MOV byte ptr [EDI + 0x8d],AL
TEST ESI,ESI
JZ 0x00061387
SUB ESP,0xc
PUSH ESI
MOV EAX,dword ptr [ESP + 0x1c]
CALL dword ptr [EAX + 0x61c]
ADD ESP,0x10
ADD ESP,0x1c
XOR EAX,EAX
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */\n\nundefined4 FUN_000612e0(int *param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)(*param_1 + 0xc);\n  if (iVar1 != 0) {\n    (*DAT_001bb43c)(iVar1);\n  }\n  iVar3 = 0;\n  if (0 < param_1[4]) {\n    do {\n      iVar2 = param_1[0x18] + iVar3 * 0x28;\n      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }\n      iVar3 = iVar3 + 1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n    } while (iVar3 < param_1[4]);\n  }\n  if (param_1[0x32] != 0) {\n    *(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1;\n  }\n  if (iVar1 != 0) {\n    (*DAT_001bb444)(iVar1);\n  }\n  return 0;\n}\n\n" comment (function_definition "undefined4 FUN_000612e0(int *param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)(*param_1 + 0xc);\n  if (iVar1 != 0) {\n    (*DAT_001bb43c)(iVar1);\n  }\n  iVar3 = 0;\n  if (0 < param_1[4]) {\n    do {\n      iVar2 = param_1[0x18] + iVar3 * 0x28;\n      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }\n      iVar3 = iVar3 + 1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n    } while (iVar3 < param_1[4]);\n  }\n  if (param_1[0x32] != 0) {\n    *(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1;\n  }\n  if (iVar1 != 0) {\n    (*DAT_001bb444)(iVar1);\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_000612e0(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)(*param_1 + 0xc);\n  if (iVar1 != 0) {\n    (*DAT_001bb43c)(iVar1);\n  }\n  iVar3 = 0;\n  if (0 < param_1[4]) {\n    do {\n      iVar2 = param_1[0x18] + iVar3 * 0x28;\n      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }\n      iVar3 = iVar3 + 1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n    } while (iVar3 < param_1[4]);\n  }\n  if (param_1[0x32] != 0) {\n    *(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1;\n  }\n  if (iVar1 != 0) {\n    (*DAT_001bb444)(iVar1);\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(*param_1 + 0xc);" (assignment_expression "iVar1 = *(int *)(*param_1 + 0xc)" identifier = (pointer_expression "*(int *)(*param_1 + 0xc)" * (cast_expression "(int *)(*param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0xc)" ( (binary_expression "*param_1 + 0xc" (pointer_expression "*param_1" * identifier) + number_literal) ))))) ;) (if_statement "if (iVar1 != 0) {\n    (*DAT_001bb43c)(iVar1);\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    (*DAT_001bb43c)(iVar1);\n  }" { (expression_statement "(*DAT_001bb43c)(iVar1);" (call_expression "(*DAT_001bb43c)(iVar1)" (parenthesized_expression "(*DAT_001bb43c)" ( (pointer_expression "*DAT_001bb43c" * identifier) )) (argument_list "(iVar1)" ( identifier ))) ;) })) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (if_statement "if (0 < param_1[4]) {\n    do {\n      iVar2 = param_1[0x18] + iVar3 * 0x28;\n      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }\n      iVar3 = iVar3 + 1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n    } while (iVar3 < param_1[4]);\n  }" if (parenthesized_expression "(0 < param_1[4])" ( (binary_expression "0 < param_1[4]" number_literal < (subscript_expression "param_1[4]" identifier [ number_literal ])) )) (compound_statement "{\n    do {\n      iVar2 = param_1[0x18] + iVar3 * 0x28;\n      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }\n      iVar3 = iVar3 + 1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n    } while (iVar3 < param_1[4]);\n  }" { (do_statement "do {\n      iVar2 = param_1[0x18] + iVar3 * 0x28;\n      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }\n      iVar3 = iVar3 + 1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n    } while (iVar3 < param_1[4]);" do (compound_statement "{\n      iVar2 = param_1[0x18] + iVar3 * 0x28;\n      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }\n      iVar3 = iVar3 + 1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n    }" { (expression_statement "iVar2 = param_1[0x18] + iVar3 * 0x28;" (assignment_expression "iVar2 = param_1[0x18] + iVar3 * 0x28" identifier = (binary_expression "param_1[0x18] + iVar3 * 0x28" (subscript_expression "param_1[0x18]" identifier [ number_literal ]) + (binary_expression "iVar3 * 0x28" identifier * number_literal))) ;) (if_statement "if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }" if (parenthesized_expression "(((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0))" ( (binary_expression "((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)" (parenthesized_expression "((*(ushort *)(iVar2 + 8) & 0x2400) != 0)" ( (binary_expression "(*(ushort *)(iVar2 + 8) & 0x2400) != 0" (parenthesized_expression "(*(ushort *)(iVar2 + 8) & 0x2400)" ( (binary_expression "*(ushort *)(iVar2 + 8) & 0x2400" (pointer_expression "*(ushort *)(iVar2 + 8)" * (cast_expression "(ushort *)(iVar2 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 8)" ( (binary_expression "iVar2 + 8" identifier + number_literal) )))) & number_literal) )) != number_literal) )) || (parenthesized_expression "(*(int *)(iVar2 + 0x18) != 0)" ( (binary_expression "*(int *)(iVar2 + 0x18) != 0" (pointer_expression "*(int *)(iVar2 + 0x18)" * (cast_expression "(int *)(iVar2 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x18)" ( (binary_expression "iVar2 + 0x18" identifier + number_literal) )))) != number_literal) ))) )) (compound_statement "{\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }" { (expression_statement "FUN_00060f90();" (call_expression "FUN_00060f90()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar2 = param_1[0x18] + iVar3 * 0x28;" (assignment_expression "iVar2 = param_1[0x18] + iVar3 * 0x28" identifier = (binary_expression "param_1[0x18] + iVar3 * 0x28" (subscript_expression "param_1[0x18]" identifier [ number_literal ]) + (binary_expression "iVar3 * 0x28" identifier * number_literal))) ;) })) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "*(undefined2 *)(iVar2 + 8) = 1;" (assignment_expression "*(undefined2 *)(iVar2 + 8) = 1" (pointer_expression "*(undefined2 *)(iVar2 + 8)" * (cast_expression "(undefined2 *)(iVar2 + 8)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 8)" ( (binary_expression "iVar2 + 8" identifier + number_literal) )))) = number_literal) ;) }) while (parenthesized_expression "(iVar3 < param_1[4])" ( (binary_expression "iVar3 < param_1[4]" identifier < (subscript_expression "param_1[4]" identifier [ number_literal ])) )) ;) })) (if_statement "if (param_1[0x32] != 0) {\n    *(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1;\n  }" if (parenthesized_expression "(param_1[0x32] != 0)" ( (binary_expression "param_1[0x32] != 0" (subscript_expression "param_1[0x32]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n    *(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1;\n  }" { (expression_statement "*(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1;" (assignment_expression "*(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1" (pointer_expression "*(byte *)((int)param_1 + 0x8d)" * (cast_expression "(byte *)((int)param_1 + 0x8d)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 0x8d)" ( (binary_expression "(int)param_1 + 0x8d" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (binary_expression "*(byte *)((int)param_1 + 0x8d) & 0xfc | 1" (binary_expression "*(byte *)((int)param_1 + 0x8d) & 0xfc" (pointer_expression "*(byte *)((int)param_1 + 0x8d)" * (cast_expression "(byte *)((int)param_1 + 0x8d)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 0x8d)" ( (binary_expression "(int)param_1 + 0x8d" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) & number_literal) | number_literal)) ;) })) (if_statement "if (iVar1 != 0) {\n    (*DAT_001bb444)(iVar1);\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    (*DAT_001bb444)(iVar1);\n  }" { (expression_statement "(*DAT_001bb444)(iVar1);" (call_expression "(*DAT_001bb444)(iVar1)" (parenthesized_expression "(*DAT_001bb444)" ( (pointer_expression "*DAT_001bb444" * identifier) )) (argument_list "(iVar1)" ( identifier ))) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */\n/* WARNING: Unknown calling convention */\n\nint sqlite3_clear_bindings(sqlite3_stmt *pStmt)\n\n{\n  sqlite3_mutex *psVar1;\n  Mem *p;\n  int iVar2;\n  \n  psVar1 = *(sqlite3_mutex **)(*(int *)pStmt + 0xc);\n  if (psVar1 != (sqlite3_mutex *)0x0) {\n    (*sqlite3Config.mutex.xMutexEnter)(psVar1);\n  }\n  iVar2 = 0;\n  if (0 < *(int *)(pStmt + 0x10)) {\n    do {\n      p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28);\n      if (((p->flags & 0x2400) != 0) || (p->szMalloc != 0)) {\n        vdbeMemClear(p);\n        p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28);\n      }\n      iVar2 = iVar2 + 1;\n      p->flags = 1;\n    } while (iVar2 < *(int *)(pStmt + 0x10));\n  }\n  if (*(int *)(pStmt + 200) != 0) {\n    pStmt[0x8d] = (sqlite3_stmt)((byte)pStmt[0x8d] & 0xfc | 1);\n  }\n  if (psVar1 != (sqlite3_mutex *)0x0) {\n    (*sqlite3Config.mutex.xMutexLeave)(psVar1);\n  }\n  return 0;\n}\n\n" comment comment (function_definition "int sqlite3_clear_bindings(sqlite3_stmt *pStmt)\n\n{\n  sqlite3_mutex *psVar1;\n  Mem *p;\n  int iVar2;\n  \n  psVar1 = *(sqlite3_mutex **)(*(int *)pStmt + 0xc);\n  if (psVar1 != (sqlite3_mutex *)0x0) {\n    (*sqlite3Config.mutex.xMutexEnter)(psVar1);\n  }\n  iVar2 = 0;\n  if (0 < *(int *)(pStmt + 0x10)) {\n    do {\n      p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28);\n      if (((p->flags & 0x2400) != 0) || (p->szMalloc != 0)) {\n        vdbeMemClear(p);\n        p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28);\n      }\n      iVar2 = iVar2 + 1;\n      p->flags = 1;\n    } while (iVar2 < *(int *)(pStmt + 0x10));\n  }\n  if (*(int *)(pStmt + 200) != 0) {\n    pStmt[0x8d] = (sqlite3_stmt)((byte)pStmt[0x8d] & 0xfc | 1);\n  }\n  if (psVar1 != (sqlite3_mutex *)0x0) {\n    (*sqlite3Config.mutex.xMutexLeave)(psVar1);\n  }\n  return 0;\n}" primitive_type (function_declarator "sqlite3_clear_bindings(sqlite3_stmt *pStmt)" identifier (parameter_list "(sqlite3_stmt *pStmt)" ( (parameter_declaration "sqlite3_stmt *pStmt" type_identifier (pointer_declarator "*pStmt" * identifier)) ))) (compound_statement "{\n  sqlite3_mutex *psVar1;\n  Mem *p;\n  int iVar2;\n  \n  psVar1 = *(sqlite3_mutex **)(*(int *)pStmt + 0xc);\n  if (psVar1 != (sqlite3_mutex *)0x0) {\n    (*sqlite3Config.mutex.xMutexEnter)(psVar1);\n  }\n  iVar2 = 0;\n  if (0 < *(int *)(pStmt + 0x10)) {\n    do {\n      p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28);\n      if (((p->flags & 0x2400) != 0) || (p->szMalloc != 0)) {\n        vdbeMemClear(p);\n        p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28);\n      }\n      iVar2 = iVar2 + 1;\n      p->flags = 1;\n    } while (iVar2 < *(int *)(pStmt + 0x10));\n  }\n  if (*(int *)(pStmt + 200) != 0) {\n    pStmt[0x8d] = (sqlite3_stmt)((byte)pStmt[0x8d] & 0xfc | 1);\n  }\n  if (psVar1 != (sqlite3_mutex *)0x0) {\n    (*sqlite3Config.mutex.xMutexLeave)(psVar1);\n  }\n  return 0;\n}" { (declaration "sqlite3_mutex *psVar1;" type_identifier (pointer_declarator "*psVar1" * identifier) ;) (declaration "Mem *p;" type_identifier (pointer_declarator "*p" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "psVar1 = *(sqlite3_mutex **)(*(int *)pStmt + 0xc);" (assignment_expression "psVar1 = *(sqlite3_mutex **)(*(int *)pStmt + 0xc)" identifier = (pointer_expression "*(sqlite3_mutex **)(*(int *)pStmt + 0xc)" * (cast_expression "(sqlite3_mutex **)(*(int *)pStmt + 0xc)" ( (type_descriptor "sqlite3_mutex **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)pStmt + 0xc)" ( (binary_expression "*(int *)pStmt + 0xc" (pointer_expression "*(int *)pStmt" * (cast_expression "(int *)pStmt" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) ;) (if_statement "if (psVar1 != (sqlite3_mutex *)0x0) {\n    (*sqlite3Config.mutex.xMutexEnter)(psVar1);\n  }" if (parenthesized_expression "(psVar1 != (sqlite3_mutex *)0x0)" ( (binary_expression "psVar1 != (sqlite3_mutex *)0x0" identifier != (cast_expression "(sqlite3_mutex *)0x0" ( (type_descriptor "sqlite3_mutex *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    (*sqlite3Config.mutex.xMutexEnter)(psVar1);\n  }" { (expression_statement "(*sqlite3Config.mutex.xMutexEnter)(psVar1);" (call_expression "(*sqlite3Config.mutex.xMutexEnter)(psVar1)" (parenthesized_expression "(*sqlite3Config.mutex.xMutexEnter)" ( (pointer_expression "*sqlite3Config.mutex.xMutexEnter" * (field_expression "sqlite3Config.mutex.xMutexEnter" (field_expression "sqlite3Config.mutex" identifier . field_identifier) . field_identifier)) )) (argument_list "(psVar1)" ( identifier ))) ;) })) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (if_statement "if (0 < *(int *)(pStmt + 0x10)) {\n    do {\n      p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28);\n      if (((p->flags & 0x2400) != 0) || (p->szMalloc != 0)) {\n        vdbeMemClear(p);\n        p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28);\n      }\n      iVar2 = iVar2 + 1;\n      p->flags = 1;\n    } while (iVar2 < *(int *)(pStmt + 0x10));\n  }" if (parenthesized_expression "(0 < *(int *)(pStmt + 0x10))" ( (binary_expression "0 < *(int *)(pStmt + 0x10)" number_literal < (pointer_expression "*(int *)(pStmt + 0x10)" * (cast_expression "(int *)(pStmt + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pStmt + 0x10)" ( (binary_expression "pStmt + 0x10" identifier + number_literal) ))))) )) (compound_statement "{\n    do {\n      p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28);\n      if (((p->flags & 0x2400) != 0) || (p->szMalloc != 0)) {\n        vdbeMemClear(p);\n        p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28);\n      }\n      iVar2 = iVar2 + 1;\n      p->flags = 1;\n    } while (iVar2 < *(int *)(pStmt + 0x10));\n  }" { (do_statement "do {\n      p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28);\n      if (((p->flags & 0x2400) != 0) || (p->szMalloc != 0)) {\n        vdbeMemClear(p);\n        p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28);\n      }\n      iVar2 = iVar2 + 1;\n      p->flags = 1;\n    } while (iVar2 < *(int *)(pStmt + 0x10));" do (compound_statement "{\n      p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28);\n      if (((p->flags & 0x2400) != 0) || (p->szMalloc != 0)) {\n        vdbeMemClear(p);\n        p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28);\n      }\n      iVar2 = iVar2 + 1;\n      p->flags = 1;\n    }" { (expression_statement "p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28);" (assignment_expression "p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28)" identifier = (cast_expression "(Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28)" ( (type_descriptor "Mem *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(pStmt + 0x60) + iVar2 * 0x28)" ( (binary_expression "*(int *)(pStmt + 0x60) + iVar2 * 0x28" (pointer_expression "*(int *)(pStmt + 0x60)" * (cast_expression "(int *)(pStmt + 0x60)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pStmt + 0x60)" ( (binary_expression "pStmt + 0x60" identifier + number_literal) )))) + (binary_expression "iVar2 * 0x28" identifier * number_literal)) )))) ;) (if_statement "if (((p->flags & 0x2400) != 0) || (p->szMalloc != 0)) {\n        vdbeMemClear(p);\n        p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28);\n      }" if (parenthesized_expression "(((p->flags & 0x2400) != 0) || (p->szMalloc != 0))" ( (binary_expression "((p->flags & 0x2400) != 0) || (p->szMalloc != 0)" (parenthesized_expression "((p->flags & 0x2400) != 0)" ( (binary_expression "(p->flags & 0x2400) != 0" (parenthesized_expression "(p->flags & 0x2400)" ( (binary_expression "p->flags & 0x2400" (field_expression "p->flags" identifier -> field_identifier) & number_literal) )) != number_literal) )) || (parenthesized_expression "(p->szMalloc != 0)" ( (binary_expression "p->szMalloc != 0" (field_expression "p->szMalloc" identifier -> field_identifier) != number_literal) ))) )) (compound_statement "{\n        vdbeMemClear(p);\n        p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28);\n      }" { (expression_statement "vdbeMemClear(p);" (call_expression "vdbeMemClear(p)" identifier (argument_list "(p)" ( identifier ))) ;) (expression_statement "p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28);" (assignment_expression "p = (Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28)" identifier = (cast_expression "(Mem *)(*(int *)(pStmt + 0x60) + iVar2 * 0x28)" ( (type_descriptor "Mem *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(pStmt + 0x60) + iVar2 * 0x28)" ( (binary_expression "*(int *)(pStmt + 0x60) + iVar2 * 0x28" (pointer_expression "*(int *)(pStmt + 0x60)" * (cast_expression "(int *)(pStmt + 0x60)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pStmt + 0x60)" ( (binary_expression "pStmt + 0x60" identifier + number_literal) )))) + (binary_expression "iVar2 * 0x28" identifier * number_literal)) )))) ;) })) (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (expression_statement "p->flags = 1;" (assignment_expression "p->flags = 1" (field_expression "p->flags" identifier -> field_identifier) = number_literal) ;) }) while (parenthesized_expression "(iVar2 < *(int *)(pStmt + 0x10))" ( (binary_expression "iVar2 < *(int *)(pStmt + 0x10)" identifier < (pointer_expression "*(int *)(pStmt + 0x10)" * (cast_expression "(int *)(pStmt + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pStmt + 0x10)" ( (binary_expression "pStmt + 0x10" identifier + number_literal) ))))) )) ;) })) (if_statement "if (*(int *)(pStmt + 200) != 0) {\n    pStmt[0x8d] = (sqlite3_stmt)((byte)pStmt[0x8d] & 0xfc | 1);\n  }" if (parenthesized_expression "(*(int *)(pStmt + 200) != 0)" ( (binary_expression "*(int *)(pStmt + 200) != 0" (pointer_expression "*(int *)(pStmt + 200)" * (cast_expression "(int *)(pStmt + 200)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pStmt + 200)" ( (binary_expression "pStmt + 200" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    pStmt[0x8d] = (sqlite3_stmt)((byte)pStmt[0x8d] & 0xfc | 1);\n  }" { (expression_statement "pStmt[0x8d] = (sqlite3_stmt)((byte)pStmt[0x8d] & 0xfc | 1);" (assignment_expression "pStmt[0x8d] = (sqlite3_stmt)((byte)pStmt[0x8d] & 0xfc | 1)" (subscript_expression "pStmt[0x8d]" identifier [ number_literal ]) = (call_expression "(sqlite3_stmt)((byte)pStmt[0x8d] & 0xfc | 1)" (parenthesized_expression "(sqlite3_stmt)" ( identifier )) (argument_list "((byte)pStmt[0x8d] & 0xfc | 1)" ( (binary_expression "(byte)pStmt[0x8d] & 0xfc | 1" (binary_expression "(byte)pStmt[0x8d] & 0xfc" (cast_expression "(byte)pStmt[0x8d]" ( (type_descriptor "byte" type_identifier) ) (subscript_expression "pStmt[0x8d]" identifier [ number_literal ])) & number_literal) | number_literal) )))) ;) })) (if_statement "if (psVar1 != (sqlite3_mutex *)0x0) {\n    (*sqlite3Config.mutex.xMutexLeave)(psVar1);\n  }" if (parenthesized_expression "(psVar1 != (sqlite3_mutex *)0x0)" ( (binary_expression "psVar1 != (sqlite3_mutex *)0x0" identifier != (cast_expression "(sqlite3_mutex *)0x0" ( (type_descriptor "sqlite3_mutex *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    (*sqlite3Config.mutex.xMutexLeave)(psVar1);\n  }" { (expression_statement "(*sqlite3Config.mutex.xMutexLeave)(psVar1);" (call_expression "(*sqlite3Config.mutex.xMutexLeave)(psVar1)" (parenthesized_expression "(*sqlite3Config.mutex.xMutexLeave)" ( (pointer_expression "*sqlite3Config.mutex.xMutexLeave" * (field_expression "sqlite3Config.mutex.xMutexLeave" (field_expression "sqlite3Config.mutex" identifier . field_identifier) . field_identifier)) )) (argument_list "(psVar1)" ( identifier ))) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 FUN_000612e0(int *param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)(*param_1 + 0xc);\n  if (iVar1 != 0) {\n    (*DAT_001bb43c)(iVar1);\n  }\n  iVar3 = 0;\n  if (0 < param_1[4]) {\n    do {\n      iVar2 = param_1[0x18] + iVar3 * 0x28;\n      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }\n      iVar3 = iVar3 + 1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n    } while (iVar3 < param_1[4]);\n  }\n  if (param_1[0x32] != 0) {\n    *(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1;\n  }\n  if (iVar1 != 0) {\n    (*DAT_001bb444)(iVar1);\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_000612e0(int *param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)(*param_1 + 0xc);\n  if (iVar1 != 0) {\n    (*DAT_001bb43c)(iVar1);\n  }\n  iVar3 = 0;\n  if (0 < param_1[4]) {\n    do {\n      iVar2 = param_1[0x18] + iVar3 * 0x28;\n      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }\n      iVar3 = iVar3 + 1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n    } while (iVar3 < param_1[4]);\n  }\n  if (param_1[0x32] != 0) {\n    *(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1;\n  }\n  if (iVar1 != 0) {\n    (*DAT_001bb444)(iVar1);\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_000612e0(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)(*param_1 + 0xc);\n  if (iVar1 != 0) {\n    (*DAT_001bb43c)(iVar1);\n  }\n  iVar3 = 0;\n  if (0 < param_1[4]) {\n    do {\n      iVar2 = param_1[0x18] + iVar3 * 0x28;\n      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }\n      iVar3 = iVar3 + 1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n    } while (iVar3 < param_1[4]);\n  }\n  if (param_1[0x32] != 0) {\n    *(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1;\n  }\n  if (iVar1 != 0) {\n    (*DAT_001bb444)(iVar1);\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(*param_1 + 0xc);" (assignment_expression "iVar1 = *(int *)(*param_1 + 0xc)" identifier = (pointer_expression "*(int *)(*param_1 + 0xc)" * (cast_expression "(int *)(*param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0xc)" ( (binary_expression "*param_1 + 0xc" (pointer_expression "*param_1" * identifier) + number_literal) ))))) ;) (if_statement "if (iVar1 != 0) {\n    (*DAT_001bb43c)(iVar1);\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    (*DAT_001bb43c)(iVar1);\n  }" { (expression_statement "(*DAT_001bb43c)(iVar1);" (call_expression "(*DAT_001bb43c)(iVar1)" (parenthesized_expression "(*DAT_001bb43c)" ( (pointer_expression "*DAT_001bb43c" * identifier) )) (argument_list "(iVar1)" ( identifier ))) ;) })) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (if_statement "if (0 < param_1[4]) {\n    do {\n      iVar2 = param_1[0x18] + iVar3 * 0x28;\n      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }\n      iVar3 = iVar3 + 1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n    } while (iVar3 < param_1[4]);\n  }" if (parenthesized_expression "(0 < param_1[4])" ( (binary_expression "0 < param_1[4]" number_literal < (subscript_expression "param_1[4]" identifier [ number_literal ])) )) (compound_statement "{\n    do {\n      iVar2 = param_1[0x18] + iVar3 * 0x28;\n      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }\n      iVar3 = iVar3 + 1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n    } while (iVar3 < param_1[4]);\n  }" { (do_statement "do {\n      iVar2 = param_1[0x18] + iVar3 * 0x28;\n      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }\n      iVar3 = iVar3 + 1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n    } while (iVar3 < param_1[4]);" do (compound_statement "{\n      iVar2 = param_1[0x18] + iVar3 * 0x28;\n      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }\n      iVar3 = iVar3 + 1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n    }" { (expression_statement "iVar2 = param_1[0x18] + iVar3 * 0x28;" (assignment_expression "iVar2 = param_1[0x18] + iVar3 * 0x28" identifier = (binary_expression "param_1[0x18] + iVar3 * 0x28" (subscript_expression "param_1[0x18]" identifier [ number_literal ]) + (binary_expression "iVar3 * 0x28" identifier * number_literal))) ;) (if_statement "if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }" if (parenthesized_expression "(((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0))" ( (binary_expression "((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)" (parenthesized_expression "((*(ushort *)(iVar2 + 8) & 0x2400) != 0)" ( (binary_expression "(*(ushort *)(iVar2 + 8) & 0x2400) != 0" (parenthesized_expression "(*(ushort *)(iVar2 + 8) & 0x2400)" ( (binary_expression "*(ushort *)(iVar2 + 8) & 0x2400" (pointer_expression "*(ushort *)(iVar2 + 8)" * (cast_expression "(ushort *)(iVar2 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 8)" ( (binary_expression "iVar2 + 8" identifier + number_literal) )))) & number_literal) )) != number_literal) )) || (parenthesized_expression "(*(int *)(iVar2 + 0x18) != 0)" ( (binary_expression "*(int *)(iVar2 + 0x18) != 0" (pointer_expression "*(int *)(iVar2 + 0x18)" * (cast_expression "(int *)(iVar2 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x18)" ( (binary_expression "iVar2 + 0x18" identifier + number_literal) )))) != number_literal) ))) )) (compound_statement "{\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }" { (expression_statement "FUN_00060f90();" (call_expression "FUN_00060f90()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar2 = param_1[0x18] + iVar3 * 0x28;" (assignment_expression "iVar2 = param_1[0x18] + iVar3 * 0x28" identifier = (binary_expression "param_1[0x18] + iVar3 * 0x28" (subscript_expression "param_1[0x18]" identifier [ number_literal ]) + (binary_expression "iVar3 * 0x28" identifier * number_literal))) ;) })) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "*(undefined2 *)(iVar2 + 8) = 1;" (assignment_expression "*(undefined2 *)(iVar2 + 8) = 1" (pointer_expression "*(undefined2 *)(iVar2 + 8)" * (cast_expression "(undefined2 *)(iVar2 + 8)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 8)" ( (binary_expression "iVar2 + 8" identifier + number_literal) )))) = number_literal) ;) }) while (parenthesized_expression "(iVar3 < param_1[4])" ( (binary_expression "iVar3 < param_1[4]" identifier < (subscript_expression "param_1[4]" identifier [ number_literal ])) )) ;) })) (if_statement "if (param_1[0x32] != 0) {\n    *(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1;\n  }" if (parenthesized_expression "(param_1[0x32] != 0)" ( (binary_expression "param_1[0x32] != 0" (subscript_expression "param_1[0x32]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n    *(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1;\n  }" { (expression_statement "*(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1;" (assignment_expression "*(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1" (pointer_expression "*(byte *)((int)param_1 + 0x8d)" * (cast_expression "(byte *)((int)param_1 + 0x8d)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 0x8d)" ( (binary_expression "(int)param_1 + 0x8d" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (binary_expression "*(byte *)((int)param_1 + 0x8d) & 0xfc | 1" (binary_expression "*(byte *)((int)param_1 + 0x8d) & 0xfc" (pointer_expression "*(byte *)((int)param_1 + 0x8d)" * (cast_expression "(byte *)((int)param_1 + 0x8d)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 0x8d)" ( (binary_expression "(int)param_1 + 0x8d" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) & number_literal) | number_literal)) ;) })) (if_statement "if (iVar1 != 0) {\n    (*DAT_001bb444)(iVar1);\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    (*DAT_001bb444)(iVar1);\n  }" { (expression_statement "(*DAT_001bb444)(iVar1);" (call_expression "(*DAT_001bb444)(iVar1)" (parenthesized_expression "(*DAT_001bb444)" ( (pointer_expression "*DAT_001bb444" * identifier) )) (argument_list "(iVar1)" ( identifier ))) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (subscript_expression IDENT [ LIT ])) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) + (binary_expression IDENT * LIT))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) != LIT) )) || (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) + (binary_expression IDENT * LIT))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) }) while (parenthesized_expression ( (binary_expression IDENT < (subscript_expression IDENT [ LIT ])) )) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) = (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) & LIT) | LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT ))) ;) })) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_000612e0(int *param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)(*param_1 + 0xc);\n  if (iVar1 != 0) {\n    (*DAT_001bb43c)(iVar1);\n  }\n  iVar3 = 0;\n  if (0 < param_1[4]) {\n    do {\n      iVar2 = param_1[0x18] + iVar3 * 0x28;\n      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }\n      iVar3 = iVar3 + 1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n    } while (iVar3 < param_1[4]);\n  }\n  if (param_1[0x32] != 0) {\n    *(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1;\n  }\n  if (iVar1 != 0) {\n    (*DAT_001bb444)(iVar1);\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_000612e0(int *param_1)" (identifier "FUN_000612e0") (parameter_list "(int *param_1)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)(*param_1 + 0xc);\n  if (iVar1 != 0) {\n    (*DAT_001bb43c)(iVar1);\n  }\n  iVar3 = 0;\n  if (0 < param_1[4]) {\n    do {\n      iVar2 = param_1[0x18] + iVar3 * 0x28;\n      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }\n      iVar3 = iVar3 + 1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n    } while (iVar3 < param_1[4]);\n  }\n  if (param_1[0x32] != 0) {\n    *(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1;\n  }\n  if (iVar1 != 0) {\n    (*DAT_001bb444)(iVar1);\n  }\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (expression_statement "iVar1 = *(int *)(*param_1 + 0xc);" (assignment_expression "iVar1 = *(int *)(*param_1 + 0xc)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(*param_1 + 0xc)" (* "*") (cast_expression "(int *)(*param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 0xc)" (( "(") (binary_expression "*param_1 + 0xc" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (if_statement "if (iVar1 != 0) {\n    (*DAT_001bb43c)(iVar1);\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    (*DAT_001bb43c)(iVar1);\n  }" ({ "{") (expression_statement "(*DAT_001bb43c)(iVar1);" (call_expression "(*DAT_001bb43c)(iVar1)" (parenthesized_expression "(*DAT_001bb43c)" (( "(") (pointer_expression "*DAT_001bb43c" (* "*") (identifier "DAT_001bb43c")) () ")")) (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (} "}"))) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (if_statement "if (0 < param_1[4]) {\n    do {\n      iVar2 = param_1[0x18] + iVar3 * 0x28;\n      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }\n      iVar3 = iVar3 + 1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n    } while (iVar3 < param_1[4]);\n  }" (if "if") (parenthesized_expression "(0 < param_1[4])" (( "(") (binary_expression "0 < param_1[4]" (number_literal "0") (< "<") (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]"))) () ")")) (compound_statement "{\n    do {\n      iVar2 = param_1[0x18] + iVar3 * 0x28;\n      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }\n      iVar3 = iVar3 + 1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n    } while (iVar3 < param_1[4]);\n  }" ({ "{") (do_statement "do {\n      iVar2 = param_1[0x18] + iVar3 * 0x28;\n      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }\n      iVar3 = iVar3 + 1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n    } while (iVar3 < param_1[4]);" (do "do") (compound_statement "{\n      iVar2 = param_1[0x18] + iVar3 * 0x28;\n      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }\n      iVar3 = iVar3 + 1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n    }" ({ "{") (expression_statement "iVar2 = param_1[0x18] + iVar3 * 0x28;" (assignment_expression "iVar2 = param_1[0x18] + iVar3 * 0x28" (identifier "iVar2") (= "=") (binary_expression "param_1[0x18] + iVar3 * 0x28" (subscript_expression "param_1[0x18]" (identifier "param_1") ([ "[") (number_literal "0x18") (] "]")) (+ "+") (binary_expression "iVar3 * 0x28" (identifier "iVar3") (* "*") (number_literal "0x28")))) (; ";")) (if_statement "if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }" (if "if") (parenthesized_expression "(((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0))" (( "(") (binary_expression "((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)" (parenthesized_expression "((*(ushort *)(iVar2 + 8) & 0x2400) != 0)" (( "(") (binary_expression "(*(ushort *)(iVar2 + 8) & 0x2400) != 0" (parenthesized_expression "(*(ushort *)(iVar2 + 8) & 0x2400)" (( "(") (binary_expression "*(ushort *)(iVar2 + 8) & 0x2400" (pointer_expression "*(ushort *)(iVar2 + 8)" (* "*") (cast_expression "(ushort *)(iVar2 + 8)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 8)" (( "(") (binary_expression "iVar2 + 8" (identifier "iVar2") (+ "+") (number_literal "8")) () ")")))) (& "&") (number_literal "0x2400")) () ")")) (!= "!=") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(*(int *)(iVar2 + 0x18) != 0)" (( "(") (binary_expression "*(int *)(iVar2 + 0x18) != 0" (pointer_expression "*(int *)(iVar2 + 0x18)" (* "*") (cast_expression "(int *)(iVar2 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x18)" (( "(") (binary_expression "iVar2 + 0x18" (identifier "iVar2") (+ "+") (number_literal "0x18")) () ")")))) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n        FUN_00060f90();\n        iVar2 = param_1[0x18] + iVar3 * 0x28;\n      }" ({ "{") (expression_statement "FUN_00060f90();" (call_expression "FUN_00060f90()" (identifier "FUN_00060f90") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar2 = param_1[0x18] + iVar3 * 0x28;" (assignment_expression "iVar2 = param_1[0x18] + iVar3 * 0x28" (identifier "iVar2") (= "=") (binary_expression "param_1[0x18] + iVar3 * 0x28" (subscript_expression "param_1[0x18]" (identifier "param_1") ([ "[") (number_literal "0x18") (] "]")) (+ "+") (binary_expression "iVar3 * 0x28" (identifier "iVar3") (* "*") (number_literal "0x28")))) (; ";")) (} "}"))) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" (identifier "iVar3") (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*(undefined2 *)(iVar2 + 8) = 1;" (assignment_expression "*(undefined2 *)(iVar2 + 8) = 1" (pointer_expression "*(undefined2 *)(iVar2 + 8)" (* "*") (cast_expression "(undefined2 *)(iVar2 + 8)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 8)" (( "(") (binary_expression "iVar2 + 8" (identifier "iVar2") (+ "+") (number_literal "8")) () ")")))) (= "=") (number_literal "1")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar3 < param_1[4])" (( "(") (binary_expression "iVar3 < param_1[4]" (identifier "iVar3") (< "<") (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]"))) () ")")) (; ";")) (} "}"))) (if_statement "if (param_1[0x32] != 0) {\n    *(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1;\n  }" (if "if") (parenthesized_expression "(param_1[0x32] != 0)" (( "(") (binary_expression "param_1[0x32] != 0" (subscript_expression "param_1[0x32]" (identifier "param_1") ([ "[") (number_literal "0x32") (] "]")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    *(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1;\n  }" ({ "{") (expression_statement "*(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1;" (assignment_expression "*(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1" (pointer_expression "*(byte *)((int)param_1 + 0x8d)" (* "*") (cast_expression "(byte *)((int)param_1 + 0x8d)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + 0x8d)" (( "(") (binary_expression "(int)param_1 + 0x8d" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "0x8d")) () ")")))) (= "=") (binary_expression "*(byte *)((int)param_1 + 0x8d) & 0xfc | 1" (binary_expression "*(byte *)((int)param_1 + 0x8d) & 0xfc" (pointer_expression "*(byte *)((int)param_1 + 0x8d)" (* "*") (cast_expression "(byte *)((int)param_1 + 0x8d)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + 0x8d)" (( "(") (binary_expression "(int)param_1 + 0x8d" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "0x8d")) () ")")))) (& "&") (number_literal "0xfc")) (| "|") (number_literal "1"))) (; ";")) (} "}"))) (if_statement "if (iVar1 != 0) {\n    (*DAT_001bb444)(iVar1);\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    (*DAT_001bb444)(iVar1);\n  }" ({ "{") (expression_statement "(*DAT_001bb444)(iVar1);" (call_expression "(*DAT_001bb444)(iVar1)" (parenthesized_expression "(*DAT_001bb444)" (( "(") (pointer_expression "*DAT_001bb444" (* "*") (identifier "DAT_001bb444")) () ")")) (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */
/* WARNING: Unknown calling convention */

int function_1(type_1 *var_2)

{
  type_2 *var_1;
  type_3 *p;
  int var_3;
  
  var_1 = *(type_2 **)(*(int *)var_2 + 0xc);
  if (var_1 != (type_2 *)0x0) {
    (*sqlite3Config.mutex.xMutexEnter)(var_1);
  }
  var_3 = 0;
  if (0 < *(int *)(var_2 + 0x10)) {
    do {
      p = (type_3 *)(*(int *)(var_2 + 0x60) + var_3 * 0x28);
      if (((p->flags & 0x2400) != 0) || (p->szMalloc != 0)) {
        var_4(p);
        p = (type_3 *)(*(int *)(var_2 + 0x60) + var_3 * 0x28);
      }
      var_3 = var_3 + 1;
      p->flags = 1;
    } while (var_3 < *(int *)(var_2 + 0x10));
  }
  if (*(int *)(var_2 + 200) != 0) {
    var_2[0x8d] = (type_1)((type_4)var_2[0x8d] & 0xfc | 1);
  }
  if (var_1 != (type_2 *)0x0) {
    (*sqlite3Config.mutex.xMutexLeave)(var_1);
  }
  return 0;
}


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

/* WARNING: Function: __i686.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */

undefined4 MASKED(int *param_1)

{
  int iVar1;
  int iVar2;
  int iVar3;
  
  iVar1 = *(int *)(*param_1 + 0xc);
  if (iVar1 != 0) {
    (*DAT_001bb43c)(iVar1);
  }
  iVar3 = 0;
  if (0 < param_1[4]) {
    do {
      iVar2 = param_1[0x18] + iVar3 * 0x28;
      if (((*(ushort *)(iVar2 + 8) & 0x2400) != 0) || (*(int *)(iVar2 + 0x18) != 0)) {
        FUN_00060f90();
        iVar2 = param_1[0x18] + iVar3 * 0x28;
      }
      iVar3 = iVar3 + 1;
      *(undefined2 *)(iVar2 + 8) = 1;
    } while (iVar3 < param_1[4]);
  }
  if (param_1[0x32] != 0) {
    *(byte *)((int)param_1 + 0x8d) = *(byte *)((int)param_1 + 0x8d) & 0xfc | 1;
  }
  if (iVar1 != 0) {
    (*DAT_001bb444)(iVar1);
  }
  return 0;
}

