
void btreeLockCarefully(Btree *p)

{
  int iVar1;
  Btree *pBVar2;
  
  iVar1 = sqlite3_mutex_try(p->pBt->mutex);
  if (iVar1 == 0) {
    p->pBt->db = p->db;
    p->locked = '\x01';
    return;
  }
  for (pBVar2 = p->pNext; pBVar2 != (Btree *)0x0; pBVar2 = pBVar2->pNext) {
    while (pBVar2->locked == '\0') {
      pBVar2 = pBVar2->pNext;
      if (pBVar2 == (Btree *)0x0) goto LAB_00033d0c;
    }
    unlockBtreeMutex((Btree *)pBVar2->pBt,(Btree *)&pBVar2->locked);
  }
LAB_00033d0c:
                    /* WARNING: Subroutine does not return */
  sqlite3_mutex_enter(p->pBt->mutex);
}



void FUN_00033c84(undefined4 *param_1)

{
  int iVar1;
  undefined4 *puVar2;
  
  iVar1 = sqlite3_mutex_try(*(undefined4 *)(param_1[1] + 0x38));
  if (iVar1 == 0) {
    *(undefined4 *)(param_1[1] + 4) = *param_1;
    *(undefined1 *)((int)param_1 + 10) = 1;
    return;
  }
  for (iVar1 = param_1[6]; iVar1 != 0; iVar1 = *(int *)(iVar1 + 0x18)) {
    while (*(char *)(iVar1 + 10) == '\0') {
      iVar1 = *(int *)(iVar1 + 0x18);
      if (iVar1 == 0) goto LAB_00033d0c;
    }
    FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10);
  }
LAB_00033d0c:
  sqlite3_mutex_enter(*(undefined4 *)(param_1[1] + 0x38));
  *(undefined4 *)(param_1[1] + 4) = *param_1;
  puVar2 = (undefined4 *)param_1[6];
  *(undefined1 *)((int)param_1 + 10) = 1;
  do {
    if (puVar2 == (undefined4 *)0x0) {
      return;
    }
    while (puVar2[3] == 0) {
      puVar2 = (undefined4 *)puVar2[6];
      if (puVar2 == (undefined4 *)0x0) {
        return;
      }
    }
    sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38));
    *(undefined4 *)(puVar2[1] + 4) = *puVar2;
    *(undefined1 *)((int)puVar2 + 10) = 1;
    puVar2 = (undefined4 *)puVar2[6];
  } while( true );
}


