
int vdbePmaReaderIncrMergeInit(PmaReader *pReadr,int eMode)

{
  IncrMerger *pIncr;
  SortSubtask *pTask;
  sqlite3 *db;
  long lVar1;
  int iVar2;
  sqlite3_file *psVar3;
  long nExtend;
  bool bVar4;
  
  pIncr = pReadr->pIncr;
  pTask = pIncr->pTask;
  db = pTask->pSorter->db;
  iVar2 = vdbeMergeEngineInit(pTask,pIncr->pMerger,eMode);
  if (iVar2 == 0) {
    nExtend = (long)pIncr->mxSz;
    if (pIncr->bUseThread == 0) {
      psVar3 = (pTask->file2).pFd;
      if (psVar3 == (sqlite3_file *)0x0) {
        iVar2 = vdbeSorterOpenTempFile(db,(pTask->file2).iEof,&(pTask->file2).pFd);
        (pTask->file2).iEof = 0;
        if (iVar2 != 0) {
          return iVar2;
        }
        psVar3 = (pTask->file2).pFd;
      }
      pIncr->aFile[1].pFd = psVar3;
      lVar1 = (pTask->file2).iEof;
      pIncr->iStartOff = lVar1;
      (pTask->file2).iEof = nExtend + lVar1;
      iVar2 = pIncr->bUseThread;
    }
    else {
      iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[0].pFd);
      if (iVar2 != 0) {
        return iVar2;
      }
      iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[1].pFd);
      if (iVar2 != 0) {
        return iVar2;
      }
      iVar2 = pIncr->bUseThread;
    }
    bVar4 = true;
    if (iVar2 != 0) {
      iVar2 = vdbeIncrPopulate(pIncr);
      bVar4 = iVar2 == 0;
    }
    if ((eMode != 1) && (bVar4)) {
      iVar2 = vdbePmaReaderNext(pReadr);
      return iVar2;
    }
  }
  return iVar2;
}



void FUN_0012fb90(long param_1,int param_2)

{
  long *plVar1;
  long lVar2;
  undefined8 uVar3;
  int iVar4;
  long lVar5;
  long lVar6;
  bool bVar7;
  
  plVar1 = *(long **)(param_1 + 0x48);
  lVar2 = *plVar1;
  uVar3 = *(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20);
  iVar4 = FUN_0012fcf0(lVar2,plVar1[1],param_2);
  if (iVar4 == 0) {
    lVar6 = (long)(int)plVar1[3];
    if ((int)plVar1[4] == 0) {
      lVar5 = *(long *)(lVar2 + 0x58);
      if (lVar5 == 0) {
        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);
        *(undefined8 *)(lVar2 + 0x60) = 0;
        if (iVar4 != 0) {
          return;
        }
        lVar5 = *(long *)(lVar2 + 0x58);
      }
      plVar1[7] = lVar5;
      lVar5 = *(long *)(lVar2 + 0x60);
      plVar1[2] = lVar5;
      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;
      iVar4 = (int)plVar1[4];
    }
    else {
      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);
      if (iVar4 != 0) {
        return;
      }
      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);
      if (iVar4 != 0) {
        return;
      }
      iVar4 = (int)plVar1[4];
    }
    bVar7 = true;
    if (iVar4 != 0) {
      iVar4 = FUN_0012f4b0(plVar1);
      bVar7 = iVar4 == 0;
    }
    if ((param_2 != 1) && (bVar7)) {
      FUN_0012f660(param_1);
      return;
    }
  }
  return;
}


