
int sqlite3BtreeCommitPhaseTwo(Btree *p,int bCleanup)

{
  int *piVar1;
  BtShared *pBVar2;
  Pager *pPager;
  uint rc;
  
  if (p->sharable != '\0') {
    sqlite3BtreeEnter(p);
  }
  if (p->inTrans == '\x02') {
    pBVar2 = p->pBt;
    pPager = pBVar2->pPager;
    rc = pPager->errCode;
    if (rc == 0) {
      if (((pPager->eState != '\x02') || (pPager->exclusiveMode == '\0')) ||
         (pPager->journalMode != '\x01')) {
        pPager->iDataVersion = pPager->iDataVersion + 1;
        rc = pager_end_transaction(pPager,(uint)pPager->setMaster,1);
        if (((rc & 0xff) == 0xd) || ((rc & 0xff) == 10)) {
          pager_error(pPager,rc);
        }
        goto LAB_0016e7d8;
      }
      pPager->eState = '\x01';
    }
    else {
LAB_0016e7d8:
      if ((rc != 0) && ((bCleanup & 1U) == 0)) {
        if (p->sharable == '\0') {
          return rc;
        }
        piVar1 = &p->wantToLock;
        *piVar1 = *piVar1 + -1;
        if (*piVar1 != 0) {
          return rc;
        }
        goto LAB_0016e75b;
      }
    }
    p->iDataVersion = p->iDataVersion - 1;
    pBVar2->inTransaction = '\x01';
    sqlite3BitvecDestroy(pBVar2->pHasContent);
    pBVar2->pHasContent = (Bitvec *)0x0;
  }
  btreeEndTransaction(p);
  if (p->sharable != '\0') {
    rc = p->wantToLock - 1;
    p->wantToLock = rc;
    if (rc == 0) {
LAB_0016e75b:
      sqlite3BtreeLeave(p);
      return rc;
    }
  }
  return 0;
}



ulong FUN_0016e710(long param_1,ulong param_2)

{
  int *piVar1;
  long *plVar2;
  long lVar3;
  uint uVar4;
  ulong uVar5;
  
  if (*(char *)(param_1 + 0x11) != '\0') {
    FUN_0011fbe0();
  }
  if (*(char *)(param_1 + 0x10) == '\x02') {
    plVar2 = *(long **)(param_1 + 8);
    lVar3 = *plVar2;
    uVar5 = (ulong)*(uint *)(lVar3 + 0x2c);
    if (*(uint *)(lVar3 + 0x2c) == 0) {
      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||
         (*(char *)(lVar3 + 9) != '\x01')) {
        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;
        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);
        uVar4 = (uint)uVar5 & 0xff;
        if ((uVar4 == 0xd) || (uVar4 == 10)) {
          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);
          uVar5 = uVar5 & 0xffffffff;
        }
        goto LAB_0016e7d8;
      }
      *(undefined1 *)(lVar3 + 0x14) = 1;
    }
    else {
LAB_0016e7d8:
      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {
        if (*(char *)(param_1 + 0x11) == '\0') {
          return uVar5;
        }
        piVar1 = (int *)(param_1 + 0x14);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 != 0) {
          return uVar5;
        }
        goto LAB_0016e75b;
      }
    }
    *(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1;
    *(undefined1 *)((long)plVar2 + 0x24) = 1;
    FUN_0011aa90(plVar2[0xb]);
    plVar2[0xb] = 0;
  }
  FUN_0016e5e0(param_1);
  if (*(char *)(param_1 + 0x11) != '\0') {
    uVar4 = *(int *)(param_1 + 0x14) - 1;
    uVar5 = (ulong)uVar4;
    *(uint *)(param_1 + 0x14) = uVar4;
    if (uVar4 == 0) {
LAB_0016e75b:
      FUN_0011fc70(param_1);
      return uVar5 & 0xffffffff;
    }
  }
  return 0;
}