lui gp,0x13
addiu gp,gp,-0x6d4
addu gp,gp,t9
addiu sp,sp,-0x28
lw t9,-0x7ea4(gp)
sw gp,0x10(sp)
sw s1,0x1c(sp)
or s1,a0,zero
sw ra,0x24(sp)
sw s2,0x20(sp)
sw s0,0x18(sp)
lw v0,0x4(a0)
bal 0x00029da0
_lw a0,0x38(v0)
beq v0,zero,0x00033da0
_lw gp,0x10(sp)
lw s0,0x18(s1)
beq s0,zero,0x00033d0c
_nop
lw s2,-0x7ed8(gp)
b 0x00033ce8
_addiu s2,s2,0x3c44
lw s0,0x18(s0)
beq s0,zero,0x00033d0c
_nop
lbu v0,0xa(s0)
beq v0,zero,0x00033cdc
_or t9,s2,zero
lw a0,0x4(s0)
bal 0x00033c44
_addiu a1,s0,0xa
lw s0,0x18(s0)
bne s0,zero,0x00033ce8
_lw gp,0x10(sp)
lw v0,0x4(s1)
lw t9,-0x7f00(gp)
bal 0x0001c608
_lw a0,0x38(v0)
lw v0,0x4(s1)
lw v1,0x0(s1)
lw gp,0x10(sp)
sw v1,0x4(v0)
li v0,0x1
lw s0,0x18(s1)
beq s0,zero,0x00033d88
_sb v0,0xa(s1)
b 0x00033d50
_li s1,0x1
lw s0,0x18(s0)
beq s0,zero,0x00033d8c
_lw ra,0x24(sp)
lw v0,0xc(s0)
beq v0,zero,0x00033d44
_lw t9,-0x7f00(gp)
lw v0,0x4(s0)
bal 0x0001c608
_lw a0,0x38(v0)
lw v0,0x4(s0)
lw v1,0x0(s0)
lw gp,0x10(sp)
sw v1,0x4(v0)
sb s1,0xa(s0)
lw s0,0x18(s0)
bne s0,zero,0x00033d50
_nop
lw ra,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
lw v0,0x4(s1)
lw v1,0x0(s1)
sw v1,0x4(v0)
li v0,0x1
sb v0,0xa(s1)
lw ra,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
(translation_unit "void FUN_00033c84(undefined4 *param_1)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  \n  iVar1 = sqlite3_mutex_try(*(undefined4 *)(param_1[1] + 0x38));\n  if (iVar1 == 0) {\n    *(undefined4 *)(param_1[1] + 4) = *param_1;\n    *(undefined1 *)((int)param_1 + 10) = 1;\n    return;\n  }\n  for (iVar1 = param_1[6]; iVar1 != 0; iVar1 = *(int *)(iVar1 + 0x18)) {\n    while (*(char *)(iVar1 + 10) == '\0') {\n      iVar1 = *(int *)(iVar1 + 0x18);\n      if (iVar1 == 0) goto LAB_00033d0c;\n    }\n    FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10);\n  }\nLAB_00033d0c:\n  sqlite3_mutex_enter(*(undefined4 *)(param_1[1] + 0x38));\n  *(undefined4 *)(param_1[1] + 4) = *param_1;\n  puVar2 = (undefined4 *)param_1[6];\n  *(undefined1 *)((int)param_1 + 10) = 1;\n  do {\n    if (puVar2 == (undefined4 *)0x0) {\n      return;\n    }\n    while (puVar2[3] == 0) {\n      puVar2 = (undefined4 *)puVar2[6];\n      if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }\n    }\n    sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38));\n    *(undefined4 *)(puVar2[1] + 4) = *puVar2;\n    *(undefined1 *)((int)puVar2 + 10) = 1;\n    puVar2 = (undefined4 *)puVar2[6];\n  } while( true );\n}\n\n" (function_definition "void FUN_00033c84(undefined4 *param_1)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  \n  iVar1 = sqlite3_mutex_try(*(undefined4 *)(param_1[1] + 0x38));\n  if (iVar1 == 0) {\n    *(undefined4 *)(param_1[1] + 4) = *param_1;\n    *(undefined1 *)((int)param_1 + 10) = 1;\n    return;\n  }\n  for (iVar1 = param_1[6]; iVar1 != 0; iVar1 = *(int *)(iVar1 + 0x18)) {\n    while (*(char *)(iVar1 + 10) == '\0') {\n      iVar1 = *(int *)(iVar1 + 0x18);\n      if (iVar1 == 0) goto LAB_00033d0c;\n    }\n    FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10);\n  }\nLAB_00033d0c:\n  sqlite3_mutex_enter(*(undefined4 *)(param_1[1] + 0x38));\n  *(undefined4 *)(param_1[1] + 4) = *param_1;\n  puVar2 = (undefined4 *)param_1[6];\n  *(undefined1 *)((int)param_1 + 10) = 1;\n  do {\n    if (puVar2 == (undefined4 *)0x0) {\n      return;\n    }\n    while (puVar2[3] == 0) {\n      puVar2 = (undefined4 *)puVar2[6];\n      if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }\n    }\n    sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38));\n    *(undefined4 *)(puVar2[1] + 4) = *puVar2;\n    *(undefined1 *)((int)puVar2 + 10) = 1;\n    puVar2 = (undefined4 *)puVar2[6];\n  } while( true );\n}" primitive_type (function_declarator "FUN_00033c84(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  \n  iVar1 = sqlite3_mutex_try(*(undefined4 *)(param_1[1] + 0x38));\n  if (iVar1 == 0) {\n    *(undefined4 *)(param_1[1] + 4) = *param_1;\n    *(undefined1 *)((int)param_1 + 10) = 1;\n    return;\n  }\n  for (iVar1 = param_1[6]; iVar1 != 0; iVar1 = *(int *)(iVar1 + 0x18)) {\n    while (*(char *)(iVar1 + 10) == '\0') {\n      iVar1 = *(int *)(iVar1 + 0x18);\n      if (iVar1 == 0) goto LAB_00033d0c;\n    }\n    FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10);\n  }\nLAB_00033d0c:\n  sqlite3_mutex_enter(*(undefined4 *)(param_1[1] + 0x38));\n  *(undefined4 *)(param_1[1] + 4) = *param_1;\n  puVar2 = (undefined4 *)param_1[6];\n  *(undefined1 *)((int)param_1 + 10) = 1;\n  do {\n    if (puVar2 == (undefined4 *)0x0) {\n      return;\n    }\n    while (puVar2[3] == 0) {\n      puVar2 = (undefined4 *)puVar2[6];\n      if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }\n    }\n    sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38));\n    *(undefined4 *)(puVar2[1] + 4) = *puVar2;\n    *(undefined1 *)((int)puVar2 + 10) = 1;\n    puVar2 = (undefined4 *)puVar2[6];\n  } while( true );\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (expression_statement "iVar1 = sqlite3_mutex_try(*(undefined4 *)(param_1[1] + 0x38));" (assignment_expression "iVar1 = sqlite3_mutex_try(*(undefined4 *)(param_1[1] + 0x38))" identifier = (call_expression "sqlite3_mutex_try(*(undefined4 *)(param_1[1] + 0x38))" identifier (argument_list "(*(undefined4 *)(param_1[1] + 0x38))" ( (pointer_expression "*(undefined4 *)(param_1[1] + 0x38)" * (cast_expression "(undefined4 *)(param_1[1] + 0x38)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[1] + 0x38)" ( (binary_expression "param_1[1] + 0x38" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal) )))) )))) ;) (if_statement "if (iVar1 == 0) {\n    *(undefined4 *)(param_1[1] + 4) = *param_1;\n    *(undefined1 *)((int)param_1 + 10) = 1;\n    return;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    *(undefined4 *)(param_1[1] + 4) = *param_1;\n    *(undefined1 *)((int)param_1 + 10) = 1;\n    return;\n  }" { (expression_statement "*(undefined4 *)(param_1[1] + 4) = *param_1;" (assignment_expression "*(undefined4 *)(param_1[1] + 4) = *param_1" (pointer_expression "*(undefined4 *)(param_1[1] + 4)" * (cast_expression "(undefined4 *)(param_1[1] + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[1] + 4)" ( (binary_expression "param_1[1] + 4" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal) )))) = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "*(undefined1 *)((int)param_1 + 10) = 1;" (assignment_expression "*(undefined1 *)((int)param_1 + 10) = 1" (pointer_expression "*(undefined1 *)((int)param_1 + 10)" * (cast_expression "(undefined1 *)((int)param_1 + 10)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 10)" ( (binary_expression "(int)param_1 + 10" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (for_statement "for (iVar1 = param_1[6]; iVar1 != 0; iVar1 = *(int *)(iVar1 + 0x18)) {\n    while (*(char *)(iVar1 + 10) == '\0') {\n      iVar1 = *(int *)(iVar1 + 0x18);\n      if (iVar1 == 0) goto LAB_00033d0c;\n    }\n    FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10);\n  }" for ( (assignment_expression "iVar1 = param_1[6]" identifier = (subscript_expression "param_1[6]" identifier [ number_literal ])) ; (binary_expression "iVar1 != 0" identifier != number_literal) ; (assignment_expression "iVar1 = *(int *)(iVar1 + 0x18)" identifier = (pointer_expression "*(int *)(iVar1 + 0x18)" * (cast_expression "(int *)(iVar1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) ))))) ) (compound_statement "{\n    while (*(char *)(iVar1 + 10) == '\0') {\n      iVar1 = *(int *)(iVar1 + 0x18);\n      if (iVar1 == 0) goto LAB_00033d0c;\n    }\n    FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10);\n  }" { (while_statement "while (*(char *)(iVar1 + 10) == '\0') {\n      iVar1 = *(int *)(iVar1 + 0x18);\n      if (iVar1 == 0) goto LAB_00033d0c;\n    }" while (parenthesized_expression "(*(char *)(iVar1 + 10) == '\0')" ( (binary_expression "*(char *)(iVar1 + 10) == '\0'" (pointer_expression "*(char *)(iVar1 + 10)" * (cast_expression "(char *)(iVar1 + 10)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 10)" ( (binary_expression "iVar1 + 10" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      iVar1 = *(int *)(iVar1 + 0x18);\n      if (iVar1 == 0) goto LAB_00033d0c;\n    }" { (expression_statement "iVar1 = *(int *)(iVar1 + 0x18);" (assignment_expression "iVar1 = *(int *)(iVar1 + 0x18)" identifier = (pointer_expression "*(int *)(iVar1 + 0x18)" * (cast_expression "(int *)(iVar1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 == 0) goto LAB_00033d0c;" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00033d0c;" goto statement_identifier ;)) })) (expression_statement "FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10);" (call_expression "FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10)" identifier (argument_list "(*(undefined4 *)(iVar1 + 4),iVar1 + 10)" ( (pointer_expression "*(undefined4 *)(iVar1 + 4)" * (cast_expression "(undefined4 *)(iVar1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) , (binary_expression "iVar1 + 10" identifier + number_literal) ))) ;) })) (labeled_statement "LAB_00033d0c:\n  sqlite3_mutex_enter(*(undefined4 *)(param_1[1] + 0x38));" statement_identifier : (expression_statement "sqlite3_mutex_enter(*(undefined4 *)(param_1[1] + 0x38));" (call_expression "sqlite3_mutex_enter(*(undefined4 *)(param_1[1] + 0x38))" identifier (argument_list "(*(undefined4 *)(param_1[1] + 0x38))" ( (pointer_expression "*(undefined4 *)(param_1[1] + 0x38)" * (cast_expression "(undefined4 *)(param_1[1] + 0x38)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[1] + 0x38)" ( (binary_expression "param_1[1] + 0x38" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal) )))) ))) ;)) (expression_statement "*(undefined4 *)(param_1[1] + 4) = *param_1;" (assignment_expression "*(undefined4 *)(param_1[1] + 4) = *param_1" (pointer_expression "*(undefined4 *)(param_1[1] + 4)" * (cast_expression "(undefined4 *)(param_1[1] + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[1] + 4)" ( (binary_expression "param_1[1] + 4" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal) )))) = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "puVar2 = (undefined4 *)param_1[6];" (assignment_expression "puVar2 = (undefined4 *)param_1[6]" identifier = (cast_expression "(undefined4 *)param_1[6]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[6]" identifier [ number_literal ]))) ;) (expression_statement "*(undefined1 *)((int)param_1 + 10) = 1;" (assignment_expression "*(undefined1 *)((int)param_1 + 10) = 1" (pointer_expression "*(undefined1 *)((int)param_1 + 10)" * (cast_expression "(undefined1 *)((int)param_1 + 10)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 10)" ( (binary_expression "(int)param_1 + 10" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (do_statement "do {\n    if (puVar2 == (undefined4 *)0x0) {\n      return;\n    }\n    while (puVar2[3] == 0) {\n      puVar2 = (undefined4 *)puVar2[6];\n      if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }\n    }\n    sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38));\n    *(undefined4 *)(puVar2[1] + 4) = *puVar2;\n    *(undefined1 *)((int)puVar2 + 10) = 1;\n    puVar2 = (undefined4 *)puVar2[6];\n  } while( true );" do (compound_statement "{\n    if (puVar2 == (undefined4 *)0x0) {\n      return;\n    }\n    while (puVar2[3] == 0) {\n      puVar2 = (undefined4 *)puVar2[6];\n      if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }\n    }\n    sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38));\n    *(undefined4 *)(puVar2[1] + 4) = *puVar2;\n    *(undefined1 *)((int)puVar2 + 10) = 1;\n    puVar2 = (undefined4 *)puVar2[6];\n  }" { (if_statement "if (puVar2 == (undefined4 *)0x0) {\n      return;\n    }" if (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" ( (binary_expression "puVar2 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) (while_statement "while (puVar2[3] == 0) {\n      puVar2 = (undefined4 *)puVar2[6];\n      if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }\n    }" while (parenthesized_expression "(puVar2[3] == 0)" ( (binary_expression "puVar2[3] == 0" (subscript_expression "puVar2[3]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n      puVar2 = (undefined4 *)puVar2[6];\n      if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }\n    }" { (expression_statement "puVar2 = (undefined4 *)puVar2[6];" (assignment_expression "puVar2 = (undefined4 *)puVar2[6]" identifier = (cast_expression "(undefined4 *)puVar2[6]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar2[6]" identifier [ number_literal ]))) ;) (if_statement "if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }" if (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" ( (binary_expression "puVar2 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) })) (expression_statement "sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38));" (call_expression "sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38))" identifier (argument_list "(*(undefined4 *)(puVar2[1] + 0x38))" ( (pointer_expression "*(undefined4 *)(puVar2[1] + 0x38)" * (cast_expression "(undefined4 *)(puVar2[1] + 0x38)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2[1] + 0x38)" ( (binary_expression "puVar2[1] + 0x38" (subscript_expression "puVar2[1]" identifier [ number_literal ]) + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(puVar2[1] + 4) = *puVar2;" (assignment_expression "*(undefined4 *)(puVar2[1] + 4) = *puVar2" (pointer_expression "*(undefined4 *)(puVar2[1] + 4)" * (cast_expression "(undefined4 *)(puVar2[1] + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2[1] + 4)" ( (binary_expression "puVar2[1] + 4" (subscript_expression "puVar2[1]" identifier [ number_literal ]) + number_literal) )))) = (pointer_expression "*puVar2" * identifier)) ;) (expression_statement "*(undefined1 *)((int)puVar2 + 10) = 1;" (assignment_expression "*(undefined1 *)((int)puVar2 + 10) = 1" (pointer_expression "*(undefined1 *)((int)puVar2 + 10)" * (cast_expression "(undefined1 *)((int)puVar2 + 10)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar2 + 10)" ( (binary_expression "(int)puVar2 + 10" (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "puVar2 = (undefined4 *)puVar2[6];" (assignment_expression "puVar2 = (undefined4 *)puVar2[6]" identifier = (cast_expression "(undefined4 *)puVar2[6]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar2[6]" identifier [ number_literal ]))) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "void btreeLockCarefully(Btree *p)\n\n{\n  int iVar1;\n  Btree *pBVar2;\n  \n  iVar1 = sqlite3_mutex_try(p->pBt->mutex);\n  if (iVar1 == 0) {\n    p->pBt->db = p->db;\n    p->locked = '\x01';\n    return;\n  }\n  for (pBVar2 = p->pNext; pBVar2 != (Btree *)0x0; pBVar2 = pBVar2->pNext) {\n    while (pBVar2->locked == '\0') {\n      pBVar2 = pBVar2->pNext;\n      if (pBVar2 == (Btree *)0x0) goto LAB_00033d0c;\n    }\n    unlockBtreeMutex((Btree *)pBVar2->pBt,(Btree *)&pBVar2->locked);\n  }\nLAB_00033d0c:\n                    /* WARNING: Subroutine does not return */\n  sqlite3_mutex_enter(p->pBt->mutex);\n}\n\n" (function_definition "void btreeLockCarefully(Btree *p)\n\n{\n  int iVar1;\n  Btree *pBVar2;\n  \n  iVar1 = sqlite3_mutex_try(p->pBt->mutex);\n  if (iVar1 == 0) {\n    p->pBt->db = p->db;\n    p->locked = '\x01';\n    return;\n  }\n  for (pBVar2 = p->pNext; pBVar2 != (Btree *)0x0; pBVar2 = pBVar2->pNext) {\n    while (pBVar2->locked == '\0') {\n      pBVar2 = pBVar2->pNext;\n      if (pBVar2 == (Btree *)0x0) goto LAB_00033d0c;\n    }\n    unlockBtreeMutex((Btree *)pBVar2->pBt,(Btree *)&pBVar2->locked);\n  }\nLAB_00033d0c:\n                    /* WARNING: Subroutine does not return */\n  sqlite3_mutex_enter(p->pBt->mutex);\n}" primitive_type (function_declarator "btreeLockCarefully(Btree *p)" identifier (parameter_list "(Btree *p)" ( (parameter_declaration "Btree *p" type_identifier (pointer_declarator "*p" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  Btree *pBVar2;\n  \n  iVar1 = sqlite3_mutex_try(p->pBt->mutex);\n  if (iVar1 == 0) {\n    p->pBt->db = p->db;\n    p->locked = '\x01';\n    return;\n  }\n  for (pBVar2 = p->pNext; pBVar2 != (Btree *)0x0; pBVar2 = pBVar2->pNext) {\n    while (pBVar2->locked == '\0') {\n      pBVar2 = pBVar2->pNext;\n      if (pBVar2 == (Btree *)0x0) goto LAB_00033d0c;\n    }\n    unlockBtreeMutex((Btree *)pBVar2->pBt,(Btree *)&pBVar2->locked);\n  }\nLAB_00033d0c:\n                    /* WARNING: Subroutine does not return */\n  sqlite3_mutex_enter(p->pBt->mutex);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "Btree *pBVar2;" type_identifier (pointer_declarator "*pBVar2" * identifier) ;) (expression_statement "iVar1 = sqlite3_mutex_try(p->pBt->mutex);" (assignment_expression "iVar1 = sqlite3_mutex_try(p->pBt->mutex)" identifier = (call_expression "sqlite3_mutex_try(p->pBt->mutex)" identifier (argument_list "(p->pBt->mutex)" ( (field_expression "p->pBt->mutex" (field_expression "p->pBt" identifier -> field_identifier) -> field_identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n    p->pBt->db = p->db;\n    p->locked = '\x01';\n    return;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    p->pBt->db = p->db;\n    p->locked = '\x01';\n    return;\n  }" { (expression_statement "p->pBt->db = p->db;" (assignment_expression "p->pBt->db = p->db" (field_expression "p->pBt->db" (field_expression "p->pBt" identifier -> field_identifier) -> field_identifier) = (field_expression "p->db" identifier -> field_identifier)) ;) (expression_statement "p->locked = '\x01';" (assignment_expression "p->locked = '\x01'" (field_expression "p->locked" identifier -> field_identifier) = (char_literal "'\x01'" ' escape_sequence ')) ;) (return_statement "return;" return ;) })) (for_statement "for (pBVar2 = p->pNext; pBVar2 != (Btree *)0x0; pBVar2 = pBVar2->pNext) {\n    while (pBVar2->locked == '\0') {\n      pBVar2 = pBVar2->pNext;\n      if (pBVar2 == (Btree *)0x0) goto LAB_00033d0c;\n    }\n    unlockBtreeMutex((Btree *)pBVar2->pBt,(Btree *)&pBVar2->locked);\n  }" for ( (assignment_expression "pBVar2 = p->pNext" identifier = (field_expression "p->pNext" identifier -> field_identifier)) ; (binary_expression "pBVar2 != (Btree *)0x0" identifier != (cast_expression "(Btree *)0x0" ( (type_descriptor "Btree *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ; (assignment_expression "pBVar2 = pBVar2->pNext" identifier = (field_expression "pBVar2->pNext" identifier -> field_identifier)) ) (compound_statement "{\n    while (pBVar2->locked == '\0') {\n      pBVar2 = pBVar2->pNext;\n      if (pBVar2 == (Btree *)0x0) goto LAB_00033d0c;\n    }\n    unlockBtreeMutex((Btree *)pBVar2->pBt,(Btree *)&pBVar2->locked);\n  }" { (while_statement "while (pBVar2->locked == '\0') {\n      pBVar2 = pBVar2->pNext;\n      if (pBVar2 == (Btree *)0x0) goto LAB_00033d0c;\n    }" while (parenthesized_expression "(pBVar2->locked == '\0')" ( (binary_expression "pBVar2->locked == '\0'" (field_expression "pBVar2->locked" identifier -> field_identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      pBVar2 = pBVar2->pNext;\n      if (pBVar2 == (Btree *)0x0) goto LAB_00033d0c;\n    }" { (expression_statement "pBVar2 = pBVar2->pNext;" (assignment_expression "pBVar2 = pBVar2->pNext" identifier = (field_expression "pBVar2->pNext" identifier -> field_identifier)) ;) (if_statement "if (pBVar2 == (Btree *)0x0) goto LAB_00033d0c;" if (parenthesized_expression "(pBVar2 == (Btree *)0x0)" ( (binary_expression "pBVar2 == (Btree *)0x0" identifier == (cast_expression "(Btree *)0x0" ( (type_descriptor "Btree *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_00033d0c;" goto statement_identifier ;)) })) (expression_statement "unlockBtreeMutex((Btree *)pBVar2->pBt,(Btree *)&pBVar2->locked);" (call_expression "unlockBtreeMutex((Btree *)pBVar2->pBt,(Btree *)&pBVar2->locked)" identifier (argument_list "((Btree *)pBVar2->pBt,(Btree *)&pBVar2->locked)" ( (cast_expression "(Btree *)pBVar2->pBt" ( (type_descriptor "Btree *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "pBVar2->pBt" identifier -> field_identifier)) , (cast_expression "(Btree *)&pBVar2->locked" ( (type_descriptor "Btree *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pBVar2->locked" & (field_expression "pBVar2->locked" identifier -> field_identifier))) ))) ;) })) (labeled_statement "LAB_00033d0c:\n                    /* WARNING: Subroutine does not return */\n  sqlite3_mutex_enter(p->pBt->mutex);" statement_identifier : comment (expression_statement "sqlite3_mutex_enter(p->pBt->mutex);" (call_expression "sqlite3_mutex_enter(p->pBt->mutex)" identifier (argument_list "(p->pBt->mutex)" ( (field_expression "p->pBt->mutex" (field_expression "p->pBt" identifier -> field_identifier) -> field_identifier) ))) ;)) })))
(translation_unit "void FUN_00033c84(undefined4 *param_1)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  \n  iVar1 = sqlite3_mutex_try(*(undefined4 *)(param_1[1] + 0x38));\n  if (iVar1 == 0) {\n    *(undefined4 *)(param_1[1] + 4) = *param_1;\n    *(undefined1 *)((int)param_1 + 10) = 1;\n    return;\n  }\n  for (iVar1 = param_1[6]; iVar1 != 0; iVar1 = *(int *)(iVar1 + 0x18)) {\n    while (*(char *)(iVar1 + 10) == '\0') {\n      iVar1 = *(int *)(iVar1 + 0x18);\n      if (iVar1 == 0) goto LAB_00033d0c;\n    }\n    FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10);\n  }\nLAB_00033d0c:\n  sqlite3_mutex_enter(*(undefined4 *)(param_1[1] + 0x38));\n  *(undefined4 *)(param_1[1] + 4) = *param_1;\n  puVar2 = (undefined4 *)param_1[6];\n  *(undefined1 *)((int)param_1 + 10) = 1;\n  do {\n    if (puVar2 == (undefined4 *)0x0) {\n      return;\n    }\n    while (puVar2[3] == 0) {\n      puVar2 = (undefined4 *)puVar2[6];\n      if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }\n    }\n    sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38));\n    *(undefined4 *)(puVar2[1] + 4) = *puVar2;\n    *(undefined1 *)((int)puVar2 + 10) = 1;\n    puVar2 = (undefined4 *)puVar2[6];\n  } while( true );\n}\n\n" (function_definition "void FUN_00033c84(undefined4 *param_1)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  \n  iVar1 = sqlite3_mutex_try(*(undefined4 *)(param_1[1] + 0x38));\n  if (iVar1 == 0) {\n    *(undefined4 *)(param_1[1] + 4) = *param_1;\n    *(undefined1 *)((int)param_1 + 10) = 1;\n    return;\n  }\n  for (iVar1 = param_1[6]; iVar1 != 0; iVar1 = *(int *)(iVar1 + 0x18)) {\n    while (*(char *)(iVar1 + 10) == '\0') {\n      iVar1 = *(int *)(iVar1 + 0x18);\n      if (iVar1 == 0) goto LAB_00033d0c;\n    }\n    FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10);\n  }\nLAB_00033d0c:\n  sqlite3_mutex_enter(*(undefined4 *)(param_1[1] + 0x38));\n  *(undefined4 *)(param_1[1] + 4) = *param_1;\n  puVar2 = (undefined4 *)param_1[6];\n  *(undefined1 *)((int)param_1 + 10) = 1;\n  do {\n    if (puVar2 == (undefined4 *)0x0) {\n      return;\n    }\n    while (puVar2[3] == 0) {\n      puVar2 = (undefined4 *)puVar2[6];\n      if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }\n    }\n    sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38));\n    *(undefined4 *)(puVar2[1] + 4) = *puVar2;\n    *(undefined1 *)((int)puVar2 + 10) = 1;\n    puVar2 = (undefined4 *)puVar2[6];\n  } while( true );\n}" primitive_type (function_declarator "FUN_00033c84(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  \n  iVar1 = sqlite3_mutex_try(*(undefined4 *)(param_1[1] + 0x38));\n  if (iVar1 == 0) {\n    *(undefined4 *)(param_1[1] + 4) = *param_1;\n    *(undefined1 *)((int)param_1 + 10) = 1;\n    return;\n  }\n  for (iVar1 = param_1[6]; iVar1 != 0; iVar1 = *(int *)(iVar1 + 0x18)) {\n    while (*(char *)(iVar1 + 10) == '\0') {\n      iVar1 = *(int *)(iVar1 + 0x18);\n      if (iVar1 == 0) goto LAB_00033d0c;\n    }\n    FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10);\n  }\nLAB_00033d0c:\n  sqlite3_mutex_enter(*(undefined4 *)(param_1[1] + 0x38));\n  *(undefined4 *)(param_1[1] + 4) = *param_1;\n  puVar2 = (undefined4 *)param_1[6];\n  *(undefined1 *)((int)param_1 + 10) = 1;\n  do {\n    if (puVar2 == (undefined4 *)0x0) {\n      return;\n    }\n    while (puVar2[3] == 0) {\n      puVar2 = (undefined4 *)puVar2[6];\n      if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }\n    }\n    sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38));\n    *(undefined4 *)(puVar2[1] + 4) = *puVar2;\n    *(undefined1 *)((int)puVar2 + 10) = 1;\n    puVar2 = (undefined4 *)puVar2[6];\n  } while( true );\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (expression_statement "iVar1 = sqlite3_mutex_try(*(undefined4 *)(param_1[1] + 0x38));" (assignment_expression "iVar1 = sqlite3_mutex_try(*(undefined4 *)(param_1[1] + 0x38))" identifier = (call_expression "sqlite3_mutex_try(*(undefined4 *)(param_1[1] + 0x38))" identifier (argument_list "(*(undefined4 *)(param_1[1] + 0x38))" ( (pointer_expression "*(undefined4 *)(param_1[1] + 0x38)" * (cast_expression "(undefined4 *)(param_1[1] + 0x38)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[1] + 0x38)" ( (binary_expression "param_1[1] + 0x38" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal) )))) )))) ;) (if_statement "if (iVar1 == 0) {\n    *(undefined4 *)(param_1[1] + 4) = *param_1;\n    *(undefined1 *)((int)param_1 + 10) = 1;\n    return;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    *(undefined4 *)(param_1[1] + 4) = *param_1;\n    *(undefined1 *)((int)param_1 + 10) = 1;\n    return;\n  }" { (expression_statement "*(undefined4 *)(param_1[1] + 4) = *param_1;" (assignment_expression "*(undefined4 *)(param_1[1] + 4) = *param_1" (pointer_expression "*(undefined4 *)(param_1[1] + 4)" * (cast_expression "(undefined4 *)(param_1[1] + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[1] + 4)" ( (binary_expression "param_1[1] + 4" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal) )))) = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "*(undefined1 *)((int)param_1 + 10) = 1;" (assignment_expression "*(undefined1 *)((int)param_1 + 10) = 1" (pointer_expression "*(undefined1 *)((int)param_1 + 10)" * (cast_expression "(undefined1 *)((int)param_1 + 10)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 10)" ( (binary_expression "(int)param_1 + 10" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (for_statement "for (iVar1 = param_1[6]; iVar1 != 0; iVar1 = *(int *)(iVar1 + 0x18)) {\n    while (*(char *)(iVar1 + 10) == '\0') {\n      iVar1 = *(int *)(iVar1 + 0x18);\n      if (iVar1 == 0) goto LAB_00033d0c;\n    }\n    FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10);\n  }" for ( (assignment_expression "iVar1 = param_1[6]" identifier = (subscript_expression "param_1[6]" identifier [ number_literal ])) ; (binary_expression "iVar1 != 0" identifier != number_literal) ; (assignment_expression "iVar1 = *(int *)(iVar1 + 0x18)" identifier = (pointer_expression "*(int *)(iVar1 + 0x18)" * (cast_expression "(int *)(iVar1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) ))))) ) (compound_statement "{\n    while (*(char *)(iVar1 + 10) == '\0') {\n      iVar1 = *(int *)(iVar1 + 0x18);\n      if (iVar1 == 0) goto LAB_00033d0c;\n    }\n    FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10);\n  }" { (while_statement "while (*(char *)(iVar1 + 10) == '\0') {\n      iVar1 = *(int *)(iVar1 + 0x18);\n      if (iVar1 == 0) goto LAB_00033d0c;\n    }" while (parenthesized_expression "(*(char *)(iVar1 + 10) == '\0')" ( (binary_expression "*(char *)(iVar1 + 10) == '\0'" (pointer_expression "*(char *)(iVar1 + 10)" * (cast_expression "(char *)(iVar1 + 10)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 10)" ( (binary_expression "iVar1 + 10" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      iVar1 = *(int *)(iVar1 + 0x18);\n      if (iVar1 == 0) goto LAB_00033d0c;\n    }" { (expression_statement "iVar1 = *(int *)(iVar1 + 0x18);" (assignment_expression "iVar1 = *(int *)(iVar1 + 0x18)" identifier = (pointer_expression "*(int *)(iVar1 + 0x18)" * (cast_expression "(int *)(iVar1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 == 0) goto LAB_00033d0c;" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00033d0c;" goto statement_identifier ;)) })) (expression_statement "FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10);" (call_expression "FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10)" identifier (argument_list "(*(undefined4 *)(iVar1 + 4),iVar1 + 10)" ( (pointer_expression "*(undefined4 *)(iVar1 + 4)" * (cast_expression "(undefined4 *)(iVar1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) , (binary_expression "iVar1 + 10" identifier + number_literal) ))) ;) })) (labeled_statement "LAB_00033d0c:\n  sqlite3_mutex_enter(*(undefined4 *)(param_1[1] + 0x38));" statement_identifier : (expression_statement "sqlite3_mutex_enter(*(undefined4 *)(param_1[1] + 0x38));" (call_expression "sqlite3_mutex_enter(*(undefined4 *)(param_1[1] + 0x38))" identifier (argument_list "(*(undefined4 *)(param_1[1] + 0x38))" ( (pointer_expression "*(undefined4 *)(param_1[1] + 0x38)" * (cast_expression "(undefined4 *)(param_1[1] + 0x38)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[1] + 0x38)" ( (binary_expression "param_1[1] + 0x38" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal) )))) ))) ;)) (expression_statement "*(undefined4 *)(param_1[1] + 4) = *param_1;" (assignment_expression "*(undefined4 *)(param_1[1] + 4) = *param_1" (pointer_expression "*(undefined4 *)(param_1[1] + 4)" * (cast_expression "(undefined4 *)(param_1[1] + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[1] + 4)" ( (binary_expression "param_1[1] + 4" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal) )))) = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "puVar2 = (undefined4 *)param_1[6];" (assignment_expression "puVar2 = (undefined4 *)param_1[6]" identifier = (cast_expression "(undefined4 *)param_1[6]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[6]" identifier [ number_literal ]))) ;) (expression_statement "*(undefined1 *)((int)param_1 + 10) = 1;" (assignment_expression "*(undefined1 *)((int)param_1 + 10) = 1" (pointer_expression "*(undefined1 *)((int)param_1 + 10)" * (cast_expression "(undefined1 *)((int)param_1 + 10)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 10)" ( (binary_expression "(int)param_1 + 10" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (do_statement "do {\n    if (puVar2 == (undefined4 *)0x0) {\n      return;\n    }\n    while (puVar2[3] == 0) {\n      puVar2 = (undefined4 *)puVar2[6];\n      if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }\n    }\n    sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38));\n    *(undefined4 *)(puVar2[1] + 4) = *puVar2;\n    *(undefined1 *)((int)puVar2 + 10) = 1;\n    puVar2 = (undefined4 *)puVar2[6];\n  } while( true );" do (compound_statement "{\n    if (puVar2 == (undefined4 *)0x0) {\n      return;\n    }\n    while (puVar2[3] == 0) {\n      puVar2 = (undefined4 *)puVar2[6];\n      if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }\n    }\n    sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38));\n    *(undefined4 *)(puVar2[1] + 4) = *puVar2;\n    *(undefined1 *)((int)puVar2 + 10) = 1;\n    puVar2 = (undefined4 *)puVar2[6];\n  }" { (if_statement "if (puVar2 == (undefined4 *)0x0) {\n      return;\n    }" if (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" ( (binary_expression "puVar2 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) (while_statement "while (puVar2[3] == 0) {\n      puVar2 = (undefined4 *)puVar2[6];\n      if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }\n    }" while (parenthesized_expression "(puVar2[3] == 0)" ( (binary_expression "puVar2[3] == 0" (subscript_expression "puVar2[3]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n      puVar2 = (undefined4 *)puVar2[6];\n      if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }\n    }" { (expression_statement "puVar2 = (undefined4 *)puVar2[6];" (assignment_expression "puVar2 = (undefined4 *)puVar2[6]" identifier = (cast_expression "(undefined4 *)puVar2[6]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar2[6]" identifier [ number_literal ]))) ;) (if_statement "if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }" if (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" ( (binary_expression "puVar2 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) })) (expression_statement "sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38));" (call_expression "sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38))" identifier (argument_list "(*(undefined4 *)(puVar2[1] + 0x38))" ( (pointer_expression "*(undefined4 *)(puVar2[1] + 0x38)" * (cast_expression "(undefined4 *)(puVar2[1] + 0x38)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2[1] + 0x38)" ( (binary_expression "puVar2[1] + 0x38" (subscript_expression "puVar2[1]" identifier [ number_literal ]) + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(puVar2[1] + 4) = *puVar2;" (assignment_expression "*(undefined4 *)(puVar2[1] + 4) = *puVar2" (pointer_expression "*(undefined4 *)(puVar2[1] + 4)" * (cast_expression "(undefined4 *)(puVar2[1] + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2[1] + 4)" ( (binary_expression "puVar2[1] + 4" (subscript_expression "puVar2[1]" identifier [ number_literal ]) + number_literal) )))) = (pointer_expression "*puVar2" * identifier)) ;) (expression_statement "*(undefined1 *)((int)puVar2 + 10) = 1;" (assignment_expression "*(undefined1 *)((int)puVar2 + 10) = 1" (pointer_expression "*(undefined1 *)((int)puVar2 + 10)" * (cast_expression "(undefined1 *)((int)puVar2 + 10)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar2 + 10)" ( (binary_expression "(int)puVar2 + 10" (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "puVar2 = (undefined4 *)puVar2[6];" (assignment_expression "puVar2 = (undefined4 *)puVar2[6]" identifier = (cast_expression "(undefined4 *)puVar2[6]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar2[6]" identifier [ number_literal ]))) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) = (pointer_expression * IDENT)) ;) (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) )))) = LIT) ;) (return_statement return ;) })) (for_statement for ( (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ) (compound_statement { (while_statement while (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto 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) )))) , (binary_expression IDENT + LIT) ))) ;) })) (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 (subscript_expression IDENT [ LIT ]) + LIT) )))) ))) ;)) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (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) )))) = LIT) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return ;) })) (while_statement while (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return ;) })) })) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) = (pointer_expression * IDENT)) ;) (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) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) }) while (parenthesized_expression ( BOOL )) ;) })))
(function_definition "void FUN_00033c84(undefined4 *param_1)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  \n  iVar1 = sqlite3_mutex_try(*(undefined4 *)(param_1[1] + 0x38));\n  if (iVar1 == 0) {\n    *(undefined4 *)(param_1[1] + 4) = *param_1;\n    *(undefined1 *)((int)param_1 + 10) = 1;\n    return;\n  }\n  for (iVar1 = param_1[6]; iVar1 != 0; iVar1 = *(int *)(iVar1 + 0x18)) {\n    while (*(char *)(iVar1 + 10) == '\0') {\n      iVar1 = *(int *)(iVar1 + 0x18);\n      if (iVar1 == 0) goto LAB_00033d0c;\n    }\n    FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10);\n  }\nLAB_00033d0c:\n  sqlite3_mutex_enter(*(undefined4 *)(param_1[1] + 0x38));\n  *(undefined4 *)(param_1[1] + 4) = *param_1;\n  puVar2 = (undefined4 *)param_1[6];\n  *(undefined1 *)((int)param_1 + 10) = 1;\n  do {\n    if (puVar2 == (undefined4 *)0x0) {\n      return;\n    }\n    while (puVar2[3] == 0) {\n      puVar2 = (undefined4 *)puVar2[6];\n      if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }\n    }\n    sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38));\n    *(undefined4 *)(puVar2[1] + 4) = *puVar2;\n    *(undefined1 *)((int)puVar2 + 10) = 1;\n    puVar2 = (undefined4 *)puVar2[6];\n  } while( true );\n}" (primitive_type "void") (function_declarator "FUN_00033c84(undefined4 *param_1)" (identifier "FUN_00033c84") (parameter_list "(undefined4 *param_1)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  \n  iVar1 = sqlite3_mutex_try(*(undefined4 *)(param_1[1] + 0x38));\n  if (iVar1 == 0) {\n    *(undefined4 *)(param_1[1] + 4) = *param_1;\n    *(undefined1 *)((int)param_1 + 10) = 1;\n    return;\n  }\n  for (iVar1 = param_1[6]; iVar1 != 0; iVar1 = *(int *)(iVar1 + 0x18)) {\n    while (*(char *)(iVar1 + 10) == '\0') {\n      iVar1 = *(int *)(iVar1 + 0x18);\n      if (iVar1 == 0) goto LAB_00033d0c;\n    }\n    FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10);\n  }\nLAB_00033d0c:\n  sqlite3_mutex_enter(*(undefined4 *)(param_1[1] + 0x38));\n  *(undefined4 *)(param_1[1] + 4) = *param_1;\n  puVar2 = (undefined4 *)param_1[6];\n  *(undefined1 *)((int)param_1 + 10) = 1;\n  do {\n    if (puVar2 == (undefined4 *)0x0) {\n      return;\n    }\n    while (puVar2[3] == 0) {\n      puVar2 = (undefined4 *)puVar2[6];\n      if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }\n    }\n    sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38));\n    *(undefined4 *)(puVar2[1] + 4) = *puVar2;\n    *(undefined1 *)((int)puVar2 + 10) = 1;\n    puVar2 = (undefined4 *)puVar2[6];\n  } while( true );\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 *puVar2;" (type_identifier "undefined4") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (expression_statement "iVar1 = sqlite3_mutex_try(*(undefined4 *)(param_1[1] + 0x38));" (assignment_expression "iVar1 = sqlite3_mutex_try(*(undefined4 *)(param_1[1] + 0x38))" (identifier "iVar1") (= "=") (call_expression "sqlite3_mutex_try(*(undefined4 *)(param_1[1] + 0x38))" (identifier "sqlite3_mutex_try") (argument_list "(*(undefined4 *)(param_1[1] + 0x38))" (( "(") (pointer_expression "*(undefined4 *)(param_1[1] + 0x38)" (* "*") (cast_expression "(undefined4 *)(param_1[1] + 0x38)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[1] + 0x38)" (( "(") (binary_expression "param_1[1] + 0x38" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "0x38")) () ")")))) () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n    *(undefined4 *)(param_1[1] + 4) = *param_1;\n    *(undefined1 *)((int)param_1 + 10) = 1;\n    return;\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    *(undefined4 *)(param_1[1] + 4) = *param_1;\n    *(undefined1 *)((int)param_1 + 10) = 1;\n    return;\n  }" ({ "{") (expression_statement "*(undefined4 *)(param_1[1] + 4) = *param_1;" (assignment_expression "*(undefined4 *)(param_1[1] + 4) = *param_1" (pointer_expression "*(undefined4 *)(param_1[1] + 4)" (* "*") (cast_expression "(undefined4 *)(param_1[1] + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[1] + 4)" (( "(") (binary_expression "param_1[1] + 4" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "4")) () ")")))) (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "*(undefined1 *)((int)param_1 + 10) = 1;" (assignment_expression "*(undefined1 *)((int)param_1 + 10) = 1" (pointer_expression "*(undefined1 *)((int)param_1 + 10)" (* "*") (cast_expression "(undefined1 *)((int)param_1 + 10)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + 10)" (( "(") (binary_expression "(int)param_1 + 10" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "10")) () ")")))) (= "=") (number_literal "1")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (for_statement "for (iVar1 = param_1[6]; iVar1 != 0; iVar1 = *(int *)(iVar1 + 0x18)) {\n    while (*(char *)(iVar1 + 10) == '\0') {\n      iVar1 = *(int *)(iVar1 + 0x18);\n      if (iVar1 == 0) goto LAB_00033d0c;\n    }\n    FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10);\n  }" (for "for") (( "(") (assignment_expression "iVar1 = param_1[6]" (identifier "iVar1") (= "=") (subscript_expression "param_1[6]" (identifier "param_1") ([ "[") (number_literal "6") (] "]"))) (; ";") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "iVar1 = *(int *)(iVar1 + 0x18)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(iVar1 + 0x18)" (* "*") (cast_expression "(int *)(iVar1 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x18)" (( "(") (binary_expression "iVar1 + 0x18" (identifier "iVar1") (+ "+") (number_literal "0x18")) () ")"))))) () ")") (compound_statement "{\n    while (*(char *)(iVar1 + 10) == '\0') {\n      iVar1 = *(int *)(iVar1 + 0x18);\n      if (iVar1 == 0) goto LAB_00033d0c;\n    }\n    FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10);\n  }" ({ "{") (while_statement "while (*(char *)(iVar1 + 10) == '\0') {\n      iVar1 = *(int *)(iVar1 + 0x18);\n      if (iVar1 == 0) goto LAB_00033d0c;\n    }" (while "while") (parenthesized_expression "(*(char *)(iVar1 + 10) == '\0')" (( "(") (binary_expression "*(char *)(iVar1 + 10) == '\0'" (pointer_expression "*(char *)(iVar1 + 10)" (* "*") (cast_expression "(char *)(iVar1 + 10)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 10)" (( "(") (binary_expression "iVar1 + 10" (identifier "iVar1") (+ "+") (number_literal "10")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      iVar1 = *(int *)(iVar1 + 0x18);\n      if (iVar1 == 0) goto LAB_00033d0c;\n    }" ({ "{") (expression_statement "iVar1 = *(int *)(iVar1 + 0x18);" (assignment_expression "iVar1 = *(int *)(iVar1 + 0x18)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(iVar1 + 0x18)" (* "*") (cast_expression "(int *)(iVar1 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x18)" (( "(") (binary_expression "iVar1 + 0x18" (identifier "iVar1") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (if_statement "if (iVar1 == 0) goto LAB_00033d0c;" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_00033d0c;" (goto "goto") (statement_identifier "LAB_00033d0c") (; ";"))) (} "}"))) (expression_statement "FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10);" (call_expression "FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10)" (identifier "FUN_00033c44") (argument_list "(*(undefined4 *)(iVar1 + 4),iVar1 + 10)" (( "(") (pointer_expression "*(undefined4 *)(iVar1 + 4)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 4)" (( "(") (binary_expression "iVar1 + 4" (identifier "iVar1") (+ "+") (number_literal "4")) () ")")))) (, ",") (binary_expression "iVar1 + 10" (identifier "iVar1") (+ "+") (number_literal "10")) () ")"))) (; ";")) (} "}"))) (labeled_statement "LAB_00033d0c:\n  sqlite3_mutex_enter(*(undefined4 *)(param_1[1] + 0x38));" (statement_identifier "LAB_00033d0c") (: ":") (expression_statement "sqlite3_mutex_enter(*(undefined4 *)(param_1[1] + 0x38));" (call_expression "sqlite3_mutex_enter(*(undefined4 *)(param_1[1] + 0x38))" (identifier "sqlite3_mutex_enter") (argument_list "(*(undefined4 *)(param_1[1] + 0x38))" (( "(") (pointer_expression "*(undefined4 *)(param_1[1] + 0x38)" (* "*") (cast_expression "(undefined4 *)(param_1[1] + 0x38)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[1] + 0x38)" (( "(") (binary_expression "param_1[1] + 0x38" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "0x38")) () ")")))) () ")"))) (; ";"))) (expression_statement "*(undefined4 *)(param_1[1] + 4) = *param_1;" (assignment_expression "*(undefined4 *)(param_1[1] + 4) = *param_1" (pointer_expression "*(undefined4 *)(param_1[1] + 4)" (* "*") (cast_expression "(undefined4 *)(param_1[1] + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[1] + 4)" (( "(") (binary_expression "param_1[1] + 4" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "4")) () ")")))) (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "puVar2 = (undefined4 *)param_1[6];" (assignment_expression "puVar2 = (undefined4 *)param_1[6]" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)param_1[6]" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[6]" (identifier "param_1") ([ "[") (number_literal "6") (] "]")))) (; ";")) (expression_statement "*(undefined1 *)((int)param_1 + 10) = 1;" (assignment_expression "*(undefined1 *)((int)param_1 + 10) = 1" (pointer_expression "*(undefined1 *)((int)param_1 + 10)" (* "*") (cast_expression "(undefined1 *)((int)param_1 + 10)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + 10)" (( "(") (binary_expression "(int)param_1 + 10" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "10")) () ")")))) (= "=") (number_literal "1")) (; ";")) (do_statement "do {\n    if (puVar2 == (undefined4 *)0x0) {\n      return;\n    }\n    while (puVar2[3] == 0) {\n      puVar2 = (undefined4 *)puVar2[6];\n      if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }\n    }\n    sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38));\n    *(undefined4 *)(puVar2[1] + 4) = *puVar2;\n    *(undefined1 *)((int)puVar2 + 10) = 1;\n    puVar2 = (undefined4 *)puVar2[6];\n  } while( true );" (do "do") (compound_statement "{\n    if (puVar2 == (undefined4 *)0x0) {\n      return;\n    }\n    while (puVar2[3] == 0) {\n      puVar2 = (undefined4 *)puVar2[6];\n      if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }\n    }\n    sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38));\n    *(undefined4 *)(puVar2[1] + 4) = *puVar2;\n    *(undefined1 *)((int)puVar2 + 10) = 1;\n    puVar2 = (undefined4 *)puVar2[6];\n  }" ({ "{") (if_statement "if (puVar2 == (undefined4 *)0x0) {\n      return;\n    }" (if "if") (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" (( "(") (binary_expression "puVar2 == (undefined4 *)0x0" (identifier "puVar2") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      return;\n    }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (while_statement "while (puVar2[3] == 0) {\n      puVar2 = (undefined4 *)puVar2[6];\n      if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }\n    }" (while "while") (parenthesized_expression "(puVar2[3] == 0)" (( "(") (binary_expression "puVar2[3] == 0" (subscript_expression "puVar2[3]" (identifier "puVar2") ([ "[") (number_literal "3") (] "]")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      puVar2 = (undefined4 *)puVar2[6];\n      if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }\n    }" ({ "{") (expression_statement "puVar2 = (undefined4 *)puVar2[6];" (assignment_expression "puVar2 = (undefined4 *)puVar2[6]" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)puVar2[6]" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar2[6]" (identifier "puVar2") ([ "[") (number_literal "6") (] "]")))) (; ";")) (if_statement "if (puVar2 == (undefined4 *)0x0) {\n        return;\n      }" (if "if") (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" (( "(") (binary_expression "puVar2 == (undefined4 *)0x0" (identifier "puVar2") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        return;\n      }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}"))) (expression_statement "sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38));" (call_expression "sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38))" (identifier "sqlite3_mutex_enter") (argument_list "(*(undefined4 *)(puVar2[1] + 0x38))" (( "(") (pointer_expression "*(undefined4 *)(puVar2[1] + 0x38)" (* "*") (cast_expression "(undefined4 *)(puVar2[1] + 0x38)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar2[1] + 0x38)" (( "(") (binary_expression "puVar2[1] + 0x38" (subscript_expression "puVar2[1]" (identifier "puVar2") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "0x38")) () ")")))) () ")"))) (; ";")) (expression_statement "*(undefined4 *)(puVar2[1] + 4) = *puVar2;" (assignment_expression "*(undefined4 *)(puVar2[1] + 4) = *puVar2" (pointer_expression "*(undefined4 *)(puVar2[1] + 4)" (* "*") (cast_expression "(undefined4 *)(puVar2[1] + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar2[1] + 4)" (( "(") (binary_expression "puVar2[1] + 4" (subscript_expression "puVar2[1]" (identifier "puVar2") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "4")) () ")")))) (= "=") (pointer_expression "*puVar2" (* "*") (identifier "puVar2"))) (; ";")) (expression_statement "*(undefined1 *)((int)puVar2 + 10) = 1;" (assignment_expression "*(undefined1 *)((int)puVar2 + 10) = 1" (pointer_expression "*(undefined1 *)((int)puVar2 + 10)" (* "*") (cast_expression "(undefined1 *)((int)puVar2 + 10)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar2 + 10)" (( "(") (binary_expression "(int)puVar2 + 10" (cast_expression "(int)puVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar2")) (+ "+") (number_literal "10")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "puVar2 = (undefined4 *)puVar2[6];" (assignment_expression "puVar2 = (undefined4 *)puVar2[6]" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)puVar2[6]" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar2[6]" (identifier "puVar2") ([ "[") (number_literal "6") (] "]")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (} "}")))

