
int sqlite3PagerOpenWal(Pager *pPager,int *pbOpen)

{
  int iVar1;
  int iVar2;
  
  if ((pPager->tempFile == '\0') && (pPager->pWal == (Wal *)0x0)) {
    iVar1 = sqlite3PagerWalSupported(pPager);
    iVar2 = 0xe;
    if (iVar1 != 0) {
      sqlite3OsClose(pPager->jfd);
      iVar2 = pagerOpenWal(pPager);
      if (iVar2 == 0) {
        pPager->journalMode = '\x05';
        pPager->eState = '\0';
      }
    }
    return iVar2;
  }
  *pbOpen = 1;
  return 0;
}



undefined8 FUN_0011d41c(long param_1,undefined4 *param_2)

{
  int iVar1;
  undefined8 uVar2;
  
  if ((*(char *)(param_1 + 0x10) == '\0') && (*(long *)(param_1 + 0x120) == 0)) {
    iVar1 = FUN_0010e8a8();
    uVar2 = 0xe;
    if (iVar1 != 0) {
      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));
      uVar2 = FUN_0011d2ac(param_1);
      if ((int)uVar2 == 0) {
        *(undefined1 *)(param_1 + 9) = 5;
        *(undefined1 *)(param_1 + 0x14) = 0;
      }
    }
    return uVar2;
  }
  *param_2 = 1;
  return 0;
}