PUSH R13
PUSH R12
MOV R12D,ESI
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x18
CMP byte ptr [RDI + 0x11],0x0
JZ 0x0016e72b
CALL 0x0011fbe0
CMP byte ptr [RBX + 0x10],0x2
JZ 0x0016e780
MOV RDI,RBX
CALL 0x0016e5e0
CMP byte ptr [RBX + 0x11],0x0
JNZ 0x0016e750
XOR EAX,EAX
ADD RSP,0x18
POP RBX
POP RBP
POP R12
POP R13
RET
MOV EAX,dword ptr [RBX + 0x14]
SUB EAX,0x1
MOV dword ptr [RBX + 0x14],EAX
JNZ 0x0016e73f
MOV RDI,RBX
MOV dword ptr [RSP + 0xc],EAX
CALL 0x0011fc70
MOV EAX,dword ptr [RSP + 0xc]
ADD RSP,0x18
POP RBX
POP RBP
POP R12
POP R13
RET
MOV R13,qword ptr [RBX + 0x8]
MOV RBP,qword ptr [R13]
MOV EAX,dword ptr [RBP + 0x2c]
TEST EAX,EAX
JNZ 0x0016e7d8
CMP byte ptr [RBP + 0x14],0x2
JNZ 0x0016e7a1
CMP byte ptr [RBP + 0x8],0x0
JZ 0x0016e7a1
CMP byte ptr [RBP + 0x9],0x1
JZ 0x0016e800
ADD dword ptr [RBP + 0x84],0x1
MOVZX ESI,byte ptr [RBP + 0x17]
MOV EDX,0x1
MOV RDI,RBP
CALL 0x0011f620
MOVZX EDX,AL
CMP EDX,0xd
JZ 0x0016e7c6
CMP EDX,0xa
JNZ 0x0016e7d8
MOV ESI,EAX
MOV RDI,RBP
MOV dword ptr [RSP + 0xc],EAX
CALL 0x0012c7a0
MOV EAX,dword ptr [RSP + 0xc]
TEST EAX,EAX
JZ 0x0016e808
AND R12D,0x1
JNZ 0x0016e808
CMP byte ptr [RBX + 0x11],0x0
JZ 0x0016e741
SUB dword ptr [RBX + 0x14],0x1
JNZ 0x0016e741
JMP 0x0016e75b
MOV byte ptr [RBP + 0x14],0x1
NOP dword ptr [RAX]
SUB dword ptr [RBX + 0x1c],0x1
MOV RDI,qword ptr [R13 + 0x58]
MOV byte ptr [R13 + 0x24],0x1
CALL 0x0011aa90
MOV qword ptr [R13 + 0x58],0x0
JMP 0x0016e731
(translation_unit "ulong FUN_0016e710(long param_1,ulong param_2)\n\n{\n  int *piVar1;\n  long *plVar2;\n  long lVar3;\n  uint uVar4;\n  ulong uVar5;\n  \n  if (*(char *)(param_1 + 0x11) != '\0') {\n    FUN_0011fbe0();\n  }\n  if (*(char *)(param_1 + 0x10) == '\x02') {\n    plVar2 = *(long **)(param_1 + 8);\n    lVar3 = *plVar2;\n    uVar5 = (ulong)*(uint *)(lVar3 + 0x2c);\n    if (*(uint *)(lVar3 + 0x2c) == 0) {\n      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }\n      *(undefined1 *)(lVar3 + 0x14) = 1;\n    }\n    else {\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }\n    *(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1;\n    *(undefined1 *)((long)plVar2 + 0x24) = 1;\n    FUN_0011aa90(plVar2[0xb]);\n    plVar2[0xb] = 0;\n  }\n  FUN_0016e5e0(param_1);\n  if (*(char *)(param_1 + 0x11) != '\0') {\n    uVar4 = *(int *)(param_1 + 0x14) - 1;\n    uVar5 = (ulong)uVar4;\n    *(uint *)(param_1 + 0x14) = uVar4;\n    if (uVar4 == 0) {\nLAB_0016e75b:\n      FUN_0011fc70(param_1);\n      return uVar5 & 0xffffffff;\n    }\n  }\n  return 0;\n}\n\n" (function_definition "ulong FUN_0016e710(long param_1,ulong param_2)\n\n{\n  int *piVar1;\n  long *plVar2;\n  long lVar3;\n  uint uVar4;\n  ulong uVar5;\n  \n  if (*(char *)(param_1 + 0x11) != '\0') {\n    FUN_0011fbe0();\n  }\n  if (*(char *)(param_1 + 0x10) == '\x02') {\n    plVar2 = *(long **)(param_1 + 8);\n    lVar3 = *plVar2;\n    uVar5 = (ulong)*(uint *)(lVar3 + 0x2c);\n    if (*(uint *)(lVar3 + 0x2c) == 0) {\n      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }\n      *(undefined1 *)(lVar3 + 0x14) = 1;\n    }\n    else {\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }\n    *(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1;\n    *(undefined1 *)((long)plVar2 + 0x24) = 1;\n    FUN_0011aa90(plVar2[0xb]);\n    plVar2[0xb] = 0;\n  }\n  FUN_0016e5e0(param_1);\n  if (*(char *)(param_1 + 0x11) != '\0') {\n    uVar4 = *(int *)(param_1 + 0x14) - 1;\n    uVar5 = (ulong)uVar4;\n    *(uint *)(param_1 + 0x14) = uVar4;\n    if (uVar4 == 0) {\nLAB_0016e75b:\n      FUN_0011fc70(param_1);\n      return uVar5 & 0xffffffff;\n    }\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_0016e710(long param_1,ulong param_2)" identifier (parameter_list "(long param_1,ulong param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "ulong param_2" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  long *plVar2;\n  long lVar3;\n  uint uVar4;\n  ulong uVar5;\n  \n  if (*(char *)(param_1 + 0x11) != '\0') {\n    FUN_0011fbe0();\n  }\n  if (*(char *)(param_1 + 0x10) == '\x02') {\n    plVar2 = *(long **)(param_1 + 8);\n    lVar3 = *plVar2;\n    uVar5 = (ulong)*(uint *)(lVar3 + 0x2c);\n    if (*(uint *)(lVar3 + 0x2c) == 0) {\n      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }\n      *(undefined1 *)(lVar3 + 0x14) = 1;\n    }\n    else {\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }\n    *(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1;\n    *(undefined1 *)((long)plVar2 + 0x24) = 1;\n    FUN_0011aa90(plVar2[0xb]);\n    plVar2[0xb] = 0;\n  }\n  FUN_0016e5e0(param_1);\n  if (*(char *)(param_1 + 0x11) != '\0') {\n    uVar4 = *(int *)(param_1 + 0x14) - 1;\n    uVar5 = (ulong)uVar4;\n    *(uint *)(param_1 + 0x14) = uVar4;\n    if (uVar4 == 0) {\nLAB_0016e75b:\n      FUN_0011fc70(param_1);\n      return uVar5 & 0xffffffff;\n    }\n  }\n  return 0;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "long *plVar2;" (sized_type_specifier "long" long) (pointer_declarator "*plVar2" * identifier) ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "ulong uVar5;" type_identifier identifier ;) (if_statement "if (*(char *)(param_1 + 0x11) != '\0') {\n    FUN_0011fbe0();\n  }" if (parenthesized_expression "(*(char *)(param_1 + 0x11) != '\0')" ( (binary_expression "*(char *)(param_1 + 0x11) != '\0'" (pointer_expression "*(char *)(param_1 + 0x11)" * (cast_expression "(char *)(param_1 + 0x11)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x11)" ( (binary_expression "param_1 + 0x11" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    FUN_0011fbe0();\n  }" { (expression_statement "FUN_0011fbe0();" (call_expression "FUN_0011fbe0()" identifier (argument_list "()" ( ))) ;) })) (if_statement "if (*(char *)(param_1 + 0x10) == '\x02') {\n    plVar2 = *(long **)(param_1 + 8);\n    lVar3 = *plVar2;\n    uVar5 = (ulong)*(uint *)(lVar3 + 0x2c);\n    if (*(uint *)(lVar3 + 0x2c) == 0) {\n      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }\n      *(undefined1 *)(lVar3 + 0x14) = 1;\n    }\n    else {\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }\n    *(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1;\n    *(undefined1 *)((long)plVar2 + 0x24) = 1;\n    FUN_0011aa90(plVar2[0xb]);\n    plVar2[0xb] = 0;\n  }" if (parenthesized_expression "(*(char *)(param_1 + 0x10) == '\x02')" ( (binary_expression "*(char *)(param_1 + 0x10) == '\x02'" (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 "'\x02'" ' escape_sequence ')) )) (compound_statement "{\n    plVar2 = *(long **)(param_1 + 8);\n    lVar3 = *plVar2;\n    uVar5 = (ulong)*(uint *)(lVar3 + 0x2c);\n    if (*(uint *)(lVar3 + 0x2c) == 0) {\n      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }\n      *(undefined1 *)(lVar3 + 0x14) = 1;\n    }\n    else {\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }\n    *(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1;\n    *(undefined1 *)((long)plVar2 + 0x24) = 1;\n    FUN_0011aa90(plVar2[0xb]);\n    plVar2[0xb] = 0;\n  }" { (expression_statement "plVar2 = *(long **)(param_1 + 8);" (assignment_expression "plVar2 = *(long **)(param_1 + 8)" identifier = (pointer_expression "*(long **)(param_1 + 8)" * (cast_expression "(long **)(param_1 + 8)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "lVar3 = *plVar2;" (assignment_expression "lVar3 = *plVar2" identifier = (pointer_expression "*plVar2" * identifier)) ;) (expression_statement "uVar5 = (ulong)*(uint *)(lVar3 + 0x2c);" (assignment_expression "uVar5 = (ulong)*(uint *)(lVar3 + 0x2c)" identifier = (binary_expression "(ulong)*(uint *)(lVar3 + 0x2c)" (parenthesized_expression "(ulong)" ( identifier )) * (cast_expression "(uint *)(lVar3 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x2c)" ( (binary_expression "lVar3 + 0x2c" identifier + number_literal) ))))) ;) (if_statement "if (*(uint *)(lVar3 + 0x2c) == 0) {\n      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }\n      *(undefined1 *)(lVar3 + 0x14) = 1;\n    }\n    else {\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }" if (parenthesized_expression "(*(uint *)(lVar3 + 0x2c) == 0)" ( (binary_expression "*(uint *)(lVar3 + 0x2c) == 0" (pointer_expression "*(uint *)(lVar3 + 0x2c)" * (cast_expression "(uint *)(lVar3 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x2c)" ( (binary_expression "lVar3 + 0x2c" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }\n      *(undefined1 *)(lVar3 + 0x14) = 1;\n    }" { (if_statement "if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }" if (parenthesized_expression "(((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01'))" ( (binary_expression "((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')" (parenthesized_expression "((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0'))" ( (binary_expression "(*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')" (parenthesized_expression "(*(char *)(lVar3 + 0x14) != '\x02')" ( (binary_expression "*(char *)(lVar3 + 0x14) != '\x02'" (pointer_expression "*(char *)(lVar3 + 0x14)" * (cast_expression "(char *)(lVar3 + 0x14)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x14)" ( (binary_expression "lVar3 + 0x14" identifier + number_literal) )))) != (char_literal "'\x02'" ' escape_sequence ')) )) || (parenthesized_expression "(*(char *)(lVar3 + 8) == '\0')" ( (binary_expression "*(char *)(lVar3 + 8) == '\0'" (pointer_expression "*(char *)(lVar3 + 8)" * (cast_expression "(char *)(lVar3 + 8)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 8)" ( (binary_expression "lVar3 + 8" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) ))) )) || (parenthesized_expression "(*(char *)(lVar3 + 9) != '\x01')" ( (binary_expression "*(char *)(lVar3 + 9) != '\x01'" (pointer_expression "*(char *)(lVar3 + 9)" * (cast_expression "(char *)(lVar3 + 9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 9)" ( (binary_expression "lVar3 + 9" identifier + number_literal) )))) != (char_literal "'\x01'" ' escape_sequence ')) ))) )) (compound_statement "{\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }" { (expression_statement "*(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;" (assignment_expression "*(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1" (pointer_expression "*(int *)(lVar3 + 0x84)" * (cast_expression "(int *)(lVar3 + 0x84)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x84)" ( (binary_expression "lVar3 + 0x84" identifier + number_literal) )))) = (binary_expression "*(int *)(lVar3 + 0x84) + 1" (pointer_expression "*(int *)(lVar3 + 0x84)" * (cast_expression "(int *)(lVar3 + 0x84)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x84)" ( (binary_expression "lVar3 + 0x84" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);" (assignment_expression "uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1)" identifier = (call_expression "FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1)" identifier (argument_list "(lVar3,*(undefined1 *)(lVar3 + 0x17),1)" ( identifier , (pointer_expression "*(undefined1 *)(lVar3 + 0x17)" * (cast_expression "(undefined1 *)(lVar3 + 0x17)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x17)" ( (binary_expression "lVar3 + 0x17" identifier + number_literal) )))) , number_literal )))) ;) (expression_statement "uVar4 = (uint)uVar5 & 0xff;" (assignment_expression "uVar4 = (uint)uVar5 & 0xff" identifier = (binary_expression "(uint)uVar5 & 0xff" (cast_expression "(uint)uVar5" ( (type_descriptor "uint" type_identifier) ) identifier) & number_literal)) ;) (if_statement "if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }" if (parenthesized_expression "((uVar4 == 0xd) || (uVar4 == 10))" ( (binary_expression "(uVar4 == 0xd) || (uVar4 == 10)" (parenthesized_expression "(uVar4 == 0xd)" ( (binary_expression "uVar4 == 0xd" identifier == number_literal) )) || (parenthesized_expression "(uVar4 == 10)" ( (binary_expression "uVar4 == 10" identifier == number_literal) ))) )) (compound_statement "{\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }" { (expression_statement "FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);" (call_expression "FUN_0012c7a0(lVar3,uVar5 & 0xffffffff)" identifier (argument_list "(lVar3,uVar5 & 0xffffffff)" ( identifier , (binary_expression "uVar5 & 0xffffffff" identifier & number_literal) ))) ;) (expression_statement "uVar5 = uVar5 & 0xffffffff;" (assignment_expression "uVar5 = uVar5 & 0xffffffff" identifier = (binary_expression "uVar5 & 0xffffffff" identifier & number_literal)) ;) })) (goto_statement "goto LAB_0016e7d8;" goto statement_identifier ;) })) (expression_statement "*(undefined1 *)(lVar3 + 0x14) = 1;" (assignment_expression "*(undefined1 *)(lVar3 + 0x14) = 1" (pointer_expression "*(undefined1 *)(lVar3 + 0x14)" * (cast_expression "(undefined1 *)(lVar3 + 0x14)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x14)" ( (binary_expression "lVar3 + 0x14" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }" else (compound_statement "{\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }" { (labeled_statement "LAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }" statement_identifier : (if_statement "if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }" if (parenthesized_expression "(((int)uVar5 != 0) && ((param_2 & 1) == 0))" ( (binary_expression "((int)uVar5 != 0) && ((param_2 & 1) == 0)" (parenthesized_expression "((int)uVar5 != 0)" ( (binary_expression "(int)uVar5 != 0" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) != number_literal) )) && (parenthesized_expression "((param_2 & 1) == 0)" ( (binary_expression "(param_2 & 1) == 0" (parenthesized_expression "(param_2 & 1)" ( (binary_expression "param_2 & 1" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }" { (if_statement "if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }" if (parenthesized_expression "(*(char *)(param_1 + 0x11) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x11) == '\0'" (pointer_expression "*(char *)(param_1 + 0x11)" * (cast_expression "(char *)(param_1 + 0x11)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x11)" ( (binary_expression "param_1 + 0x11" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n          return uVar5;\n        }" { (return_statement "return uVar5;" return identifier ;) })) (expression_statement "piVar1 = (int *)(param_1 + 0x14);" (assignment_expression "piVar1 = (int *)(param_1 + 0x14)" identifier = (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) ;) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (if_statement "if (*piVar1 != 0) {\n          return uVar5;\n        }" if (parenthesized_expression "(*piVar1 != 0)" ( (binary_expression "*piVar1 != 0" (pointer_expression "*piVar1" * identifier) != number_literal) )) (compound_statement "{\n          return uVar5;\n        }" { (return_statement "return uVar5;" return identifier ;) })) (goto_statement "goto LAB_0016e75b;" goto statement_identifier ;) }))) }))) (expression_statement "*(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1;" (assignment_expression "*(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1" (pointer_expression "*(int *)(param_1 + 0x1c)" * (cast_expression "(int *)(param_1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 0x1c) + -1" (pointer_expression "*(int *)(param_1 + 0x1c)" * (cast_expression "(int *)(param_1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "*(undefined1 *)((long)plVar2 + 0x24) = 1;" (assignment_expression "*(undefined1 *)((long)plVar2 + 0x24) = 1" (pointer_expression "*(undefined1 *)((long)plVar2 + 0x24)" * (cast_expression "(undefined1 *)((long)plVar2 + 0x24)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)plVar2 + 0x24)" ( (binary_expression "(long)plVar2 + 0x24" (cast_expression "(long)plVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "FUN_0011aa90(plVar2[0xb]);" (call_expression "FUN_0011aa90(plVar2[0xb])" identifier (argument_list "(plVar2[0xb])" ( (subscript_expression "plVar2[0xb]" identifier [ number_literal ]) ))) ;) (expression_statement "plVar2[0xb] = 0;" (assignment_expression "plVar2[0xb] = 0" (subscript_expression "plVar2[0xb]" identifier [ number_literal ]) = number_literal) ;) })) (expression_statement "FUN_0016e5e0(param_1);" (call_expression "FUN_0016e5e0(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (if_statement "if (*(char *)(param_1 + 0x11) != '\0') {\n    uVar4 = *(int *)(param_1 + 0x14) - 1;\n    uVar5 = (ulong)uVar4;\n    *(uint *)(param_1 + 0x14) = uVar4;\n    if (uVar4 == 0) {\nLAB_0016e75b:\n      FUN_0011fc70(param_1);\n      return uVar5 & 0xffffffff;\n    }\n  }" if (parenthesized_expression "(*(char *)(param_1 + 0x11) != '\0')" ( (binary_expression "*(char *)(param_1 + 0x11) != '\0'" (pointer_expression "*(char *)(param_1 + 0x11)" * (cast_expression "(char *)(param_1 + 0x11)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x11)" ( (binary_expression "param_1 + 0x11" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    uVar4 = *(int *)(param_1 + 0x14) - 1;\n    uVar5 = (ulong)uVar4;\n    *(uint *)(param_1 + 0x14) = uVar4;\n    if (uVar4 == 0) {\nLAB_0016e75b:\n      FUN_0011fc70(param_1);\n      return uVar5 & 0xffffffff;\n    }\n  }" { (expression_statement "uVar4 = *(int *)(param_1 + 0x14) - 1;" (assignment_expression "uVar4 = *(int *)(param_1 + 0x14) - 1" identifier = (binary_expression "*(int *)(param_1 + 0x14) - 1" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) - number_literal)) ;) (expression_statement "uVar5 = (ulong)uVar4;" (assignment_expression "uVar5 = (ulong)uVar4" identifier = (cast_expression "(ulong)uVar4" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) (expression_statement "*(uint *)(param_1 + 0x14) = uVar4;" (assignment_expression "*(uint *)(param_1 + 0x14) = uVar4" (pointer_expression "*(uint *)(param_1 + 0x14)" * (cast_expression "(uint *)(param_1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = identifier) ;) (if_statement "if (uVar4 == 0) {\nLAB_0016e75b:\n      FUN_0011fc70(param_1);\n      return uVar5 & 0xffffffff;\n    }" if (parenthesized_expression "(uVar4 == 0)" ( (binary_expression "uVar4 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0016e75b:\n      FUN_0011fc70(param_1);\n      return uVar5 & 0xffffffff;\n    }" { (labeled_statement "LAB_0016e75b:\n      FUN_0011fc70(param_1);" statement_identifier : (expression_statement "FUN_0011fc70(param_1);" (call_expression "FUN_0011fc70(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;)) (return_statement "return uVar5 & 0xffffffff;" return (binary_expression "uVar5 & 0xffffffff" identifier & number_literal) ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "int sqlite3BtreeCommitPhaseTwo(Btree *p,int bCleanup)\n\n{\n  int *piVar1;\n  BtShared *pBVar2;\n  Pager *pPager;\n  uint rc;\n  \n  if (p->sharable != '\0') {\n    sqlite3BtreeEnter(p);\n  }\n  if (p->inTrans == '\x02') {\n    pBVar2 = p->pBt;\n    pPager = pBVar2->pPager;\n    rc = pPager->errCode;\n    if (rc == 0) {\n      if (((pPager->eState != '\x02') || (pPager->exclusiveMode == '\0')) ||\n         (pPager->journalMode != '\x01')) {\n        pPager->iDataVersion = pPager->iDataVersion + 1;\n        rc = pager_end_transaction(pPager,(uint)pPager->setMaster,1);\n        if (((rc & 0xff) == 0xd) || ((rc & 0xff) == 10)) {\n          pager_error(pPager,rc);\n        }\n        goto LAB_0016e7d8;\n      }\n      pPager->eState = '\x01';\n    }\n    else {\nLAB_0016e7d8:\n      if ((rc != 0) && ((bCleanup & 1U) == 0)) {\n        if (p->sharable == '\0') {\n          return rc;\n        }\n        piVar1 = &p->wantToLock;\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return rc;\n        }\n        goto LAB_0016e75b;\n      }\n    }\n    p->iDataVersion = p->iDataVersion - 1;\n    pBVar2->inTransaction = '\x01';\n    sqlite3BitvecDestroy(pBVar2->pHasContent);\n    pBVar2->pHasContent = (Bitvec *)0x0;\n  }\n  btreeEndTransaction(p);\n  if (p->sharable != '\0') {\n    rc = p->wantToLock - 1;\n    p->wantToLock = rc;\n    if (rc == 0) {\nLAB_0016e75b:\n      sqlite3BtreeLeave(p);\n      return rc;\n    }\n  }\n  return 0;\n}\n\n" (function_definition "int sqlite3BtreeCommitPhaseTwo(Btree *p,int bCleanup)\n\n{\n  int *piVar1;\n  BtShared *pBVar2;\n  Pager *pPager;\n  uint rc;\n  \n  if (p->sharable != '\0') {\n    sqlite3BtreeEnter(p);\n  }\n  if (p->inTrans == '\x02') {\n    pBVar2 = p->pBt;\n    pPager = pBVar2->pPager;\n    rc = pPager->errCode;\n    if (rc == 0) {\n      if (((pPager->eState != '\x02') || (pPager->exclusiveMode == '\0')) ||\n         (pPager->journalMode != '\x01')) {\n        pPager->iDataVersion = pPager->iDataVersion + 1;\n        rc = pager_end_transaction(pPager,(uint)pPager->setMaster,1);\n        if (((rc & 0xff) == 0xd) || ((rc & 0xff) == 10)) {\n          pager_error(pPager,rc);\n        }\n        goto LAB_0016e7d8;\n      }\n      pPager->eState = '\x01';\n    }\n    else {\nLAB_0016e7d8:\n      if ((rc != 0) && ((bCleanup & 1U) == 0)) {\n        if (p->sharable == '\0') {\n          return rc;\n        }\n        piVar1 = &p->wantToLock;\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return rc;\n        }\n        goto LAB_0016e75b;\n      }\n    }\n    p->iDataVersion = p->iDataVersion - 1;\n    pBVar2->inTransaction = '\x01';\n    sqlite3BitvecDestroy(pBVar2->pHasContent);\n    pBVar2->pHasContent = (Bitvec *)0x0;\n  }\n  btreeEndTransaction(p);\n  if (p->sharable != '\0') {\n    rc = p->wantToLock - 1;\n    p->wantToLock = rc;\n    if (rc == 0) {\nLAB_0016e75b:\n      sqlite3BtreeLeave(p);\n      return rc;\n    }\n  }\n  return 0;\n}" primitive_type (function_declarator "sqlite3BtreeCommitPhaseTwo(Btree *p,int bCleanup)" identifier (parameter_list "(Btree *p,int bCleanup)" ( (parameter_declaration "Btree *p" type_identifier (pointer_declarator "*p" * identifier)) , (parameter_declaration "int bCleanup" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  BtShared *pBVar2;\n  Pager *pPager;\n  uint rc;\n  \n  if (p->sharable != '\0') {\n    sqlite3BtreeEnter(p);\n  }\n  if (p->inTrans == '\x02') {\n    pBVar2 = p->pBt;\n    pPager = pBVar2->pPager;\n    rc = pPager->errCode;\n    if (rc == 0) {\n      if (((pPager->eState != '\x02') || (pPager->exclusiveMode == '\0')) ||\n         (pPager->journalMode != '\x01')) {\n        pPager->iDataVersion = pPager->iDataVersion + 1;\n        rc = pager_end_transaction(pPager,(uint)pPager->setMaster,1);\n        if (((rc & 0xff) == 0xd) || ((rc & 0xff) == 10)) {\n          pager_error(pPager,rc);\n        }\n        goto LAB_0016e7d8;\n      }\n      pPager->eState = '\x01';\n    }\n    else {\nLAB_0016e7d8:\n      if ((rc != 0) && ((bCleanup & 1U) == 0)) {\n        if (p->sharable == '\0') {\n          return rc;\n        }\n        piVar1 = &p->wantToLock;\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return rc;\n        }\n        goto LAB_0016e75b;\n      }\n    }\n    p->iDataVersion = p->iDataVersion - 1;\n    pBVar2->inTransaction = '\x01';\n    sqlite3BitvecDestroy(pBVar2->pHasContent);\n    pBVar2->pHasContent = (Bitvec *)0x0;\n  }\n  btreeEndTransaction(p);\n  if (p->sharable != '\0') {\n    rc = p->wantToLock - 1;\n    p->wantToLock = rc;\n    if (rc == 0) {\nLAB_0016e75b:\n      sqlite3BtreeLeave(p);\n      return rc;\n    }\n  }\n  return 0;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "BtShared *pBVar2;" type_identifier (pointer_declarator "*pBVar2" * identifier) ;) (declaration "Pager *pPager;" type_identifier (pointer_declarator "*pPager" * identifier) ;) (declaration "uint rc;" type_identifier identifier ;) (if_statement "if (p->sharable != '\0') {\n    sqlite3BtreeEnter(p);\n  }" if (parenthesized_expression "(p->sharable != '\0')" ( (binary_expression "p->sharable != '\0'" (field_expression "p->sharable" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    sqlite3BtreeEnter(p);\n  }" { (expression_statement "sqlite3BtreeEnter(p);" (call_expression "sqlite3BtreeEnter(p)" identifier (argument_list "(p)" ( identifier ))) ;) })) (if_statement "if (p->inTrans == '\x02') {\n    pBVar2 = p->pBt;\n    pPager = pBVar2->pPager;\n    rc = pPager->errCode;\n    if (rc == 0) {\n      if (((pPager->eState != '\x02') || (pPager->exclusiveMode == '\0')) ||\n         (pPager->journalMode != '\x01')) {\n        pPager->iDataVersion = pPager->iDataVersion + 1;\n        rc = pager_end_transaction(pPager,(uint)pPager->setMaster,1);\n        if (((rc & 0xff) == 0xd) || ((rc & 0xff) == 10)) {\n          pager_error(pPager,rc);\n        }\n        goto LAB_0016e7d8;\n      }\n      pPager->eState = '\x01';\n    }\n    else {\nLAB_0016e7d8:\n      if ((rc != 0) && ((bCleanup & 1U) == 0)) {\n        if (p->sharable == '\0') {\n          return rc;\n        }\n        piVar1 = &p->wantToLock;\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return rc;\n        }\n        goto LAB_0016e75b;\n      }\n    }\n    p->iDataVersion = p->iDataVersion - 1;\n    pBVar2->inTransaction = '\x01';\n    sqlite3BitvecDestroy(pBVar2->pHasContent);\n    pBVar2->pHasContent = (Bitvec *)0x0;\n  }" if (parenthesized_expression "(p->inTrans == '\x02')" ( (binary_expression "p->inTrans == '\x02'" (field_expression "p->inTrans" identifier -> field_identifier) == (char_literal "'\x02'" ' escape_sequence ')) )) (compound_statement "{\n    pBVar2 = p->pBt;\n    pPager = pBVar2->pPager;\n    rc = pPager->errCode;\n    if (rc == 0) {\n      if (((pPager->eState != '\x02') || (pPager->exclusiveMode == '\0')) ||\n         (pPager->journalMode != '\x01')) {\n        pPager->iDataVersion = pPager->iDataVersion + 1;\n        rc = pager_end_transaction(pPager,(uint)pPager->setMaster,1);\n        if (((rc & 0xff) == 0xd) || ((rc & 0xff) == 10)) {\n          pager_error(pPager,rc);\n        }\n        goto LAB_0016e7d8;\n      }\n      pPager->eState = '\x01';\n    }\n    else {\nLAB_0016e7d8:\n      if ((rc != 0) && ((bCleanup & 1U) == 0)) {\n        if (p->sharable == '\0') {\n          return rc;\n        }\n        piVar1 = &p->wantToLock;\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return rc;\n        }\n        goto LAB_0016e75b;\n      }\n    }\n    p->iDataVersion = p->iDataVersion - 1;\n    pBVar2->inTransaction = '\x01';\n    sqlite3BitvecDestroy(pBVar2->pHasContent);\n    pBVar2->pHasContent = (Bitvec *)0x0;\n  }" { (expression_statement "pBVar2 = p->pBt;" (assignment_expression "pBVar2 = p->pBt" identifier = (field_expression "p->pBt" identifier -> field_identifier)) ;) (expression_statement "pPager = pBVar2->pPager;" (assignment_expression "pPager = pBVar2->pPager" identifier = (field_expression "pBVar2->pPager" identifier -> field_identifier)) ;) (expression_statement "rc = pPager->errCode;" (assignment_expression "rc = pPager->errCode" identifier = (field_expression "pPager->errCode" identifier -> field_identifier)) ;) (if_statement "if (rc == 0) {\n      if (((pPager->eState != '\x02') || (pPager->exclusiveMode == '\0')) ||\n         (pPager->journalMode != '\x01')) {\n        pPager->iDataVersion = pPager->iDataVersion + 1;\n        rc = pager_end_transaction(pPager,(uint)pPager->setMaster,1);\n        if (((rc & 0xff) == 0xd) || ((rc & 0xff) == 10)) {\n          pager_error(pPager,rc);\n        }\n        goto LAB_0016e7d8;\n      }\n      pPager->eState = '\x01';\n    }\n    else {\nLAB_0016e7d8:\n      if ((rc != 0) && ((bCleanup & 1U) == 0)) {\n        if (p->sharable == '\0') {\n          return rc;\n        }\n        piVar1 = &p->wantToLock;\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return rc;\n        }\n        goto LAB_0016e75b;\n      }\n    }" if (parenthesized_expression "(rc == 0)" ( (binary_expression "rc == 0" identifier == number_literal) )) (compound_statement "{\n      if (((pPager->eState != '\x02') || (pPager->exclusiveMode == '\0')) ||\n         (pPager->journalMode != '\x01')) {\n        pPager->iDataVersion = pPager->iDataVersion + 1;\n        rc = pager_end_transaction(pPager,(uint)pPager->setMaster,1);\n        if (((rc & 0xff) == 0xd) || ((rc & 0xff) == 10)) {\n          pager_error(pPager,rc);\n        }\n        goto LAB_0016e7d8;\n      }\n      pPager->eState = '\x01';\n    }" { (if_statement "if (((pPager->eState != '\x02') || (pPager->exclusiveMode == '\0')) ||\n         (pPager->journalMode != '\x01')) {\n        pPager->iDataVersion = pPager->iDataVersion + 1;\n        rc = pager_end_transaction(pPager,(uint)pPager->setMaster,1);\n        if (((rc & 0xff) == 0xd) || ((rc & 0xff) == 10)) {\n          pager_error(pPager,rc);\n        }\n        goto LAB_0016e7d8;\n      }" if (parenthesized_expression "(((pPager->eState != '\x02') || (pPager->exclusiveMode == '\0')) ||\n         (pPager->journalMode != '\x01'))" ( (binary_expression "((pPager->eState != '\x02') || (pPager->exclusiveMode == '\0')) ||\n         (pPager->journalMode != '\x01')" (parenthesized_expression "((pPager->eState != '\x02') || (pPager->exclusiveMode == '\0'))" ( (binary_expression "(pPager->eState != '\x02') || (pPager->exclusiveMode == '\0')" (parenthesized_expression "(pPager->eState != '\x02')" ( (binary_expression "pPager->eState != '\x02'" (field_expression "pPager->eState" identifier -> field_identifier) != (char_literal "'\x02'" ' escape_sequence ')) )) || (parenthesized_expression "(pPager->exclusiveMode == '\0')" ( (binary_expression "pPager->exclusiveMode == '\0'" (field_expression "pPager->exclusiveMode" identifier -> field_identifier) == (char_literal "'\0'" ' escape_sequence ')) ))) )) || (parenthesized_expression "(pPager->journalMode != '\x01')" ( (binary_expression "pPager->journalMode != '\x01'" (field_expression "pPager->journalMode" identifier -> field_identifier) != (char_literal "'\x01'" ' escape_sequence ')) ))) )) (compound_statement "{\n        pPager->iDataVersion = pPager->iDataVersion + 1;\n        rc = pager_end_transaction(pPager,(uint)pPager->setMaster,1);\n        if (((rc & 0xff) == 0xd) || ((rc & 0xff) == 10)) {\n          pager_error(pPager,rc);\n        }\n        goto LAB_0016e7d8;\n      }" { (expression_statement "pPager->iDataVersion = pPager->iDataVersion + 1;" (assignment_expression "pPager->iDataVersion = pPager->iDataVersion + 1" (field_expression "pPager->iDataVersion" identifier -> field_identifier) = (binary_expression "pPager->iDataVersion + 1" (field_expression "pPager->iDataVersion" identifier -> field_identifier) + number_literal)) ;) (expression_statement "rc = pager_end_transaction(pPager,(uint)pPager->setMaster,1);" (assignment_expression "rc = pager_end_transaction(pPager,(uint)pPager->setMaster,1)" identifier = (call_expression "pager_end_transaction(pPager,(uint)pPager->setMaster,1)" identifier (argument_list "(pPager,(uint)pPager->setMaster,1)" ( identifier , (cast_expression "(uint)pPager->setMaster" ( (type_descriptor "uint" type_identifier) ) (field_expression "pPager->setMaster" identifier -> field_identifier)) , number_literal )))) ;) (if_statement "if (((rc & 0xff) == 0xd) || ((rc & 0xff) == 10)) {\n          pager_error(pPager,rc);\n        }" if (parenthesized_expression "(((rc & 0xff) == 0xd) || ((rc & 0xff) == 10))" ( (binary_expression "((rc & 0xff) == 0xd) || ((rc & 0xff) == 10)" (parenthesized_expression "((rc & 0xff) == 0xd)" ( (binary_expression "(rc & 0xff) == 0xd" (parenthesized_expression "(rc & 0xff)" ( (binary_expression "rc & 0xff" identifier & number_literal) )) == number_literal) )) || (parenthesized_expression "((rc & 0xff) == 10)" ( (binary_expression "(rc & 0xff) == 10" (parenthesized_expression "(rc & 0xff)" ( (binary_expression "rc & 0xff" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n          pager_error(pPager,rc);\n        }" { (expression_statement "pager_error(pPager,rc);" (call_expression "pager_error(pPager,rc)" identifier (argument_list "(pPager,rc)" ( identifier , identifier ))) ;) })) (goto_statement "goto LAB_0016e7d8;" goto statement_identifier ;) })) (expression_statement "pPager->eState = '\x01';" (assignment_expression "pPager->eState = '\x01'" (field_expression "pPager->eState" identifier -> field_identifier) = (char_literal "'\x01'" ' escape_sequence ')) ;) }) (else_clause "else {\nLAB_0016e7d8:\n      if ((rc != 0) && ((bCleanup & 1U) == 0)) {\n        if (p->sharable == '\0') {\n          return rc;\n        }\n        piVar1 = &p->wantToLock;\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return rc;\n        }\n        goto LAB_0016e75b;\n      }\n    }" else (compound_statement "{\nLAB_0016e7d8:\n      if ((rc != 0) && ((bCleanup & 1U) == 0)) {\n        if (p->sharable == '\0') {\n          return rc;\n        }\n        piVar1 = &p->wantToLock;\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return rc;\n        }\n        goto LAB_0016e75b;\n      }\n    }" { (labeled_statement "LAB_0016e7d8:\n      if ((rc != 0) && ((bCleanup & 1U) == 0)) {\n        if (p->sharable == '\0') {\n          return rc;\n        }\n        piVar1 = &p->wantToLock;\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return rc;\n        }\n        goto LAB_0016e75b;\n      }" statement_identifier : (if_statement "if ((rc != 0) && ((bCleanup & 1U) == 0)) {\n        if (p->sharable == '\0') {\n          return rc;\n        }\n        piVar1 = &p->wantToLock;\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return rc;\n        }\n        goto LAB_0016e75b;\n      }" if (parenthesized_expression "((rc != 0) && ((bCleanup & 1U) == 0))" ( (binary_expression "(rc != 0) && ((bCleanup & 1U) == 0)" (parenthesized_expression "(rc != 0)" ( (binary_expression "rc != 0" identifier != number_literal) )) && (parenthesized_expression "((bCleanup & 1U) == 0)" ( (binary_expression "(bCleanup & 1U) == 0" (parenthesized_expression "(bCleanup & 1U)" ( (binary_expression "bCleanup & 1U" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n        if (p->sharable == '\0') {\n          return rc;\n        }\n        piVar1 = &p->wantToLock;\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return rc;\n        }\n        goto LAB_0016e75b;\n      }" { (if_statement "if (p->sharable == '\0') {\n          return rc;\n        }" if (parenthesized_expression "(p->sharable == '\0')" ( (binary_expression "p->sharable == '\0'" (field_expression "p->sharable" identifier -> field_identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n          return rc;\n        }" { (return_statement "return rc;" return identifier ;) })) (expression_statement "piVar1 = &p->wantToLock;" (assignment_expression "piVar1 = &p->wantToLock" identifier = (pointer_expression "&p->wantToLock" & (field_expression "p->wantToLock" identifier -> field_identifier))) ;) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (if_statement "if (*piVar1 != 0) {\n          return rc;\n        }" if (parenthesized_expression "(*piVar1 != 0)" ( (binary_expression "*piVar1 != 0" (pointer_expression "*piVar1" * identifier) != number_literal) )) (compound_statement "{\n          return rc;\n        }" { (return_statement "return rc;" return identifier ;) })) (goto_statement "goto LAB_0016e75b;" goto statement_identifier ;) }))) }))) (expression_statement "p->iDataVersion = p->iDataVersion - 1;" (assignment_expression "p->iDataVersion = p->iDataVersion - 1" (field_expression "p->iDataVersion" identifier -> field_identifier) = (binary_expression "p->iDataVersion - 1" (field_expression "p->iDataVersion" identifier -> field_identifier) - number_literal)) ;) (expression_statement "pBVar2->inTransaction = '\x01';" (assignment_expression "pBVar2->inTransaction = '\x01'" (field_expression "pBVar2->inTransaction" identifier -> field_identifier) = (char_literal "'\x01'" ' escape_sequence ')) ;) (expression_statement "sqlite3BitvecDestroy(pBVar2->pHasContent);" (call_expression "sqlite3BitvecDestroy(pBVar2->pHasContent)" identifier (argument_list "(pBVar2->pHasContent)" ( (field_expression "pBVar2->pHasContent" identifier -> field_identifier) ))) ;) (expression_statement "pBVar2->pHasContent = (Bitvec *)0x0;" (assignment_expression "pBVar2->pHasContent = (Bitvec *)0x0" (field_expression "pBVar2->pHasContent" identifier -> field_identifier) = (cast_expression "(Bitvec *)0x0" ( (type_descriptor "Bitvec *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })) (expression_statement "btreeEndTransaction(p);" (call_expression "btreeEndTransaction(p)" identifier (argument_list "(p)" ( identifier ))) ;) (if_statement "if (p->sharable != '\0') {\n    rc = p->wantToLock - 1;\n    p->wantToLock = rc;\n    if (rc == 0) {\nLAB_0016e75b:\n      sqlite3BtreeLeave(p);\n      return rc;\n    }\n  }" if (parenthesized_expression "(p->sharable != '\0')" ( (binary_expression "p->sharable != '\0'" (field_expression "p->sharable" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    rc = p->wantToLock - 1;\n    p->wantToLock = rc;\n    if (rc == 0) {\nLAB_0016e75b:\n      sqlite3BtreeLeave(p);\n      return rc;\n    }\n  }" { (expression_statement "rc = p->wantToLock - 1;" (assignment_expression "rc = p->wantToLock - 1" identifier = (binary_expression "p->wantToLock - 1" (field_expression "p->wantToLock" identifier -> field_identifier) - number_literal)) ;) (expression_statement "p->wantToLock = rc;" (assignment_expression "p->wantToLock = rc" (field_expression "p->wantToLock" identifier -> field_identifier) = identifier) ;) (if_statement "if (rc == 0) {\nLAB_0016e75b:\n      sqlite3BtreeLeave(p);\n      return rc;\n    }" if (parenthesized_expression "(rc == 0)" ( (binary_expression "rc == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0016e75b:\n      sqlite3BtreeLeave(p);\n      return rc;\n    }" { (labeled_statement "LAB_0016e75b:\n      sqlite3BtreeLeave(p);" statement_identifier : (expression_statement "sqlite3BtreeLeave(p);" (call_expression "sqlite3BtreeLeave(p)" identifier (argument_list "(p)" ( identifier ))) ;)) (return_statement "return rc;" return identifier ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "ulong FUN_0016e710(long param_1,ulong param_2)\n\n{\n  int *piVar1;\n  long *plVar2;\n  long lVar3;\n  uint uVar4;\n  ulong uVar5;\n  \n  if (*(char *)(param_1 + 0x11) != '\0') {\n    FUN_0011fbe0();\n  }\n  if (*(char *)(param_1 + 0x10) == '\x02') {\n    plVar2 = *(long **)(param_1 + 8);\n    lVar3 = *plVar2;\n    uVar5 = (ulong)*(uint *)(lVar3 + 0x2c);\n    if (*(uint *)(lVar3 + 0x2c) == 0) {\n      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }\n      *(undefined1 *)(lVar3 + 0x14) = 1;\n    }\n    else {\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }\n    *(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1;\n    *(undefined1 *)((long)plVar2 + 0x24) = 1;\n    FUN_0011aa90(plVar2[0xb]);\n    plVar2[0xb] = 0;\n  }\n  FUN_0016e5e0(param_1);\n  if (*(char *)(param_1 + 0x11) != '\0') {\n    uVar4 = *(int *)(param_1 + 0x14) - 1;\n    uVar5 = (ulong)uVar4;\n    *(uint *)(param_1 + 0x14) = uVar4;\n    if (uVar4 == 0) {\nLAB_0016e75b:\n      FUN_0011fc70(param_1);\n      return uVar5 & 0xffffffff;\n    }\n  }\n  return 0;\n}\n\n" (function_definition "ulong FUN_0016e710(long param_1,ulong param_2)\n\n{\n  int *piVar1;\n  long *plVar2;\n  long lVar3;\n  uint uVar4;\n  ulong uVar5;\n  \n  if (*(char *)(param_1 + 0x11) != '\0') {\n    FUN_0011fbe0();\n  }\n  if (*(char *)(param_1 + 0x10) == '\x02') {\n    plVar2 = *(long **)(param_1 + 8);\n    lVar3 = *plVar2;\n    uVar5 = (ulong)*(uint *)(lVar3 + 0x2c);\n    if (*(uint *)(lVar3 + 0x2c) == 0) {\n      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }\n      *(undefined1 *)(lVar3 + 0x14) = 1;\n    }\n    else {\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }\n    *(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1;\n    *(undefined1 *)((long)plVar2 + 0x24) = 1;\n    FUN_0011aa90(plVar2[0xb]);\n    plVar2[0xb] = 0;\n  }\n  FUN_0016e5e0(param_1);\n  if (*(char *)(param_1 + 0x11) != '\0') {\n    uVar4 = *(int *)(param_1 + 0x14) - 1;\n    uVar5 = (ulong)uVar4;\n    *(uint *)(param_1 + 0x14) = uVar4;\n    if (uVar4 == 0) {\nLAB_0016e75b:\n      FUN_0011fc70(param_1);\n      return uVar5 & 0xffffffff;\n    }\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_0016e710(long param_1,ulong param_2)" identifier (parameter_list "(long param_1,ulong param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "ulong param_2" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  long *plVar2;\n  long lVar3;\n  uint uVar4;\n  ulong uVar5;\n  \n  if (*(char *)(param_1 + 0x11) != '\0') {\n    FUN_0011fbe0();\n  }\n  if (*(char *)(param_1 + 0x10) == '\x02') {\n    plVar2 = *(long **)(param_1 + 8);\n    lVar3 = *plVar2;\n    uVar5 = (ulong)*(uint *)(lVar3 + 0x2c);\n    if (*(uint *)(lVar3 + 0x2c) == 0) {\n      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }\n      *(undefined1 *)(lVar3 + 0x14) = 1;\n    }\n    else {\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }\n    *(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1;\n    *(undefined1 *)((long)plVar2 + 0x24) = 1;\n    FUN_0011aa90(plVar2[0xb]);\n    plVar2[0xb] = 0;\n  }\n  FUN_0016e5e0(param_1);\n  if (*(char *)(param_1 + 0x11) != '\0') {\n    uVar4 = *(int *)(param_1 + 0x14) - 1;\n    uVar5 = (ulong)uVar4;\n    *(uint *)(param_1 + 0x14) = uVar4;\n    if (uVar4 == 0) {\nLAB_0016e75b:\n      FUN_0011fc70(param_1);\n      return uVar5 & 0xffffffff;\n    }\n  }\n  return 0;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "long *plVar2;" (sized_type_specifier "long" long) (pointer_declarator "*plVar2" * identifier) ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "ulong uVar5;" type_identifier identifier ;) (if_statement "if (*(char *)(param_1 + 0x11) != '\0') {\n    FUN_0011fbe0();\n  }" if (parenthesized_expression "(*(char *)(param_1 + 0x11) != '\0')" ( (binary_expression "*(char *)(param_1 + 0x11) != '\0'" (pointer_expression "*(char *)(param_1 + 0x11)" * (cast_expression "(char *)(param_1 + 0x11)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x11)" ( (binary_expression "param_1 + 0x11" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    FUN_0011fbe0();\n  }" { (expression_statement "FUN_0011fbe0();" (call_expression "FUN_0011fbe0()" identifier (argument_list "()" ( ))) ;) })) (if_statement "if (*(char *)(param_1 + 0x10) == '\x02') {\n    plVar2 = *(long **)(param_1 + 8);\n    lVar3 = *plVar2;\n    uVar5 = (ulong)*(uint *)(lVar3 + 0x2c);\n    if (*(uint *)(lVar3 + 0x2c) == 0) {\n      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }\n      *(undefined1 *)(lVar3 + 0x14) = 1;\n    }\n    else {\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }\n    *(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1;\n    *(undefined1 *)((long)plVar2 + 0x24) = 1;\n    FUN_0011aa90(plVar2[0xb]);\n    plVar2[0xb] = 0;\n  }" if (parenthesized_expression "(*(char *)(param_1 + 0x10) == '\x02')" ( (binary_expression "*(char *)(param_1 + 0x10) == '\x02'" (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 "'\x02'" ' escape_sequence ')) )) (compound_statement "{\n    plVar2 = *(long **)(param_1 + 8);\n    lVar3 = *plVar2;\n    uVar5 = (ulong)*(uint *)(lVar3 + 0x2c);\n    if (*(uint *)(lVar3 + 0x2c) == 0) {\n      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }\n      *(undefined1 *)(lVar3 + 0x14) = 1;\n    }\n    else {\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }\n    *(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1;\n    *(undefined1 *)((long)plVar2 + 0x24) = 1;\n    FUN_0011aa90(plVar2[0xb]);\n    plVar2[0xb] = 0;\n  }" { (expression_statement "plVar2 = *(long **)(param_1 + 8);" (assignment_expression "plVar2 = *(long **)(param_1 + 8)" identifier = (pointer_expression "*(long **)(param_1 + 8)" * (cast_expression "(long **)(param_1 + 8)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "lVar3 = *plVar2;" (assignment_expression "lVar3 = *plVar2" identifier = (pointer_expression "*plVar2" * identifier)) ;) (expression_statement "uVar5 = (ulong)*(uint *)(lVar3 + 0x2c);" (assignment_expression "uVar5 = (ulong)*(uint *)(lVar3 + 0x2c)" identifier = (binary_expression "(ulong)*(uint *)(lVar3 + 0x2c)" (parenthesized_expression "(ulong)" ( identifier )) * (cast_expression "(uint *)(lVar3 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x2c)" ( (binary_expression "lVar3 + 0x2c" identifier + number_literal) ))))) ;) (if_statement "if (*(uint *)(lVar3 + 0x2c) == 0) {\n      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }\n      *(undefined1 *)(lVar3 + 0x14) = 1;\n    }\n    else {\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }" if (parenthesized_expression "(*(uint *)(lVar3 + 0x2c) == 0)" ( (binary_expression "*(uint *)(lVar3 + 0x2c) == 0" (pointer_expression "*(uint *)(lVar3 + 0x2c)" * (cast_expression "(uint *)(lVar3 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x2c)" ( (binary_expression "lVar3 + 0x2c" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }\n      *(undefined1 *)(lVar3 + 0x14) = 1;\n    }" { (if_statement "if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }" if (parenthesized_expression "(((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01'))" ( (binary_expression "((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')" (parenthesized_expression "((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0'))" ( (binary_expression "(*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')" (parenthesized_expression "(*(char *)(lVar3 + 0x14) != '\x02')" ( (binary_expression "*(char *)(lVar3 + 0x14) != '\x02'" (pointer_expression "*(char *)(lVar3 + 0x14)" * (cast_expression "(char *)(lVar3 + 0x14)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x14)" ( (binary_expression "lVar3 + 0x14" identifier + number_literal) )))) != (char_literal "'\x02'" ' escape_sequence ')) )) || (parenthesized_expression "(*(char *)(lVar3 + 8) == '\0')" ( (binary_expression "*(char *)(lVar3 + 8) == '\0'" (pointer_expression "*(char *)(lVar3 + 8)" * (cast_expression "(char *)(lVar3 + 8)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 8)" ( (binary_expression "lVar3 + 8" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) ))) )) || (parenthesized_expression "(*(char *)(lVar3 + 9) != '\x01')" ( (binary_expression "*(char *)(lVar3 + 9) != '\x01'" (pointer_expression "*(char *)(lVar3 + 9)" * (cast_expression "(char *)(lVar3 + 9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 9)" ( (binary_expression "lVar3 + 9" identifier + number_literal) )))) != (char_literal "'\x01'" ' escape_sequence ')) ))) )) (compound_statement "{\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }" { (expression_statement "*(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;" (assignment_expression "*(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1" (pointer_expression "*(int *)(lVar3 + 0x84)" * (cast_expression "(int *)(lVar3 + 0x84)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x84)" ( (binary_expression "lVar3 + 0x84" identifier + number_literal) )))) = (binary_expression "*(int *)(lVar3 + 0x84) + 1" (pointer_expression "*(int *)(lVar3 + 0x84)" * (cast_expression "(int *)(lVar3 + 0x84)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x84)" ( (binary_expression "lVar3 + 0x84" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);" (assignment_expression "uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1)" identifier = (call_expression "FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1)" identifier (argument_list "(lVar3,*(undefined1 *)(lVar3 + 0x17),1)" ( identifier , (pointer_expression "*(undefined1 *)(lVar3 + 0x17)" * (cast_expression "(undefined1 *)(lVar3 + 0x17)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x17)" ( (binary_expression "lVar3 + 0x17" identifier + number_literal) )))) , number_literal )))) ;) (expression_statement "uVar4 = (uint)uVar5 & 0xff;" (assignment_expression "uVar4 = (uint)uVar5 & 0xff" identifier = (binary_expression "(uint)uVar5 & 0xff" (cast_expression "(uint)uVar5" ( (type_descriptor "uint" type_identifier) ) identifier) & number_literal)) ;) (if_statement "if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }" if (parenthesized_expression "((uVar4 == 0xd) || (uVar4 == 10))" ( (binary_expression "(uVar4 == 0xd) || (uVar4 == 10)" (parenthesized_expression "(uVar4 == 0xd)" ( (binary_expression "uVar4 == 0xd" identifier == number_literal) )) || (parenthesized_expression "(uVar4 == 10)" ( (binary_expression "uVar4 == 10" identifier == number_literal) ))) )) (compound_statement "{\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }" { (expression_statement "FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);" (call_expression "FUN_0012c7a0(lVar3,uVar5 & 0xffffffff)" identifier (argument_list "(lVar3,uVar5 & 0xffffffff)" ( identifier , (binary_expression "uVar5 & 0xffffffff" identifier & number_literal) ))) ;) (expression_statement "uVar5 = uVar5 & 0xffffffff;" (assignment_expression "uVar5 = uVar5 & 0xffffffff" identifier = (binary_expression "uVar5 & 0xffffffff" identifier & number_literal)) ;) })) (goto_statement "goto LAB_0016e7d8;" goto statement_identifier ;) })) (expression_statement "*(undefined1 *)(lVar3 + 0x14) = 1;" (assignment_expression "*(undefined1 *)(lVar3 + 0x14) = 1" (pointer_expression "*(undefined1 *)(lVar3 + 0x14)" * (cast_expression "(undefined1 *)(lVar3 + 0x14)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x14)" ( (binary_expression "lVar3 + 0x14" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }" else (compound_statement "{\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }" { (labeled_statement "LAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }" statement_identifier : (if_statement "if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }" if (parenthesized_expression "(((int)uVar5 != 0) && ((param_2 & 1) == 0))" ( (binary_expression "((int)uVar5 != 0) && ((param_2 & 1) == 0)" (parenthesized_expression "((int)uVar5 != 0)" ( (binary_expression "(int)uVar5 != 0" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) != number_literal) )) && (parenthesized_expression "((param_2 & 1) == 0)" ( (binary_expression "(param_2 & 1) == 0" (parenthesized_expression "(param_2 & 1)" ( (binary_expression "param_2 & 1" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }" { (if_statement "if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }" if (parenthesized_expression "(*(char *)(param_1 + 0x11) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x11) == '\0'" (pointer_expression "*(char *)(param_1 + 0x11)" * (cast_expression "(char *)(param_1 + 0x11)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x11)" ( (binary_expression "param_1 + 0x11" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n          return uVar5;\n        }" { (return_statement "return uVar5;" return identifier ;) })) (expression_statement "piVar1 = (int *)(param_1 + 0x14);" (assignment_expression "piVar1 = (int *)(param_1 + 0x14)" identifier = (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) ;) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (if_statement "if (*piVar1 != 0) {\n          return uVar5;\n        }" if (parenthesized_expression "(*piVar1 != 0)" ( (binary_expression "*piVar1 != 0" (pointer_expression "*piVar1" * identifier) != number_literal) )) (compound_statement "{\n          return uVar5;\n        }" { (return_statement "return uVar5;" return identifier ;) })) (goto_statement "goto LAB_0016e75b;" goto statement_identifier ;) }))) }))) (expression_statement "*(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1;" (assignment_expression "*(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1" (pointer_expression "*(int *)(param_1 + 0x1c)" * (cast_expression "(int *)(param_1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 0x1c) + -1" (pointer_expression "*(int *)(param_1 + 0x1c)" * (cast_expression "(int *)(param_1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "*(undefined1 *)((long)plVar2 + 0x24) = 1;" (assignment_expression "*(undefined1 *)((long)plVar2 + 0x24) = 1" (pointer_expression "*(undefined1 *)((long)plVar2 + 0x24)" * (cast_expression "(undefined1 *)((long)plVar2 + 0x24)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)plVar2 + 0x24)" ( (binary_expression "(long)plVar2 + 0x24" (cast_expression "(long)plVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "FUN_0011aa90(plVar2[0xb]);" (call_expression "FUN_0011aa90(plVar2[0xb])" identifier (argument_list "(plVar2[0xb])" ( (subscript_expression "plVar2[0xb]" identifier [ number_literal ]) ))) ;) (expression_statement "plVar2[0xb] = 0;" (assignment_expression "plVar2[0xb] = 0" (subscript_expression "plVar2[0xb]" identifier [ number_literal ]) = number_literal) ;) })) (expression_statement "FUN_0016e5e0(param_1);" (call_expression "FUN_0016e5e0(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (if_statement "if (*(char *)(param_1 + 0x11) != '\0') {\n    uVar4 = *(int *)(param_1 + 0x14) - 1;\n    uVar5 = (ulong)uVar4;\n    *(uint *)(param_1 + 0x14) = uVar4;\n    if (uVar4 == 0) {\nLAB_0016e75b:\n      FUN_0011fc70(param_1);\n      return uVar5 & 0xffffffff;\n    }\n  }" if (parenthesized_expression "(*(char *)(param_1 + 0x11) != '\0')" ( (binary_expression "*(char *)(param_1 + 0x11) != '\0'" (pointer_expression "*(char *)(param_1 + 0x11)" * (cast_expression "(char *)(param_1 + 0x11)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x11)" ( (binary_expression "param_1 + 0x11" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    uVar4 = *(int *)(param_1 + 0x14) - 1;\n    uVar5 = (ulong)uVar4;\n    *(uint *)(param_1 + 0x14) = uVar4;\n    if (uVar4 == 0) {\nLAB_0016e75b:\n      FUN_0011fc70(param_1);\n      return uVar5 & 0xffffffff;\n    }\n  }" { (expression_statement "uVar4 = *(int *)(param_1 + 0x14) - 1;" (assignment_expression "uVar4 = *(int *)(param_1 + 0x14) - 1" identifier = (binary_expression "*(int *)(param_1 + 0x14) - 1" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) - number_literal)) ;) (expression_statement "uVar5 = (ulong)uVar4;" (assignment_expression "uVar5 = (ulong)uVar4" identifier = (cast_expression "(ulong)uVar4" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) (expression_statement "*(uint *)(param_1 + 0x14) = uVar4;" (assignment_expression "*(uint *)(param_1 + 0x14) = uVar4" (pointer_expression "*(uint *)(param_1 + 0x14)" * (cast_expression "(uint *)(param_1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = identifier) ;) (if_statement "if (uVar4 == 0) {\nLAB_0016e75b:\n      FUN_0011fc70(param_1);\n      return uVar5 & 0xffffffff;\n    }" if (parenthesized_expression "(uVar4 == 0)" ( (binary_expression "uVar4 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0016e75b:\n      FUN_0011fc70(param_1);\n      return uVar5 & 0xffffffff;\n    }" { (labeled_statement "LAB_0016e75b:\n      FUN_0011fc70(param_1);" statement_identifier : (expression_statement "FUN_0011fc70(param_1);" (call_expression "FUN_0011fc70(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;)) (return_statement "return uVar5 & 0xffffffff;" return (binary_expression "uVar5 & 0xffffffff" 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 IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) || (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) )))) != (char_literal ' escape_sequence ')) ))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (binary_expression IDENT == LIT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT & LIT) ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) })) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) }) (else_clause else (compound_statement { (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) != LIT) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) ))) )) (compound_statement { (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 IDENT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) (compound_statement { (return_statement return IDENT ;) })) (goto_statement goto statement_identifier ;) }))) }))) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_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 (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) )))) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) - LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;)) (return_statement return (binary_expression IDENT & LIT) ;) })) })) (return_statement return LIT ;) })))
(function_definition "ulong FUN_0016e710(long param_1,ulong param_2)\n\n{\n  int *piVar1;\n  long *plVar2;\n  long lVar3;\n  uint uVar4;\n  ulong uVar5;\n  \n  if (*(char *)(param_1 + 0x11) != '\0') {\n    FUN_0011fbe0();\n  }\n  if (*(char *)(param_1 + 0x10) == '\x02') {\n    plVar2 = *(long **)(param_1 + 8);\n    lVar3 = *plVar2;\n    uVar5 = (ulong)*(uint *)(lVar3 + 0x2c);\n    if (*(uint *)(lVar3 + 0x2c) == 0) {\n      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }\n      *(undefined1 *)(lVar3 + 0x14) = 1;\n    }\n    else {\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }\n    *(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1;\n    *(undefined1 *)((long)plVar2 + 0x24) = 1;\n    FUN_0011aa90(plVar2[0xb]);\n    plVar2[0xb] = 0;\n  }\n  FUN_0016e5e0(param_1);\n  if (*(char *)(param_1 + 0x11) != '\0') {\n    uVar4 = *(int *)(param_1 + 0x14) - 1;\n    uVar5 = (ulong)uVar4;\n    *(uint *)(param_1 + 0x14) = uVar4;\n    if (uVar4 == 0) {\nLAB_0016e75b:\n      FUN_0011fc70(param_1);\n      return uVar5 & 0xffffffff;\n    }\n  }\n  return 0;\n}" (type_identifier "ulong") (function_declarator "FUN_0016e710(long param_1,ulong param_2)" (identifier "FUN_0016e710") (parameter_list "(long param_1,ulong param_2)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "ulong param_2" (type_identifier "ulong") (identifier "param_2")) () ")"))) (compound_statement "{\n  int *piVar1;\n  long *plVar2;\n  long lVar3;\n  uint uVar4;\n  ulong uVar5;\n  \n  if (*(char *)(param_1 + 0x11) != '\0') {\n    FUN_0011fbe0();\n  }\n  if (*(char *)(param_1 + 0x10) == '\x02') {\n    plVar2 = *(long **)(param_1 + 8);\n    lVar3 = *plVar2;\n    uVar5 = (ulong)*(uint *)(lVar3 + 0x2c);\n    if (*(uint *)(lVar3 + 0x2c) == 0) {\n      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }\n      *(undefined1 *)(lVar3 + 0x14) = 1;\n    }\n    else {\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }\n    *(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1;\n    *(undefined1 *)((long)plVar2 + 0x24) = 1;\n    FUN_0011aa90(plVar2[0xb]);\n    plVar2[0xb] = 0;\n  }\n  FUN_0016e5e0(param_1);\n  if (*(char *)(param_1 + 0x11) != '\0') {\n    uVar4 = *(int *)(param_1 + 0x14) - 1;\n    uVar5 = (ulong)uVar4;\n    *(uint *)(param_1 + 0x14) = uVar4;\n    if (uVar4 == 0) {\nLAB_0016e75b:\n      FUN_0011fc70(param_1);\n      return uVar5 & 0xffffffff;\n    }\n  }\n  return 0;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "long *plVar2;" (sized_type_specifier "long" (long "long")) (pointer_declarator "*plVar2" (* "*") (identifier "plVar2")) (; ";")) (declaration "long lVar3;" (sized_type_specifier "long" (long "long")) (identifier "lVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "ulong uVar5;" (type_identifier "ulong") (identifier "uVar5") (; ";")) (if_statement "if (*(char *)(param_1 + 0x11) != '\0') {\n    FUN_0011fbe0();\n  }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 0x11) != '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0x11) != '\0'" (pointer_expression "*(char *)(param_1 + 0x11)" (* "*") (cast_expression "(char *)(param_1 + 0x11)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x11)" (( "(") (binary_expression "param_1 + 0x11" (identifier "param_1") (+ "+") (number_literal "0x11")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    FUN_0011fbe0();\n  }" ({ "{") (expression_statement "FUN_0011fbe0();" (call_expression "FUN_0011fbe0()" (identifier "FUN_0011fbe0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (if_statement "if (*(char *)(param_1 + 0x10) == '\x02') {\n    plVar2 = *(long **)(param_1 + 8);\n    lVar3 = *plVar2;\n    uVar5 = (ulong)*(uint *)(lVar3 + 0x2c);\n    if (*(uint *)(lVar3 + 0x2c) == 0) {\n      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }\n      *(undefined1 *)(lVar3 + 0x14) = 1;\n    }\n    else {\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }\n    *(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1;\n    *(undefined1 *)((long)plVar2 + 0x24) = 1;\n    FUN_0011aa90(plVar2[0xb]);\n    plVar2[0xb] = 0;\n  }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 0x10) == '\x02')" (( "(") (binary_expression "*(char *)(param_1 + 0x10) == '\x02'" (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 "'\x02'" (' "'") (escape_sequence "\x02") (' "'"))) () ")")) (compound_statement "{\n    plVar2 = *(long **)(param_1 + 8);\n    lVar3 = *plVar2;\n    uVar5 = (ulong)*(uint *)(lVar3 + 0x2c);\n    if (*(uint *)(lVar3 + 0x2c) == 0) {\n      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }\n      *(undefined1 *)(lVar3 + 0x14) = 1;\n    }\n    else {\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }\n    *(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1;\n    *(undefined1 *)((long)plVar2 + 0x24) = 1;\n    FUN_0011aa90(plVar2[0xb]);\n    plVar2[0xb] = 0;\n  }" ({ "{") (expression_statement "plVar2 = *(long **)(param_1 + 8);" (assignment_expression "plVar2 = *(long **)(param_1 + 8)" (identifier "plVar2") (= "=") (pointer_expression "*(long **)(param_1 + 8)" (* "*") (cast_expression "(long **)(param_1 + 8)" (( "(") (type_descriptor "long **" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "lVar3 = *plVar2;" (assignment_expression "lVar3 = *plVar2" (identifier "lVar3") (= "=") (pointer_expression "*plVar2" (* "*") (identifier "plVar2"))) (; ";")) (expression_statement "uVar5 = (ulong)*(uint *)(lVar3 + 0x2c);" (assignment_expression "uVar5 = (ulong)*(uint *)(lVar3 + 0x2c)" (identifier "uVar5") (= "=") (binary_expression "(ulong)*(uint *)(lVar3 + 0x2c)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (* "*") (cast_expression "(uint *)(lVar3 + 0x2c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x2c)" (( "(") (binary_expression "lVar3 + 0x2c" (identifier "lVar3") (+ "+") (number_literal "0x2c")) () ")"))))) (; ";")) (if_statement "if (*(uint *)(lVar3 + 0x2c) == 0) {\n      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }\n      *(undefined1 *)(lVar3 + 0x14) = 1;\n    }\n    else {\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }" (if "if") (parenthesized_expression "(*(uint *)(lVar3 + 0x2c) == 0)" (( "(") (binary_expression "*(uint *)(lVar3 + 0x2c) == 0" (pointer_expression "*(uint *)(lVar3 + 0x2c)" (* "*") (cast_expression "(uint *)(lVar3 + 0x2c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x2c)" (( "(") (binary_expression "lVar3 + 0x2c" (identifier "lVar3") (+ "+") (number_literal "0x2c")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }\n      *(undefined1 *)(lVar3 + 0x14) = 1;\n    }" ({ "{") (if_statement "if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')) {\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }" (if "if") (parenthesized_expression "(((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01'))" (( "(") (binary_expression "((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||\n         (*(char *)(lVar3 + 9) != '\x01')" (parenthesized_expression "((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0'))" (( "(") (binary_expression "(*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')" (parenthesized_expression "(*(char *)(lVar3 + 0x14) != '\x02')" (( "(") (binary_expression "*(char *)(lVar3 + 0x14) != '\x02'" (pointer_expression "*(char *)(lVar3 + 0x14)" (* "*") (cast_expression "(char *)(lVar3 + 0x14)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x14)" (( "(") (binary_expression "lVar3 + 0x14" (identifier "lVar3") (+ "+") (number_literal "0x14")) () ")")))) (!= "!=") (char_literal "'\x02'" (' "'") (escape_sequence "\x02") (' "'"))) () ")")) (|| "||") (parenthesized_expression "(*(char *)(lVar3 + 8) == '\0')" (( "(") (binary_expression "*(char *)(lVar3 + 8) == '\0'" (pointer_expression "*(char *)(lVar3 + 8)" (* "*") (cast_expression "(char *)(lVar3 + 8)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 8)" (( "(") (binary_expression "lVar3 + 8" (identifier "lVar3") (+ "+") (number_literal "8")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")"))) () ")")) (|| "||") (parenthesized_expression "(*(char *)(lVar3 + 9) != '\x01')" (( "(") (binary_expression "*(char *)(lVar3 + 9) != '\x01'" (pointer_expression "*(char *)(lVar3 + 9)" (* "*") (cast_expression "(char *)(lVar3 + 9)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 9)" (( "(") (binary_expression "lVar3 + 9" (identifier "lVar3") (+ "+") (number_literal "9")) () ")")))) (!= "!=") (char_literal "'\x01'" (' "'") (escape_sequence "\x01") (' "'"))) () ")"))) () ")")) (compound_statement "{\n        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;\n        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);\n        uVar4 = (uint)uVar5 & 0xff;\n        if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }\n        goto LAB_0016e7d8;\n      }" ({ "{") (expression_statement "*(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;" (assignment_expression "*(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1" (pointer_expression "*(int *)(lVar3 + 0x84)" (* "*") (cast_expression "(int *)(lVar3 + 0x84)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x84)" (( "(") (binary_expression "lVar3 + 0x84" (identifier "lVar3") (+ "+") (number_literal "0x84")) () ")")))) (= "=") (binary_expression "*(int *)(lVar3 + 0x84) + 1" (pointer_expression "*(int *)(lVar3 + 0x84)" (* "*") (cast_expression "(int *)(lVar3 + 0x84)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x84)" (( "(") (binary_expression "lVar3 + 0x84" (identifier "lVar3") (+ "+") (number_literal "0x84")) () ")")))) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);" (assignment_expression "uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1)" (identifier "uVar5") (= "=") (call_expression "FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1)" (identifier "FUN_0011f620") (argument_list "(lVar3,*(undefined1 *)(lVar3 + 0x17),1)" (( "(") (identifier "lVar3") (, ",") (pointer_expression "*(undefined1 *)(lVar3 + 0x17)" (* "*") (cast_expression "(undefined1 *)(lVar3 + 0x17)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x17)" (( "(") (binary_expression "lVar3 + 0x17" (identifier "lVar3") (+ "+") (number_literal "0x17")) () ")")))) (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "uVar4 = (uint)uVar5 & 0xff;" (assignment_expression "uVar4 = (uint)uVar5 & 0xff" (identifier "uVar4") (= "=") (binary_expression "(uint)uVar5 & 0xff" (cast_expression "(uint)uVar5" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "uVar5")) (& "&") (number_literal "0xff"))) (; ";")) (if_statement "if ((uVar4 == 0xd) || (uVar4 == 10)) {\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }" (if "if") (parenthesized_expression "((uVar4 == 0xd) || (uVar4 == 10))" (( "(") (binary_expression "(uVar4 == 0xd) || (uVar4 == 10)" (parenthesized_expression "(uVar4 == 0xd)" (( "(") (binary_expression "uVar4 == 0xd" (identifier "uVar4") (== "==") (number_literal "0xd")) () ")")) (|| "||") (parenthesized_expression "(uVar4 == 10)" (( "(") (binary_expression "uVar4 == 10" (identifier "uVar4") (== "==") (number_literal "10")) () ")"))) () ")")) (compound_statement "{\n          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);\n          uVar5 = uVar5 & 0xffffffff;\n        }" ({ "{") (expression_statement "FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);" (call_expression "FUN_0012c7a0(lVar3,uVar5 & 0xffffffff)" (identifier "FUN_0012c7a0") (argument_list "(lVar3,uVar5 & 0xffffffff)" (( "(") (identifier "lVar3") (, ",") (binary_expression "uVar5 & 0xffffffff" (identifier "uVar5") (& "&") (number_literal "0xffffffff")) () ")"))) (; ";")) (expression_statement "uVar5 = uVar5 & 0xffffffff;" (assignment_expression "uVar5 = uVar5 & 0xffffffff" (identifier "uVar5") (= "=") (binary_expression "uVar5 & 0xffffffff" (identifier "uVar5") (& "&") (number_literal "0xffffffff"))) (; ";")) (} "}"))) (goto_statement "goto LAB_0016e7d8;" (goto "goto") (statement_identifier "LAB_0016e7d8") (; ";")) (} "}"))) (expression_statement "*(undefined1 *)(lVar3 + 0x14) = 1;" (assignment_expression "*(undefined1 *)(lVar3 + 0x14) = 1" (pointer_expression "*(undefined1 *)(lVar3 + 0x14)" (* "*") (cast_expression "(undefined1 *)(lVar3 + 0x14)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x14)" (( "(") (binary_expression "lVar3 + 0x14" (identifier "lVar3") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (number_literal "1")) (; ";")) (} "}")) (else_clause "else {\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }" (else "else") (compound_statement "{\nLAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }\n    }" ({ "{") (labeled_statement "LAB_0016e7d8:\n      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }" (statement_identifier "LAB_0016e7d8") (: ":") (if_statement "if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }" (if "if") (parenthesized_expression "(((int)uVar5 != 0) && ((param_2 & 1) == 0))" (( "(") (binary_expression "((int)uVar5 != 0) && ((param_2 & 1) == 0)" (parenthesized_expression "((int)uVar5 != 0)" (( "(") (binary_expression "(int)uVar5 != 0" (cast_expression "(int)uVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar5")) (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "((param_2 & 1) == 0)" (( "(") (binary_expression "(param_2 & 1) == 0" (parenthesized_expression "(param_2 & 1)" (( "(") (binary_expression "param_2 & 1" (identifier "param_2") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n        if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }\n        piVar1 = (int *)(param_1 + 0x14);\n        *piVar1 = *piVar1 + -1;\n        if (*piVar1 != 0) {\n          return uVar5;\n        }\n        goto LAB_0016e75b;\n      }" ({ "{") (if_statement "if (*(char *)(param_1 + 0x11) == '\0') {\n          return uVar5;\n        }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 0x11) == '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0x11) == '\0'" (pointer_expression "*(char *)(param_1 + 0x11)" (* "*") (cast_expression "(char *)(param_1 + 0x11)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x11)" (( "(") (binary_expression "param_1 + 0x11" (identifier "param_1") (+ "+") (number_literal "0x11")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n          return uVar5;\n        }" ({ "{") (return_statement "return uVar5;" (return "return") (identifier "uVar5") (; ";")) (} "}"))) (expression_statement "piVar1 = (int *)(param_1 + 0x14);" (assignment_expression "piVar1 = (int *)(param_1 + 0x14)" (identifier "piVar1") (= "=") (cast_expression "(int *)(param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (; ";")) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (= "=") (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (+ "+") (number_literal "-1"))) (; ";")) (if_statement "if (*piVar1 != 0) {\n          return uVar5;\n        }" (if "if") (parenthesized_expression "(*piVar1 != 0)" (( "(") (binary_expression "*piVar1 != 0" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          return uVar5;\n        }" ({ "{") (return_statement "return uVar5;" (return "return") (identifier "uVar5") (; ";")) (} "}"))) (goto_statement "goto LAB_0016e75b;" (goto "goto") (statement_identifier "LAB_0016e75b") (; ";")) (} "}")))) (} "}")))) (expression_statement "*(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1;" (assignment_expression "*(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1" (pointer_expression "*(int *)(param_1 + 0x1c)" (* "*") (cast_expression "(int *)(param_1 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1c)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) () ")")))) (= "=") (binary_expression "*(int *)(param_1 + 0x1c) + -1" (pointer_expression "*(int *)(param_1 + 0x1c)" (* "*") (cast_expression "(int *)(param_1 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1c)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) () ")")))) (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "*(undefined1 *)((long)plVar2 + 0x24) = 1;" (assignment_expression "*(undefined1 *)((long)plVar2 + 0x24) = 1" (pointer_expression "*(undefined1 *)((long)plVar2 + 0x24)" (* "*") (cast_expression "(undefined1 *)((long)plVar2 + 0x24)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)plVar2 + 0x24)" (( "(") (binary_expression "(long)plVar2 + 0x24" (cast_expression "(long)plVar2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "plVar2")) (+ "+") (number_literal "0x24")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "FUN_0011aa90(plVar2[0xb]);" (call_expression "FUN_0011aa90(plVar2[0xb])" (identifier "FUN_0011aa90") (argument_list "(plVar2[0xb])" (( "(") (subscript_expression "plVar2[0xb]" (identifier "plVar2") ([ "[") (number_literal "0xb") (] "]")) () ")"))) (; ";")) (expression_statement "plVar2[0xb] = 0;" (assignment_expression "plVar2[0xb] = 0" (subscript_expression "plVar2[0xb]" (identifier "plVar2") ([ "[") (number_literal "0xb") (] "]")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "FUN_0016e5e0(param_1);" (call_expression "FUN_0016e5e0(param_1)" (identifier "FUN_0016e5e0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (if_statement "if (*(char *)(param_1 + 0x11) != '\0') {\n    uVar4 = *(int *)(param_1 + 0x14) - 1;\n    uVar5 = (ulong)uVar4;\n    *(uint *)(param_1 + 0x14) = uVar4;\n    if (uVar4 == 0) {\nLAB_0016e75b:\n      FUN_0011fc70(param_1);\n      return uVar5 & 0xffffffff;\n    }\n  }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 0x11) != '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0x11) != '\0'" (pointer_expression "*(char *)(param_1 + 0x11)" (* "*") (cast_expression "(char *)(param_1 + 0x11)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x11)" (( "(") (binary_expression "param_1 + 0x11" (identifier "param_1") (+ "+") (number_literal "0x11")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    uVar4 = *(int *)(param_1 + 0x14) - 1;\n    uVar5 = (ulong)uVar4;\n    *(uint *)(param_1 + 0x14) = uVar4;\n    if (uVar4 == 0) {\nLAB_0016e75b:\n      FUN_0011fc70(param_1);\n      return uVar5 & 0xffffffff;\n    }\n  }" ({ "{") (expression_statement "uVar4 = *(int *)(param_1 + 0x14) - 1;" (assignment_expression "uVar4 = *(int *)(param_1 + 0x14) - 1" (identifier "uVar4") (= "=") (binary_expression "*(int *)(param_1 + 0x14) - 1" (pointer_expression "*(int *)(param_1 + 0x14)" (* "*") (cast_expression "(int *)(param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (- "-") (number_literal "1"))) (; ";")) (expression_statement "uVar5 = (ulong)uVar4;" (assignment_expression "uVar5 = (ulong)uVar4" (identifier "uVar5") (= "=") (cast_expression "(ulong)uVar4" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar4"))) (; ";")) (expression_statement "*(uint *)(param_1 + 0x14) = uVar4;" (assignment_expression "*(uint *)(param_1 + 0x14) = uVar4" (pointer_expression "*(uint *)(param_1 + 0x14)" (* "*") (cast_expression "(uint *)(param_1 + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (identifier "uVar4")) (; ";")) (if_statement "if (uVar4 == 0) {\nLAB_0016e75b:\n      FUN_0011fc70(param_1);\n      return uVar5 & 0xffffffff;\n    }" (if "if") (parenthesized_expression "(uVar4 == 0)" (( "(") (binary_expression "uVar4 == 0" (identifier "uVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\nLAB_0016e75b:\n      FUN_0011fc70(param_1);\n      return uVar5 & 0xffffffff;\n    }" ({ "{") (labeled_statement "LAB_0016e75b:\n      FUN_0011fc70(param_1);" (statement_identifier "LAB_0016e75b") (: ":") (expression_statement "FUN_0011fc70(param_1);" (call_expression "FUN_0011fc70(param_1)" (identifier "FUN_0011fc70") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";"))) (return_statement "return uVar5 & 0xffffffff;" (return "return") (binary_expression "uVar5 & 0xffffffff" (identifier "uVar5") (& "&") (number_literal "0xffffffff")) (; ";")) (} "}"))) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

int function_1(type_1 *p,int var_5)

{
  int *piVar1;
  type_2 *pBVar2;
  type_3 *pPager;
  type_4 var_2;
  
  if (p->sharable != '\0') {
    var_1(p);
  }
  if (p->inTrans == '\x02') {
    pBVar2 = p->pBt;
    pPager = pBVar2->pPager;
    var_2 = pPager->errCode;
    if (var_2 == 0) {
      if (((pPager->eState != '\x02') || (pPager->exclusiveMode == '\0')) ||
         (pPager->journalMode != '\x01')) {
        pPager->iDataVersion = pPager->iDataVersion + 1;
        var_2 = var_3(pPager,(type_4)pPager->setMaster,1);
        if (((var_2 & 0xff) == 0xd) || ((var_2 & 0xff) == 10)) {
          var_4(pPager,var_2);
        }
        goto LAB_0016e7d8;
      }
      pPager->eState = '\x01';
    }
    else {
LAB_0016e7d8:
      if ((var_2 != 0) && ((var_5 & 1U) == 0)) {
        if (p->sharable == '\0') {
          return var_2;
        }
        piVar1 = &p->wantToLock;
        *piVar1 = *piVar1 + -1;
        if (*piVar1 != 0) {
          return var_2;
        }
        goto LAB_0016e75b;
      }
    }
    p->iDataVersion = p->iDataVersion - 1;
    pBVar2->inTransaction = '\x01';
    var_6(pBVar2->pHasContent);
    pBVar2->pHasContent = (type_5 *)0x0;
  }
  var_7(p);
  if (p->sharable != '\0') {
    var_2 = p->wantToLock - 1;
    p->wantToLock = var_2;
    if (var_2 == 0) {
LAB_0016e75b:
      var_8(p);
      return var_2;
    }
  }
  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: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (sized_type_specifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (identifier)) right: (cast_expression type: (type_descriptor type: (type_identifier) 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: (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))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (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: (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: (char_literal (escape_sequence)))))) consequence: (compound_statement (expression_statement (assignment_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: (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)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (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))))) (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (goto_statement label: (statement_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: (identifier) right: (number_literal))))) right: (number_literal)))) alternative: (else_clause (compound_statement (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))))) 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: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (char_literal (escape_sequence)))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (compound_statement (return_statement (identifier)))) (goto_statement label: (statement_identifier)))))))) (expression_statement (assignment_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: (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)))) (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: (sized_type_specifier)) value: (identifier)) right: (number_literal))))) right: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (subscript_expression argument: (identifier) index: (number_literal))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (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)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (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: (identifier) right: (number_literal))))) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))) (return_statement (binary_expression left: (identifier) right: (number_literal))))))) (return_statement (number_literal)))))