void function_1(type_1 *p)

{
  int var_2;
  type_1 *var_3;
  
  var_2 = var_1(p->pBt->mutex);
  if (var_2 == 0) {
    p->pBt->db = p->db;
    p->locked = '\x01';
    return;
  }
  for (var_3 = p->pNext; var_3 != (type_1 *)0x0; var_3 = var_3->pNext) {
    while (var_3->locked == '\0') {
      var_3 = var_3->pNext;
      if (var_3 == (type_1 *)0x0) goto LAB_00033d0c;
    }
    var_4((type_1 *)var_3->pBt,(type_1 *)&var_3->locked);
  }
LAB_00033d0c:
                    /* WARNING: Subroutine does not return */
  var_5(p->pBt->mutex);
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (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))) (expression_statement (assignment_expression left: (identifier) right: (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: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))))) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (number_literal))) (return_statement))) (for_statement initializer: (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal))) condition: (binary_expression left: (identifier) right: (number_literal)) update: (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)))))) body: (compound_statement (while_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)))) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_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))))) (binary_expression left: (identifier) right: (number_literal))))))) (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: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))))) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) (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: (number_literal))) (do_statement body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (return_statement))) (while_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (return_statement))))) (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: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))))) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal)))))) condition: (parenthesized_expression (true))))))