PUSH R15
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
MOV R12D,ESI
PUSH RBP
MOV EDX,R12D
PUSH RBX
SUB RSP,0x8
MOV RBX,qword ptr [RDI + 0x48]
MOV RBP,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RBP + 0x10]
MOV RDI,RBP
MOV R14,qword ptr [RAX + 0x20]
CALL 0x0012fcf0
TEST EAX,EAX
JNZ 0x0012fc3c
MOV EAX,dword ptr [RBX + 0x20]
MOVSXD R15,dword ptr [RBX + 0x18]
TEST EAX,EAX
JNZ 0x0012fc50
MOV RAX,qword ptr [RBP + 0x58]
TEST RAX,RAX
JZ 0x0012fc20
MOV qword ptr [RBX + 0x38],RAX
MOV RAX,qword ptr [RBP + 0x60]
MOV EDX,0x1
ADD R15,RAX
MOV qword ptr [RBX + 0x10],RAX
MOV qword ptr [RBP + 0x60],R15
MOV EAX,dword ptr [RBX + 0x20]
TEST EAX,EAX
JNZ 0x0012fc86
CMP R12D,0x1
JZ 0x0012fc3c
TEST DL,DL
JZ 0x0012fc3c
ADD RSP,0x8
MOV RDI,R13
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
JMP 0x0012f660
MOV RSI,qword ptr [RBP + 0x60]
LEA RDX,[RBP + 0x58]
MOV RDI,R14
CALL 0x0011a970
MOV qword ptr [RBP + 0x60],0x0
TEST EAX,EAX
JZ 0x0012fca0
ADD RSP,0x8
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
LEA RDX,[RBX + 0x28]
MOV RSI,R15
MOV RDI,R14
CALL 0x0011a970
TEST EAX,EAX
JNZ 0x0012fc3c
LEA RDX,[RBX + 0x38]
MOV RSI,R15
MOV RDI,R14
CALL 0x0011a970
TEST EAX,EAX
JNZ 0x0012fc3c
MOV EAX,dword ptr [RBX + 0x20]
MOV EDX,0x1
TEST EAX,EAX
JZ 0x0012fbfd
MOV RDI,RBX
CALL 0x0012f4b0
TEST EAX,EAX
SETZ DL
JMP 0x0012fbfd
MOV RAX,qword ptr [RBP + 0x58]
JMP 0x0012fbda
(translation_unit "void FUN_0012fb90(long param_1,int param_2)\n\n{\n  long *plVar1;\n  long lVar2;\n  undefined8 uVar3;\n  int iVar4;\n  long lVar5;\n  long lVar6;\n  bool bVar7;\n  \n  plVar1 = *(long **)(param_1 + 0x48);\n  lVar2 = *plVar1;\n  uVar3 = *(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20);\n  iVar4 = FUN_0012fcf0(lVar2,plVar1[1],param_2);\n  if (iVar4 == 0) {\n    lVar6 = (long)(int)plVar1[3];\n    if ((int)plVar1[4] == 0) {\n      lVar5 = *(long *)(lVar2 + 0x58);\n      if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }\n      plVar1[7] = lVar5;\n      lVar5 = *(long *)(lVar2 + 0x60);\n      plVar1[2] = lVar5;\n      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;\n      iVar4 = (int)plVar1[4];\n    }\n    else {\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }\n    bVar7 = true;\n    if (iVar4 != 0) {\n      iVar4 = FUN_0012f4b0(plVar1);\n      bVar7 = iVar4 == 0;\n    }\n    if ((param_2 != 1) && (bVar7)) {\n      FUN_0012f660(param_1);\n      return;\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_0012fb90(long param_1,int param_2)\n\n{\n  long *plVar1;\n  long lVar2;\n  undefined8 uVar3;\n  int iVar4;\n  long lVar5;\n  long lVar6;\n  bool bVar7;\n  \n  plVar1 = *(long **)(param_1 + 0x48);\n  lVar2 = *plVar1;\n  uVar3 = *(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20);\n  iVar4 = FUN_0012fcf0(lVar2,plVar1[1],param_2);\n  if (iVar4 == 0) {\n    lVar6 = (long)(int)plVar1[3];\n    if ((int)plVar1[4] == 0) {\n      lVar5 = *(long *)(lVar2 + 0x58);\n      if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }\n      plVar1[7] = lVar5;\n      lVar5 = *(long *)(lVar2 + 0x60);\n      plVar1[2] = lVar5;\n      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;\n      iVar4 = (int)plVar1[4];\n    }\n    else {\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }\n    bVar7 = true;\n    if (iVar4 != 0) {\n      iVar4 = FUN_0012f4b0(plVar1);\n      bVar7 = iVar4 == 0;\n    }\n    if ((param_2 != 1) && (bVar7)) {\n      FUN_0012f660(param_1);\n      return;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0012fb90(long param_1,int param_2)" identifier (parameter_list "(long param_1,int param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  long *plVar1;\n  long lVar2;\n  undefined8 uVar3;\n  int iVar4;\n  long lVar5;\n  long lVar6;\n  bool bVar7;\n  \n  plVar1 = *(long **)(param_1 + 0x48);\n  lVar2 = *plVar1;\n  uVar3 = *(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20);\n  iVar4 = FUN_0012fcf0(lVar2,plVar1[1],param_2);\n  if (iVar4 == 0) {\n    lVar6 = (long)(int)plVar1[3];\n    if ((int)plVar1[4] == 0) {\n      lVar5 = *(long *)(lVar2 + 0x58);\n      if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }\n      plVar1[7] = lVar5;\n      lVar5 = *(long *)(lVar2 + 0x60);\n      plVar1[2] = lVar5;\n      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;\n      iVar4 = (int)plVar1[4];\n    }\n    else {\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }\n    bVar7 = true;\n    if (iVar4 != 0) {\n      iVar4 = FUN_0012f4b0(plVar1);\n      bVar7 = iVar4 == 0;\n    }\n    if ((param_2 != 1) && (bVar7)) {\n      FUN_0012f660(param_1);\n      return;\n    }\n  }\n  return;\n}" { (declaration "long *plVar1;" (sized_type_specifier "long" long) (pointer_declarator "*plVar1" * identifier) ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar6;" (sized_type_specifier "long" long) identifier ;) (declaration "bool bVar7;" primitive_type identifier ;) (expression_statement "plVar1 = *(long **)(param_1 + 0x48);" (assignment_expression "plVar1 = *(long **)(param_1 + 0x48)" identifier = (pointer_expression "*(long **)(param_1 + 0x48)" * (cast_expression "(long **)(param_1 + 0x48)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) ))))) ;) (expression_statement "lVar2 = *plVar1;" (assignment_expression "lVar2 = *plVar1" identifier = (pointer_expression "*plVar1" * identifier)) ;) (expression_statement "uVar3 = *(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20);" (assignment_expression "uVar3 = *(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20)" identifier = (pointer_expression "*(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20)" * (cast_expression "(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(lVar2 + 0x10) + 0x20)" ( (binary_expression "*(long *)(lVar2 + 0x10) + 0x20" (pointer_expression "*(long *)(lVar2 + 0x10)" * (cast_expression "(long *)(lVar2 + 0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + 0x10)" ( (binary_expression "lVar2 + 0x10" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "iVar4 = FUN_0012fcf0(lVar2,plVar1[1],param_2);" (assignment_expression "iVar4 = FUN_0012fcf0(lVar2,plVar1[1],param_2)" identifier = (call_expression "FUN_0012fcf0(lVar2,plVar1[1],param_2)" identifier (argument_list "(lVar2,plVar1[1],param_2)" ( identifier , (subscript_expression "plVar1[1]" identifier [ number_literal ]) , identifier )))) ;) (if_statement "if (iVar4 == 0) {\n    lVar6 = (long)(int)plVar1[3];\n    if ((int)plVar1[4] == 0) {\n      lVar5 = *(long *)(lVar2 + 0x58);\n      if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }\n      plVar1[7] = lVar5;\n      lVar5 = *(long *)(lVar2 + 0x60);\n      plVar1[2] = lVar5;\n      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;\n      iVar4 = (int)plVar1[4];\n    }\n    else {\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }\n    bVar7 = true;\n    if (iVar4 != 0) {\n      iVar4 = FUN_0012f4b0(plVar1);\n      bVar7 = iVar4 == 0;\n    }\n    if ((param_2 != 1) && (bVar7)) {\n      FUN_0012f660(param_1);\n      return;\n    }\n  }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n    lVar6 = (long)(int)plVar1[3];\n    if ((int)plVar1[4] == 0) {\n      lVar5 = *(long *)(lVar2 + 0x58);\n      if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }\n      plVar1[7] = lVar5;\n      lVar5 = *(long *)(lVar2 + 0x60);\n      plVar1[2] = lVar5;\n      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;\n      iVar4 = (int)plVar1[4];\n    }\n    else {\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }\n    bVar7 = true;\n    if (iVar4 != 0) {\n      iVar4 = FUN_0012f4b0(plVar1);\n      bVar7 = iVar4 == 0;\n    }\n    if ((param_2 != 1) && (bVar7)) {\n      FUN_0012f660(param_1);\n      return;\n    }\n  }" { (expression_statement "lVar6 = (long)(int)plVar1[3];" (assignment_expression "lVar6 = (long)(int)plVar1[3]" identifier = (cast_expression "(long)(int)plVar1[3]" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)plVar1[3]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "plVar1[3]" identifier [ number_literal ])))) ;) (if_statement "if ((int)plVar1[4] == 0) {\n      lVar5 = *(long *)(lVar2 + 0x58);\n      if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }\n      plVar1[7] = lVar5;\n      lVar5 = *(long *)(lVar2 + 0x60);\n      plVar1[2] = lVar5;\n      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;\n      iVar4 = (int)plVar1[4];\n    }\n    else {\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }" if (parenthesized_expression "((int)plVar1[4] == 0)" ( (binary_expression "(int)plVar1[4] == 0" (cast_expression "(int)plVar1[4]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "plVar1[4]" identifier [ number_literal ])) == number_literal) )) (compound_statement "{\n      lVar5 = *(long *)(lVar2 + 0x58);\n      if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }\n      plVar1[7] = lVar5;\n      lVar5 = *(long *)(lVar2 + 0x60);\n      plVar1[2] = lVar5;\n      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;\n      iVar4 = (int)plVar1[4];\n    }" { (expression_statement "lVar5 = *(long *)(lVar2 + 0x58);" (assignment_expression "lVar5 = *(long *)(lVar2 + 0x58)" identifier = (pointer_expression "*(long *)(lVar2 + 0x58)" * (cast_expression "(long *)(lVar2 + 0x58)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + 0x58)" ( (binary_expression "lVar2 + 0x58" identifier + number_literal) ))))) ;) (if_statement "if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }" if (parenthesized_expression "(lVar5 == 0)" ( (binary_expression "lVar5 == 0" identifier == number_literal) )) (compound_statement "{\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }" { (expression_statement "iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);" (assignment_expression "iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58)" identifier = (call_expression "FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58)" identifier (argument_list "(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58)" ( identifier , (pointer_expression "*(undefined8 *)(lVar2 + 0x60)" * (cast_expression "(undefined8 *)(lVar2 + 0x60)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + 0x60)" ( (binary_expression "lVar2 + 0x60" identifier + number_literal) )))) , (binary_expression "lVar2 + 0x58" identifier + number_literal) )))) ;) (expression_statement "*(undefined8 *)(lVar2 + 0x60) = 0;" (assignment_expression "*(undefined8 *)(lVar2 + 0x60) = 0" (pointer_expression "*(undefined8 *)(lVar2 + 0x60)" * (cast_expression "(undefined8 *)(lVar2 + 0x60)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + 0x60)" ( (binary_expression "lVar2 + 0x60" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (iVar4 != 0) {\n          return;\n        }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n          return;\n        }" { (return_statement "return;" return ;) })) (expression_statement "lVar5 = *(long *)(lVar2 + 0x58);" (assignment_expression "lVar5 = *(long *)(lVar2 + 0x58)" identifier = (pointer_expression "*(long *)(lVar2 + 0x58)" * (cast_expression "(long *)(lVar2 + 0x58)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + 0x58)" ( (binary_expression "lVar2 + 0x58" identifier + number_literal) ))))) ;) })) (expression_statement "plVar1[7] = lVar5;" (assignment_expression "plVar1[7] = lVar5" (subscript_expression "plVar1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "lVar5 = *(long *)(lVar2 + 0x60);" (assignment_expression "lVar5 = *(long *)(lVar2 + 0x60)" identifier = (pointer_expression "*(long *)(lVar2 + 0x60)" * (cast_expression "(long *)(lVar2 + 0x60)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + 0x60)" ( (binary_expression "lVar2 + 0x60" identifier + number_literal) ))))) ;) (expression_statement "plVar1[2] = lVar5;" (assignment_expression "plVar1[2] = lVar5" (subscript_expression "plVar1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(long *)(lVar2 + 0x60) = lVar6 + lVar5;" (assignment_expression "*(long *)(lVar2 + 0x60) = lVar6 + lVar5" (pointer_expression "*(long *)(lVar2 + 0x60)" * (cast_expression "(long *)(lVar2 + 0x60)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + 0x60)" ( (binary_expression "lVar2 + 0x60" identifier + number_literal) )))) = (binary_expression "lVar6 + lVar5" identifier + identifier)) ;) (expression_statement "iVar4 = (int)plVar1[4];" (assignment_expression "iVar4 = (int)plVar1[4]" identifier = (cast_expression "(int)plVar1[4]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "plVar1[4]" identifier [ number_literal ]))) ;) }) (else_clause "else {\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }" else (compound_statement "{\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }" { (expression_statement "iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);" (assignment_expression "iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5)" identifier = (call_expression "FUN_0011a970(uVar3,lVar6,plVar1 + 5)" identifier (argument_list "(uVar3,lVar6,plVar1 + 5)" ( identifier , identifier , (binary_expression "plVar1 + 5" identifier + number_literal) )))) ;) (if_statement "if (iVar4 != 0) {\n        return;\n      }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);" (assignment_expression "iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7)" identifier = (call_expression "FUN_0011a970(uVar3,lVar6,plVar1 + 7)" identifier (argument_list "(uVar3,lVar6,plVar1 + 7)" ( identifier , identifier , (binary_expression "plVar1 + 7" identifier + number_literal) )))) ;) (if_statement "if (iVar4 != 0) {\n        return;\n      }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "iVar4 = (int)plVar1[4];" (assignment_expression "iVar4 = (int)plVar1[4]" identifier = (cast_expression "(int)plVar1[4]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "plVar1[4]" identifier [ number_literal ]))) ;) }))) (expression_statement "bVar7 = true;" (assignment_expression "bVar7 = true" identifier = true) ;) (if_statement "if (iVar4 != 0) {\n      iVar4 = FUN_0012f4b0(plVar1);\n      bVar7 = iVar4 == 0;\n    }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar4 = FUN_0012f4b0(plVar1);\n      bVar7 = iVar4 == 0;\n    }" { (expression_statement "iVar4 = FUN_0012f4b0(plVar1);" (assignment_expression "iVar4 = FUN_0012f4b0(plVar1)" identifier = (call_expression "FUN_0012f4b0(plVar1)" identifier (argument_list "(plVar1)" ( identifier )))) ;) (expression_statement "bVar7 = iVar4 == 0;" (assignment_expression "bVar7 = iVar4 == 0" identifier = (binary_expression "iVar4 == 0" identifier == number_literal)) ;) })) (if_statement "if ((param_2 != 1) && (bVar7)) {\n      FUN_0012f660(param_1);\n      return;\n    }" if (parenthesized_expression "((param_2 != 1) && (bVar7))" ( (binary_expression "(param_2 != 1) && (bVar7)" (parenthesized_expression "(param_2 != 1)" ( (binary_expression "param_2 != 1" identifier != number_literal) )) && (parenthesized_expression "(bVar7)" ( identifier ))) )) (compound_statement "{\n      FUN_0012f660(param_1);\n      return;\n    }" { (expression_statement "FUN_0012f660(param_1);" (call_expression "FUN_0012f660(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "int vdbePmaReaderIncrMergeInit(PmaReader *pReadr,int eMode)\n\n{\n  IncrMerger *pIncr;\n  SortSubtask *pTask;\n  sqlite3 *db;\n  long lVar1;\n  int iVar2;\n  sqlite3_file *psVar3;\n  long nExtend;\n  bool bVar4;\n  \n  pIncr = pReadr->pIncr;\n  pTask = pIncr->pTask;\n  db = pTask->pSorter->db;\n  iVar2 = vdbeMergeEngineInit(pTask,pIncr->pMerger,eMode);\n  if (iVar2 == 0) {\n    nExtend = (long)pIncr->mxSz;\n    if (pIncr->bUseThread == 0) {\n      psVar3 = (pTask->file2).pFd;\n      if (psVar3 == (sqlite3_file *)0x0) {\n        iVar2 = vdbeSorterOpenTempFile(db,(pTask->file2).iEof,&(pTask->file2).pFd);\n        (pTask->file2).iEof = 0;\n        if (iVar2 != 0) {\n          return iVar2;\n        }\n        psVar3 = (pTask->file2).pFd;\n      }\n      pIncr->aFile[1].pFd = psVar3;\n      lVar1 = (pTask->file2).iEof;\n      pIncr->iStartOff = lVar1;\n      (pTask->file2).iEof = nExtend + lVar1;\n      iVar2 = pIncr->bUseThread;\n    }\n    else {\n      iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[0].pFd);\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[1].pFd);\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar2 = pIncr->bUseThread;\n    }\n    bVar4 = true;\n    if (iVar2 != 0) {\n      iVar2 = vdbeIncrPopulate(pIncr);\n      bVar4 = iVar2 == 0;\n    }\n    if ((eMode != 1) && (bVar4)) {\n      iVar2 = vdbePmaReaderNext(pReadr);\n      return iVar2;\n    }\n  }\n  return iVar2;\n}\n\n" (function_definition "int vdbePmaReaderIncrMergeInit(PmaReader *pReadr,int eMode)\n\n{\n  IncrMerger *pIncr;\n  SortSubtask *pTask;\n  sqlite3 *db;\n  long lVar1;\n  int iVar2;\n  sqlite3_file *psVar3;\n  long nExtend;\n  bool bVar4;\n  \n  pIncr = pReadr->pIncr;\n  pTask = pIncr->pTask;\n  db = pTask->pSorter->db;\n  iVar2 = vdbeMergeEngineInit(pTask,pIncr->pMerger,eMode);\n  if (iVar2 == 0) {\n    nExtend = (long)pIncr->mxSz;\n    if (pIncr->bUseThread == 0) {\n      psVar3 = (pTask->file2).pFd;\n      if (psVar3 == (sqlite3_file *)0x0) {\n        iVar2 = vdbeSorterOpenTempFile(db,(pTask->file2).iEof,&(pTask->file2).pFd);\n        (pTask->file2).iEof = 0;\n        if (iVar2 != 0) {\n          return iVar2;\n        }\n        psVar3 = (pTask->file2).pFd;\n      }\n      pIncr->aFile[1].pFd = psVar3;\n      lVar1 = (pTask->file2).iEof;\n      pIncr->iStartOff = lVar1;\n      (pTask->file2).iEof = nExtend + lVar1;\n      iVar2 = pIncr->bUseThread;\n    }\n    else {\n      iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[0].pFd);\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[1].pFd);\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar2 = pIncr->bUseThread;\n    }\n    bVar4 = true;\n    if (iVar2 != 0) {\n      iVar2 = vdbeIncrPopulate(pIncr);\n      bVar4 = iVar2 == 0;\n    }\n    if ((eMode != 1) && (bVar4)) {\n      iVar2 = vdbePmaReaderNext(pReadr);\n      return iVar2;\n    }\n  }\n  return iVar2;\n}" primitive_type (function_declarator "vdbePmaReaderIncrMergeInit(PmaReader *pReadr,int eMode)" identifier (parameter_list "(PmaReader *pReadr,int eMode)" ( (parameter_declaration "PmaReader *pReadr" type_identifier (pointer_declarator "*pReadr" * identifier)) , (parameter_declaration "int eMode" primitive_type identifier) ))) (compound_statement "{\n  IncrMerger *pIncr;\n  SortSubtask *pTask;\n  sqlite3 *db;\n  long lVar1;\n  int iVar2;\n  sqlite3_file *psVar3;\n  long nExtend;\n  bool bVar4;\n  \n  pIncr = pReadr->pIncr;\n  pTask = pIncr->pTask;\n  db = pTask->pSorter->db;\n  iVar2 = vdbeMergeEngineInit(pTask,pIncr->pMerger,eMode);\n  if (iVar2 == 0) {\n    nExtend = (long)pIncr->mxSz;\n    if (pIncr->bUseThread == 0) {\n      psVar3 = (pTask->file2).pFd;\n      if (psVar3 == (sqlite3_file *)0x0) {\n        iVar2 = vdbeSorterOpenTempFile(db,(pTask->file2).iEof,&(pTask->file2).pFd);\n        (pTask->file2).iEof = 0;\n        if (iVar2 != 0) {\n          return iVar2;\n        }\n        psVar3 = (pTask->file2).pFd;\n      }\n      pIncr->aFile[1].pFd = psVar3;\n      lVar1 = (pTask->file2).iEof;\n      pIncr->iStartOff = lVar1;\n      (pTask->file2).iEof = nExtend + lVar1;\n      iVar2 = pIncr->bUseThread;\n    }\n    else {\n      iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[0].pFd);\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[1].pFd);\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar2 = pIncr->bUseThread;\n    }\n    bVar4 = true;\n    if (iVar2 != 0) {\n      iVar2 = vdbeIncrPopulate(pIncr);\n      bVar4 = iVar2 == 0;\n    }\n    if ((eMode != 1) && (bVar4)) {\n      iVar2 = vdbePmaReaderNext(pReadr);\n      return iVar2;\n    }\n  }\n  return iVar2;\n}" { (declaration "IncrMerger *pIncr;" type_identifier (pointer_declarator "*pIncr" * identifier) ;) (declaration "SortSubtask *pTask;" type_identifier (pointer_declarator "*pTask" * identifier) ;) (declaration "sqlite3 *db;" type_identifier (pointer_declarator "*db" * identifier) ;) (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "sqlite3_file *psVar3;" type_identifier (pointer_declarator "*psVar3" * identifier) ;) (declaration "long nExtend;" (sized_type_specifier "long" long) identifier ;) (declaration "bool bVar4;" primitive_type identifier ;) (expression_statement "pIncr = pReadr->pIncr;" (assignment_expression "pIncr = pReadr->pIncr" identifier = (field_expression "pReadr->pIncr" identifier -> field_identifier)) ;) (expression_statement "pTask = pIncr->pTask;" (assignment_expression "pTask = pIncr->pTask" identifier = (field_expression "pIncr->pTask" identifier -> field_identifier)) ;) (expression_statement "db = pTask->pSorter->db;" (assignment_expression "db = pTask->pSorter->db" identifier = (field_expression "pTask->pSorter->db" (field_expression "pTask->pSorter" identifier -> field_identifier) -> field_identifier)) ;) (expression_statement "iVar2 = vdbeMergeEngineInit(pTask,pIncr->pMerger,eMode);" (assignment_expression "iVar2 = vdbeMergeEngineInit(pTask,pIncr->pMerger,eMode)" identifier = (call_expression "vdbeMergeEngineInit(pTask,pIncr->pMerger,eMode)" identifier (argument_list "(pTask,pIncr->pMerger,eMode)" ( identifier , (field_expression "pIncr->pMerger" identifier -> field_identifier) , identifier )))) ;) (if_statement "if (iVar2 == 0) {\n    nExtend = (long)pIncr->mxSz;\n    if (pIncr->bUseThread == 0) {\n      psVar3 = (pTask->file2).pFd;\n      if (psVar3 == (sqlite3_file *)0x0) {\n        iVar2 = vdbeSorterOpenTempFile(db,(pTask->file2).iEof,&(pTask->file2).pFd);\n        (pTask->file2).iEof = 0;\n        if (iVar2 != 0) {\n          return iVar2;\n        }\n        psVar3 = (pTask->file2).pFd;\n      }\n      pIncr->aFile[1].pFd = psVar3;\n      lVar1 = (pTask->file2).iEof;\n      pIncr->iStartOff = lVar1;\n      (pTask->file2).iEof = nExtend + lVar1;\n      iVar2 = pIncr->bUseThread;\n    }\n    else {\n      iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[0].pFd);\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[1].pFd);\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar2 = pIncr->bUseThread;\n    }\n    bVar4 = true;\n    if (iVar2 != 0) {\n      iVar2 = vdbeIncrPopulate(pIncr);\n      bVar4 = iVar2 == 0;\n    }\n    if ((eMode != 1) && (bVar4)) {\n      iVar2 = vdbePmaReaderNext(pReadr);\n      return iVar2;\n    }\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    nExtend = (long)pIncr->mxSz;\n    if (pIncr->bUseThread == 0) {\n      psVar3 = (pTask->file2).pFd;\n      if (psVar3 == (sqlite3_file *)0x0) {\n        iVar2 = vdbeSorterOpenTempFile(db,(pTask->file2).iEof,&(pTask->file2).pFd);\n        (pTask->file2).iEof = 0;\n        if (iVar2 != 0) {\n          return iVar2;\n        }\n        psVar3 = (pTask->file2).pFd;\n      }\n      pIncr->aFile[1].pFd = psVar3;\n      lVar1 = (pTask->file2).iEof;\n      pIncr->iStartOff = lVar1;\n      (pTask->file2).iEof = nExtend + lVar1;\n      iVar2 = pIncr->bUseThread;\n    }\n    else {\n      iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[0].pFd);\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[1].pFd);\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar2 = pIncr->bUseThread;\n    }\n    bVar4 = true;\n    if (iVar2 != 0) {\n      iVar2 = vdbeIncrPopulate(pIncr);\n      bVar4 = iVar2 == 0;\n    }\n    if ((eMode != 1) && (bVar4)) {\n      iVar2 = vdbePmaReaderNext(pReadr);\n      return iVar2;\n    }\n  }" { (expression_statement "nExtend = (long)pIncr->mxSz;" (assignment_expression "nExtend = (long)pIncr->mxSz" identifier = (cast_expression "(long)pIncr->mxSz" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (field_expression "pIncr->mxSz" identifier -> field_identifier))) ;) (if_statement "if (pIncr->bUseThread == 0) {\n      psVar3 = (pTask->file2).pFd;\n      if (psVar3 == (sqlite3_file *)0x0) {\n        iVar2 = vdbeSorterOpenTempFile(db,(pTask->file2).iEof,&(pTask->file2).pFd);\n        (pTask->file2).iEof = 0;\n        if (iVar2 != 0) {\n          return iVar2;\n        }\n        psVar3 = (pTask->file2).pFd;\n      }\n      pIncr->aFile[1].pFd = psVar3;\n      lVar1 = (pTask->file2).iEof;\n      pIncr->iStartOff = lVar1;\n      (pTask->file2).iEof = nExtend + lVar1;\n      iVar2 = pIncr->bUseThread;\n    }\n    else {\n      iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[0].pFd);\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[1].pFd);\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar2 = pIncr->bUseThread;\n    }" if (parenthesized_expression "(pIncr->bUseThread == 0)" ( (binary_expression "pIncr->bUseThread == 0" (field_expression "pIncr->bUseThread" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n      psVar3 = (pTask->file2).pFd;\n      if (psVar3 == (sqlite3_file *)0x0) {\n        iVar2 = vdbeSorterOpenTempFile(db,(pTask->file2).iEof,&(pTask->file2).pFd);\n        (pTask->file2).iEof = 0;\n        if (iVar2 != 0) {\n          return iVar2;\n        }\n        psVar3 = (pTask->file2).pFd;\n      }\n      pIncr->aFile[1].pFd = psVar3;\n      lVar1 = (pTask->file2).iEof;\n      pIncr->iStartOff = lVar1;\n      (pTask->file2).iEof = nExtend + lVar1;\n      iVar2 = pIncr->bUseThread;\n    }" { (expression_statement "psVar3 = (pTask->file2).pFd;" (assignment_expression "psVar3 = (pTask->file2).pFd" identifier = (field_expression "(pTask->file2).pFd" (parenthesized_expression "(pTask->file2)" ( (field_expression "pTask->file2" identifier -> field_identifier) )) . field_identifier)) ;) (if_statement "if (psVar3 == (sqlite3_file *)0x0) {\n        iVar2 = vdbeSorterOpenTempFile(db,(pTask->file2).iEof,&(pTask->file2).pFd);\n        (pTask->file2).iEof = 0;\n        if (iVar2 != 0) {\n          return iVar2;\n        }\n        psVar3 = (pTask->file2).pFd;\n      }" if (parenthesized_expression "(psVar3 == (sqlite3_file *)0x0)" ( (binary_expression "psVar3 == (sqlite3_file *)0x0" identifier == (cast_expression "(sqlite3_file *)0x0" ( (type_descriptor "sqlite3_file *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        iVar2 = vdbeSorterOpenTempFile(db,(pTask->file2).iEof,&(pTask->file2).pFd);\n        (pTask->file2).iEof = 0;\n        if (iVar2 != 0) {\n          return iVar2;\n        }\n        psVar3 = (pTask->file2).pFd;\n      }" { (expression_statement "iVar2 = vdbeSorterOpenTempFile(db,(pTask->file2).iEof,&(pTask->file2).pFd);" (assignment_expression "iVar2 = vdbeSorterOpenTempFile(db,(pTask->file2).iEof,&(pTask->file2).pFd)" identifier = (call_expression "vdbeSorterOpenTempFile(db,(pTask->file2).iEof,&(pTask->file2).pFd)" identifier (argument_list "(db,(pTask->file2).iEof,&(pTask->file2).pFd)" ( identifier , (field_expression "(pTask->file2).iEof" (parenthesized_expression "(pTask->file2)" ( (field_expression "pTask->file2" identifier -> field_identifier) )) . field_identifier) , (pointer_expression "&(pTask->file2).pFd" & (field_expression "(pTask->file2).pFd" (parenthesized_expression "(pTask->file2)" ( (field_expression "pTask->file2" identifier -> field_identifier) )) . field_identifier)) )))) ;) (expression_statement "(pTask->file2).iEof = 0;" (assignment_expression "(pTask->file2).iEof = 0" (field_expression "(pTask->file2).iEof" (parenthesized_expression "(pTask->file2)" ( (field_expression "pTask->file2" identifier -> field_identifier) )) . field_identifier) = number_literal) ;) (if_statement "if (iVar2 != 0) {\n          return iVar2;\n        }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n          return iVar2;\n        }" { (return_statement "return iVar2;" return identifier ;) })) (expression_statement "psVar3 = (pTask->file2).pFd;" (assignment_expression "psVar3 = (pTask->file2).pFd" identifier = (field_expression "(pTask->file2).pFd" (parenthesized_expression "(pTask->file2)" ( (field_expression "pTask->file2" identifier -> field_identifier) )) . field_identifier)) ;) })) (expression_statement "pIncr->aFile[1].pFd = psVar3;" (assignment_expression "pIncr->aFile[1].pFd = psVar3" (field_expression "pIncr->aFile[1].pFd" (subscript_expression "pIncr->aFile[1]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier) = identifier) ;) (expression_statement "lVar1 = (pTask->file2).iEof;" (assignment_expression "lVar1 = (pTask->file2).iEof" identifier = (field_expression "(pTask->file2).iEof" (parenthesized_expression "(pTask->file2)" ( (field_expression "pTask->file2" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "pIncr->iStartOff = lVar1;" (assignment_expression "pIncr->iStartOff = lVar1" (field_expression "pIncr->iStartOff" identifier -> field_identifier) = identifier) ;) (expression_statement "(pTask->file2).iEof = nExtend + lVar1;" (assignment_expression "(pTask->file2).iEof = nExtend + lVar1" (field_expression "(pTask->file2).iEof" (parenthesized_expression "(pTask->file2)" ( (field_expression "pTask->file2" identifier -> field_identifier) )) . field_identifier) = (binary_expression "nExtend + lVar1" identifier + identifier)) ;) (expression_statement "iVar2 = pIncr->bUseThread;" (assignment_expression "iVar2 = pIncr->bUseThread" identifier = (field_expression "pIncr->bUseThread" identifier -> field_identifier)) ;) }) (else_clause "else {\n      iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[0].pFd);\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[1].pFd);\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar2 = pIncr->bUseThread;\n    }" else (compound_statement "{\n      iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[0].pFd);\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[1].pFd);\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar2 = pIncr->bUseThread;\n    }" { (expression_statement "iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[0].pFd);" (assignment_expression "iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[0].pFd)" identifier = (call_expression "vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[0].pFd)" identifier (argument_list "(db,nExtend,&pIncr->aFile[0].pFd)" ( identifier , identifier , (pointer_expression "&pIncr->aFile[0].pFd" & (field_expression "pIncr->aFile[0].pFd" (subscript_expression "pIncr->aFile[0]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier)) )))) ;) (if_statement "if (iVar2 != 0) {\n        return iVar2;\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        return iVar2;\n      }" { (return_statement "return iVar2;" return identifier ;) })) (expression_statement "iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[1].pFd);" (assignment_expression "iVar2 = vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[1].pFd)" identifier = (call_expression "vdbeSorterOpenTempFile(db,nExtend,&pIncr->aFile[1].pFd)" identifier (argument_list "(db,nExtend,&pIncr->aFile[1].pFd)" ( identifier , identifier , (pointer_expression "&pIncr->aFile[1].pFd" & (field_expression "pIncr->aFile[1].pFd" (subscript_expression "pIncr->aFile[1]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier)) )))) ;) (if_statement "if (iVar2 != 0) {\n        return iVar2;\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        return iVar2;\n      }" { (return_statement "return iVar2;" return identifier ;) })) (expression_statement "iVar2 = pIncr->bUseThread;" (assignment_expression "iVar2 = pIncr->bUseThread" identifier = (field_expression "pIncr->bUseThread" identifier -> field_identifier)) ;) }))) (expression_statement "bVar4 = true;" (assignment_expression "bVar4 = true" identifier = true) ;) (if_statement "if (iVar2 != 0) {\n      iVar2 = vdbeIncrPopulate(pIncr);\n      bVar4 = iVar2 == 0;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar2 = vdbeIncrPopulate(pIncr);\n      bVar4 = iVar2 == 0;\n    }" { (expression_statement "iVar2 = vdbeIncrPopulate(pIncr);" (assignment_expression "iVar2 = vdbeIncrPopulate(pIncr)" identifier = (call_expression "vdbeIncrPopulate(pIncr)" identifier (argument_list "(pIncr)" ( identifier )))) ;) (expression_statement "bVar4 = iVar2 == 0;" (assignment_expression "bVar4 = iVar2 == 0" identifier = (binary_expression "iVar2 == 0" identifier == number_literal)) ;) })) (if_statement "if ((eMode != 1) && (bVar4)) {\n      iVar2 = vdbePmaReaderNext(pReadr);\n      return iVar2;\n    }" if (parenthesized_expression "((eMode != 1) && (bVar4))" ( (binary_expression "(eMode != 1) && (bVar4)" (parenthesized_expression "(eMode != 1)" ( (binary_expression "eMode != 1" identifier != number_literal) )) && (parenthesized_expression "(bVar4)" ( identifier ))) )) (compound_statement "{\n      iVar2 = vdbePmaReaderNext(pReadr);\n      return iVar2;\n    }" { (expression_statement "iVar2 = vdbePmaReaderNext(pReadr);" (assignment_expression "iVar2 = vdbePmaReaderNext(pReadr)" identifier = (call_expression "vdbePmaReaderNext(pReadr)" identifier (argument_list "(pReadr)" ( identifier )))) ;) (return_statement "return iVar2;" return identifier ;) })) })) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "void FUN_0012fb90(long param_1,int param_2)\n\n{\n  long *plVar1;\n  long lVar2;\n  undefined8 uVar3;\n  int iVar4;\n  long lVar5;\n  long lVar6;\n  bool bVar7;\n  \n  plVar1 = *(long **)(param_1 + 0x48);\n  lVar2 = *plVar1;\n  uVar3 = *(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20);\n  iVar4 = FUN_0012fcf0(lVar2,plVar1[1],param_2);\n  if (iVar4 == 0) {\n    lVar6 = (long)(int)plVar1[3];\n    if ((int)plVar1[4] == 0) {\n      lVar5 = *(long *)(lVar2 + 0x58);\n      if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }\n      plVar1[7] = lVar5;\n      lVar5 = *(long *)(lVar2 + 0x60);\n      plVar1[2] = lVar5;\n      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;\n      iVar4 = (int)plVar1[4];\n    }\n    else {\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }\n    bVar7 = true;\n    if (iVar4 != 0) {\n      iVar4 = FUN_0012f4b0(plVar1);\n      bVar7 = iVar4 == 0;\n    }\n    if ((param_2 != 1) && (bVar7)) {\n      FUN_0012f660(param_1);\n      return;\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_0012fb90(long param_1,int param_2)\n\n{\n  long *plVar1;\n  long lVar2;\n  undefined8 uVar3;\n  int iVar4;\n  long lVar5;\n  long lVar6;\n  bool bVar7;\n  \n  plVar1 = *(long **)(param_1 + 0x48);\n  lVar2 = *plVar1;\n  uVar3 = *(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20);\n  iVar4 = FUN_0012fcf0(lVar2,plVar1[1],param_2);\n  if (iVar4 == 0) {\n    lVar6 = (long)(int)plVar1[3];\n    if ((int)plVar1[4] == 0) {\n      lVar5 = *(long *)(lVar2 + 0x58);\n      if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }\n      plVar1[7] = lVar5;\n      lVar5 = *(long *)(lVar2 + 0x60);\n      plVar1[2] = lVar5;\n      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;\n      iVar4 = (int)plVar1[4];\n    }\n    else {\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }\n    bVar7 = true;\n    if (iVar4 != 0) {\n      iVar4 = FUN_0012f4b0(plVar1);\n      bVar7 = iVar4 == 0;\n    }\n    if ((param_2 != 1) && (bVar7)) {\n      FUN_0012f660(param_1);\n      return;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0012fb90(long param_1,int param_2)" identifier (parameter_list "(long param_1,int param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  long *plVar1;\n  long lVar2;\n  undefined8 uVar3;\n  int iVar4;\n  long lVar5;\n  long lVar6;\n  bool bVar7;\n  \n  plVar1 = *(long **)(param_1 + 0x48);\n  lVar2 = *plVar1;\n  uVar3 = *(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20);\n  iVar4 = FUN_0012fcf0(lVar2,plVar1[1],param_2);\n  if (iVar4 == 0) {\n    lVar6 = (long)(int)plVar1[3];\n    if ((int)plVar1[4] == 0) {\n      lVar5 = *(long *)(lVar2 + 0x58);\n      if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }\n      plVar1[7] = lVar5;\n      lVar5 = *(long *)(lVar2 + 0x60);\n      plVar1[2] = lVar5;\n      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;\n      iVar4 = (int)plVar1[4];\n    }\n    else {\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }\n    bVar7 = true;\n    if (iVar4 != 0) {\n      iVar4 = FUN_0012f4b0(plVar1);\n      bVar7 = iVar4 == 0;\n    }\n    if ((param_2 != 1) && (bVar7)) {\n      FUN_0012f660(param_1);\n      return;\n    }\n  }\n  return;\n}" { (declaration "long *plVar1;" (sized_type_specifier "long" long) (pointer_declarator "*plVar1" * identifier) ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar6;" (sized_type_specifier "long" long) identifier ;) (declaration "bool bVar7;" primitive_type identifier ;) (expression_statement "plVar1 = *(long **)(param_1 + 0x48);" (assignment_expression "plVar1 = *(long **)(param_1 + 0x48)" identifier = (pointer_expression "*(long **)(param_1 + 0x48)" * (cast_expression "(long **)(param_1 + 0x48)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) ))))) ;) (expression_statement "lVar2 = *plVar1;" (assignment_expression "lVar2 = *plVar1" identifier = (pointer_expression "*plVar1" * identifier)) ;) (expression_statement "uVar3 = *(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20);" (assignment_expression "uVar3 = *(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20)" identifier = (pointer_expression "*(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20)" * (cast_expression "(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(lVar2 + 0x10) + 0x20)" ( (binary_expression "*(long *)(lVar2 + 0x10) + 0x20" (pointer_expression "*(long *)(lVar2 + 0x10)" * (cast_expression "(long *)(lVar2 + 0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + 0x10)" ( (binary_expression "lVar2 + 0x10" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "iVar4 = FUN_0012fcf0(lVar2,plVar1[1],param_2);" (assignment_expression "iVar4 = FUN_0012fcf0(lVar2,plVar1[1],param_2)" identifier = (call_expression "FUN_0012fcf0(lVar2,plVar1[1],param_2)" identifier (argument_list "(lVar2,plVar1[1],param_2)" ( identifier , (subscript_expression "plVar1[1]" identifier [ number_literal ]) , identifier )))) ;) (if_statement "if (iVar4 == 0) {\n    lVar6 = (long)(int)plVar1[3];\n    if ((int)plVar1[4] == 0) {\n      lVar5 = *(long *)(lVar2 + 0x58);\n      if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }\n      plVar1[7] = lVar5;\n      lVar5 = *(long *)(lVar2 + 0x60);\n      plVar1[2] = lVar5;\n      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;\n      iVar4 = (int)plVar1[4];\n    }\n    else {\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }\n    bVar7 = true;\n    if (iVar4 != 0) {\n      iVar4 = FUN_0012f4b0(plVar1);\n      bVar7 = iVar4 == 0;\n    }\n    if ((param_2 != 1) && (bVar7)) {\n      FUN_0012f660(param_1);\n      return;\n    }\n  }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n    lVar6 = (long)(int)plVar1[3];\n    if ((int)plVar1[4] == 0) {\n      lVar5 = *(long *)(lVar2 + 0x58);\n      if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }\n      plVar1[7] = lVar5;\n      lVar5 = *(long *)(lVar2 + 0x60);\n      plVar1[2] = lVar5;\n      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;\n      iVar4 = (int)plVar1[4];\n    }\n    else {\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }\n    bVar7 = true;\n    if (iVar4 != 0) {\n      iVar4 = FUN_0012f4b0(plVar1);\n      bVar7 = iVar4 == 0;\n    }\n    if ((param_2 != 1) && (bVar7)) {\n      FUN_0012f660(param_1);\n      return;\n    }\n  }" { (expression_statement "lVar6 = (long)(int)plVar1[3];" (assignment_expression "lVar6 = (long)(int)plVar1[3]" identifier = (cast_expression "(long)(int)plVar1[3]" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)plVar1[3]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "plVar1[3]" identifier [ number_literal ])))) ;) (if_statement "if ((int)plVar1[4] == 0) {\n      lVar5 = *(long *)(lVar2 + 0x58);\n      if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }\n      plVar1[7] = lVar5;\n      lVar5 = *(long *)(lVar2 + 0x60);\n      plVar1[2] = lVar5;\n      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;\n      iVar4 = (int)plVar1[4];\n    }\n    else {\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }" if (parenthesized_expression "((int)plVar1[4] == 0)" ( (binary_expression "(int)plVar1[4] == 0" (cast_expression "(int)plVar1[4]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "plVar1[4]" identifier [ number_literal ])) == number_literal) )) (compound_statement "{\n      lVar5 = *(long *)(lVar2 + 0x58);\n      if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }\n      plVar1[7] = lVar5;\n      lVar5 = *(long *)(lVar2 + 0x60);\n      plVar1[2] = lVar5;\n      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;\n      iVar4 = (int)plVar1[4];\n    }" { (expression_statement "lVar5 = *(long *)(lVar2 + 0x58);" (assignment_expression "lVar5 = *(long *)(lVar2 + 0x58)" identifier = (pointer_expression "*(long *)(lVar2 + 0x58)" * (cast_expression "(long *)(lVar2 + 0x58)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + 0x58)" ( (binary_expression "lVar2 + 0x58" identifier + number_literal) ))))) ;) (if_statement "if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }" if (parenthesized_expression "(lVar5 == 0)" ( (binary_expression "lVar5 == 0" identifier == number_literal) )) (compound_statement "{\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }" { (expression_statement "iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);" (assignment_expression "iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58)" identifier = (call_expression "FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58)" identifier (argument_list "(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58)" ( identifier , (pointer_expression "*(undefined8 *)(lVar2 + 0x60)" * (cast_expression "(undefined8 *)(lVar2 + 0x60)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + 0x60)" ( (binary_expression "lVar2 + 0x60" identifier + number_literal) )))) , (binary_expression "lVar2 + 0x58" identifier + number_literal) )))) ;) (expression_statement "*(undefined8 *)(lVar2 + 0x60) = 0;" (assignment_expression "*(undefined8 *)(lVar2 + 0x60) = 0" (pointer_expression "*(undefined8 *)(lVar2 + 0x60)" * (cast_expression "(undefined8 *)(lVar2 + 0x60)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + 0x60)" ( (binary_expression "lVar2 + 0x60" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (iVar4 != 0) {\n          return;\n        }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n          return;\n        }" { (return_statement "return;" return ;) })) (expression_statement "lVar5 = *(long *)(lVar2 + 0x58);" (assignment_expression "lVar5 = *(long *)(lVar2 + 0x58)" identifier = (pointer_expression "*(long *)(lVar2 + 0x58)" * (cast_expression "(long *)(lVar2 + 0x58)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + 0x58)" ( (binary_expression "lVar2 + 0x58" identifier + number_literal) ))))) ;) })) (expression_statement "plVar1[7] = lVar5;" (assignment_expression "plVar1[7] = lVar5" (subscript_expression "plVar1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "lVar5 = *(long *)(lVar2 + 0x60);" (assignment_expression "lVar5 = *(long *)(lVar2 + 0x60)" identifier = (pointer_expression "*(long *)(lVar2 + 0x60)" * (cast_expression "(long *)(lVar2 + 0x60)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + 0x60)" ( (binary_expression "lVar2 + 0x60" identifier + number_literal) ))))) ;) (expression_statement "plVar1[2] = lVar5;" (assignment_expression "plVar1[2] = lVar5" (subscript_expression "plVar1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(long *)(lVar2 + 0x60) = lVar6 + lVar5;" (assignment_expression "*(long *)(lVar2 + 0x60) = lVar6 + lVar5" (pointer_expression "*(long *)(lVar2 + 0x60)" * (cast_expression "(long *)(lVar2 + 0x60)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + 0x60)" ( (binary_expression "lVar2 + 0x60" identifier + number_literal) )))) = (binary_expression "lVar6 + lVar5" identifier + identifier)) ;) (expression_statement "iVar4 = (int)plVar1[4];" (assignment_expression "iVar4 = (int)plVar1[4]" identifier = (cast_expression "(int)plVar1[4]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "plVar1[4]" identifier [ number_literal ]))) ;) }) (else_clause "else {\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }" else (compound_statement "{\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }" { (expression_statement "iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);" (assignment_expression "iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5)" identifier = (call_expression "FUN_0011a970(uVar3,lVar6,plVar1 + 5)" identifier (argument_list "(uVar3,lVar6,plVar1 + 5)" ( identifier , identifier , (binary_expression "plVar1 + 5" identifier + number_literal) )))) ;) (if_statement "if (iVar4 != 0) {\n        return;\n      }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);" (assignment_expression "iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7)" identifier = (call_expression "FUN_0011a970(uVar3,lVar6,plVar1 + 7)" identifier (argument_list "(uVar3,lVar6,plVar1 + 7)" ( identifier , identifier , (binary_expression "plVar1 + 7" identifier + number_literal) )))) ;) (if_statement "if (iVar4 != 0) {\n        return;\n      }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "iVar4 = (int)plVar1[4];" (assignment_expression "iVar4 = (int)plVar1[4]" identifier = (cast_expression "(int)plVar1[4]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "plVar1[4]" identifier [ number_literal ]))) ;) }))) (expression_statement "bVar7 = true;" (assignment_expression "bVar7 = true" identifier = true) ;) (if_statement "if (iVar4 != 0) {\n      iVar4 = FUN_0012f4b0(plVar1);\n      bVar7 = iVar4 == 0;\n    }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar4 = FUN_0012f4b0(plVar1);\n      bVar7 = iVar4 == 0;\n    }" { (expression_statement "iVar4 = FUN_0012f4b0(plVar1);" (assignment_expression "iVar4 = FUN_0012f4b0(plVar1)" identifier = (call_expression "FUN_0012f4b0(plVar1)" identifier (argument_list "(plVar1)" ( identifier )))) ;) (expression_statement "bVar7 = iVar4 == 0;" (assignment_expression "bVar7 = iVar4 == 0" identifier = (binary_expression "iVar4 == 0" identifier == number_literal)) ;) })) (if_statement "if ((param_2 != 1) && (bVar7)) {\n      FUN_0012f660(param_1);\n      return;\n    }" if (parenthesized_expression "((param_2 != 1) && (bVar7))" ( (binary_expression "(param_2 != 1) && (bVar7)" (parenthesized_expression "(param_2 != 1)" ( (binary_expression "param_2 != 1" identifier != number_literal) )) && (parenthesized_expression "(bVar7)" ( identifier ))) )) (compound_statement "{\n      FUN_0012f660(param_1);\n      return;\n    }" { (expression_statement "FUN_0012f660(param_1);" (call_expression "FUN_0012f660(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration (sized_type_specifier long) (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (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 = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (subscript_expression IDENT [ LIT ]) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (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) )))) , (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) ;) }))) (expression_statement (assignment_expression IDENT = BOOL) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT == LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( IDENT ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })) })) (return_statement return ;) })))
(function_definition "void FUN_0012fb90(long param_1,int param_2)\n\n{\n  long *plVar1;\n  long lVar2;\n  undefined8 uVar3;\n  int iVar4;\n  long lVar5;\n  long lVar6;\n  bool bVar7;\n  \n  plVar1 = *(long **)(param_1 + 0x48);\n  lVar2 = *plVar1;\n  uVar3 = *(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20);\n  iVar4 = FUN_0012fcf0(lVar2,plVar1[1],param_2);\n  if (iVar4 == 0) {\n    lVar6 = (long)(int)plVar1[3];\n    if ((int)plVar1[4] == 0) {\n      lVar5 = *(long *)(lVar2 + 0x58);\n      if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }\n      plVar1[7] = lVar5;\n      lVar5 = *(long *)(lVar2 + 0x60);\n      plVar1[2] = lVar5;\n      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;\n      iVar4 = (int)plVar1[4];\n    }\n    else {\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }\n    bVar7 = true;\n    if (iVar4 != 0) {\n      iVar4 = FUN_0012f4b0(plVar1);\n      bVar7 = iVar4 == 0;\n    }\n    if ((param_2 != 1) && (bVar7)) {\n      FUN_0012f660(param_1);\n      return;\n    }\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0012fb90(long param_1,int param_2)" (identifier "FUN_0012fb90") (parameter_list "(long param_1,int param_2)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  long *plVar1;\n  long lVar2;\n  undefined8 uVar3;\n  int iVar4;\n  long lVar5;\n  long lVar6;\n  bool bVar7;\n  \n  plVar1 = *(long **)(param_1 + 0x48);\n  lVar2 = *plVar1;\n  uVar3 = *(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20);\n  iVar4 = FUN_0012fcf0(lVar2,plVar1[1],param_2);\n  if (iVar4 == 0) {\n    lVar6 = (long)(int)plVar1[3];\n    if ((int)plVar1[4] == 0) {\n      lVar5 = *(long *)(lVar2 + 0x58);\n      if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }\n      plVar1[7] = lVar5;\n      lVar5 = *(long *)(lVar2 + 0x60);\n      plVar1[2] = lVar5;\n      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;\n      iVar4 = (int)plVar1[4];\n    }\n    else {\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }\n    bVar7 = true;\n    if (iVar4 != 0) {\n      iVar4 = FUN_0012f4b0(plVar1);\n      bVar7 = iVar4 == 0;\n    }\n    if ((param_2 != 1) && (bVar7)) {\n      FUN_0012f660(param_1);\n      return;\n    }\n  }\n  return;\n}" ({ "{") (declaration "long *plVar1;" (sized_type_specifier "long" (long "long")) (pointer_declarator "*plVar1" (* "*") (identifier "plVar1")) (; ";")) (declaration "long lVar2;" (sized_type_specifier "long" (long "long")) (identifier "lVar2") (; ";")) (declaration "undefined8 uVar3;" (type_identifier "undefined8") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "long lVar5;" (sized_type_specifier "long" (long "long")) (identifier "lVar5") (; ";")) (declaration "long lVar6;" (sized_type_specifier "long" (long "long")) (identifier "lVar6") (; ";")) (declaration "bool bVar7;" (primitive_type "bool") (identifier "bVar7") (; ";")) (expression_statement "plVar1 = *(long **)(param_1 + 0x48);" (assignment_expression "plVar1 = *(long **)(param_1 + 0x48)" (identifier "plVar1") (= "=") (pointer_expression "*(long **)(param_1 + 0x48)" (* "*") (cast_expression "(long **)(param_1 + 0x48)" (( "(") (type_descriptor "long **" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x48)" (( "(") (binary_expression "param_1 + 0x48" (identifier "param_1") (+ "+") (number_literal "0x48")) () ")"))))) (; ";")) (expression_statement "lVar2 = *plVar1;" (assignment_expression "lVar2 = *plVar1" (identifier "lVar2") (= "=") (pointer_expression "*plVar1" (* "*") (identifier "plVar1"))) (; ";")) (expression_statement "uVar3 = *(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20);" (assignment_expression "uVar3 = *(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20)" (identifier "uVar3") (= "=") (pointer_expression "*(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20)" (* "*") (cast_expression "(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(long *)(lVar2 + 0x10) + 0x20)" (( "(") (binary_expression "*(long *)(lVar2 + 0x10) + 0x20" (pointer_expression "*(long *)(lVar2 + 0x10)" (* "*") (cast_expression "(long *)(lVar2 + 0x10)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar2 + 0x10)" (( "(") (binary_expression "lVar2 + 0x10" (identifier "lVar2") (+ "+") (number_literal "0x10")) () ")")))) (+ "+") (number_literal "0x20")) () ")"))))) (; ";")) (expression_statement "iVar4 = FUN_0012fcf0(lVar2,plVar1[1],param_2);" (assignment_expression "iVar4 = FUN_0012fcf0(lVar2,plVar1[1],param_2)" (identifier "iVar4") (= "=") (call_expression "FUN_0012fcf0(lVar2,plVar1[1],param_2)" (identifier "FUN_0012fcf0") (argument_list "(lVar2,plVar1[1],param_2)" (( "(") (identifier "lVar2") (, ",") (subscript_expression "plVar1[1]" (identifier "plVar1") ([ "[") (number_literal "1") (] "]")) (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar4 == 0) {\n    lVar6 = (long)(int)plVar1[3];\n    if ((int)plVar1[4] == 0) {\n      lVar5 = *(long *)(lVar2 + 0x58);\n      if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }\n      plVar1[7] = lVar5;\n      lVar5 = *(long *)(lVar2 + 0x60);\n      plVar1[2] = lVar5;\n      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;\n      iVar4 = (int)plVar1[4];\n    }\n    else {\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }\n    bVar7 = true;\n    if (iVar4 != 0) {\n      iVar4 = FUN_0012f4b0(plVar1);\n      bVar7 = iVar4 == 0;\n    }\n    if ((param_2 != 1) && (bVar7)) {\n      FUN_0012f660(param_1);\n      return;\n    }\n  }" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    lVar6 = (long)(int)plVar1[3];\n    if ((int)plVar1[4] == 0) {\n      lVar5 = *(long *)(lVar2 + 0x58);\n      if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }\n      plVar1[7] = lVar5;\n      lVar5 = *(long *)(lVar2 + 0x60);\n      plVar1[2] = lVar5;\n      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;\n      iVar4 = (int)plVar1[4];\n    }\n    else {\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }\n    bVar7 = true;\n    if (iVar4 != 0) {\n      iVar4 = FUN_0012f4b0(plVar1);\n      bVar7 = iVar4 == 0;\n    }\n    if ((param_2 != 1) && (bVar7)) {\n      FUN_0012f660(param_1);\n      return;\n    }\n  }" ({ "{") (expression_statement "lVar6 = (long)(int)plVar1[3];" (assignment_expression "lVar6 = (long)(int)plVar1[3]" (identifier "lVar6") (= "=") (cast_expression "(long)(int)plVar1[3]" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)plVar1[3]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "plVar1[3]" (identifier "plVar1") ([ "[") (number_literal "3") (] "]"))))) (; ";")) (if_statement "if ((int)plVar1[4] == 0) {\n      lVar5 = *(long *)(lVar2 + 0x58);\n      if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }\n      plVar1[7] = lVar5;\n      lVar5 = *(long *)(lVar2 + 0x60);\n      plVar1[2] = lVar5;\n      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;\n      iVar4 = (int)plVar1[4];\n    }\n    else {\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }" (if "if") (parenthesized_expression "((int)plVar1[4] == 0)" (( "(") (binary_expression "(int)plVar1[4] == 0" (cast_expression "(int)plVar1[4]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "plVar1[4]" (identifier "plVar1") ([ "[") (number_literal "4") (] "]"))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      lVar5 = *(long *)(lVar2 + 0x58);\n      if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }\n      plVar1[7] = lVar5;\n      lVar5 = *(long *)(lVar2 + 0x60);\n      plVar1[2] = lVar5;\n      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;\n      iVar4 = (int)plVar1[4];\n    }" ({ "{") (expression_statement "lVar5 = *(long *)(lVar2 + 0x58);" (assignment_expression "lVar5 = *(long *)(lVar2 + 0x58)" (identifier "lVar5") (= "=") (pointer_expression "*(long *)(lVar2 + 0x58)" (* "*") (cast_expression "(long *)(lVar2 + 0x58)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar2 + 0x58)" (( "(") (binary_expression "lVar2 + 0x58" (identifier "lVar2") (+ "+") (number_literal "0x58")) () ")"))))) (; ";")) (if_statement "if (lVar5 == 0) {\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }" (if "if") (parenthesized_expression "(lVar5 == 0)" (( "(") (binary_expression "lVar5 == 0" (identifier "lVar5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);\n        *(undefined8 *)(lVar2 + 0x60) = 0;\n        if (iVar4 != 0) {\n          return;\n        }\n        lVar5 = *(long *)(lVar2 + 0x58);\n      }" ({ "{") (expression_statement "iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);" (assignment_expression "iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58)" (identifier "iVar4") (= "=") (call_expression "FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58)" (identifier "FUN_0011a970") (argument_list "(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58)" (( "(") (identifier "uVar3") (, ",") (pointer_expression "*(undefined8 *)(lVar2 + 0x60)" (* "*") (cast_expression "(undefined8 *)(lVar2 + 0x60)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar2 + 0x60)" (( "(") (binary_expression "lVar2 + 0x60" (identifier "lVar2") (+ "+") (number_literal "0x60")) () ")")))) (, ",") (binary_expression "lVar2 + 0x58" (identifier "lVar2") (+ "+") (number_literal "0x58")) () ")")))) (; ";")) (expression_statement "*(undefined8 *)(lVar2 + 0x60) = 0;" (assignment_expression "*(undefined8 *)(lVar2 + 0x60) = 0" (pointer_expression "*(undefined8 *)(lVar2 + 0x60)" (* "*") (cast_expression "(undefined8 *)(lVar2 + 0x60)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar2 + 0x60)" (( "(") (binary_expression "lVar2 + 0x60" (identifier "lVar2") (+ "+") (number_literal "0x60")) () ")")))) (= "=") (number_literal "0")) (; ";")) (if_statement "if (iVar4 != 0) {\n          return;\n        }" (if "if") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          return;\n        }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "lVar5 = *(long *)(lVar2 + 0x58);" (assignment_expression "lVar5 = *(long *)(lVar2 + 0x58)" (identifier "lVar5") (= "=") (pointer_expression "*(long *)(lVar2 + 0x58)" (* "*") (cast_expression "(long *)(lVar2 + 0x58)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar2 + 0x58)" (( "(") (binary_expression "lVar2 + 0x58" (identifier "lVar2") (+ "+") (number_literal "0x58")) () ")"))))) (; ";")) (} "}"))) (expression_statement "plVar1[7] = lVar5;" (assignment_expression "plVar1[7] = lVar5" (subscript_expression "plVar1[7]" (identifier "plVar1") ([ "[") (number_literal "7") (] "]")) (= "=") (identifier "lVar5")) (; ";")) (expression_statement "lVar5 = *(long *)(lVar2 + 0x60);" (assignment_expression "lVar5 = *(long *)(lVar2 + 0x60)" (identifier "lVar5") (= "=") (pointer_expression "*(long *)(lVar2 + 0x60)" (* "*") (cast_expression "(long *)(lVar2 + 0x60)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar2 + 0x60)" (( "(") (binary_expression "lVar2 + 0x60" (identifier "lVar2") (+ "+") (number_literal "0x60")) () ")"))))) (; ";")) (expression_statement "plVar1[2] = lVar5;" (assignment_expression "plVar1[2] = lVar5" (subscript_expression "plVar1[2]" (identifier "plVar1") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "lVar5")) (; ";")) (expression_statement "*(long *)(lVar2 + 0x60) = lVar6 + lVar5;" (assignment_expression "*(long *)(lVar2 + 0x60) = lVar6 + lVar5" (pointer_expression "*(long *)(lVar2 + 0x60)" (* "*") (cast_expression "(long *)(lVar2 + 0x60)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar2 + 0x60)" (( "(") (binary_expression "lVar2 + 0x60" (identifier "lVar2") (+ "+") (number_literal "0x60")) () ")")))) (= "=") (binary_expression "lVar6 + lVar5" (identifier "lVar6") (+ "+") (identifier "lVar5"))) (; ";")) (expression_statement "iVar4 = (int)plVar1[4];" (assignment_expression "iVar4 = (int)plVar1[4]" (identifier "iVar4") (= "=") (cast_expression "(int)plVar1[4]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "plVar1[4]" (identifier "plVar1") ([ "[") (number_literal "4") (] "]")))) (; ";")) (} "}")) (else_clause "else {\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }" (else "else") (compound_statement "{\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);\n      if (iVar4 != 0) {\n        return;\n      }\n      iVar4 = (int)plVar1[4];\n    }" ({ "{") (expression_statement "iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);" (assignment_expression "iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5)" (identifier "iVar4") (= "=") (call_expression "FUN_0011a970(uVar3,lVar6,plVar1 + 5)" (identifier "FUN_0011a970") (argument_list "(uVar3,lVar6,plVar1 + 5)" (( "(") (identifier "uVar3") (, ",") (identifier "lVar6") (, ",") (binary_expression "plVar1 + 5" (identifier "plVar1") (+ "+") (number_literal "5")) () ")")))) (; ";")) (if_statement "if (iVar4 != 0) {\n        return;\n      }" (if "if") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        return;\n      }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);" (assignment_expression "iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7)" (identifier "iVar4") (= "=") (call_expression "FUN_0011a970(uVar3,lVar6,plVar1 + 7)" (identifier "FUN_0011a970") (argument_list "(uVar3,lVar6,plVar1 + 7)" (( "(") (identifier "uVar3") (, ",") (identifier "lVar6") (, ",") (binary_expression "plVar1 + 7" (identifier "plVar1") (+ "+") (number_literal "7")) () ")")))) (; ";")) (if_statement "if (iVar4 != 0) {\n        return;\n      }" (if "if") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        return;\n      }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "iVar4 = (int)plVar1[4];" (assignment_expression "iVar4 = (int)plVar1[4]" (identifier "iVar4") (= "=") (cast_expression "(int)plVar1[4]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "plVar1[4]" (identifier "plVar1") ([ "[") (number_literal "4") (] "]")))) (; ";")) (} "}")))) (expression_statement "bVar7 = true;" (assignment_expression "bVar7 = true" (identifier "bVar7") (= "=") (true "true")) (; ";")) (if_statement "if (iVar4 != 0) {\n      iVar4 = FUN_0012f4b0(plVar1);\n      bVar7 = iVar4 == 0;\n    }" (if "if") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      iVar4 = FUN_0012f4b0(plVar1);\n      bVar7 = iVar4 == 0;\n    }" ({ "{") (expression_statement "iVar4 = FUN_0012f4b0(plVar1);" (assignment_expression "iVar4 = FUN_0012f4b0(plVar1)" (identifier "iVar4") (= "=") (call_expression "FUN_0012f4b0(plVar1)" (identifier "FUN_0012f4b0") (argument_list "(plVar1)" (( "(") (identifier "plVar1") () ")")))) (; ";")) (expression_statement "bVar7 = iVar4 == 0;" (assignment_expression "bVar7 = iVar4 == 0" (identifier "bVar7") (= "=") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0"))) (; ";")) (} "}"))) (if_statement "if ((param_2 != 1) && (bVar7)) {\n      FUN_0012f660(param_1);\n      return;\n    }" (if "if") (parenthesized_expression "((param_2 != 1) && (bVar7))" (( "(") (binary_expression "(param_2 != 1) && (bVar7)" (parenthesized_expression "(param_2 != 1)" (( "(") (binary_expression "param_2 != 1" (identifier "param_2") (!= "!=") (number_literal "1")) () ")")) (&& "&&") (parenthesized_expression "(bVar7)" (( "(") (identifier "bVar7") () ")"))) () ")")) (compound_statement "{\n      FUN_0012f660(param_1);\n      return;\n    }" ({ "{") (expression_statement "FUN_0012f660(param_1);" (call_expression "FUN_0012f660(param_1)" (identifier "FUN_0012f660") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

int function_1(type_1 *pReadr,int var_8)

{
  type_2 *pIncr;
  type_3 *pTask;
  type_4 *db;
  long var_6;
  int var_2;
  type_5 *var_3;
  long var_5;
  bool bVar4;
  
  pIncr = pReadr->pIncr;
  pTask = pIncr->pTask;
  db = pTask->pSorter->db;
  var_2 = var_1(pTask,pIncr->pMerger,var_8);
  if (var_2 == 0) {
    var_5 = (long)pIncr->mxSz;
    if (pIncr->bUseThread == 0) {
      var_3 = (pTask->file2).pFd;
      if (var_3 == (type_5 *)0x0) {
        var_2 = var_4(db,(pTask->file2).iEof,&(pTask->file2).pFd);
        (pTask->file2).iEof = 0;
        if (var_2 != 0) {
          return var_2;
        }
        var_3 = (pTask->file2).pFd;
      }
      pIncr->aFile[1].pFd = var_3;
      var_6 = (pTask->file2).iEof;
      pIncr->iStartOff = var_6;
      (pTask->file2).iEof = var_5 + var_6;
      var_2 = pIncr->bUseThread;
    }
    else {
      var_2 = var_4(db,var_5,&pIncr->aFile[0].pFd);
      if (var_2 != 0) {
        return var_2;
      }
      var_2 = var_4(db,var_5,&pIncr->aFile[1].pFd);
      if (var_2 != 0) {
        return var_2;
      }
      var_2 = pIncr->bUseThread;
    }
    bVar4 = true;
    if (var_2 != 0) {
      var_2 = var_7(pIncr);
      bVar4 = var_2 == 0;
    }
    if ((var_8 != 1) && (bVar4)) {
      var_2 = var_9(pReadr);
      return var_2;
    }
  }
  return var_2;
}


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

void MASKED(long param_1,int param_2)

{
  long *plVar1;
  long lVar2;
  undefined8 uVar3;
  int iVar4;
  long lVar5;
  long lVar6;
  bool bVar7;
  
  plVar1 = *(long **)(param_1 + 0x48);
  lVar2 = *plVar1;
  uVar3 = *(undefined8 *)(*(long *)(lVar2 + 0x10) + 0x20);
  iVar4 = FUN_0012fcf0(lVar2,plVar1[1],param_2);
  if (iVar4 == 0) {
    lVar6 = (long)(int)plVar1[3];
    if ((int)plVar1[4] == 0) {
      lVar5 = *(long *)(lVar2 + 0x58);
      if (lVar5 == 0) {
        iVar4 = FUN_0011a970(uVar3,*(undefined8 *)(lVar2 + 0x60),lVar2 + 0x58);
        *(undefined8 *)(lVar2 + 0x60) = 0;
        if (iVar4 != 0) {
          return;
        }
        lVar5 = *(long *)(lVar2 + 0x58);
      }
      plVar1[7] = lVar5;
      lVar5 = *(long *)(lVar2 + 0x60);
      plVar1[2] = lVar5;
      *(long *)(lVar2 + 0x60) = lVar6 + lVar5;
      iVar4 = (int)plVar1[4];
    }
    else {
      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 5);
      if (iVar4 != 0) {
        return;
      }
      iVar4 = FUN_0011a970(uVar3,lVar6,plVar1 + 7);
      if (iVar4 != 0) {
        return;
      }
      iVar4 = (int)plVar1[4];
    }
    bVar7 = true;
    if (iVar4 != 0) {
      iVar4 = FUN_0012f4b0(plVar1);
      bVar7 = iVar4 == 0;
    }
    if ((param_2 != 1) && (bVar7)) {
      FUN_0012f660(param_1);
      return;
    }
  }
  return;
}