ulong MASKED(long param_1,ulong param_2)

{
  int *piVar1;
  long *plVar2;
  long lVar3;
  uint uVar4;
  ulong uVar5;
  
  if (*(char *)(param_1 + 0x11) != '\0') {
    FUN_0011fbe0();
  }
  if (*(char *)(param_1 + 0x10) == '\x02') {
    plVar2 = *(long **)(param_1 + 8);
    lVar3 = *plVar2;
    uVar5 = (ulong)*(uint *)(lVar3 + 0x2c);
    if (*(uint *)(lVar3 + 0x2c) == 0) {
      if (((*(char *)(lVar3 + 0x14) != '\x02') || (*(char *)(lVar3 + 8) == '\0')) ||
         (*(char *)(lVar3 + 9) != '\x01')) {
        *(int *)(lVar3 + 0x84) = *(int *)(lVar3 + 0x84) + 1;
        uVar5 = FUN_0011f620(lVar3,*(undefined1 *)(lVar3 + 0x17),1);
        uVar4 = (uint)uVar5 & 0xff;
        if ((uVar4 == 0xd) || (uVar4 == 10)) {
          FUN_0012c7a0(lVar3,uVar5 & 0xffffffff);
          uVar5 = uVar5 & 0xffffffff;
        }
        goto LAB_0016e7d8;
      }
      *(undefined1 *)(lVar3 + 0x14) = 1;
    }
    else {
LAB_0016e7d8:
      if (((int)uVar5 != 0) && ((param_2 & 1) == 0)) {
        if (*(char *)(param_1 + 0x11) == '\0') {
          return uVar5;
        }
        piVar1 = (int *)(param_1 + 0x14);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 != 0) {
          return uVar5;
        }
        goto LAB_0016e75b;
      }
    }
    *(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + -1;
    *(undefined1 *)((long)plVar2 + 0x24) = 1;
    FUN_0011aa90(plVar2[0xb]);
    plVar2[0xb] = 0;
  }
  FUN_0016e5e0(param_1);
  if (*(char *)(param_1 + 0x11) != '\0') {
    uVar4 = *(int *)(param_1 + 0x14) - 1;
    uVar5 = (ulong)uVar4;
    *(uint *)(param_1 + 0x14) = uVar4;
    if (uVar4 == 0) {
LAB_0016e75b:
      FUN_0011fc70(param_1);
      return uVar5 & 0xffffffff;
    }
  }
  return 0;
}