void MASKED(undefined4 *param_1)

{
  int iVar1;
  undefined4 *puVar2;
  
  iVar1 = sqlite3_mutex_try(*(undefined4 *)(param_1[1] + 0x38));
  if (iVar1 == 0) {
    *(undefined4 *)(param_1[1] + 4) = *param_1;
    *(undefined1 *)((int)param_1 + 10) = 1;
    return;
  }
  for (iVar1 = param_1[6]; iVar1 != 0; iVar1 = *(int *)(iVar1 + 0x18)) {
    while (*(char *)(iVar1 + 10) == '\0') {
      iVar1 = *(int *)(iVar1 + 0x18);
      if (iVar1 == 0) goto LAB_00033d0c;
    }
    FUN_00033c44(*(undefined4 *)(iVar1 + 4),iVar1 + 10);
  }
LAB_00033d0c:
  sqlite3_mutex_enter(*(undefined4 *)(param_1[1] + 0x38));
  *(undefined4 *)(param_1[1] + 4) = *param_1;
  puVar2 = (undefined4 *)param_1[6];
  *(undefined1 *)((int)param_1 + 10) = 1;
  do {
    if (puVar2 == (undefined4 *)0x0) {
      return;
    }
    while (puVar2[3] == 0) {
      puVar2 = (undefined4 *)puVar2[6];
      if (puVar2 == (undefined4 *)0x0) {
        return;
      }
    }
    sqlite3_mutex_enter(*(undefined4 *)(puVar2[1] + 0x38));
    *(undefined4 *)(puVar2[1] + 4) = *puVar2;
    *(undefined1 *)((int)puVar2 + 10) = 1;
    puVar2 = (undefined4 *)puVar2[6];
  } while( true );
}

