
int sqlite3PagerOpenWal(Pager *pPager,int *pbOpen)

{
  int iVar1;
  sqlite3_io_methods *psVar2;
  sqlite3_file *psVar3;
  
  if ((pPager->tempFile != '\0') || (pPager->pWal != (Wal *)0x0)) {
    *pbOpen = 1;
    return 0;
  }
  if (pPager->noLock != '\0') {
    return 0xe;
  }
  if (pPager->exclusiveMode == '\0') {
    psVar2 = pPager->fd->pMethods;
    if (psVar2->iVersion < 2) {
      return 0xe;
    }
    if (psVar2->xShmMap == (_func_int_sqlite3_file_ptr_int_int_int_void_ptr_ptr *)0x0) {
      return 0xe;
    }
  }
  psVar3 = pPager->jfd;
  if (psVar3->pMethods != (sqlite3_io_methods *)0x0) {
    (*psVar3->pMethods->xClose)(psVar3);
    psVar3->pMethods = (sqlite3_io_methods *)0x0;
  }
  iVar1 = pagerOpenWal(pPager);
  if (iVar1 == 0) {
    pPager->eState = '\0';
    pPager->journalMode = '\x05';
  }
  return iVar1;
}



int FUN_0004a900(int param_1,undefined4 *param_2)