CMP byte ptr [RDI + 0x10],0x0
JNZ 0x0011d42c
CMP qword ptr [RDI + 0x120],0x0
JZ 0x0011d438
MOV dword ptr [RSI],0x1
MOV EAX,0x0
RET
PUSH RBX
MOV RBX,RDI
CALL 0x0010e8a8
MOV EDX,EAX
MOV EAX,0xe
TEST EDX,EDX
JZ 0x0011d469
MOV RDI,qword ptr [RBX + 0x50]
CALL 0x0010c9dd
MOV RDI,RBX
CALL 0x0011d2ac
TEST EAX,EAX
JNZ 0x0011d469
MOV byte ptr [RBX + 0x9],0x5
MOV byte ptr [RBX + 0x14],0x0
POP RBX
RET
(translation_unit "undefined8 FUN_0011d41c(long param_1,undefined4 *param_2)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if ((*(char *)(param_1 + 0x10) == '\0') && (*(long *)(param_1 + 0x120) == 0)) {\n    iVar1 = FUN_0010e8a8();\n    uVar2 = 0xe;\n    if (iVar1 != 0) {\n      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));\n      uVar2 = FUN_0011d2ac(param_1);\n      if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }\n    }\n    return uVar2;\n  }\n  *param_2 = 1;\n  return 0;\n}\n\n" (function_definition "undefined8 FUN_0011d41c(long param_1,undefined4 *param_2)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if ((*(char *)(param_1 + 0x10) == '\0') && (*(long *)(param_1 + 0x120) == 0)) {\n    iVar1 = FUN_0010e8a8();\n    uVar2 = 0xe;\n    if (iVar1 != 0) {\n      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));\n      uVar2 = FUN_0011d2ac(param_1);\n      if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }\n    }\n    return uVar2;\n  }\n  *param_2 = 1;\n  return 0;\n}" type_identifier (function_declarator "FUN_0011d41c(long param_1,undefined4 *param_2)" identifier (parameter_list "(long param_1,undefined4 *param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if ((*(char *)(param_1 + 0x10) == '\0') && (*(long *)(param_1 + 0x120) == 0)) {\n    iVar1 = FUN_0010e8a8();\n    uVar2 = 0xe;\n    if (iVar1 != 0) {\n      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));\n      uVar2 = FUN_0011d2ac(param_1);\n      if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }\n    }\n    return uVar2;\n  }\n  *param_2 = 1;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (if_statement "if ((*(char *)(param_1 + 0x10) == '\0') && (*(long *)(param_1 + 0x120) == 0)) {\n    iVar1 = FUN_0010e8a8();\n    uVar2 = 0xe;\n    if (iVar1 != 0) {\n      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));\n      uVar2 = FUN_0011d2ac(param_1);\n      if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }\n    }\n    return uVar2;\n  }" if (parenthesized_expression "((*(char *)(param_1 + 0x10) == '\0') && (*(long *)(param_1 + 0x120) == 0))" ( (binary_expression "(*(char *)(param_1 + 0x10) == '\0') && (*(long *)(param_1 + 0x120) == 0)" (parenthesized_expression "(*(char *)(param_1 + 0x10) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x10) == '\0'" (pointer_expression "*(char *)(param_1 + 0x10)" * (cast_expression "(char *)(param_1 + 0x10)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(*(long *)(param_1 + 0x120) == 0)" ( (binary_expression "*(long *)(param_1 + 0x120) == 0" (pointer_expression "*(long *)(param_1 + 0x120)" * (cast_expression "(long *)(param_1 + 0x120)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x120)" ( (binary_expression "param_1 + 0x120" identifier + number_literal) )))) == number_literal) ))) )) (compound_statement "{\n    iVar1 = FUN_0010e8a8();\n    uVar2 = 0xe;\n    if (iVar1 != 0) {\n      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));\n      uVar2 = FUN_0011d2ac(param_1);\n      if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }\n    }\n    return uVar2;\n  }" { (expression_statement "iVar1 = FUN_0010e8a8();" (assignment_expression "iVar1 = FUN_0010e8a8()" identifier = (call_expression "FUN_0010e8a8()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar2 = 0xe;" (assignment_expression "uVar2 = 0xe" identifier = number_literal) ;) (if_statement "if (iVar1 != 0) {\n      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));\n      uVar2 = FUN_0011d2ac(param_1);\n      if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));\n      uVar2 = FUN_0011d2ac(param_1);\n      if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }\n    }" { (expression_statement "FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));" (call_expression "FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x50))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x50)" * (cast_expression "(undefined8 *)(param_1 + 0x50)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) ))) ;) (expression_statement "uVar2 = FUN_0011d2ac(param_1);" (assignment_expression "uVar2 = FUN_0011d2ac(param_1)" identifier = (call_expression "FUN_0011d2ac(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }" if (parenthesized_expression "((int)uVar2 == 0)" ( (binary_expression "(int)uVar2 == 0" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal) )) (compound_statement "{\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }" { (expression_statement "*(undefined1 *)(param_1 + 9) = 5;" (assignment_expression "*(undefined1 *)(param_1 + 9) = 5" (pointer_expression "*(undefined1 *)(param_1 + 9)" * (cast_expression "(undefined1 *)(param_1 + 9)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 9)" ( (binary_expression "param_1 + 9" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined1 *)(param_1 + 0x14) = 0;" (assignment_expression "*(undefined1 *)(param_1 + 0x14) = 0" (pointer_expression "*(undefined1 *)(param_1 + 0x14)" * (cast_expression "(undefined1 *)(param_1 + 0x14)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = number_literal) ;) })) })) (return_statement "return uVar2;" return identifier ;) })) (expression_statement "*param_2 = 1;" (assignment_expression "*param_2 = 1" (pointer_expression "*param_2" * identifier) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "int sqlite3PagerOpenWal(Pager *pPager,int *pbOpen)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  if ((pPager->tempFile == '\0') && (pPager->pWal == (Wal *)0x0)) {\n    iVar1 = sqlite3PagerWalSupported(pPager);\n    iVar2 = 0xe;\n    if (iVar1 != 0) {\n      sqlite3OsClose(pPager->jfd);\n      iVar2 = pagerOpenWal(pPager);\n      if (iVar2 == 0) {\n        pPager->journalMode = '\x05';\n        pPager->eState = '\0';\n      }\n    }\n    return iVar2;\n  }\n  *pbOpen = 1;\n  return 0;\n}\n\n" (function_definition "int sqlite3PagerOpenWal(Pager *pPager,int *pbOpen)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  if ((pPager->tempFile == '\0') && (pPager->pWal == (Wal *)0x0)) {\n    iVar1 = sqlite3PagerWalSupported(pPager);\n    iVar2 = 0xe;\n    if (iVar1 != 0) {\n      sqlite3OsClose(pPager->jfd);\n      iVar2 = pagerOpenWal(pPager);\n      if (iVar2 == 0) {\n        pPager->journalMode = '\x05';\n        pPager->eState = '\0';\n      }\n    }\n    return iVar2;\n  }\n  *pbOpen = 1;\n  return 0;\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  int iVar2;\n  \n  if ((pPager->tempFile == '\0') && (pPager->pWal == (Wal *)0x0)) {\n    iVar1 = sqlite3PagerWalSupported(pPager);\n    iVar2 = 0xe;\n    if (iVar1 != 0) {\n      sqlite3OsClose(pPager->jfd);\n      iVar2 = pagerOpenWal(pPager);\n      if (iVar2 == 0) {\n        pPager->journalMode = '\x05';\n        pPager->eState = '\0';\n      }\n    }\n    return iVar2;\n  }\n  *pbOpen = 1;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if ((pPager->tempFile == '\0') && (pPager->pWal == (Wal *)0x0)) {\n    iVar1 = sqlite3PagerWalSupported(pPager);\n    iVar2 = 0xe;\n    if (iVar1 != 0) {\n      sqlite3OsClose(pPager->jfd);\n      iVar2 = pagerOpenWal(pPager);\n      if (iVar2 == 0) {\n        pPager->journalMode = '\x05';\n        pPager->eState = '\0';\n      }\n    }\n    return iVar2;\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    iVar1 = sqlite3PagerWalSupported(pPager);\n    iVar2 = 0xe;\n    if (iVar1 != 0) {\n      sqlite3OsClose(pPager->jfd);\n      iVar2 = pagerOpenWal(pPager);\n      if (iVar2 == 0) {\n        pPager->journalMode = '\x05';\n        pPager->eState = '\0';\n      }\n    }\n    return iVar2;\n  }" { (expression_statement "iVar1 = sqlite3PagerWalSupported(pPager);" (assignment_expression "iVar1 = sqlite3PagerWalSupported(pPager)" identifier = (call_expression "sqlite3PagerWalSupported(pPager)" identifier (argument_list "(pPager)" ( identifier )))) ;) (expression_statement "iVar2 = 0xe;" (assignment_expression "iVar2 = 0xe" identifier = number_literal) ;) (if_statement "if (iVar1 != 0) {\n      sqlite3OsClose(pPager->jfd);\n      iVar2 = pagerOpenWal(pPager);\n      if (iVar2 == 0) {\n        pPager->journalMode = '\x05';\n        pPager->eState = '\0';\n      }\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      sqlite3OsClose(pPager->jfd);\n      iVar2 = pagerOpenWal(pPager);\n      if (iVar2 == 0) {\n        pPager->journalMode = '\x05';\n        pPager->eState = '\0';\n      }\n    }" { (expression_statement "sqlite3OsClose(pPager->jfd);" (call_expression "sqlite3OsClose(pPager->jfd)" identifier (argument_list "(pPager->jfd)" ( (field_expression "pPager->jfd" identifier -> field_identifier) ))) ;) (expression_statement "iVar2 = pagerOpenWal(pPager);" (assignment_expression "iVar2 = pagerOpenWal(pPager)" identifier = (call_expression "pagerOpenWal(pPager)" identifier (argument_list "(pPager)" ( identifier )))) ;) (if_statement "if (iVar2 == 0) {\n        pPager->journalMode = '\x05';\n        pPager->eState = '\0';\n      }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        pPager->journalMode = '\x05';\n        pPager->eState = '\0';\n      }" { (expression_statement "pPager->journalMode = '\x05';" (assignment_expression "pPager->journalMode = '\x05'" (field_expression "pPager->journalMode" identifier -> field_identifier) = (char_literal "'\x05'" ' escape_sequence ')) ;) (expression_statement "pPager->eState = '\0';" (assignment_expression "pPager->eState = '\0'" (field_expression "pPager->eState" identifier -> field_identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) })) })) (return_statement "return iVar2;" return identifier ;) })) (expression_statement "*pbOpen = 1;" (assignment_expression "*pbOpen = 1" (pointer_expression "*pbOpen" * identifier) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined8 FUN_0011d41c(long param_1,undefined4 *param_2)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if ((*(char *)(param_1 + 0x10) == '\0') && (*(long *)(param_1 + 0x120) == 0)) {\n    iVar1 = FUN_0010e8a8();\n    uVar2 = 0xe;\n    if (iVar1 != 0) {\n      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));\n      uVar2 = FUN_0011d2ac(param_1);\n      if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }\n    }\n    return uVar2;\n  }\n  *param_2 = 1;\n  return 0;\n}\n\n" (function_definition "undefined8 FUN_0011d41c(long param_1,undefined4 *param_2)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if ((*(char *)(param_1 + 0x10) == '\0') && (*(long *)(param_1 + 0x120) == 0)) {\n    iVar1 = FUN_0010e8a8();\n    uVar2 = 0xe;\n    if (iVar1 != 0) {\n      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));\n      uVar2 = FUN_0011d2ac(param_1);\n      if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }\n    }\n    return uVar2;\n  }\n  *param_2 = 1;\n  return 0;\n}" type_identifier (function_declarator "FUN_0011d41c(long param_1,undefined4 *param_2)" identifier (parameter_list "(long param_1,undefined4 *param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if ((*(char *)(param_1 + 0x10) == '\0') && (*(long *)(param_1 + 0x120) == 0)) {\n    iVar1 = FUN_0010e8a8();\n    uVar2 = 0xe;\n    if (iVar1 != 0) {\n      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));\n      uVar2 = FUN_0011d2ac(param_1);\n      if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }\n    }\n    return uVar2;\n  }\n  *param_2 = 1;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (if_statement "if ((*(char *)(param_1 + 0x10) == '\0') && (*(long *)(param_1 + 0x120) == 0)) {\n    iVar1 = FUN_0010e8a8();\n    uVar2 = 0xe;\n    if (iVar1 != 0) {\n      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));\n      uVar2 = FUN_0011d2ac(param_1);\n      if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }\n    }\n    return uVar2;\n  }" if (parenthesized_expression "((*(char *)(param_1 + 0x10) == '\0') && (*(long *)(param_1 + 0x120) == 0))" ( (binary_expression "(*(char *)(param_1 + 0x10) == '\0') && (*(long *)(param_1 + 0x120) == 0)" (parenthesized_expression "(*(char *)(param_1 + 0x10) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x10) == '\0'" (pointer_expression "*(char *)(param_1 + 0x10)" * (cast_expression "(char *)(param_1 + 0x10)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(*(long *)(param_1 + 0x120) == 0)" ( (binary_expression "*(long *)(param_1 + 0x120) == 0" (pointer_expression "*(long *)(param_1 + 0x120)" * (cast_expression "(long *)(param_1 + 0x120)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x120)" ( (binary_expression "param_1 + 0x120" identifier + number_literal) )))) == number_literal) ))) )) (compound_statement "{\n    iVar1 = FUN_0010e8a8();\n    uVar2 = 0xe;\n    if (iVar1 != 0) {\n      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));\n      uVar2 = FUN_0011d2ac(param_1);\n      if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }\n    }\n    return uVar2;\n  }" { (expression_statement "iVar1 = FUN_0010e8a8();" (assignment_expression "iVar1 = FUN_0010e8a8()" identifier = (call_expression "FUN_0010e8a8()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar2 = 0xe;" (assignment_expression "uVar2 = 0xe" identifier = number_literal) ;) (if_statement "if (iVar1 != 0) {\n      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));\n      uVar2 = FUN_0011d2ac(param_1);\n      if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));\n      uVar2 = FUN_0011d2ac(param_1);\n      if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }\n    }" { (expression_statement "FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));" (call_expression "FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x50))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x50)" * (cast_expression "(undefined8 *)(param_1 + 0x50)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) ))) ;) (expression_statement "uVar2 = FUN_0011d2ac(param_1);" (assignment_expression "uVar2 = FUN_0011d2ac(param_1)" identifier = (call_expression "FUN_0011d2ac(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }" if (parenthesized_expression "((int)uVar2 == 0)" ( (binary_expression "(int)uVar2 == 0" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal) )) (compound_statement "{\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }" { (expression_statement "*(undefined1 *)(param_1 + 9) = 5;" (assignment_expression "*(undefined1 *)(param_1 + 9) = 5" (pointer_expression "*(undefined1 *)(param_1 + 9)" * (cast_expression "(undefined1 *)(param_1 + 9)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 9)" ( (binary_expression "param_1 + 9" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined1 *)(param_1 + 0x14) = 0;" (assignment_expression "*(undefined1 *)(param_1 + 0x14) = 0" (pointer_expression "*(undefined1 *)(param_1 + 0x14)" * (cast_expression "(undefined1 *)(param_1 + 0x14)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = number_literal) ;) })) })) (return_statement "return uVar2;" return identifier ;) })) (expression_statement "*param_2 = 1;" (assignment_expression "*param_2 = 1" (pointer_expression "*param_2" * identifier) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE 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 (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) 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 ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return LIT ;) })))
(function_definition "undefined8 FUN_0011d41c(long param_1,undefined4 *param_2)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if ((*(char *)(param_1 + 0x10) == '\0') && (*(long *)(param_1 + 0x120) == 0)) {\n    iVar1 = FUN_0010e8a8();\n    uVar2 = 0xe;\n    if (iVar1 != 0) {\n      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));\n      uVar2 = FUN_0011d2ac(param_1);\n      if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }\n    }\n    return uVar2;\n  }\n  *param_2 = 1;\n  return 0;\n}" (type_identifier "undefined8") (function_declarator "FUN_0011d41c(long param_1,undefined4 *param_2)" (identifier "FUN_0011d41c") (parameter_list "(long param_1,undefined4 *param_2)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if ((*(char *)(param_1 + 0x10) == '\0') && (*(long *)(param_1 + 0x120) == 0)) {\n    iVar1 = FUN_0010e8a8();\n    uVar2 = 0xe;\n    if (iVar1 != 0) {\n      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));\n      uVar2 = FUN_0011d2ac(param_1);\n      if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }\n    }\n    return uVar2;\n  }\n  *param_2 = 1;\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined8 uVar2;" (type_identifier "undefined8") (identifier "uVar2") (; ";")) (if_statement "if ((*(char *)(param_1 + 0x10) == '\0') && (*(long *)(param_1 + 0x120) == 0)) {\n    iVar1 = FUN_0010e8a8();\n    uVar2 = 0xe;\n    if (iVar1 != 0) {\n      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));\n      uVar2 = FUN_0011d2ac(param_1);\n      if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }\n    }\n    return uVar2;\n  }" (if "if") (parenthesized_expression "((*(char *)(param_1 + 0x10) == '\0') && (*(long *)(param_1 + 0x120) == 0))" (( "(") (binary_expression "(*(char *)(param_1 + 0x10) == '\0') && (*(long *)(param_1 + 0x120) == 0)" (parenthesized_expression "(*(char *)(param_1 + 0x10) == '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0x10) == '\0'" (pointer_expression "*(char *)(param_1 + 0x10)" (* "*") (cast_expression "(char *)(param_1 + 0x10)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(*(long *)(param_1 + 0x120) == 0)" (( "(") (binary_expression "*(long *)(param_1 + 0x120) == 0" (pointer_expression "*(long *)(param_1 + 0x120)" (* "*") (cast_expression "(long *)(param_1 + 0x120)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x120)" (( "(") (binary_expression "param_1 + 0x120" (identifier "param_1") (+ "+") (number_literal "0x120")) () ")")))) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    iVar1 = FUN_0010e8a8();\n    uVar2 = 0xe;\n    if (iVar1 != 0) {\n      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));\n      uVar2 = FUN_0011d2ac(param_1);\n      if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }\n    }\n    return uVar2;\n  }" ({ "{") (expression_statement "iVar1 = FUN_0010e8a8();" (assignment_expression "iVar1 = FUN_0010e8a8()" (identifier "iVar1") (= "=") (call_expression "FUN_0010e8a8()" (identifier "FUN_0010e8a8") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar2 = 0xe;" (assignment_expression "uVar2 = 0xe" (identifier "uVar2") (= "=") (number_literal "0xe")) (; ";")) (if_statement "if (iVar1 != 0) {\n      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));\n      uVar2 = FUN_0011d2ac(param_1);\n      if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }\n    }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));\n      uVar2 = FUN_0011d2ac(param_1);\n      if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }\n    }" ({ "{") (expression_statement "FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));" (call_expression "FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50))" (identifier "FUN_0010c9dd") (argument_list "(*(undefined8 *)(param_1 + 0x50))" (( "(") (pointer_expression "*(undefined8 *)(param_1 + 0x50)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x50)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x50)" (( "(") (binary_expression "param_1 + 0x50" (identifier "param_1") (+ "+") (number_literal "0x50")) () ")")))) () ")"))) (; ";")) (expression_statement "uVar2 = FUN_0011d2ac(param_1);" (assignment_expression "uVar2 = FUN_0011d2ac(param_1)" (identifier "uVar2") (= "=") (call_expression "FUN_0011d2ac(param_1)" (identifier "FUN_0011d2ac") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if ((int)uVar2 == 0) {\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }" (if "if") (parenthesized_expression "((int)uVar2 == 0)" (( "(") (binary_expression "(int)uVar2 == 0" (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        *(undefined1 *)(param_1 + 9) = 5;\n        *(undefined1 *)(param_1 + 0x14) = 0;\n      }" ({ "{") (expression_statement "*(undefined1 *)(param_1 + 9) = 5;" (assignment_expression "*(undefined1 *)(param_1 + 9) = 5" (pointer_expression "*(undefined1 *)(param_1 + 9)" (* "*") (cast_expression "(undefined1 *)(param_1 + 9)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 9)" (( "(") (binary_expression "param_1 + 9" (identifier "param_1") (+ "+") (number_literal "9")) () ")")))) (= "=") (number_literal "5")) (; ";")) (expression_statement "*(undefined1 *)(param_1 + 0x14) = 0;" (assignment_expression "*(undefined1 *)(param_1 + 0x14) = 0" (pointer_expression "*(undefined1 *)(param_1 + 0x14)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0x14)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}"))) (} "}"))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (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") (; ";")) (} "}")))

int function_1(type_1 *pPager,int *pbOpen)

{
  int var_2;
  int var_5;
  
  if ((pPager->tempFile == '\0') && (pPager->pWal == (type_2 *)0x0)) {
    var_2 = var_1(pPager);
    var_5 = 0xe;
    if (var_2 != 0) {
      var_3(pPager->jfd);
      var_5 = var_4(pPager);
      if (var_5 == 0) {
        pPager->journalMode = '\x05';
        pPager->eState = '\0';
      }
    }
    return var_5;
  }
  *pbOpen = 1;
  return 0;
}


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

undefined8 MASKED(long param_1,undefined4 *param_2)

{
  int iVar1;
  undefined8 uVar2;
  
  if ((*(char *)(param_1 + 0x10) == '\0') && (*(long *)(param_1 + 0x120) == 0)) {
    iVar1 = FUN_0010e8a8();
    uVar2 = 0xe;
    if (iVar1 != 0) {
      FUN_0010c9dd(*(undefined8 *)(param_1 + 0x50));
      uVar2 = FUN_0011d2ac(param_1);
      if ((int)uVar2 == 0) {
        *(undefined1 *)(param_1 + 9) = 5;
        *(undefined1 *)(param_1 + 0x14) = 0;
      }
    }
    return uVar2;
  }
  *param_2 = 1;
  return 0;
}