{
  int iVar1;
  int *piVar2;
  
  if ((*(char *)(param_1 + 0xc) != '\0') || (*(int *)(param_1 + 0xd8) != 0)) {
    *param_2 = 1;
    return 0;
  }
  if (*(char *)(param_1 + 0xd) != '\0') {
    return 0xe;
  }
  if (*(char *)(param_1 + 4) == '\0') {
    if (*(int *)**(undefined4 **)(param_1 + 0x3c) < 2) {
      return 0xe;
    }
    if (((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0) {
      return 0xe;
    }
  }
  piVar2 = *(int **)(param_1 + 0x40);
  if (*piVar2 != 0) {
    (**(code **)(*piVar2 + 4))(piVar2);
    *piVar2 = 0;
  }
  iVar1 = FUN_0004a6a8(param_1);
  if (iVar1 == 0) {
    *(undefined1 *)(param_1 + 0x10) = 0;
    *(undefined1 *)(param_1 + 5) = 5;
  }
  return iVar1;
}


lui gp,0x12
addiu gp,gp,-0x7350
addu gp,gp,t9
lbu v0,0xc(a0)
bne v0,zero,0x0004a924
_li v1,0x1
lw v0,0xd8(a0)
beq v0,zero,0x0004a930
_nop
or v0,zero,zero
jr ra
_sw v1,0x0(a1)
lbu v0,0xd(a0)
bne v0,zero,0x0004a9e4
_nop
lbu v0,0x4(a0)
bne v0,zero,0x0004a974
_nop
lw v0,0x3c(a0)
lw v1,0x0(v0)
lw v0,0x0(v1)
slti v0,v0,0x2
bne v0,zero,0x0004a9e4
_nop
lw v0,0x34(v1)
bne v0,zero,0x0004a974
_li v0,0xe
jr ra
_nop
jr ra
_li v0,0xe
(translation_unit "int FUN_0004a900(int param_1,undefined4 *param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  \n  if ((*(char *)(param_1 + 0xc) != '\0') || (*(int *)(param_1 + 0xd8) != 0)) {\n    *param_2 = 1;\n    return 0;\n  }\n  if (*(char *)(param_1 + 0xd) != '\0') {\n    return 0xe;\n  }\n  if (*(char *)(param_1 + 4) == '\0') {\n    if (*(int *)**(undefined4 **)(param_1 + 0x3c) < 2) {\n      return 0xe;\n    }\n    if (((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0) {\n      return 0xe;\n    }\n  }\n  piVar2 = *(int **)(param_1 + 0x40);\n  if (*piVar2 != 0) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n    *piVar2 = 0;\n  }\n  iVar1 = FUN_0004a6a8(param_1);\n  if (iVar1 == 0) {\n    *(undefined1 *)(param_1 + 0x10) = 0;\n    *(undefined1 *)(param_1 + 5) = 5;\n  }\n  return iVar1;\n}\n\n" (function_definition "int FUN_0004a900(int param_1,undefined4 *param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  \n  if ((*(char *)(param_1 + 0xc) != '\0') || (*(int *)(param_1 + 0xd8) != 0)) {\n    *param_2 = 1;\n    return 0;\n  }\n  if (*(char *)(param_1 + 0xd) != '\0') {\n    return 0xe;\n  }\n  if (*(char *)(param_1 + 4) == '\0') {\n    if (*(int *)**(undefined4 **)(param_1 + 0x3c) < 2) {\n      return 0xe;\n    }\n    if (((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0) {\n      return 0xe;\n    }\n  }\n  piVar2 = *(int **)(param_1 + 0x40);\n  if (*piVar2 != 0) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n    *piVar2 = 0;\n  }\n  iVar1 = FUN_0004a6a8(param_1);\n  if (iVar1 == 0) {\n    *(undefined1 *)(param_1 + 0x10) = 0;\n    *(undefined1 *)(param_1 + 5) = 5;\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_0004a900(int param_1,undefined4 *param_2)" identifier (parameter_list "(int param_1,undefined4 *param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  \n  if ((*(char *)(param_1 + 0xc) != '\0') || (*(int *)(param_1 + 0xd8) != 0)) {\n    *param_2 = 1;\n    return 0;\n  }\n  if (*(char *)(param_1 + 0xd) != '\0') {\n    return 0xe;\n  }\n  if (*(char *)(param_1 + 4) == '\0') {\n    if (*(int *)**(undefined4 **)(param_1 + 0x3c) < 2) {\n      return 0xe;\n    }\n    if (((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0) {\n      return 0xe;\n    }\n  }\n  piVar2 = *(int **)(param_1 + 0x40);\n  if (*piVar2 != 0) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n    *piVar2 = 0;\n  }\n  iVar1 = FUN_0004a6a8(param_1);\n  if (iVar1 == 0) {\n    *(undefined1 *)(param_1 + 0x10) = 0;\n    *(undefined1 *)(param_1 + 5) = 5;\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (if_statement "if ((*(char *)(param_1 + 0xc) != '\0') || (*(int *)(param_1 + 0xd8) != 0)) {\n    *param_2 = 1;\n    return 0;\n  }" if (parenthesized_expression "((*(char *)(param_1 + 0xc) != '\0') || (*(int *)(param_1 + 0xd8) != 0))" ( (binary_expression "(*(char *)(param_1 + 0xc) != '\0') || (*(int *)(param_1 + 0xd8) != 0)" (parenthesized_expression "(*(char *)(param_1 + 0xc) != '\0')" ( (binary_expression "*(char *)(param_1 + 0xc) != '\0'" (pointer_expression "*(char *)(param_1 + 0xc)" * (cast_expression "(char *)(param_1 + 0xc)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(*(int *)(param_1 + 0xd8) != 0)" ( (binary_expression "*(int *)(param_1 + 0xd8) != 0" (pointer_expression "*(int *)(param_1 + 0xd8)" * (cast_expression "(int *)(param_1 + 0xd8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd8)" ( (binary_expression "param_1 + 0xd8" identifier + number_literal) )))) != number_literal) ))) )) (compound_statement "{\n    *param_2 = 1;\n    return 0;\n  }" { (expression_statement "*param_2 = 1;" (assignment_expression "*param_2 = 1" (pointer_expression "*param_2" * identifier) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if (*(char *)(param_1 + 0xd) != '\0') {\n    return 0xe;\n  }" if (parenthesized_expression "(*(char *)(param_1 + 0xd) != '\0')" ( (binary_expression "*(char *)(param_1 + 0xd) != '\0'" (pointer_expression "*(char *)(param_1 + 0xd)" * (cast_expression "(char *)(param_1 + 0xd)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd)" ( (binary_expression "param_1 + 0xd" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    return 0xe;\n  }" { (return_statement "return 0xe;" return number_literal ;) })) (if_statement "if (*(char *)(param_1 + 4) == '\0') {\n    if (*(int *)**(undefined4 **)(param_1 + 0x3c) < 2) {\n      return 0xe;\n    }\n    if (((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0) {\n      return 0xe;\n    }\n  }" if (parenthesized_expression "(*(char *)(param_1 + 4) == '\0')" ( (binary_expression "*(char *)(param_1 + 4) == '\0'" (pointer_expression "*(char *)(param_1 + 4)" * (cast_expression "(char *)(param_1 + 4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if (*(int *)**(undefined4 **)(param_1 + 0x3c) < 2) {\n      return 0xe;\n    }\n    if (((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0) {\n      return 0xe;\n    }\n  }" { (if_statement "if (*(int *)**(undefined4 **)(param_1 + 0x3c) < 2) {\n      return 0xe;\n    }" if (parenthesized_expression "(*(int *)**(undefined4 **)(param_1 + 0x3c) < 2)" ( (binary_expression "*(int *)**(undefined4 **)(param_1 + 0x3c) < 2" (pointer_expression "*(int *)**(undefined4 **)(param_1 + 0x3c)" * (cast_expression "(int *)**(undefined4 **)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "**(undefined4 **)(param_1 + 0x3c)" * (pointer_expression "*(undefined4 **)(param_1 + 0x3c)" * (cast_expression "(undefined4 **)(param_1 + 0x3c)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) ))))))) < number_literal) )) (compound_statement "{\n      return 0xe;\n    }" { (return_statement "return 0xe;" return number_literal ;) })) (if_statement "if (((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0) {\n      return 0xe;\n    }" if (parenthesized_expression "(((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0)" ( (binary_expression "((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0" (subscript_expression "((int *)**(undefined4 **)(param_1 + 0x3c))[0xd]" (parenthesized_expression "((int *)**(undefined4 **)(param_1 + 0x3c))" ( (cast_expression "(int *)**(undefined4 **)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "**(undefined4 **)(param_1 + 0x3c)" * (pointer_expression "*(undefined4 **)(param_1 + 0x3c)" * (cast_expression "(undefined4 **)(param_1 + 0x3c)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))))) )) [ number_literal ]) == number_literal) )) (compound_statement "{\n      return 0xe;\n    }" { (return_statement "return 0xe;" return number_literal ;) })) })) (expression_statement "piVar2 = *(int **)(param_1 + 0x40);" (assignment_expression "piVar2 = *(int **)(param_1 + 0x40)" identifier = (pointer_expression "*(int **)(param_1 + 0x40)" * (cast_expression "(int **)(param_1 + 0x40)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) ))))) ;) (if_statement "if (*piVar2 != 0) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n    *piVar2 = 0;\n  }" if (parenthesized_expression "(*piVar2 != 0)" ( (binary_expression "*piVar2 != 0" (pointer_expression "*piVar2" * identifier) != number_literal) )) (compound_statement "{\n    (**(code **)(*piVar2 + 4))(piVar2);\n    *piVar2 = 0;\n  }" { (expression_statement "(**(code **)(*piVar2 + 4))(piVar2);" (call_expression "(**(code **)(*piVar2 + 4))(piVar2)" (parenthesized_expression "(**(code **)(*piVar2 + 4))" ( (pointer_expression "**(code **)(*piVar2 + 4)" * (pointer_expression "*(code **)(*piVar2 + 4)" * (cast_expression "(code **)(*piVar2 + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar2 + 4)" ( (binary_expression "*piVar2 + 4" (pointer_expression "*piVar2" * identifier) + number_literal) ))))) )) (argument_list "(piVar2)" ( identifier ))) ;) (expression_statement "*piVar2 = 0;" (assignment_expression "*piVar2 = 0" (pointer_expression "*piVar2" * identifier) = number_literal) ;) })) (expression_statement "iVar1 = FUN_0004a6a8(param_1);" (assignment_expression "iVar1 = FUN_0004a6a8(param_1)" identifier = (call_expression "FUN_0004a6a8(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    *(undefined1 *)(param_1 + 0x10) = 0;\n    *(undefined1 *)(param_1 + 5) = 5;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    *(undefined1 *)(param_1 + 0x10) = 0;\n    *(undefined1 *)(param_1 + 5) = 5;\n  }" { (expression_statement "*(undefined1 *)(param_1 + 0x10) = 0;" (assignment_expression "*(undefined1 *)(param_1 + 0x10) = 0" (pointer_expression "*(undefined1 *)(param_1 + 0x10)" * (cast_expression "(undefined1 *)(param_1 + 0x10)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined1 *)(param_1 + 5) = 5;" (assignment_expression "*(undefined1 *)(param_1 + 5) = 5" (pointer_expression "*(undefined1 *)(param_1 + 5)" * (cast_expression "(undefined1 *)(param_1 + 5)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 5)" ( (binary_expression "param_1 + 5" identifier + number_literal) )))) = number_literal) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int sqlite3PagerOpenWal(Pager *pPager,int *pbOpen)\n\n{\n  int iVar1;\n  sqlite3_io_methods *psVar2;\n  sqlite3_file *psVar3;\n  \n  if ((pPager->tempFile != '\0') || (pPager->pWal != (Wal *)0x0)) {\n    *pbOpen = 1;\n    return 0;\n  }\n  if (pPager->noLock != '\0') {\n    return 0xe;\n  }\n  if (pPager->exclusiveMode == '\0') {\n    psVar2 = pPager->fd->pMethods;\n    if (psVar2->iVersion < 2) {\n      return 0xe;\n    }\n    if (psVar2->xShmMap == (_func_int_sqlite3_file_ptr_int_int_int_void_ptr_ptr *)0x0) {\n      return 0xe;\n    }\n  }\n  psVar3 = pPager->jfd;\n  if (psVar3->pMethods != (sqlite3_io_methods *)0x0) {\n    (*psVar3->pMethods->xClose)(psVar3);\n    psVar3->pMethods = (sqlite3_io_methods *)0x0;\n  }\n  iVar1 = pagerOpenWal(pPager);\n  if (iVar1 == 0) {\n    pPager->eState = '\0';\n    pPager->journalMode = '\x05';\n  }\n  return iVar1;\n}\n\n" (function_definition "int sqlite3PagerOpenWal(Pager *pPager,int *pbOpen)\n\n{\n  int iVar1;\n  sqlite3_io_methods *psVar2;\n  sqlite3_file *psVar3;\n  \n  if ((pPager->tempFile != '\0') || (pPager->pWal != (Wal *)0x0)) {\n    *pbOpen = 1;\n    return 0;\n  }\n  if (pPager->noLock != '\0') {\n    return 0xe;\n  }\n  if (pPager->exclusiveMode == '\0') {\n    psVar2 = pPager->fd->pMethods;\n    if (psVar2->iVersion < 2) {\n      return 0xe;\n    }\n    if (psVar2->xShmMap == (_func_int_sqlite3_file_ptr_int_int_int_void_ptr_ptr *)0x0) {\n      return 0xe;\n    }\n  }\n  psVar3 = pPager->jfd;\n  if (psVar3->pMethods != (sqlite3_io_methods *)0x0) {\n    (*psVar3->pMethods->xClose)(psVar3);\n    psVar3->pMethods = (sqlite3_io_methods *)0x0;\n  }\n  iVar1 = pagerOpenWal(pPager);\n  if (iVar1 == 0) {\n    pPager->eState = '\0';\n    pPager->journalMode = '\x05';\n  }\n  return iVar1;\n}" primitive_type (function_declarator "sqlite3PagerOpenWal(Pager *pPager,int *pbOpen)" identifier (parameter_list "(Pager *pPager,int *pbOpen)" ( (parameter_declaration "Pager *pPager" type_identifier (pointer_declarator "*pPager" * identifier)) , (parameter_declaration "int *pbOpen" primitive_type (pointer_declarator "*pbOpen" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  sqlite3_io_methods *psVar2;\n  sqlite3_file *psVar3;\n  \n  if ((pPager->tempFile != '\0') || (pPager->pWal != (Wal *)0x0)) {\n    *pbOpen = 1;\n    return 0;\n  }\n  if (pPager->noLock != '\0') {\n    return 0xe;\n  }\n  if (pPager->exclusiveMode == '\0') {\n    psVar2 = pPager->fd->pMethods;\n    if (psVar2->iVersion < 2) {\n      return 0xe;\n    }\n    if (psVar2->xShmMap == (_func_int_sqlite3_file_ptr_int_int_int_void_ptr_ptr *)0x0) {\n      return 0xe;\n    }\n  }\n  psVar3 = pPager->jfd;\n  if (psVar3->pMethods != (sqlite3_io_methods *)0x0) {\n    (*psVar3->pMethods->xClose)(psVar3);\n    psVar3->pMethods = (sqlite3_io_methods *)0x0;\n  }\n  iVar1 = pagerOpenWal(pPager);\n  if (iVar1 == 0) {\n    pPager->eState = '\0';\n    pPager->journalMode = '\x05';\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "sqlite3_io_methods *psVar2;" type_identifier (pointer_declarator "*psVar2" * identifier) ;) (declaration "sqlite3_file *psVar3;" type_identifier (pointer_declarator "*psVar3" * identifier) ;) (if_statement "if ((pPager->tempFile != '\0') || (pPager->pWal != (Wal *)0x0)) {\n    *pbOpen = 1;\n    return 0;\n  }" if (parenthesized_expression "((pPager->tempFile != '\0') || (pPager->pWal != (Wal *)0x0))" ( (binary_expression "(pPager->tempFile != '\0') || (pPager->pWal != (Wal *)0x0)" (parenthesized_expression "(pPager->tempFile != '\0')" ( (binary_expression "pPager->tempFile != '\0'" (field_expression "pPager->tempFile" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(pPager->pWal != (Wal *)0x0)" ( (binary_expression "pPager->pWal != (Wal *)0x0" (field_expression "pPager->pWal" identifier -> field_identifier) != (cast_expression "(Wal *)0x0" ( (type_descriptor "Wal *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n    *pbOpen = 1;\n    return 0;\n  }" { (expression_statement "*pbOpen = 1;" (assignment_expression "*pbOpen = 1" (pointer_expression "*pbOpen" * identifier) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if (pPager->noLock != '\0') {\n    return 0xe;\n  }" if (parenthesized_expression "(pPager->noLock != '\0')" ( (binary_expression "pPager->noLock != '\0'" (field_expression "pPager->noLock" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    return 0xe;\n  }" { (return_statement "return 0xe;" return number_literal ;) })) (if_statement "if (pPager->exclusiveMode == '\0') {\n    psVar2 = pPager->fd->pMethods;\n    if (psVar2->iVersion < 2) {\n      return 0xe;\n    }\n    if (psVar2->xShmMap == (_func_int_sqlite3_file_ptr_int_int_int_void_ptr_ptr *)0x0) {\n      return 0xe;\n    }\n  }" if (parenthesized_expression "(pPager->exclusiveMode == '\0')" ( (binary_expression "pPager->exclusiveMode == '\0'" (field_expression "pPager->exclusiveMode" identifier -> field_identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    psVar2 = pPager->fd->pMethods;\n    if (psVar2->iVersion < 2) {\n      return 0xe;\n    }\n    if (psVar2->xShmMap == (_func_int_sqlite3_file_ptr_int_int_int_void_ptr_ptr *)0x0) {\n      return 0xe;\n    }\n  }" { (expression_statement "psVar2 = pPager->fd->pMethods;" (assignment_expression "psVar2 = pPager->fd->pMethods" identifier = (field_expression "pPager->fd->pMethods" (field_expression "pPager->fd" identifier -> field_identifier) -> field_identifier)) ;) (if_statement "if (psVar2->iVersion < 2) {\n      return 0xe;\n    }" if (parenthesized_expression "(psVar2->iVersion < 2)" ( (binary_expression "psVar2->iVersion < 2" (field_expression "psVar2->iVersion" identifier -> field_identifier) < number_literal) )) (compound_statement "{\n      return 0xe;\n    }" { (return_statement "return 0xe;" return number_literal ;) })) (if_statement "if (psVar2->xShmMap == (_func_int_sqlite3_file_ptr_int_int_int_void_ptr_ptr *)0x0) {\n      return 0xe;\n    }" if (parenthesized_expression "(psVar2->xShmMap == (_func_int_sqlite3_file_ptr_int_int_int_void_ptr_ptr *)0x0)" ( (binary_expression "psVar2->xShmMap == (_func_int_sqlite3_file_ptr_int_int_int_void_ptr_ptr *)0x0" (field_expression "psVar2->xShmMap" identifier -> field_identifier) == (cast_expression "(_func_int_sqlite3_file_ptr_int_int_int_void_ptr_ptr *)0x0" ( (type_descriptor "_func_int_sqlite3_file_ptr_int_int_int_void_ptr_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 0xe;\n    }" { (return_statement "return 0xe;" return number_literal ;) })) })) (expression_statement "psVar3 = pPager->jfd;" (assignment_expression "psVar3 = pPager->jfd" identifier = (field_expression "pPager->jfd" identifier -> field_identifier)) ;) (if_statement "if (psVar3->pMethods != (sqlite3_io_methods *)0x0) {\n    (*psVar3->pMethods->xClose)(psVar3);\n    psVar3->pMethods = (sqlite3_io_methods *)0x0;\n  }" if (parenthesized_expression "(psVar3->pMethods != (sqlite3_io_methods *)0x0)" ( (binary_expression "psVar3->pMethods != (sqlite3_io_methods *)0x0" (field_expression "psVar3->pMethods" identifier -> field_identifier) != (cast_expression "(sqlite3_io_methods *)0x0" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    (*psVar3->pMethods->xClose)(psVar3);\n    psVar3->pMethods = (sqlite3_io_methods *)0x0;\n  }" { (expression_statement "(*psVar3->pMethods->xClose)(psVar3);" (call_expression "(*psVar3->pMethods->xClose)(psVar3)" (parenthesized_expression "(*psVar3->pMethods->xClose)" ( (pointer_expression "*psVar3->pMethods->xClose" * (field_expression "psVar3->pMethods->xClose" (field_expression "psVar3->pMethods" identifier -> field_identifier) -> field_identifier)) )) (argument_list "(psVar3)" ( identifier ))) ;) (expression_statement "psVar3->pMethods = (sqlite3_io_methods *)0x0;" (assignment_expression "psVar3->pMethods = (sqlite3_io_methods *)0x0" (field_expression "psVar3->pMethods" identifier -> field_identifier) = (cast_expression "(sqlite3_io_methods *)0x0" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })) (expression_statement "iVar1 = pagerOpenWal(pPager);" (assignment_expression "iVar1 = pagerOpenWal(pPager)" identifier = (call_expression "pagerOpenWal(pPager)" identifier (argument_list "(pPager)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    pPager->eState = '\0';\n    pPager->journalMode = '\x05';\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    pPager->eState = '\0';\n    pPager->journalMode = '\x05';\n  }" { (expression_statement "pPager->eState = '\0';" (assignment_expression "pPager->eState = '\0'" (field_expression "pPager->eState" identifier -> field_identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "pPager->journalMode = '\x05';" (assignment_expression "pPager->journalMode = '\x05'" (field_expression "pPager->journalMode" identifier -> field_identifier) = (char_literal "'\x05'" ' escape_sequence ')) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int FUN_0004a900(int param_1,undefined4 *param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  \n  if ((*(char *)(param_1 + 0xc) != '\0') || (*(int *)(param_1 + 0xd8) != 0)) {\n    *param_2 = 1;\n    return 0;\n  }\n  if (*(char *)(param_1 + 0xd) != '\0') {\n    return 0xe;\n  }\n  if (*(char *)(param_1 + 4) == '\0') {\n    if (*(int *)**(undefined4 **)(param_1 + 0x3c) < 2) {\n      return 0xe;\n    }\n    if (((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0) {\n      return 0xe;\n    }\n  }\n  piVar2 = *(int **)(param_1 + 0x40);\n  if (*piVar2 != 0) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n    *piVar2 = 0;\n  }\n  iVar1 = FUN_0004a6a8(param_1);\n  if (iVar1 == 0) {\n    *(undefined1 *)(param_1 + 0x10) = 0;\n    *(undefined1 *)(param_1 + 5) = 5;\n  }\n  return iVar1;\n}\n\n" (function_definition "int FUN_0004a900(int param_1,undefined4 *param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  \n  if ((*(char *)(param_1 + 0xc) != '\0') || (*(int *)(param_1 + 0xd8) != 0)) {\n    *param_2 = 1;\n    return 0;\n  }\n  if (*(char *)(param_1 + 0xd) != '\0') {\n    return 0xe;\n  }\n  if (*(char *)(param_1 + 4) == '\0') {\n    if (*(int *)**(undefined4 **)(param_1 + 0x3c) < 2) {\n      return 0xe;\n    }\n    if (((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0) {\n      return 0xe;\n    }\n  }\n  piVar2 = *(int **)(param_1 + 0x40);\n  if (*piVar2 != 0) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n    *piVar2 = 0;\n  }\n  iVar1 = FUN_0004a6a8(param_1);\n  if (iVar1 == 0) {\n    *(undefined1 *)(param_1 + 0x10) = 0;\n    *(undefined1 *)(param_1 + 5) = 5;\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_0004a900(int param_1,undefined4 *param_2)" identifier (parameter_list "(int param_1,undefined4 *param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  \n  if ((*(char *)(param_1 + 0xc) != '\0') || (*(int *)(param_1 + 0xd8) != 0)) {\n    *param_2 = 1;\n    return 0;\n  }\n  if (*(char *)(param_1 + 0xd) != '\0') {\n    return 0xe;\n  }\n  if (*(char *)(param_1 + 4) == '\0') {\n    if (*(int *)**(undefined4 **)(param_1 + 0x3c) < 2) {\n      return 0xe;\n    }\n    if (((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0) {\n      return 0xe;\n    }\n  }\n  piVar2 = *(int **)(param_1 + 0x40);\n  if (*piVar2 != 0) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n    *piVar2 = 0;\n  }\n  iVar1 = FUN_0004a6a8(param_1);\n  if (iVar1 == 0) {\n    *(undefined1 *)(param_1 + 0x10) = 0;\n    *(undefined1 *)(param_1 + 5) = 5;\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (if_statement "if ((*(char *)(param_1 + 0xc) != '\0') || (*(int *)(param_1 + 0xd8) != 0)) {\n    *param_2 = 1;\n    return 0;\n  }" if (parenthesized_expression "((*(char *)(param_1 + 0xc) != '\0') || (*(int *)(param_1 + 0xd8) != 0))" ( (binary_expression "(*(char *)(param_1 + 0xc) != '\0') || (*(int *)(param_1 + 0xd8) != 0)" (parenthesized_expression "(*(char *)(param_1 + 0xc) != '\0')" ( (binary_expression "*(char *)(param_1 + 0xc) != '\0'" (pointer_expression "*(char *)(param_1 + 0xc)" * (cast_expression "(char *)(param_1 + 0xc)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(*(int *)(param_1 + 0xd8) != 0)" ( (binary_expression "*(int *)(param_1 + 0xd8) != 0" (pointer_expression "*(int *)(param_1 + 0xd8)" * (cast_expression "(int *)(param_1 + 0xd8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd8)" ( (binary_expression "param_1 + 0xd8" identifier + number_literal) )))) != number_literal) ))) )) (compound_statement "{\n    *param_2 = 1;\n    return 0;\n  }" { (expression_statement "*param_2 = 1;" (assignment_expression "*param_2 = 1" (pointer_expression "*param_2" * identifier) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if (*(char *)(param_1 + 0xd) != '\0') {\n    return 0xe;\n  }" if (parenthesized_expression "(*(char *)(param_1 + 0xd) != '\0')" ( (binary_expression "*(char *)(param_1 + 0xd) != '\0'" (pointer_expression "*(char *)(param_1 + 0xd)" * (cast_expression "(char *)(param_1 + 0xd)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd)" ( (binary_expression "param_1 + 0xd" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    return 0xe;\n  }" { (return_statement "return 0xe;" return number_literal ;) })) (if_statement "if (*(char *)(param_1 + 4) == '\0') {\n    if (*(int *)**(undefined4 **)(param_1 + 0x3c) < 2) {\n      return 0xe;\n    }\n    if (((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0) {\n      return 0xe;\n    }\n  }" if (parenthesized_expression "(*(char *)(param_1 + 4) == '\0')" ( (binary_expression "*(char *)(param_1 + 4) == '\0'" (pointer_expression "*(char *)(param_1 + 4)" * (cast_expression "(char *)(param_1 + 4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if (*(int *)**(undefined4 **)(param_1 + 0x3c) < 2) {\n      return 0xe;\n    }\n    if (((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0) {\n      return 0xe;\n    }\n  }" { (if_statement "if (*(int *)**(undefined4 **)(param_1 + 0x3c) < 2) {\n      return 0xe;\n    }" if (parenthesized_expression "(*(int *)**(undefined4 **)(param_1 + 0x3c) < 2)" ( (binary_expression "*(int *)**(undefined4 **)(param_1 + 0x3c) < 2" (pointer_expression "*(int *)**(undefined4 **)(param_1 + 0x3c)" * (cast_expression "(int *)**(undefined4 **)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "**(undefined4 **)(param_1 + 0x3c)" * (pointer_expression "*(undefined4 **)(param_1 + 0x3c)" * (cast_expression "(undefined4 **)(param_1 + 0x3c)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) ))))))) < number_literal) )) (compound_statement "{\n      return 0xe;\n    }" { (return_statement "return 0xe;" return number_literal ;) })) (if_statement "if (((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0) {\n      return 0xe;\n    }" if (parenthesized_expression "(((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0)" ( (binary_expression "((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0" (subscript_expression "((int *)**(undefined4 **)(param_1 + 0x3c))[0xd]" (parenthesized_expression "((int *)**(undefined4 **)(param_1 + 0x3c))" ( (cast_expression "(int *)**(undefined4 **)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "**(undefined4 **)(param_1 + 0x3c)" * (pointer_expression "*(undefined4 **)(param_1 + 0x3c)" * (cast_expression "(undefined4 **)(param_1 + 0x3c)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))))) )) [ number_literal ]) == number_literal) )) (compound_statement "{\n      return 0xe;\n    }" { (return_statement "return 0xe;" return number_literal ;) })) })) (expression_statement "piVar2 = *(int **)(param_1 + 0x40);" (assignment_expression "piVar2 = *(int **)(param_1 + 0x40)" identifier = (pointer_expression "*(int **)(param_1 + 0x40)" * (cast_expression "(int **)(param_1 + 0x40)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) ))))) ;) (if_statement "if (*piVar2 != 0) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n    *piVar2 = 0;\n  }" if (parenthesized_expression "(*piVar2 != 0)" ( (binary_expression "*piVar2 != 0" (pointer_expression "*piVar2" * identifier) != number_literal) )) (compound_statement "{\n    (**(code **)(*piVar2 + 4))(piVar2);\n    *piVar2 = 0;\n  }" { (expression_statement "(**(code **)(*piVar2 + 4))(piVar2);" (call_expression "(**(code **)(*piVar2 + 4))(piVar2)" (parenthesized_expression "(**(code **)(*piVar2 + 4))" ( (pointer_expression "**(code **)(*piVar2 + 4)" * (pointer_expression "*(code **)(*piVar2 + 4)" * (cast_expression "(code **)(*piVar2 + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar2 + 4)" ( (binary_expression "*piVar2 + 4" (pointer_expression "*piVar2" * identifier) + number_literal) ))))) )) (argument_list "(piVar2)" ( identifier ))) ;) (expression_statement "*piVar2 = 0;" (assignment_expression "*piVar2 = 0" (pointer_expression "*piVar2" * identifier) = number_literal) ;) })) (expression_statement "iVar1 = FUN_0004a6a8(param_1);" (assignment_expression "iVar1 = FUN_0004a6a8(param_1)" identifier = (call_expression "FUN_0004a6a8(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    *(undefined1 *)(param_1 + 0x10) = 0;\n    *(undefined1 *)(param_1 + 5) = 5;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    *(undefined1 *)(param_1 + 0x10) = 0;\n    *(undefined1 *)(param_1 + 5) = 5;\n  }" { (expression_statement "*(undefined1 *)(param_1 + 0x10) = 0;" (assignment_expression "*(undefined1 *)(param_1 + 0x10) = 0" (pointer_expression "*(undefined1 *)(param_1 + 0x10)" * (cast_expression "(undefined1 *)(param_1 + 0x10)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined1 *)(param_1 + 5) = 5;" (assignment_expression "*(undefined1 *)(param_1 + 5) = 5" (pointer_expression "*(undefined1 *)(param_1 + 5)" * (cast_expression "(undefined1 *)(param_1 + 5)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 5)" ( (binary_expression "param_1 + 5" identifier + number_literal) )))) = number_literal) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) || (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))))) < LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression (parenthesized_expression ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) )) [ LIT ]) == LIT) )) (compound_statement { (return_statement return LIT ;) })) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_0004a900(int param_1,undefined4 *param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  \n  if ((*(char *)(param_1 + 0xc) != '\0') || (*(int *)(param_1 + 0xd8) != 0)) {\n    *param_2 = 1;\n    return 0;\n  }\n  if (*(char *)(param_1 + 0xd) != '\0') {\n    return 0xe;\n  }\n  if (*(char *)(param_1 + 4) == '\0') {\n    if (*(int *)**(undefined4 **)(param_1 + 0x3c) < 2) {\n      return 0xe;\n    }\n    if (((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0) {\n      return 0xe;\n    }\n  }\n  piVar2 = *(int **)(param_1 + 0x40);\n  if (*piVar2 != 0) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n    *piVar2 = 0;\n  }\n  iVar1 = FUN_0004a6a8(param_1);\n  if (iVar1 == 0) {\n    *(undefined1 *)(param_1 + 0x10) = 0;\n    *(undefined1 *)(param_1 + 5) = 5;\n  }\n  return iVar1;\n}" (primitive_type "int") (function_declarator "FUN_0004a900(int param_1,undefined4 *param_2)" (identifier "FUN_0004a900") (parameter_list "(int param_1,undefined4 *param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  \n  if ((*(char *)(param_1 + 0xc) != '\0') || (*(int *)(param_1 + 0xd8) != 0)) {\n    *param_2 = 1;\n    return 0;\n  }\n  if (*(char *)(param_1 + 0xd) != '\0') {\n    return 0xe;\n  }\n  if (*(char *)(param_1 + 4) == '\0') {\n    if (*(int *)**(undefined4 **)(param_1 + 0x3c) < 2) {\n      return 0xe;\n    }\n    if (((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0) {\n      return 0xe;\n    }\n  }\n  piVar2 = *(int **)(param_1 + 0x40);\n  if (*piVar2 != 0) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n    *piVar2 = 0;\n  }\n  iVar1 = FUN_0004a6a8(param_1);\n  if (iVar1 == 0) {\n    *(undefined1 *)(param_1 + 0x10) = 0;\n    *(undefined1 *)(param_1 + 5) = 5;\n  }\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (if_statement "if ((*(char *)(param_1 + 0xc) != '\0') || (*(int *)(param_1 + 0xd8) != 0)) {\n    *param_2 = 1;\n    return 0;\n  }" (if "if") (parenthesized_expression "((*(char *)(param_1 + 0xc) != '\0') || (*(int *)(param_1 + 0xd8) != 0))" (( "(") (binary_expression "(*(char *)(param_1 + 0xc) != '\0') || (*(int *)(param_1 + 0xd8) != 0)" (parenthesized_expression "(*(char *)(param_1 + 0xc) != '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0xc) != '\0'" (pointer_expression "*(char *)(param_1 + 0xc)" (* "*") (cast_expression "(char *)(param_1 + 0xc)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (|| "||") (parenthesized_expression "(*(int *)(param_1 + 0xd8) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0xd8) != 0" (pointer_expression "*(int *)(param_1 + 0xd8)" (* "*") (cast_expression "(int *)(param_1 + 0xd8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xd8)" (( "(") (binary_expression "param_1 + 0xd8" (identifier "param_1") (+ "+") (number_literal "0xd8")) () ")")))) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    *param_2 = 1;\n    return 0;\n  }" ({ "{") (expression_statement "*param_2 = 1;" (assignment_expression "*param_2 = 1" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (number_literal "1")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (*(char *)(param_1 + 0xd) != '\0') {\n    return 0xe;\n  }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 0xd) != '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0xd) != '\0'" (pointer_expression "*(char *)(param_1 + 0xd)" (* "*") (cast_expression "(char *)(param_1 + 0xd)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xd)" (( "(") (binary_expression "param_1 + 0xd" (identifier "param_1") (+ "+") (number_literal "0xd")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    return 0xe;\n  }" ({ "{") (return_statement "return 0xe;" (return "return") (number_literal "0xe") (; ";")) (} "}"))) (if_statement "if (*(char *)(param_1 + 4) == '\0') {\n    if (*(int *)**(undefined4 **)(param_1 + 0x3c) < 2) {\n      return 0xe;\n    }\n    if (((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0) {\n      return 0xe;\n    }\n  }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 4) == '\0')" (( "(") (binary_expression "*(char *)(param_1 + 4) == '\0'" (pointer_expression "*(char *)(param_1 + 4)" (* "*") (cast_expression "(char *)(param_1 + 4)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    if (*(int *)**(undefined4 **)(param_1 + 0x3c) < 2) {\n      return 0xe;\n    }\n    if (((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0) {\n      return 0xe;\n    }\n  }" ({ "{") (if_statement "if (*(int *)**(undefined4 **)(param_1 + 0x3c) < 2) {\n      return 0xe;\n    }" (if "if") (parenthesized_expression "(*(int *)**(undefined4 **)(param_1 + 0x3c) < 2)" (( "(") (binary_expression "*(int *)**(undefined4 **)(param_1 + 0x3c) < 2" (pointer_expression "*(int *)**(undefined4 **)(param_1 + 0x3c)" (* "*") (cast_expression "(int *)**(undefined4 **)(param_1 + 0x3c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "**(undefined4 **)(param_1 + 0x3c)" (* "*") (pointer_expression "*(undefined4 **)(param_1 + 0x3c)" (* "*") (cast_expression "(undefined4 **)(param_1 + 0x3c)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")"))))))) (< "<") (number_literal "2")) () ")")) (compound_statement "{\n      return 0xe;\n    }" ({ "{") (return_statement "return 0xe;" (return "return") (number_literal "0xe") (; ";")) (} "}"))) (if_statement "if (((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0) {\n      return 0xe;\n    }" (if "if") (parenthesized_expression "(((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0)" (( "(") (binary_expression "((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0" (subscript_expression "((int *)**(undefined4 **)(param_1 + 0x3c))[0xd]" (parenthesized_expression "((int *)**(undefined4 **)(param_1 + 0x3c))" (( "(") (cast_expression "(int *)**(undefined4 **)(param_1 + 0x3c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "**(undefined4 **)(param_1 + 0x3c)" (* "*") (pointer_expression "*(undefined4 **)(param_1 + 0x3c)" (* "*") (cast_expression "(undefined4 **)(param_1 + 0x3c)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")")))))) () ")")) ([ "[") (number_literal "0xd") (] "]")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return 0xe;\n    }" ({ "{") (return_statement "return 0xe;" (return "return") (number_literal "0xe") (; ";")) (} "}"))) (} "}"))) (expression_statement "piVar2 = *(int **)(param_1 + 0x40);" (assignment_expression "piVar2 = *(int **)(param_1 + 0x40)" (identifier "piVar2") (= "=") (pointer_expression "*(int **)(param_1 + 0x40)" (* "*") (cast_expression "(int **)(param_1 + 0x40)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x40)" (( "(") (binary_expression "param_1 + 0x40" (identifier "param_1") (+ "+") (number_literal "0x40")) () ")"))))) (; ";")) (if_statement "if (*piVar2 != 0) {\n    (**(code **)(*piVar2 + 4))(piVar2);\n    *piVar2 = 0;\n  }" (if "if") (parenthesized_expression "(*piVar2 != 0)" (( "(") (binary_expression "*piVar2 != 0" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    (**(code **)(*piVar2 + 4))(piVar2);\n    *piVar2 = 0;\n  }" ({ "{") (expression_statement "(**(code **)(*piVar2 + 4))(piVar2);" (call_expression "(**(code **)(*piVar2 + 4))(piVar2)" (parenthesized_expression "(**(code **)(*piVar2 + 4))" (( "(") (pointer_expression "**(code **)(*piVar2 + 4)" (* "*") (pointer_expression "*(code **)(*piVar2 + 4)" (* "*") (cast_expression "(code **)(*piVar2 + 4)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar2 + 4)" (( "(") (binary_expression "*piVar2 + 4" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (+ "+") (number_literal "4")) () ")"))))) () ")")) (argument_list "(piVar2)" (( "(") (identifier "piVar2") () ")"))) (; ";")) (expression_statement "*piVar2 = 0;" (assignment_expression "*piVar2 = 0" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "iVar1 = FUN_0004a6a8(param_1);" (assignment_expression "iVar1 = FUN_0004a6a8(param_1)" (identifier "iVar1") (= "=") (call_expression "FUN_0004a6a8(param_1)" (identifier "FUN_0004a6a8") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n    *(undefined1 *)(param_1 + 0x10) = 0;\n    *(undefined1 *)(param_1 + 5) = 5;\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    *(undefined1 *)(param_1 + 0x10) = 0;\n    *(undefined1 *)(param_1 + 5) = 5;\n  }" ({ "{") (expression_statement "*(undefined1 *)(param_1 + 0x10) = 0;" (assignment_expression "*(undefined1 *)(param_1 + 0x10) = 0" (pointer_expression "*(undefined1 *)(param_1 + 0x10)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0x10)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined1 *)(param_1 + 5) = 5;" (assignment_expression "*(undefined1 *)(param_1 + 5) = 5" (pointer_expression "*(undefined1 *)(param_1 + 5)" (* "*") (cast_expression "(undefined1 *)(param_1 + 5)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 5)" (( "(") (binary_expression "param_1 + 5" (identifier "param_1") (+ "+") (number_literal "5")) () ")")))) (= "=") (number_literal "5")) (; ";")) (} "}"))) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (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)))) 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 (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (return_statement (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (char_literal (escape_sequence)))) consequence: (compound_statement (return_statement (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (char_literal (escape_sequence)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (parenthesized_expression (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))))) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))))) (return_statement (identifier)))))

int MASKED(int param_1,undefined4 *param_2)

{
  int iVar1;
  int *piVar2;
  
  if ((*(char *)(param_1 + 0xc) != '\0') || (*(int *)(param_1 + 0xd8) != 0)) {
    *param_2 = 1;
    return 0;
  }
  if (*(char *)(param_1 + 0xd) != '\0') {
    return 0xe;
  }
  if (*(char *)(param_1 + 4) == '\0') {
    if (*(int *)**(undefined4 **)(param_1 + 0x3c) < 2) {
      return 0xe;
    }
    if (((int *)**(undefined4 **)(param_1 + 0x3c))[0xd] == 0) {
      return 0xe;
    }
  }
  piVar2 = *(int **)(param_1 + 0x40);
  if (*piVar2 != 0) {
    (**(code **)(*piVar2 + 4))(piVar2);
    *piVar2 = 0;
  }
  iVar1 = FUN_0004a6a8(param_1);
  if (iVar1 == 0) {
    *(undefined1 *)(param_1 + 0x10) = 0;
    *(undefined1 *)(param_1 + 5) = 5;
  }
  return iVar1;
}

