
int vdbeMergeEngineInit(SortSubtask *pTask,MergeEngine *pMerger,int eMode)

{
  PmaReader *pPVar1;
  uint uVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  long lVar6;
  int iVar7;
  int iVar8;
  long lVar9;
  long in_FS_OFFSET;
  int bCached;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  pMerger->pTask = pTask;
  iVar4 = pMerger->nTree;
  if (0 < iVar4) {
    lVar6 = 0;
    do {
      if (eMode == 2) {
        uVar2 = vdbePmaReaderNext(pMerger->aReadr + (long)iVar4 + -1);
      }
      else {
        uVar2 = vdbePmaReaderIncrInit((PmaReader *)((long)&pMerger->aReadr->iReadOff + lVar6),0);
      }
      if (uVar2 != 0) goto LAB_0013e090;
      lVar6 = lVar6 + 0x50;
      iVar4 = iVar4 + -1;
    } while (iVar4 != 0);
  }
  iVar4 = pMerger->nTree + -1;
  if (0 < iVar4) {
    lVar6 = (long)iVar4 * 4;
    lVar9 = (long)iVar4 << 3;
    do {
      if (iVar4 < pMerger->nTree / 2) {
        iVar5 = *(int *)((long)pMerger->aTree + lVar9);
        iVar7 = *(int *)((long)pMerger->aTree + lVar9 + 4);
      }
      else {
        iVar5 = (iVar4 - pMerger->nTree / 2) * 2;
        iVar7 = iVar5 + 1;
      }
      pPVar1 = pMerger->aReadr;
      iVar8 = iVar7;
      if ((pPVar1[iVar5].pFd != (sqlite3_file *)0x0) &&
         (iVar8 = iVar5, pPVar1[iVar7].pFd != (sqlite3_file *)0x0)) {
        bCached = 0;
        iVar3 = (*pMerger->pTask->xCompare)
                          (pMerger->pTask,&bCached,pPVar1[iVar5].aKey,pPVar1[iVar5].nKey,
                           pPVar1[iVar7].aKey,pPVar1[iVar7].nKey);
        iVar8 = iVar7;
        if (iVar3 < 1) {
          iVar8 = iVar5;
        }
      }
      *(int *)((long)pMerger->aTree + lVar6) = iVar8;
      lVar6 = lVar6 + -4;
      lVar9 = lVar9 + -8;
      iVar4 = iVar4 + -1;
    } while (iVar4 != 0);
  }
  uVar2 = (uint)pTask->pUnpacked->errCode;
LAB_0013e090:
  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return uVar2;
}



ulong FUN_0013df2e(long param_1,int *param_2,int param_3)

{
  int iVar1;
  ulong uVar2;
  long lVar3;
  int iVar4;
  long lVar5;
  int iVar6;
  long lVar7;
  int iVar8;
  int iVar9;
  long lVar10;
  long in_FS_OFFSET;
  undefined4 local_44;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  *(long *)(param_2 + 2) = param_1;
  iVar4 = *param_2;
  if (0 < iVar4) {
    lVar7 = 0;
    do {
      if (param_3 == 2) {
        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);
      }
      else {
        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);
      }
      if ((int)uVar2 != 0) goto LAB_0013e090;
      lVar7 = lVar7 + 0x50;
      iVar4 = iVar4 + -1;
    } while (iVar4 != 0);
  }
  iVar4 = *param_2 + -1;
  if (0 < iVar4) {
    lVar7 = (long)iVar4 * 4;
    lVar10 = (long)iVar4 << 3;
    do {
      if (iVar4 < *param_2 / 2) {
        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);
        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);
      }
      else {
        iVar6 = (iVar4 - *param_2 / 2) * 2;
        iVar8 = iVar6 + 1;
      }
      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);
      iVar9 = iVar8;
      if ((*(long *)(lVar3 + 0x18) != 0) &&
         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,
         *(long *)(lVar5 + 0x18) != 0)) {
        local_44 = 0;
        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))
                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),
                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),
                           *(undefined4 *)(lVar5 + 0x14));
        iVar9 = iVar8;
        if (iVar1 < 1) {
          iVar9 = iVar6;
        }
      }
      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;
      lVar7 = lVar7 + -4;
      lVar10 = lVar10 + -8;
      iVar4 = iVar4 + -1;
    } while (iVar4 != 0);
  }
  uVar2 = (ulong)*(byte *)(*(long *)(param_1 + 0x18) + 0x13);
LAB_0013e090:
  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return uVar2;
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RSP + 0x8],RDI
MOV RBX,RSI
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RCX
XOR ECX,ECX
MOV qword ptr [RSI + 0x8],RDI
MOV EBP,dword ptr [RSI]
TEST EBP,EBP
JLE 0x0013dfac
MOV R13D,EDX
MOV R12D,0x0
JMP 0x0013df93
MOVSXD RAX,EBP
LEA RAX,[RAX + RAX*0x4]
SHL RAX,0x4
MOV RDX,qword ptr [RBX + 0x18]
LEA RDI,[RDX + RAX*0x1 + -0x50]
CALL 0x0013d9a2
TEST EAX,EAX
JNZ 0x0013e090
ADD R12,0x50
SUB EBP,0x1
JZ 0x0013dfac
CMP R13D,0x2
JZ 0x0013df69
MOV RDI,R12
ADD RDI,qword ptr [RBX + 0x18]
MOV ESI,0x0
CALL 0x0013def6
JMP 0x0013df82
MOV EAX,dword ptr [RBX]
LEA EBP,[RAX + -0x1]
TEST EBP,EBP
JLE 0x0013e083
MOVSXD R14,EBP
LEA R15,[R14*0x4]
SHL R14,0x3
LEA RAX,[RSP + 0x14]
MOV qword ptr [RSP],RAX
JMP 0x0013e04f
MOV RAX,qword ptr [RBX + 0x10]
MOV R12D,dword ptr [RAX + R14*0x1]
MOV R13D,dword ptr [RAX + R14*0x1 + 0x4]
MOV RDX,qword ptr [RBX + 0x18]
MOVSXD RAX,R12D
LEA RAX,[RAX + RAX*0x4]
SHL RAX,0x4
ADD RAX,RDX
CMP qword ptr [RAX + 0x18],0x0
JZ 0x0013e03a
MOVSXD RCX,R13D
LEA RSI,[RCX + RCX*0x4]
SHL RSI,0x4
ADD RSI,RDX
CMP qword ptr [RSI + 0x18],0x0
JZ 0x0013e07e
MOV R10,qword ptr [RBX + 0x8]
MOV dword ptr [RSP + 0x14],0x0
MOV ECX,dword ptr [RAX + 0x14]
MOV RDX,qword ptr [RAX + 0x28]
MOV R9D,dword ptr [RSI + 0x14]
MOV R8,qword ptr [RSI + 0x28]
MOV RSI,qword ptr [RSP]
MOV RDI,R10
CALL qword ptr [R10 + 0x40]
TEST EAX,EAX
CMOVLE R13D,R12D
MOV RAX,qword ptr [RBX + 0x10]
MOV dword ptr [RAX + R15*0x1],R13D
SUB R15,0x4
SUB R14,0x8
SUB EBP,0x1
JZ 0x0013e083
MOV EDX,dword ptr [RBX]
MOV EAX,EDX
SHR EAX,0x1f
ADD EAX,EDX
SAR EAX,0x1
CMP EAX,EBP
JG 0x0013dfd3
MOV EAX,EDX
SHR EAX,0x1f
ADD EDX,EAX
SAR EDX,0x1
MOV R12D,EBP
SUB R12D,EDX
ADD R12D,R12D
LEA R13D,[R12 + 0x1]
JMP 0x0013dfe0
MOV R13D,R12D
JMP 0x0013e03a
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOVZX EAX,byte ptr [RAX + 0x13]
MOV RCX,qword ptr [RSP + 0x18]
XOR RCX,qword ptr FS:[0x28]
JNZ 0x0013e0af
ADD RSP,0x28
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
CALL 0x0010c0d0
(translation_unit "ulong FUN_0013df2e(long param_1,int *param_2,int param_3)\n\n{\n  int iVar1;\n  ulong uVar2;\n  long lVar3;\n  int iVar4;\n  long lVar5;\n  int iVar6;\n  long lVar7;\n  int iVar8;\n  int iVar9;\n  long lVar10;\n  long in_FS_OFFSET;\n  undefined4 local_44;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  *(long *)(param_2 + 2) = param_1;\n  iVar4 = *param_2;\n  if (0 < iVar4) {\n    lVar7 = 0;\n    do {\n      if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }\n      if ((int)uVar2 != 0) goto LAB_0013e090;\n      lVar7 = lVar7 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  iVar4 = *param_2 + -1;\n  if (0 < iVar4) {\n    lVar7 = (long)iVar4 * 4;\n    lVar10 = (long)iVar4 << 3;\n    do {\n      if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }\n      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);\n      iVar9 = iVar8;\n      if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }\n      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;\n      lVar7 = lVar7 + -4;\n      lVar10 = lVar10 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  uVar2 = (ulong)*(byte *)(*(long *)(param_1 + 0x18) + 0x13);\nLAB_0013e090:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return uVar2;\n}\n\n" (function_definition "ulong FUN_0013df2e(long param_1,int *param_2,int param_3)\n\n{\n  int iVar1;\n  ulong uVar2;\n  long lVar3;\n  int iVar4;\n  long lVar5;\n  int iVar6;\n  long lVar7;\n  int iVar8;\n  int iVar9;\n  long lVar10;\n  long in_FS_OFFSET;\n  undefined4 local_44;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  *(long *)(param_2 + 2) = param_1;\n  iVar4 = *param_2;\n  if (0 < iVar4) {\n    lVar7 = 0;\n    do {\n      if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }\n      if ((int)uVar2 != 0) goto LAB_0013e090;\n      lVar7 = lVar7 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  iVar4 = *param_2 + -1;\n  if (0 < iVar4) {\n    lVar7 = (long)iVar4 * 4;\n    lVar10 = (long)iVar4 << 3;\n    do {\n      if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }\n      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);\n      iVar9 = iVar8;\n      if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }\n      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;\n      lVar7 = lVar7 + -4;\n      lVar10 = lVar10 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  uVar2 = (ulong)*(byte *)(*(long *)(param_1 + 0x18) + 0x13);\nLAB_0013e090:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_0013df2e(long param_1,int *param_2,int param_3)" identifier (parameter_list "(long param_1,int *param_2,int param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  ulong uVar2;\n  long lVar3;\n  int iVar4;\n  long lVar5;\n  int iVar6;\n  long lVar7;\n  int iVar8;\n  int iVar9;\n  long lVar10;\n  long in_FS_OFFSET;\n  undefined4 local_44;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  *(long *)(param_2 + 2) = param_1;\n  iVar4 = *param_2;\n  if (0 < iVar4) {\n    lVar7 = 0;\n    do {\n      if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }\n      if ((int)uVar2 != 0) goto LAB_0013e090;\n      lVar7 = lVar7 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  iVar4 = *param_2 + -1;\n  if (0 < iVar4) {\n    lVar7 = (long)iVar4 * 4;\n    lVar10 = (long)iVar4 << 3;\n    do {\n      if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }\n      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);\n      iVar9 = iVar8;\n      if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }\n      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;\n      lVar7 = lVar7 + -4;\n      lVar10 = lVar10 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  uVar2 = (ulong)*(byte *)(*(long *)(param_1 + 0x18) + 0x13);\nLAB_0013e090:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "long lVar7;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "long lVar10;" (sized_type_specifier "long" long) identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined4 local_44;" type_identifier identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "*(long *)(param_2 + 2) = param_1;" (assignment_expression "*(long *)(param_2 + 2) = param_1" (pointer_expression "*(long *)(param_2 + 2)" * (cast_expression "(long *)(param_2 + 2)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 2)" ( (binary_expression "param_2 + 2" identifier + number_literal) )))) = identifier) ;) (expression_statement "iVar4 = *param_2;" (assignment_expression "iVar4 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (0 < iVar4) {\n    lVar7 = 0;\n    do {\n      if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }\n      if ((int)uVar2 != 0) goto LAB_0013e090;\n      lVar7 = lVar7 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }" if (parenthesized_expression "(0 < iVar4)" ( (binary_expression "0 < iVar4" number_literal < identifier) )) (compound_statement "{\n    lVar7 = 0;\n    do {\n      if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }\n      if ((int)uVar2 != 0) goto LAB_0013e090;\n      lVar7 = lVar7 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }" { (expression_statement "lVar7 = 0;" (assignment_expression "lVar7 = 0" identifier = number_literal) ;) (do_statement "do {\n      if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }\n      if ((int)uVar2 != 0) goto LAB_0013e090;\n      lVar7 = lVar7 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);" do (compound_statement "{\n      if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }\n      if ((int)uVar2 != 0) goto LAB_0013e090;\n      lVar7 = lVar7 + 0x50;\n      iVar4 = iVar4 + -1;\n    }" { (if_statement "if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }" if (parenthesized_expression "(param_3 == 2)" ( (binary_expression "param_3 == 2" identifier == number_literal) )) (compound_statement "{\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }" { (expression_statement "uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);" (assignment_expression "uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50)" identifier = (call_expression "FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50)" identifier (argument_list "(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50)" ( (binary_expression "*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50" (binary_expression "*(long *)(param_2 + 6) + -0x50" (pointer_expression "*(long *)(param_2 + 6)" * (cast_expression "(long *)(param_2 + 6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 6)" ( (binary_expression "param_2 + 6" identifier + number_literal) )))) + number_literal) + (binary_expression "(long)iVar4 * 0x50" (cast_expression "(long)iVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal)) )))) ;) }) (else_clause "else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }" else (compound_statement "{\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }" { (expression_statement "uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);" (assignment_expression "uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0)" identifier = (call_expression "FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0)" identifier (argument_list "(lVar7 + *(long *)(param_2 + 6),0)" ( (binary_expression "lVar7 + *(long *)(param_2 + 6)" identifier + (pointer_expression "*(long *)(param_2 + 6)" * (cast_expression "(long *)(param_2 + 6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 6)" ( (binary_expression "param_2 + 6" identifier + number_literal) ))))) , number_literal )))) ;) }))) (if_statement "if ((int)uVar2 != 0) goto LAB_0013e090;" if (parenthesized_expression "((int)uVar2 != 0)" ( (binary_expression "(int)uVar2 != 0" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) != number_literal) )) (goto_statement "goto LAB_0013e090;" goto statement_identifier ;)) (expression_statement "lVar7 = lVar7 + 0x50;" (assignment_expression "lVar7 = lVar7 + 0x50" identifier = (binary_expression "lVar7 + 0x50" identifier + number_literal)) ;) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) ;) })) (expression_statement "iVar4 = *param_2 + -1;" (assignment_expression "iVar4 = *param_2 + -1" identifier = (binary_expression "*param_2 + -1" (pointer_expression "*param_2" * identifier) + number_literal)) ;) (if_statement "if (0 < iVar4) {\n    lVar7 = (long)iVar4 * 4;\n    lVar10 = (long)iVar4 << 3;\n    do {\n      if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }\n      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);\n      iVar9 = iVar8;\n      if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }\n      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;\n      lVar7 = lVar7 + -4;\n      lVar10 = lVar10 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }" if (parenthesized_expression "(0 < iVar4)" ( (binary_expression "0 < iVar4" number_literal < identifier) )) (compound_statement "{\n    lVar7 = (long)iVar4 * 4;\n    lVar10 = (long)iVar4 << 3;\n    do {\n      if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }\n      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);\n      iVar9 = iVar8;\n      if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }\n      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;\n      lVar7 = lVar7 + -4;\n      lVar10 = lVar10 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }" { (expression_statement "lVar7 = (long)iVar4 * 4;" (assignment_expression "lVar7 = (long)iVar4 * 4" identifier = (binary_expression "(long)iVar4 * 4" (cast_expression "(long)iVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal)) ;) (expression_statement "lVar10 = (long)iVar4 << 3;" (assignment_expression "lVar10 = (long)iVar4 << 3" identifier = (binary_expression "(long)iVar4 << 3" (cast_expression "(long)iVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) << number_literal)) ;) (do_statement "do {\n      if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }\n      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);\n      iVar9 = iVar8;\n      if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }\n      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;\n      lVar7 = lVar7 + -4;\n      lVar10 = lVar10 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);" do (compound_statement "{\n      if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }\n      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);\n      iVar9 = iVar8;\n      if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }\n      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;\n      lVar7 = lVar7 + -4;\n      lVar10 = lVar10 + -8;\n      iVar4 = iVar4 + -1;\n    }" { (if_statement "if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }" if (parenthesized_expression "(iVar4 < *param_2 / 2)" ( (binary_expression "iVar4 < *param_2 / 2" identifier < (binary_expression "*param_2 / 2" (pointer_expression "*param_2" * identifier) / number_literal)) )) (compound_statement "{\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }" { (expression_statement "iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);" (assignment_expression "iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10)" identifier = (pointer_expression "*(int *)(*(long *)(param_2 + 4) + lVar10)" * (cast_expression "(int *)(*(long *)(param_2 + 4) + lVar10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(param_2 + 4) + lVar10)" ( (binary_expression "*(long *)(param_2 + 4) + lVar10" (pointer_expression "*(long *)(param_2 + 4)" * (cast_expression "(long *)(param_2 + 4)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) + identifier) ))))) ;) (expression_statement "iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);" (assignment_expression "iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10)" identifier = (pointer_expression "*(int *)(*(long *)(param_2 + 4) + 4 + lVar10)" * (cast_expression "(int *)(*(long *)(param_2 + 4) + 4 + lVar10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(param_2 + 4) + 4 + lVar10)" ( (binary_expression "*(long *)(param_2 + 4) + 4 + lVar10" (binary_expression "*(long *)(param_2 + 4) + 4" (pointer_expression "*(long *)(param_2 + 4)" * (cast_expression "(long *)(param_2 + 4)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) + number_literal) + identifier) ))))) ;) }) (else_clause "else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }" else (compound_statement "{\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }" { (expression_statement "iVar6 = (iVar4 - *param_2 / 2) * 2;" (assignment_expression "iVar6 = (iVar4 - *param_2 / 2) * 2" identifier = (binary_expression "(iVar4 - *param_2 / 2) * 2" (parenthesized_expression "(iVar4 - *param_2 / 2)" ( (binary_expression "iVar4 - *param_2 / 2" identifier - (binary_expression "*param_2 / 2" (pointer_expression "*param_2" * identifier) / number_literal)) )) * number_literal)) ;) (expression_statement "iVar8 = iVar6 + 1;" (assignment_expression "iVar8 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) }))) (expression_statement "lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);" (assignment_expression "lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6)" identifier = (binary_expression "(long)iVar6 * 0x50 + *(long *)(param_2 + 6)" (binary_expression "(long)iVar6 * 0x50" (cast_expression "(long)iVar6" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal) + (pointer_expression "*(long *)(param_2 + 6)" * (cast_expression "(long *)(param_2 + 6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 6)" ( (binary_expression "param_2 + 6" identifier + number_literal) )))))) ;) (expression_statement "iVar9 = iVar8;" (assignment_expression "iVar9 = iVar8" identifier = identifier) ;) (if_statement "if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }" if (parenthesized_expression "((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0))" ( (binary_expression "(*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)" (parenthesized_expression "(*(long *)(lVar3 + 0x18) != 0)" ( (binary_expression "*(long *)(lVar3 + 0x18) != 0" (pointer_expression "*(long *)(lVar3 + 0x18)" * (cast_expression "(long *)(lVar3 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x18)" ( (binary_expression "lVar3 + 0x18" identifier + number_literal) )))) != number_literal) )) && (parenthesized_expression "(lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)" ( (comma_expression "lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0" (assignment_expression "lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6)" identifier = (binary_expression "(long)iVar8 * 0x50 + *(long *)(param_2 + 6)" (binary_expression "(long)iVar8 * 0x50" (cast_expression "(long)iVar8" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal) + (pointer_expression "*(long *)(param_2 + 6)" * (cast_expression "(long *)(param_2 + 6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 6)" ( (binary_expression "param_2 + 6" identifier + number_literal) )))))) , (comma_expression "iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0" (assignment_expression "iVar9 = iVar6" identifier = identifier) , (binary_expression "*(long *)(lVar5 + 0x18) != 0" (pointer_expression "*(long *)(lVar5 + 0x18)" * (cast_expression "(long *)(lVar5 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar5 + 0x18)" ( (binary_expression "lVar5 + 0x18" identifier + number_literal) )))) != number_literal))) ))) )) (compound_statement "{\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }" { (expression_statement "local_44 = 0;" (assignment_expression "local_44 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));" (assignment_expression "iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14))" identifier = (call_expression "(**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14))" (parenthesized_expression "(**(code **)(*(long *)(param_2 + 2) + 0x40))" ( (pointer_expression "**(code **)(*(long *)(param_2 + 2) + 0x40)" * (pointer_expression "*(code **)(*(long *)(param_2 + 2) + 0x40)" * (cast_expression "(code **)(*(long *)(param_2 + 2) + 0x40)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(long *)(param_2 + 2) + 0x40)" ( (binary_expression "*(long *)(param_2 + 2) + 0x40" (pointer_expression "*(long *)(param_2 + 2)" * (cast_expression "(long *)(param_2 + 2)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 2)" ( (binary_expression "param_2 + 2" identifier + number_literal) )))) + number_literal) ))))) )) (argument_list "(*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14))" ( (pointer_expression "*(long *)(param_2 + 2)" * (cast_expression "(long *)(param_2 + 2)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 2)" ( (binary_expression "param_2 + 2" identifier + number_literal) )))) , (pointer_expression "&local_44" & identifier) , (pointer_expression "*(undefined8 *)(lVar3 + 0x28)" * (cast_expression "(undefined8 *)(lVar3 + 0x28)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x28)" ( (binary_expression "lVar3 + 0x28" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(lVar3 + 0x14)" * (cast_expression "(undefined4 *)(lVar3 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x14)" ( (binary_expression "lVar3 + 0x14" identifier + number_literal) )))) , (pointer_expression "*(undefined8 *)(lVar5 + 0x28)" * (cast_expression "(undefined8 *)(lVar5 + 0x28)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar5 + 0x28)" ( (binary_expression "lVar5 + 0x28" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(lVar5 + 0x14)" * (cast_expression "(undefined4 *)(lVar5 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar5 + 0x14)" ( (binary_expression "lVar5 + 0x14" identifier + number_literal) )))) )))) ;) (expression_statement "iVar9 = iVar8;" (assignment_expression "iVar9 = iVar8" identifier = identifier) ;) (if_statement "if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }" if (parenthesized_expression "(iVar1 < 1)" ( (binary_expression "iVar1 < 1" identifier < number_literal) )) (compound_statement "{\n          iVar9 = iVar6;\n        }" { (expression_statement "iVar9 = iVar6;" (assignment_expression "iVar9 = iVar6" identifier = identifier) ;) })) })) (expression_statement "*(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;" (assignment_expression "*(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9" (pointer_expression "*(int *)(*(long *)(param_2 + 4) + lVar7)" * (cast_expression "(int *)(*(long *)(param_2 + 4) + lVar7)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(param_2 + 4) + lVar7)" ( (binary_expression "*(long *)(param_2 + 4) + lVar7" (pointer_expression "*(long *)(param_2 + 4)" * (cast_expression "(long *)(param_2 + 4)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) + identifier) )))) = identifier) ;) (expression_statement "lVar7 = lVar7 + -4;" (assignment_expression "lVar7 = lVar7 + -4" identifier = (binary_expression "lVar7 + -4" identifier + number_literal)) ;) (expression_statement "lVar10 = lVar10 + -8;" (assignment_expression "lVar10 = lVar10 + -8" identifier = (binary_expression "lVar10 + -8" identifier + number_literal)) ;) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) ;) })) (expression_statement "uVar2 = (ulong)*(byte *)(*(long *)(param_1 + 0x18) + 0x13);" (assignment_expression "uVar2 = (ulong)*(byte *)(*(long *)(param_1 + 0x18) + 0x13)" identifier = (binary_expression "(ulong)*(byte *)(*(long *)(param_1 + 0x18) + 0x13)" (parenthesized_expression "(ulong)" ( identifier )) * (cast_expression "(byte *)(*(long *)(param_1 + 0x18) + 0x13)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(param_1 + 0x18) + 0x13)" ( (binary_expression "*(long *)(param_1 + 0x18) + 0x13" (pointer_expression "*(long *)(param_1 + 0x18)" * (cast_expression "(long *)(param_1 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) + number_literal) ))))) ;) (labeled_statement "LAB_0013e090:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" statement_identifier : (if_statement "if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" if (parenthesized_expression "(local_40 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 != *(long *)(in_FS_OFFSET + 0x28)" identifier != (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" { comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "int vdbeMergeEngineInit(SortSubtask *pTask,MergeEngine *pMerger,int eMode)\n\n{\n  PmaReader *pPVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  long lVar6;\n  int iVar7;\n  int iVar8;\n  long lVar9;\n  long in_FS_OFFSET;\n  int bCached;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  pMerger->pTask = pTask;\n  iVar4 = pMerger->nTree;\n  if (0 < iVar4) {\n    lVar6 = 0;\n    do {\n      if (eMode == 2) {\n        uVar2 = vdbePmaReaderNext(pMerger->aReadr + (long)iVar4 + -1);\n      }\n      else {\n        uVar2 = vdbePmaReaderIncrInit((PmaReader *)((long)&pMerger->aReadr->iReadOff + lVar6),0);\n      }\n      if (uVar2 != 0) goto LAB_0013e090;\n      lVar6 = lVar6 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  iVar4 = pMerger->nTree + -1;\n  if (0 < iVar4) {\n    lVar6 = (long)iVar4 * 4;\n    lVar9 = (long)iVar4 << 3;\n    do {\n      if (iVar4 < pMerger->nTree / 2) {\n        iVar5 = *(int *)((long)pMerger->aTree + lVar9);\n        iVar7 = *(int *)((long)pMerger->aTree + lVar9 + 4);\n      }\n      else {\n        iVar5 = (iVar4 - pMerger->nTree / 2) * 2;\n        iVar7 = iVar5 + 1;\n      }\n      pPVar1 = pMerger->aReadr;\n      iVar8 = iVar7;\n      if ((pPVar1[iVar5].pFd != (sqlite3_file *)0x0) &&\n         (iVar8 = iVar5, pPVar1[iVar7].pFd != (sqlite3_file *)0x0)) {\n        bCached = 0;\n        iVar3 = (*pMerger->pTask->xCompare)\n                          (pMerger->pTask,&bCached,pPVar1[iVar5].aKey,pPVar1[iVar5].nKey,\n                           pPVar1[iVar7].aKey,pPVar1[iVar7].nKey);\n        iVar8 = iVar7;\n        if (iVar3 < 1) {\n          iVar8 = iVar5;\n        }\n      }\n      *(int *)((long)pMerger->aTree + lVar6) = iVar8;\n      lVar6 = lVar6 + -4;\n      lVar9 = lVar9 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  uVar2 = (uint)pTask->pUnpacked->errCode;\nLAB_0013e090:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return uVar2;\n}\n\n" (function_definition "int vdbeMergeEngineInit(SortSubtask *pTask,MergeEngine *pMerger,int eMode)\n\n{\n  PmaReader *pPVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  long lVar6;\n  int iVar7;\n  int iVar8;\n  long lVar9;\n  long in_FS_OFFSET;\n  int bCached;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  pMerger->pTask = pTask;\n  iVar4 = pMerger->nTree;\n  if (0 < iVar4) {\n    lVar6 = 0;\n    do {\n      if (eMode == 2) {\n        uVar2 = vdbePmaReaderNext(pMerger->aReadr + (long)iVar4 + -1);\n      }\n      else {\n        uVar2 = vdbePmaReaderIncrInit((PmaReader *)((long)&pMerger->aReadr->iReadOff + lVar6),0);\n      }\n      if (uVar2 != 0) goto LAB_0013e090;\n      lVar6 = lVar6 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  iVar4 = pMerger->nTree + -1;\n  if (0 < iVar4) {\n    lVar6 = (long)iVar4 * 4;\n    lVar9 = (long)iVar4 << 3;\n    do {\n      if (iVar4 < pMerger->nTree / 2) {\n        iVar5 = *(int *)((long)pMerger->aTree + lVar9);\n        iVar7 = *(int *)((long)pMerger->aTree + lVar9 + 4);\n      }\n      else {\n        iVar5 = (iVar4 - pMerger->nTree / 2) * 2;\n        iVar7 = iVar5 + 1;\n      }\n      pPVar1 = pMerger->aReadr;\n      iVar8 = iVar7;\n      if ((pPVar1[iVar5].pFd != (sqlite3_file *)0x0) &&\n         (iVar8 = iVar5, pPVar1[iVar7].pFd != (sqlite3_file *)0x0)) {\n        bCached = 0;\n        iVar3 = (*pMerger->pTask->xCompare)\n                          (pMerger->pTask,&bCached,pPVar1[iVar5].aKey,pPVar1[iVar5].nKey,\n                           pPVar1[iVar7].aKey,pPVar1[iVar7].nKey);\n        iVar8 = iVar7;\n        if (iVar3 < 1) {\n          iVar8 = iVar5;\n        }\n      }\n      *(int *)((long)pMerger->aTree + lVar6) = iVar8;\n      lVar6 = lVar6 + -4;\n      lVar9 = lVar9 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  uVar2 = (uint)pTask->pUnpacked->errCode;\nLAB_0013e090:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return uVar2;\n}" primitive_type (function_declarator "vdbeMergeEngineInit(SortSubtask *pTask,MergeEngine *pMerger,int eMode)" identifier (parameter_list "(SortSubtask *pTask,MergeEngine *pMerger,int eMode)" ( (parameter_declaration "SortSubtask *pTask" type_identifier (pointer_declarator "*pTask" * identifier)) , (parameter_declaration "MergeEngine *pMerger" type_identifier (pointer_declarator "*pMerger" * identifier)) , (parameter_declaration "int eMode" primitive_type identifier) ))) (compound_statement "{\n  PmaReader *pPVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  long lVar6;\n  int iVar7;\n  int iVar8;\n  long lVar9;\n  long in_FS_OFFSET;\n  int bCached;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  pMerger->pTask = pTask;\n  iVar4 = pMerger->nTree;\n  if (0 < iVar4) {\n    lVar6 = 0;\n    do {\n      if (eMode == 2) {\n        uVar2 = vdbePmaReaderNext(pMerger->aReadr + (long)iVar4 + -1);\n      }\n      else {\n        uVar2 = vdbePmaReaderIncrInit((PmaReader *)((long)&pMerger->aReadr->iReadOff + lVar6),0);\n      }\n      if (uVar2 != 0) goto LAB_0013e090;\n      lVar6 = lVar6 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  iVar4 = pMerger->nTree + -1;\n  if (0 < iVar4) {\n    lVar6 = (long)iVar4 * 4;\n    lVar9 = (long)iVar4 << 3;\n    do {\n      if (iVar4 < pMerger->nTree / 2) {\n        iVar5 = *(int *)((long)pMerger->aTree + lVar9);\n        iVar7 = *(int *)((long)pMerger->aTree + lVar9 + 4);\n      }\n      else {\n        iVar5 = (iVar4 - pMerger->nTree / 2) * 2;\n        iVar7 = iVar5 + 1;\n      }\n      pPVar1 = pMerger->aReadr;\n      iVar8 = iVar7;\n      if ((pPVar1[iVar5].pFd != (sqlite3_file *)0x0) &&\n         (iVar8 = iVar5, pPVar1[iVar7].pFd != (sqlite3_file *)0x0)) {\n        bCached = 0;\n        iVar3 = (*pMerger->pTask->xCompare)\n                          (pMerger->pTask,&bCached,pPVar1[iVar5].aKey,pPVar1[iVar5].nKey,\n                           pPVar1[iVar7].aKey,pPVar1[iVar7].nKey);\n        iVar8 = iVar7;\n        if (iVar3 < 1) {\n          iVar8 = iVar5;\n        }\n      }\n      *(int *)((long)pMerger->aTree + lVar6) = iVar8;\n      lVar6 = lVar6 + -4;\n      lVar9 = lVar9 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  uVar2 = (uint)pTask->pUnpacked->errCode;\nLAB_0013e090:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return uVar2;\n}" { (declaration "PmaReader *pPVar1;" type_identifier (pointer_declarator "*pPVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "long lVar6;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "long lVar9;" (sized_type_specifier "long" long) identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "int bCached;" primitive_type identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "pMerger->pTask = pTask;" (assignment_expression "pMerger->pTask = pTask" (field_expression "pMerger->pTask" identifier -> field_identifier) = identifier) ;) (expression_statement "iVar4 = pMerger->nTree;" (assignment_expression "iVar4 = pMerger->nTree" identifier = (field_expression "pMerger->nTree" identifier -> field_identifier)) ;) (if_statement "if (0 < iVar4) {\n    lVar6 = 0;\n    do {\n      if (eMode == 2) {\n        uVar2 = vdbePmaReaderNext(pMerger->aReadr + (long)iVar4 + -1);\n      }\n      else {\n        uVar2 = vdbePmaReaderIncrInit((PmaReader *)((long)&pMerger->aReadr->iReadOff + lVar6),0);\n      }\n      if (uVar2 != 0) goto LAB_0013e090;\n      lVar6 = lVar6 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }" if (parenthesized_expression "(0 < iVar4)" ( (binary_expression "0 < iVar4" number_literal < identifier) )) (compound_statement "{\n    lVar6 = 0;\n    do {\n      if (eMode == 2) {\n        uVar2 = vdbePmaReaderNext(pMerger->aReadr + (long)iVar4 + -1);\n      }\n      else {\n        uVar2 = vdbePmaReaderIncrInit((PmaReader *)((long)&pMerger->aReadr->iReadOff + lVar6),0);\n      }\n      if (uVar2 != 0) goto LAB_0013e090;\n      lVar6 = lVar6 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }" { (expression_statement "lVar6 = 0;" (assignment_expression "lVar6 = 0" identifier = number_literal) ;) (do_statement "do {\n      if (eMode == 2) {\n        uVar2 = vdbePmaReaderNext(pMerger->aReadr + (long)iVar4 + -1);\n      }\n      else {\n        uVar2 = vdbePmaReaderIncrInit((PmaReader *)((long)&pMerger->aReadr->iReadOff + lVar6),0);\n      }\n      if (uVar2 != 0) goto LAB_0013e090;\n      lVar6 = lVar6 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);" do (compound_statement "{\n      if (eMode == 2) {\n        uVar2 = vdbePmaReaderNext(pMerger->aReadr + (long)iVar4 + -1);\n      }\n      else {\n        uVar2 = vdbePmaReaderIncrInit((PmaReader *)((long)&pMerger->aReadr->iReadOff + lVar6),0);\n      }\n      if (uVar2 != 0) goto LAB_0013e090;\n      lVar6 = lVar6 + 0x50;\n      iVar4 = iVar4 + -1;\n    }" { (if_statement "if (eMode == 2) {\n        uVar2 = vdbePmaReaderNext(pMerger->aReadr + (long)iVar4 + -1);\n      }\n      else {\n        uVar2 = vdbePmaReaderIncrInit((PmaReader *)((long)&pMerger->aReadr->iReadOff + lVar6),0);\n      }" if (parenthesized_expression "(eMode == 2)" ( (binary_expression "eMode == 2" identifier == number_literal) )) (compound_statement "{\n        uVar2 = vdbePmaReaderNext(pMerger->aReadr + (long)iVar4 + -1);\n      }" { (expression_statement "uVar2 = vdbePmaReaderNext(pMerger->aReadr + (long)iVar4 + -1);" (assignment_expression "uVar2 = vdbePmaReaderNext(pMerger->aReadr + (long)iVar4 + -1)" identifier = (call_expression "vdbePmaReaderNext(pMerger->aReadr + (long)iVar4 + -1)" identifier (argument_list "(pMerger->aReadr + (long)iVar4 + -1)" ( (binary_expression "pMerger->aReadr + (long)iVar4 + -1" (binary_expression "pMerger->aReadr + (long)iVar4" (field_expression "pMerger->aReadr" identifier -> field_identifier) + (cast_expression "(long)iVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) + number_literal) )))) ;) }) (else_clause "else {\n        uVar2 = vdbePmaReaderIncrInit((PmaReader *)((long)&pMerger->aReadr->iReadOff + lVar6),0);\n      }" else (compound_statement "{\n        uVar2 = vdbePmaReaderIncrInit((PmaReader *)((long)&pMerger->aReadr->iReadOff + lVar6),0);\n      }" { (expression_statement "uVar2 = vdbePmaReaderIncrInit((PmaReader *)((long)&pMerger->aReadr->iReadOff + lVar6),0);" (assignment_expression "uVar2 = vdbePmaReaderIncrInit((PmaReader *)((long)&pMerger->aReadr->iReadOff + lVar6),0)" identifier = (call_expression "vdbePmaReaderIncrInit((PmaReader *)((long)&pMerger->aReadr->iReadOff + lVar6),0)" identifier (argument_list "((PmaReader *)((long)&pMerger->aReadr->iReadOff + lVar6),0)" ( (cast_expression "(PmaReader *)((long)&pMerger->aReadr->iReadOff + lVar6)" ( (type_descriptor "PmaReader *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)&pMerger->aReadr->iReadOff + lVar6)" ( (binary_expression "(long)&pMerger->aReadr->iReadOff + lVar6" (cast_expression "(long)&pMerger->aReadr->iReadOff" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "&pMerger->aReadr->iReadOff" & (field_expression "pMerger->aReadr->iReadOff" (field_expression "pMerger->aReadr" identifier -> field_identifier) -> field_identifier))) + identifier) ))) , number_literal )))) ;) }))) (if_statement "if (uVar2 != 0) goto LAB_0013e090;" if (parenthesized_expression "(uVar2 != 0)" ( (binary_expression "uVar2 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0013e090;" goto statement_identifier ;)) (expression_statement "lVar6 = lVar6 + 0x50;" (assignment_expression "lVar6 = lVar6 + 0x50" identifier = (binary_expression "lVar6 + 0x50" identifier + number_literal)) ;) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) ;) })) (expression_statement "iVar4 = pMerger->nTree + -1;" (assignment_expression "iVar4 = pMerger->nTree + -1" identifier = (binary_expression "pMerger->nTree + -1" (field_expression "pMerger->nTree" identifier -> field_identifier) + number_literal)) ;) (if_statement "if (0 < iVar4) {\n    lVar6 = (long)iVar4 * 4;\n    lVar9 = (long)iVar4 << 3;\n    do {\n      if (iVar4 < pMerger->nTree / 2) {\n        iVar5 = *(int *)((long)pMerger->aTree + lVar9);\n        iVar7 = *(int *)((long)pMerger->aTree + lVar9 + 4);\n      }\n      else {\n        iVar5 = (iVar4 - pMerger->nTree / 2) * 2;\n        iVar7 = iVar5 + 1;\n      }\n      pPVar1 = pMerger->aReadr;\n      iVar8 = iVar7;\n      if ((pPVar1[iVar5].pFd != (sqlite3_file *)0x0) &&\n         (iVar8 = iVar5, pPVar1[iVar7].pFd != (sqlite3_file *)0x0)) {\n        bCached = 0;\n        iVar3 = (*pMerger->pTask->xCompare)\n                          (pMerger->pTask,&bCached,pPVar1[iVar5].aKey,pPVar1[iVar5].nKey,\n                           pPVar1[iVar7].aKey,pPVar1[iVar7].nKey);\n        iVar8 = iVar7;\n        if (iVar3 < 1) {\n          iVar8 = iVar5;\n        }\n      }\n      *(int *)((long)pMerger->aTree + lVar6) = iVar8;\n      lVar6 = lVar6 + -4;\n      lVar9 = lVar9 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }" if (parenthesized_expression "(0 < iVar4)" ( (binary_expression "0 < iVar4" number_literal < identifier) )) (compound_statement "{\n    lVar6 = (long)iVar4 * 4;\n    lVar9 = (long)iVar4 << 3;\n    do {\n      if (iVar4 < pMerger->nTree / 2) {\n        iVar5 = *(int *)((long)pMerger->aTree + lVar9);\n        iVar7 = *(int *)((long)pMerger->aTree + lVar9 + 4);\n      }\n      else {\n        iVar5 = (iVar4 - pMerger->nTree / 2) * 2;\n        iVar7 = iVar5 + 1;\n      }\n      pPVar1 = pMerger->aReadr;\n      iVar8 = iVar7;\n      if ((pPVar1[iVar5].pFd != (sqlite3_file *)0x0) &&\n         (iVar8 = iVar5, pPVar1[iVar7].pFd != (sqlite3_file *)0x0)) {\n        bCached = 0;\n        iVar3 = (*pMerger->pTask->xCompare)\n                          (pMerger->pTask,&bCached,pPVar1[iVar5].aKey,pPVar1[iVar5].nKey,\n                           pPVar1[iVar7].aKey,pPVar1[iVar7].nKey);\n        iVar8 = iVar7;\n        if (iVar3 < 1) {\n          iVar8 = iVar5;\n        }\n      }\n      *(int *)((long)pMerger->aTree + lVar6) = iVar8;\n      lVar6 = lVar6 + -4;\n      lVar9 = lVar9 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }" { (expression_statement "lVar6 = (long)iVar4 * 4;" (assignment_expression "lVar6 = (long)iVar4 * 4" identifier = (binary_expression "(long)iVar4 * 4" (cast_expression "(long)iVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal)) ;) (expression_statement "lVar9 = (long)iVar4 << 3;" (assignment_expression "lVar9 = (long)iVar4 << 3" identifier = (binary_expression "(long)iVar4 << 3" (cast_expression "(long)iVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) << number_literal)) ;) (do_statement "do {\n      if (iVar4 < pMerger->nTree / 2) {\n        iVar5 = *(int *)((long)pMerger->aTree + lVar9);\n        iVar7 = *(int *)((long)pMerger->aTree + lVar9 + 4);\n      }\n      else {\n        iVar5 = (iVar4 - pMerger->nTree / 2) * 2;\n        iVar7 = iVar5 + 1;\n      }\n      pPVar1 = pMerger->aReadr;\n      iVar8 = iVar7;\n      if ((pPVar1[iVar5].pFd != (sqlite3_file *)0x0) &&\n         (iVar8 = iVar5, pPVar1[iVar7].pFd != (sqlite3_file *)0x0)) {\n        bCached = 0;\n        iVar3 = (*pMerger->pTask->xCompare)\n                          (pMerger->pTask,&bCached,pPVar1[iVar5].aKey,pPVar1[iVar5].nKey,\n                           pPVar1[iVar7].aKey,pPVar1[iVar7].nKey);\n        iVar8 = iVar7;\n        if (iVar3 < 1) {\n          iVar8 = iVar5;\n        }\n      }\n      *(int *)((long)pMerger->aTree + lVar6) = iVar8;\n      lVar6 = lVar6 + -4;\n      lVar9 = lVar9 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);" do (compound_statement "{\n      if (iVar4 < pMerger->nTree / 2) {\n        iVar5 = *(int *)((long)pMerger->aTree + lVar9);\n        iVar7 = *(int *)((long)pMerger->aTree + lVar9 + 4);\n      }\n      else {\n        iVar5 = (iVar4 - pMerger->nTree / 2) * 2;\n        iVar7 = iVar5 + 1;\n      }\n      pPVar1 = pMerger->aReadr;\n      iVar8 = iVar7;\n      if ((pPVar1[iVar5].pFd != (sqlite3_file *)0x0) &&\n         (iVar8 = iVar5, pPVar1[iVar7].pFd != (sqlite3_file *)0x0)) {\n        bCached = 0;\n        iVar3 = (*pMerger->pTask->xCompare)\n                          (pMerger->pTask,&bCached,pPVar1[iVar5].aKey,pPVar1[iVar5].nKey,\n                           pPVar1[iVar7].aKey,pPVar1[iVar7].nKey);\n        iVar8 = iVar7;\n        if (iVar3 < 1) {\n          iVar8 = iVar5;\n        }\n      }\n      *(int *)((long)pMerger->aTree + lVar6) = iVar8;\n      lVar6 = lVar6 + -4;\n      lVar9 = lVar9 + -8;\n      iVar4 = iVar4 + -1;\n    }" { (if_statement "if (iVar4 < pMerger->nTree / 2) {\n        iVar5 = *(int *)((long)pMerger->aTree + lVar9);\n        iVar7 = *(int *)((long)pMerger->aTree + lVar9 + 4);\n      }\n      else {\n        iVar5 = (iVar4 - pMerger->nTree / 2) * 2;\n        iVar7 = iVar5 + 1;\n      }" if (parenthesized_expression "(iVar4 < pMerger->nTree / 2)" ( (binary_expression "iVar4 < pMerger->nTree / 2" identifier < (binary_expression "pMerger->nTree / 2" (field_expression "pMerger->nTree" identifier -> field_identifier) / number_literal)) )) (compound_statement "{\n        iVar5 = *(int *)((long)pMerger->aTree + lVar9);\n        iVar7 = *(int *)((long)pMerger->aTree + lVar9 + 4);\n      }" { (expression_statement "iVar5 = *(int *)((long)pMerger->aTree + lVar9);" (assignment_expression "iVar5 = *(int *)((long)pMerger->aTree + lVar9)" identifier = (pointer_expression "*(int *)((long)pMerger->aTree + lVar9)" * (cast_expression "(int *)((long)pMerger->aTree + lVar9)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)pMerger->aTree + lVar9)" ( (binary_expression "(long)pMerger->aTree + lVar9" (cast_expression "(long)pMerger->aTree" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (field_expression "pMerger->aTree" identifier -> field_identifier)) + identifier) ))))) ;) (expression_statement "iVar7 = *(int *)((long)pMerger->aTree + lVar9 + 4);" (assignment_expression "iVar7 = *(int *)((long)pMerger->aTree + lVar9 + 4)" identifier = (pointer_expression "*(int *)((long)pMerger->aTree + lVar9 + 4)" * (cast_expression "(int *)((long)pMerger->aTree + lVar9 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)pMerger->aTree + lVar9 + 4)" ( (binary_expression "(long)pMerger->aTree + lVar9 + 4" (binary_expression "(long)pMerger->aTree + lVar9" (cast_expression "(long)pMerger->aTree" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (field_expression "pMerger->aTree" identifier -> field_identifier)) + identifier) + number_literal) ))))) ;) }) (else_clause "else {\n        iVar5 = (iVar4 - pMerger->nTree / 2) * 2;\n        iVar7 = iVar5 + 1;\n      }" else (compound_statement "{\n        iVar5 = (iVar4 - pMerger->nTree / 2) * 2;\n        iVar7 = iVar5 + 1;\n      }" { (expression_statement "iVar5 = (iVar4 - pMerger->nTree / 2) * 2;" (assignment_expression "iVar5 = (iVar4 - pMerger->nTree / 2) * 2" identifier = (binary_expression "(iVar4 - pMerger->nTree / 2) * 2" (parenthesized_expression "(iVar4 - pMerger->nTree / 2)" ( (binary_expression "iVar4 - pMerger->nTree / 2" identifier - (binary_expression "pMerger->nTree / 2" (field_expression "pMerger->nTree" identifier -> field_identifier) / number_literal)) )) * number_literal)) ;) (expression_statement "iVar7 = iVar5 + 1;" (assignment_expression "iVar7 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) }))) (expression_statement "pPVar1 = pMerger->aReadr;" (assignment_expression "pPVar1 = pMerger->aReadr" identifier = (field_expression "pMerger->aReadr" identifier -> field_identifier)) ;) (expression_statement "iVar8 = iVar7;" (assignment_expression "iVar8 = iVar7" identifier = identifier) ;) (if_statement "if ((pPVar1[iVar5].pFd != (sqlite3_file *)0x0) &&\n         (iVar8 = iVar5, pPVar1[iVar7].pFd != (sqlite3_file *)0x0)) {\n        bCached = 0;\n        iVar3 = (*pMerger->pTask->xCompare)\n                          (pMerger->pTask,&bCached,pPVar1[iVar5].aKey,pPVar1[iVar5].nKey,\n                           pPVar1[iVar7].aKey,pPVar1[iVar7].nKey);\n        iVar8 = iVar7;\n        if (iVar3 < 1) {\n          iVar8 = iVar5;\n        }\n      }" if (parenthesized_expression "((pPVar1[iVar5].pFd != (sqlite3_file *)0x0) &&\n         (iVar8 = iVar5, pPVar1[iVar7].pFd != (sqlite3_file *)0x0))" ( (binary_expression "(pPVar1[iVar5].pFd != (sqlite3_file *)0x0) &&\n         (iVar8 = iVar5, pPVar1[iVar7].pFd != (sqlite3_file *)0x0)" (parenthesized_expression "(pPVar1[iVar5].pFd != (sqlite3_file *)0x0)" ( (binary_expression "pPVar1[iVar5].pFd != (sqlite3_file *)0x0" (field_expression "pPVar1[iVar5].pFd" (subscript_expression "pPVar1[iVar5]" identifier [ identifier ]) . field_identifier) != (cast_expression "(sqlite3_file *)0x0" ( (type_descriptor "sqlite3_file *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar8 = iVar5, pPVar1[iVar7].pFd != (sqlite3_file *)0x0)" ( (comma_expression "iVar8 = iVar5, pPVar1[iVar7].pFd != (sqlite3_file *)0x0" (assignment_expression "iVar8 = iVar5" identifier = identifier) , (binary_expression "pPVar1[iVar7].pFd != (sqlite3_file *)0x0" (field_expression "pPVar1[iVar7].pFd" (subscript_expression "pPVar1[iVar7]" identifier [ identifier ]) . field_identifier) != (cast_expression "(sqlite3_file *)0x0" ( (type_descriptor "sqlite3_file *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) (compound_statement "{\n        bCached = 0;\n        iVar3 = (*pMerger->pTask->xCompare)\n                          (pMerger->pTask,&bCached,pPVar1[iVar5].aKey,pPVar1[iVar5].nKey,\n                           pPVar1[iVar7].aKey,pPVar1[iVar7].nKey);\n        iVar8 = iVar7;\n        if (iVar3 < 1) {\n          iVar8 = iVar5;\n        }\n      }" { (expression_statement "bCached = 0;" (assignment_expression "bCached = 0" identifier = number_literal) ;) (expression_statement "iVar3 = (*pMerger->pTask->xCompare)\n                          (pMerger->pTask,&bCached,pPVar1[iVar5].aKey,pPVar1[iVar5].nKey,\n                           pPVar1[iVar7].aKey,pPVar1[iVar7].nKey);" (assignment_expression "iVar3 = (*pMerger->pTask->xCompare)\n                          (pMerger->pTask,&bCached,pPVar1[iVar5].aKey,pPVar1[iVar5].nKey,\n                           pPVar1[iVar7].aKey,pPVar1[iVar7].nKey)" identifier = (call_expression "(*pMerger->pTask->xCompare)\n                          (pMerger->pTask,&bCached,pPVar1[iVar5].aKey,pPVar1[iVar5].nKey,\n                           pPVar1[iVar7].aKey,pPVar1[iVar7].nKey)" (parenthesized_expression "(*pMerger->pTask->xCompare)" ( (pointer_expression "*pMerger->pTask->xCompare" * (field_expression "pMerger->pTask->xCompare" (field_expression "pMerger->pTask" identifier -> field_identifier) -> field_identifier)) )) (argument_list "(pMerger->pTask,&bCached,pPVar1[iVar5].aKey,pPVar1[iVar5].nKey,\n                           pPVar1[iVar7].aKey,pPVar1[iVar7].nKey)" ( (field_expression "pMerger->pTask" identifier -> field_identifier) , (pointer_expression "&bCached" & identifier) , (field_expression "pPVar1[iVar5].aKey" (subscript_expression "pPVar1[iVar5]" identifier [ identifier ]) . field_identifier) , (field_expression "pPVar1[iVar5].nKey" (subscript_expression "pPVar1[iVar5]" identifier [ identifier ]) . field_identifier) , (field_expression "pPVar1[iVar7].aKey" (subscript_expression "pPVar1[iVar7]" identifier [ identifier ]) . field_identifier) , (field_expression "pPVar1[iVar7].nKey" (subscript_expression "pPVar1[iVar7]" identifier [ identifier ]) . field_identifier) )))) ;) (expression_statement "iVar8 = iVar7;" (assignment_expression "iVar8 = iVar7" identifier = identifier) ;) (if_statement "if (iVar3 < 1) {\n          iVar8 = iVar5;\n        }" if (parenthesized_expression "(iVar3 < 1)" ( (binary_expression "iVar3 < 1" identifier < number_literal) )) (compound_statement "{\n          iVar8 = iVar5;\n        }" { (expression_statement "iVar8 = iVar5;" (assignment_expression "iVar8 = iVar5" identifier = identifier) ;) })) })) (expression_statement "*(int *)((long)pMerger->aTree + lVar6) = iVar8;" (assignment_expression "*(int *)((long)pMerger->aTree + lVar6) = iVar8" (pointer_expression "*(int *)((long)pMerger->aTree + lVar6)" * (cast_expression "(int *)((long)pMerger->aTree + lVar6)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)pMerger->aTree + lVar6)" ( (binary_expression "(long)pMerger->aTree + lVar6" (cast_expression "(long)pMerger->aTree" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (field_expression "pMerger->aTree" identifier -> field_identifier)) + identifier) )))) = identifier) ;) (expression_statement "lVar6 = lVar6 + -4;" (assignment_expression "lVar6 = lVar6 + -4" identifier = (binary_expression "lVar6 + -4" identifier + number_literal)) ;) (expression_statement "lVar9 = lVar9 + -8;" (assignment_expression "lVar9 = lVar9 + -8" identifier = (binary_expression "lVar9 + -8" identifier + number_literal)) ;) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) ;) })) (expression_statement "uVar2 = (uint)pTask->pUnpacked->errCode;" (assignment_expression "uVar2 = (uint)pTask->pUnpacked->errCode" identifier = (cast_expression "(uint)pTask->pUnpacked->errCode" ( (type_descriptor "uint" type_identifier) ) (field_expression "pTask->pUnpacked->errCode" (field_expression "pTask->pUnpacked" identifier -> field_identifier) -> field_identifier))) ;) (labeled_statement "LAB_0013e090:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" statement_identifier : (if_statement "if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" if (parenthesized_expression "(local_40 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 != *(long *)(in_FS_OFFSET + 0x28)" identifier != (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" { comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "ulong FUN_0013df2e(long param_1,int *param_2,int param_3)\n\n{\n  int iVar1;\n  ulong uVar2;\n  long lVar3;\n  int iVar4;\n  long lVar5;\n  int iVar6;\n  long lVar7;\n  int iVar8;\n  int iVar9;\n  long lVar10;\n  long in_FS_OFFSET;\n  undefined4 local_44;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  *(long *)(param_2 + 2) = param_1;\n  iVar4 = *param_2;\n  if (0 < iVar4) {\n    lVar7 = 0;\n    do {\n      if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }\n      if ((int)uVar2 != 0) goto LAB_0013e090;\n      lVar7 = lVar7 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  iVar4 = *param_2 + -1;\n  if (0 < iVar4) {\n    lVar7 = (long)iVar4 * 4;\n    lVar10 = (long)iVar4 << 3;\n    do {\n      if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }\n      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);\n      iVar9 = iVar8;\n      if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }\n      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;\n      lVar7 = lVar7 + -4;\n      lVar10 = lVar10 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  uVar2 = (ulong)*(byte *)(*(long *)(param_1 + 0x18) + 0x13);\nLAB_0013e090:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return uVar2;\n}\n\n" (function_definition "ulong FUN_0013df2e(long param_1,int *param_2,int param_3)\n\n{\n  int iVar1;\n  ulong uVar2;\n  long lVar3;\n  int iVar4;\n  long lVar5;\n  int iVar6;\n  long lVar7;\n  int iVar8;\n  int iVar9;\n  long lVar10;\n  long in_FS_OFFSET;\n  undefined4 local_44;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  *(long *)(param_2 + 2) = param_1;\n  iVar4 = *param_2;\n  if (0 < iVar4) {\n    lVar7 = 0;\n    do {\n      if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }\n      if ((int)uVar2 != 0) goto LAB_0013e090;\n      lVar7 = lVar7 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  iVar4 = *param_2 + -1;\n  if (0 < iVar4) {\n    lVar7 = (long)iVar4 * 4;\n    lVar10 = (long)iVar4 << 3;\n    do {\n      if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }\n      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);\n      iVar9 = iVar8;\n      if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }\n      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;\n      lVar7 = lVar7 + -4;\n      lVar10 = lVar10 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  uVar2 = (ulong)*(byte *)(*(long *)(param_1 + 0x18) + 0x13);\nLAB_0013e090:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_0013df2e(long param_1,int *param_2,int param_3)" identifier (parameter_list "(long param_1,int *param_2,int param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  ulong uVar2;\n  long lVar3;\n  int iVar4;\n  long lVar5;\n  int iVar6;\n  long lVar7;\n  int iVar8;\n  int iVar9;\n  long lVar10;\n  long in_FS_OFFSET;\n  undefined4 local_44;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  *(long *)(param_2 + 2) = param_1;\n  iVar4 = *param_2;\n  if (0 < iVar4) {\n    lVar7 = 0;\n    do {\n      if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }\n      if ((int)uVar2 != 0) goto LAB_0013e090;\n      lVar7 = lVar7 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  iVar4 = *param_2 + -1;\n  if (0 < iVar4) {\n    lVar7 = (long)iVar4 * 4;\n    lVar10 = (long)iVar4 << 3;\n    do {\n      if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }\n      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);\n      iVar9 = iVar8;\n      if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }\n      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;\n      lVar7 = lVar7 + -4;\n      lVar10 = lVar10 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  uVar2 = (ulong)*(byte *)(*(long *)(param_1 + 0x18) + 0x13);\nLAB_0013e090:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "long lVar7;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "long lVar10;" (sized_type_specifier "long" long) identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined4 local_44;" type_identifier identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "*(long *)(param_2 + 2) = param_1;" (assignment_expression "*(long *)(param_2 + 2) = param_1" (pointer_expression "*(long *)(param_2 + 2)" * (cast_expression "(long *)(param_2 + 2)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 2)" ( (binary_expression "param_2 + 2" identifier + number_literal) )))) = identifier) ;) (expression_statement "iVar4 = *param_2;" (assignment_expression "iVar4 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (0 < iVar4) {\n    lVar7 = 0;\n    do {\n      if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }\n      if ((int)uVar2 != 0) goto LAB_0013e090;\n      lVar7 = lVar7 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }" if (parenthesized_expression "(0 < iVar4)" ( (binary_expression "0 < iVar4" number_literal < identifier) )) (compound_statement "{\n    lVar7 = 0;\n    do {\n      if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }\n      if ((int)uVar2 != 0) goto LAB_0013e090;\n      lVar7 = lVar7 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }" { (expression_statement "lVar7 = 0;" (assignment_expression "lVar7 = 0" identifier = number_literal) ;) (do_statement "do {\n      if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }\n      if ((int)uVar2 != 0) goto LAB_0013e090;\n      lVar7 = lVar7 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);" do (compound_statement "{\n      if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }\n      if ((int)uVar2 != 0) goto LAB_0013e090;\n      lVar7 = lVar7 + 0x50;\n      iVar4 = iVar4 + -1;\n    }" { (if_statement "if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }" if (parenthesized_expression "(param_3 == 2)" ( (binary_expression "param_3 == 2" identifier == number_literal) )) (compound_statement "{\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }" { (expression_statement "uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);" (assignment_expression "uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50)" identifier = (call_expression "FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50)" identifier (argument_list "(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50)" ( (binary_expression "*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50" (binary_expression "*(long *)(param_2 + 6) + -0x50" (pointer_expression "*(long *)(param_2 + 6)" * (cast_expression "(long *)(param_2 + 6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 6)" ( (binary_expression "param_2 + 6" identifier + number_literal) )))) + number_literal) + (binary_expression "(long)iVar4 * 0x50" (cast_expression "(long)iVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal)) )))) ;) }) (else_clause "else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }" else (compound_statement "{\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }" { (expression_statement "uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);" (assignment_expression "uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0)" identifier = (call_expression "FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0)" identifier (argument_list "(lVar7 + *(long *)(param_2 + 6),0)" ( (binary_expression "lVar7 + *(long *)(param_2 + 6)" identifier + (pointer_expression "*(long *)(param_2 + 6)" * (cast_expression "(long *)(param_2 + 6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 6)" ( (binary_expression "param_2 + 6" identifier + number_literal) ))))) , number_literal )))) ;) }))) (if_statement "if ((int)uVar2 != 0) goto LAB_0013e090;" if (parenthesized_expression "((int)uVar2 != 0)" ( (binary_expression "(int)uVar2 != 0" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) != number_literal) )) (goto_statement "goto LAB_0013e090;" goto statement_identifier ;)) (expression_statement "lVar7 = lVar7 + 0x50;" (assignment_expression "lVar7 = lVar7 + 0x50" identifier = (binary_expression "lVar7 + 0x50" identifier + number_literal)) ;) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) ;) })) (expression_statement "iVar4 = *param_2 + -1;" (assignment_expression "iVar4 = *param_2 + -1" identifier = (binary_expression "*param_2 + -1" (pointer_expression "*param_2" * identifier) + number_literal)) ;) (if_statement "if (0 < iVar4) {\n    lVar7 = (long)iVar4 * 4;\n    lVar10 = (long)iVar4 << 3;\n    do {\n      if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }\n      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);\n      iVar9 = iVar8;\n      if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }\n      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;\n      lVar7 = lVar7 + -4;\n      lVar10 = lVar10 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }" if (parenthesized_expression "(0 < iVar4)" ( (binary_expression "0 < iVar4" number_literal < identifier) )) (compound_statement "{\n    lVar7 = (long)iVar4 * 4;\n    lVar10 = (long)iVar4 << 3;\n    do {\n      if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }\n      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);\n      iVar9 = iVar8;\n      if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }\n      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;\n      lVar7 = lVar7 + -4;\n      lVar10 = lVar10 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }" { (expression_statement "lVar7 = (long)iVar4 * 4;" (assignment_expression "lVar7 = (long)iVar4 * 4" identifier = (binary_expression "(long)iVar4 * 4" (cast_expression "(long)iVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal)) ;) (expression_statement "lVar10 = (long)iVar4 << 3;" (assignment_expression "lVar10 = (long)iVar4 << 3" identifier = (binary_expression "(long)iVar4 << 3" (cast_expression "(long)iVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) << number_literal)) ;) (do_statement "do {\n      if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }\n      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);\n      iVar9 = iVar8;\n      if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }\n      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;\n      lVar7 = lVar7 + -4;\n      lVar10 = lVar10 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);" do (compound_statement "{\n      if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }\n      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);\n      iVar9 = iVar8;\n      if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }\n      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;\n      lVar7 = lVar7 + -4;\n      lVar10 = lVar10 + -8;\n      iVar4 = iVar4 + -1;\n    }" { (if_statement "if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }" if (parenthesized_expression "(iVar4 < *param_2 / 2)" ( (binary_expression "iVar4 < *param_2 / 2" identifier < (binary_expression "*param_2 / 2" (pointer_expression "*param_2" * identifier) / number_literal)) )) (compound_statement "{\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }" { (expression_statement "iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);" (assignment_expression "iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10)" identifier = (pointer_expression "*(int *)(*(long *)(param_2 + 4) + lVar10)" * (cast_expression "(int *)(*(long *)(param_2 + 4) + lVar10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(param_2 + 4) + lVar10)" ( (binary_expression "*(long *)(param_2 + 4) + lVar10" (pointer_expression "*(long *)(param_2 + 4)" * (cast_expression "(long *)(param_2 + 4)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) + identifier) ))))) ;) (expression_statement "iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);" (assignment_expression "iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10)" identifier = (pointer_expression "*(int *)(*(long *)(param_2 + 4) + 4 + lVar10)" * (cast_expression "(int *)(*(long *)(param_2 + 4) + 4 + lVar10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(param_2 + 4) + 4 + lVar10)" ( (binary_expression "*(long *)(param_2 + 4) + 4 + lVar10" (binary_expression "*(long *)(param_2 + 4) + 4" (pointer_expression "*(long *)(param_2 + 4)" * (cast_expression "(long *)(param_2 + 4)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) + number_literal) + identifier) ))))) ;) }) (else_clause "else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }" else (compound_statement "{\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }" { (expression_statement "iVar6 = (iVar4 - *param_2 / 2) * 2;" (assignment_expression "iVar6 = (iVar4 - *param_2 / 2) * 2" identifier = (binary_expression "(iVar4 - *param_2 / 2) * 2" (parenthesized_expression "(iVar4 - *param_2 / 2)" ( (binary_expression "iVar4 - *param_2 / 2" identifier - (binary_expression "*param_2 / 2" (pointer_expression "*param_2" * identifier) / number_literal)) )) * number_literal)) ;) (expression_statement "iVar8 = iVar6 + 1;" (assignment_expression "iVar8 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) }))) (expression_statement "lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);" (assignment_expression "lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6)" identifier = (binary_expression "(long)iVar6 * 0x50 + *(long *)(param_2 + 6)" (binary_expression "(long)iVar6 * 0x50" (cast_expression "(long)iVar6" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal) + (pointer_expression "*(long *)(param_2 + 6)" * (cast_expression "(long *)(param_2 + 6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 6)" ( (binary_expression "param_2 + 6" identifier + number_literal) )))))) ;) (expression_statement "iVar9 = iVar8;" (assignment_expression "iVar9 = iVar8" identifier = identifier) ;) (if_statement "if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }" if (parenthesized_expression "((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0))" ( (binary_expression "(*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)" (parenthesized_expression "(*(long *)(lVar3 + 0x18) != 0)" ( (binary_expression "*(long *)(lVar3 + 0x18) != 0" (pointer_expression "*(long *)(lVar3 + 0x18)" * (cast_expression "(long *)(lVar3 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x18)" ( (binary_expression "lVar3 + 0x18" identifier + number_literal) )))) != number_literal) )) && (parenthesized_expression "(lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)" ( (comma_expression "lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0" (assignment_expression "lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6)" identifier = (binary_expression "(long)iVar8 * 0x50 + *(long *)(param_2 + 6)" (binary_expression "(long)iVar8 * 0x50" (cast_expression "(long)iVar8" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal) + (pointer_expression "*(long *)(param_2 + 6)" * (cast_expression "(long *)(param_2 + 6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 6)" ( (binary_expression "param_2 + 6" identifier + number_literal) )))))) , (comma_expression "iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0" (assignment_expression "iVar9 = iVar6" identifier = identifier) , (binary_expression "*(long *)(lVar5 + 0x18) != 0" (pointer_expression "*(long *)(lVar5 + 0x18)" * (cast_expression "(long *)(lVar5 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar5 + 0x18)" ( (binary_expression "lVar5 + 0x18" identifier + number_literal) )))) != number_literal))) ))) )) (compound_statement "{\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }" { (expression_statement "local_44 = 0;" (assignment_expression "local_44 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));" (assignment_expression "iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14))" identifier = (call_expression "(**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14))" (parenthesized_expression "(**(code **)(*(long *)(param_2 + 2) + 0x40))" ( (pointer_expression "**(code **)(*(long *)(param_2 + 2) + 0x40)" * (pointer_expression "*(code **)(*(long *)(param_2 + 2) + 0x40)" * (cast_expression "(code **)(*(long *)(param_2 + 2) + 0x40)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(long *)(param_2 + 2) + 0x40)" ( (binary_expression "*(long *)(param_2 + 2) + 0x40" (pointer_expression "*(long *)(param_2 + 2)" * (cast_expression "(long *)(param_2 + 2)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 2)" ( (binary_expression "param_2 + 2" identifier + number_literal) )))) + number_literal) ))))) )) (argument_list "(*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14))" ( (pointer_expression "*(long *)(param_2 + 2)" * (cast_expression "(long *)(param_2 + 2)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 2)" ( (binary_expression "param_2 + 2" identifier + number_literal) )))) , (pointer_expression "&local_44" & identifier) , (pointer_expression "*(undefined8 *)(lVar3 + 0x28)" * (cast_expression "(undefined8 *)(lVar3 + 0x28)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x28)" ( (binary_expression "lVar3 + 0x28" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(lVar3 + 0x14)" * (cast_expression "(undefined4 *)(lVar3 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x14)" ( (binary_expression "lVar3 + 0x14" identifier + number_literal) )))) , (pointer_expression "*(undefined8 *)(lVar5 + 0x28)" * (cast_expression "(undefined8 *)(lVar5 + 0x28)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar5 + 0x28)" ( (binary_expression "lVar5 + 0x28" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(lVar5 + 0x14)" * (cast_expression "(undefined4 *)(lVar5 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar5 + 0x14)" ( (binary_expression "lVar5 + 0x14" identifier + number_literal) )))) )))) ;) (expression_statement "iVar9 = iVar8;" (assignment_expression "iVar9 = iVar8" identifier = identifier) ;) (if_statement "if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }" if (parenthesized_expression "(iVar1 < 1)" ( (binary_expression "iVar1 < 1" identifier < number_literal) )) (compound_statement "{\n          iVar9 = iVar6;\n        }" { (expression_statement "iVar9 = iVar6;" (assignment_expression "iVar9 = iVar6" identifier = identifier) ;) })) })) (expression_statement "*(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;" (assignment_expression "*(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9" (pointer_expression "*(int *)(*(long *)(param_2 + 4) + lVar7)" * (cast_expression "(int *)(*(long *)(param_2 + 4) + lVar7)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(param_2 + 4) + lVar7)" ( (binary_expression "*(long *)(param_2 + 4) + lVar7" (pointer_expression "*(long *)(param_2 + 4)" * (cast_expression "(long *)(param_2 + 4)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) + identifier) )))) = identifier) ;) (expression_statement "lVar7 = lVar7 + -4;" (assignment_expression "lVar7 = lVar7 + -4" identifier = (binary_expression "lVar7 + -4" identifier + number_literal)) ;) (expression_statement "lVar10 = lVar10 + -8;" (assignment_expression "lVar10 = lVar10 + -8" identifier = (binary_expression "lVar10 + -8" identifier + number_literal)) ;) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) ;) })) (expression_statement "uVar2 = (ulong)*(byte *)(*(long *)(param_1 + 0x18) + 0x13);" (assignment_expression "uVar2 = (ulong)*(byte *)(*(long *)(param_1 + 0x18) + 0x13)" identifier = (binary_expression "(ulong)*(byte *)(*(long *)(param_1 + 0x18) + 0x13)" (parenthesized_expression "(ulong)" ( identifier )) * (cast_expression "(byte *)(*(long *)(param_1 + 0x18) + 0x13)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(param_1 + 0x18) + 0x13)" ( (binary_expression "*(long *)(param_1 + 0x18) + 0x13" (pointer_expression "*(long *)(param_1 + 0x18)" * (cast_expression "(long *)(param_1 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) + number_literal) ))))) ;) (labeled_statement "LAB_0013e090:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" statement_identifier : (if_statement "if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" if (parenthesized_expression "(local_40 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 != *(long *)(in_FS_OFFSET + 0x28)" identifier != (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    __stack_chk_fail();\n  }" { (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE 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 ;) (declaration (sized_type_specifier long) 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 (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) + (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) * LIT)) )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) , LIT )))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) != LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) * LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) << LIT)) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < (binary_expression (pointer_expression * IDENT) / LIT)) )) (compound_statement { (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) )))) + IDENT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) + IDENT) ))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT - (binary_expression (pointer_expression * IDENT) / LIT)) )) * LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }))) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) * LIT) + (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) * LIT) + (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) , (comma_expression (assignment_expression IDENT = IDENT) , (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT))) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression & IDENT) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) })) (expression_statement (assignment_expression (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) )))) + IDENT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * (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) ))))) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "ulong FUN_0013df2e(long param_1,int *param_2,int param_3)\n\n{\n  int iVar1;\n  ulong uVar2;\n  long lVar3;\n  int iVar4;\n  long lVar5;\n  int iVar6;\n  long lVar7;\n  int iVar8;\n  int iVar9;\n  long lVar10;\n  long in_FS_OFFSET;\n  undefined4 local_44;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  *(long *)(param_2 + 2) = param_1;\n  iVar4 = *param_2;\n  if (0 < iVar4) {\n    lVar7 = 0;\n    do {\n      if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }\n      if ((int)uVar2 != 0) goto LAB_0013e090;\n      lVar7 = lVar7 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  iVar4 = *param_2 + -1;\n  if (0 < iVar4) {\n    lVar7 = (long)iVar4 * 4;\n    lVar10 = (long)iVar4 << 3;\n    do {\n      if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }\n      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);\n      iVar9 = iVar8;\n      if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }\n      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;\n      lVar7 = lVar7 + -4;\n      lVar10 = lVar10 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  uVar2 = (ulong)*(byte *)(*(long *)(param_1 + 0x18) + 0x13);\nLAB_0013e090:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return uVar2;\n}" (type_identifier "ulong") (function_declarator "FUN_0013df2e(long param_1,int *param_2,int param_3)" (identifier "FUN_0013df2e") (parameter_list "(long param_1,int *param_2,int param_3)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  ulong uVar2;\n  long lVar3;\n  int iVar4;\n  long lVar5;\n  int iVar6;\n  long lVar7;\n  int iVar8;\n  int iVar9;\n  long lVar10;\n  long in_FS_OFFSET;\n  undefined4 local_44;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  *(long *)(param_2 + 2) = param_1;\n  iVar4 = *param_2;\n  if (0 < iVar4) {\n    lVar7 = 0;\n    do {\n      if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }\n      if ((int)uVar2 != 0) goto LAB_0013e090;\n      lVar7 = lVar7 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  iVar4 = *param_2 + -1;\n  if (0 < iVar4) {\n    lVar7 = (long)iVar4 * 4;\n    lVar10 = (long)iVar4 << 3;\n    do {\n      if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }\n      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);\n      iVar9 = iVar8;\n      if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }\n      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;\n      lVar7 = lVar7 + -4;\n      lVar10 = lVar10 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }\n  uVar2 = (ulong)*(byte *)(*(long *)(param_1 + 0x18) + 0x13);\nLAB_0013e090:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return uVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "ulong uVar2;" (type_identifier "ulong") (identifier "uVar2") (; ";")) (declaration "long lVar3;" (sized_type_specifier "long" (long "long")) (identifier "lVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "long lVar5;" (sized_type_specifier "long" (long "long")) (identifier "lVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "long lVar7;" (sized_type_specifier "long" (long "long")) (identifier "lVar7") (; ";")) (declaration "int iVar8;" (primitive_type "int") (identifier "iVar8") (; ";")) (declaration "int iVar9;" (primitive_type "int") (identifier "iVar9") (; ";")) (declaration "long lVar10;" (sized_type_specifier "long" (long "long")) (identifier "lVar10") (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "undefined4 local_44;" (type_identifier "undefined4") (identifier "local_44") (; ";")) (declaration "long local_40;" (sized_type_specifier "long" (long "long")) (identifier "local_40") (; ";")) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (= "=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (expression_statement "*(long *)(param_2 + 2) = param_1;" (assignment_expression "*(long *)(param_2 + 2) = param_1" (pointer_expression "*(long *)(param_2 + 2)" (* "*") (cast_expression "(long *)(param_2 + 2)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 2)" (( "(") (binary_expression "param_2 + 2" (identifier "param_2") (+ "+") (number_literal "2")) () ")")))) (= "=") (identifier "param_1")) (; ";")) (expression_statement "iVar4 = *param_2;" (assignment_expression "iVar4 = *param_2" (identifier "iVar4") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (if_statement "if (0 < iVar4) {\n    lVar7 = 0;\n    do {\n      if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }\n      if ((int)uVar2 != 0) goto LAB_0013e090;\n      lVar7 = lVar7 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }" (if "if") (parenthesized_expression "(0 < iVar4)" (( "(") (binary_expression "0 < iVar4" (number_literal "0") (< "<") (identifier "iVar4")) () ")")) (compound_statement "{\n    lVar7 = 0;\n    do {\n      if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }\n      if ((int)uVar2 != 0) goto LAB_0013e090;\n      lVar7 = lVar7 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }" ({ "{") (expression_statement "lVar7 = 0;" (assignment_expression "lVar7 = 0" (identifier "lVar7") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }\n      if ((int)uVar2 != 0) goto LAB_0013e090;\n      lVar7 = lVar7 + 0x50;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);" (do "do") (compound_statement "{\n      if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }\n      if ((int)uVar2 != 0) goto LAB_0013e090;\n      lVar7 = lVar7 + 0x50;\n      iVar4 = iVar4 + -1;\n    }" ({ "{") (if_statement "if (param_3 == 2) {\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }\n      else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }" (if "if") (parenthesized_expression "(param_3 == 2)" (( "(") (binary_expression "param_3 == 2" (identifier "param_3") (== "==") (number_literal "2")) () ")")) (compound_statement "{\n        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);\n      }" ({ "{") (expression_statement "uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);" (assignment_expression "uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50)" (identifier "uVar2") (= "=") (call_expression "FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50)" (identifier "FUN_0013d9a2") (argument_list "(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50)" (( "(") (binary_expression "*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50" (binary_expression "*(long *)(param_2 + 6) + -0x50" (pointer_expression "*(long *)(param_2 + 6)" (* "*") (cast_expression "(long *)(param_2 + 6)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 6)" (( "(") (binary_expression "param_2 + 6" (identifier "param_2") (+ "+") (number_literal "6")) () ")")))) (+ "+") (number_literal "-0x50")) (+ "+") (binary_expression "(long)iVar4 * 0x50" (cast_expression "(long)iVar4" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar4")) (* "*") (number_literal "0x50"))) () ")")))) (; ";")) (} "}")) (else_clause "else {\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }" (else "else") (compound_statement "{\n        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);\n      }" ({ "{") (expression_statement "uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);" (assignment_expression "uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0)" (identifier "uVar2") (= "=") (call_expression "FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0)" (identifier "FUN_0013def6") (argument_list "(lVar7 + *(long *)(param_2 + 6),0)" (( "(") (binary_expression "lVar7 + *(long *)(param_2 + 6)" (identifier "lVar7") (+ "+") (pointer_expression "*(long *)(param_2 + 6)" (* "*") (cast_expression "(long *)(param_2 + 6)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 6)" (( "(") (binary_expression "param_2 + 6" (identifier "param_2") (+ "+") (number_literal "6")) () ")"))))) (, ",") (number_literal "0") () ")")))) (; ";")) (} "}")))) (if_statement "if ((int)uVar2 != 0) goto LAB_0013e090;" (if "if") (parenthesized_expression "((int)uVar2 != 0)" (( "(") (binary_expression "(int)uVar2 != 0" (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2")) (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_0013e090;" (goto "goto") (statement_identifier "LAB_0013e090") (; ";"))) (expression_statement "lVar7 = lVar7 + 0x50;" (assignment_expression "lVar7 = lVar7 + 0x50" (identifier "lVar7") (= "=") (binary_expression "lVar7 + 0x50" (identifier "lVar7") (+ "+") (number_literal "0x50"))) (; ";")) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + -1" (identifier "iVar4") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (; ";")) (} "}"))) (expression_statement "iVar4 = *param_2 + -1;" (assignment_expression "iVar4 = *param_2 + -1" (identifier "iVar4") (= "=") (binary_expression "*param_2 + -1" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (+ "+") (number_literal "-1"))) (; ";")) (if_statement "if (0 < iVar4) {\n    lVar7 = (long)iVar4 * 4;\n    lVar10 = (long)iVar4 << 3;\n    do {\n      if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }\n      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);\n      iVar9 = iVar8;\n      if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }\n      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;\n      lVar7 = lVar7 + -4;\n      lVar10 = lVar10 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }" (if "if") (parenthesized_expression "(0 < iVar4)" (( "(") (binary_expression "0 < iVar4" (number_literal "0") (< "<") (identifier "iVar4")) () ")")) (compound_statement "{\n    lVar7 = (long)iVar4 * 4;\n    lVar10 = (long)iVar4 << 3;\n    do {\n      if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }\n      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);\n      iVar9 = iVar8;\n      if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }\n      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;\n      lVar7 = lVar7 + -4;\n      lVar10 = lVar10 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);\n  }" ({ "{") (expression_statement "lVar7 = (long)iVar4 * 4;" (assignment_expression "lVar7 = (long)iVar4 * 4" (identifier "lVar7") (= "=") (binary_expression "(long)iVar4 * 4" (cast_expression "(long)iVar4" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar4")) (* "*") (number_literal "4"))) (; ";")) (expression_statement "lVar10 = (long)iVar4 << 3;" (assignment_expression "lVar10 = (long)iVar4 << 3" (identifier "lVar10") (= "=") (binary_expression "(long)iVar4 << 3" (cast_expression "(long)iVar4" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar4")) (<< "<<") (number_literal "3"))) (; ";")) (do_statement "do {\n      if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }\n      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);\n      iVar9 = iVar8;\n      if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }\n      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;\n      lVar7 = lVar7 + -4;\n      lVar10 = lVar10 + -8;\n      iVar4 = iVar4 + -1;\n    } while (iVar4 != 0);" (do "do") (compound_statement "{\n      if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }\n      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);\n      iVar9 = iVar8;\n      if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }\n      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;\n      lVar7 = lVar7 + -4;\n      lVar10 = lVar10 + -8;\n      iVar4 = iVar4 + -1;\n    }" ({ "{") (if_statement "if (iVar4 < *param_2 / 2) {\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }\n      else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }" (if "if") (parenthesized_expression "(iVar4 < *param_2 / 2)" (( "(") (binary_expression "iVar4 < *param_2 / 2" (identifier "iVar4") (< "<") (binary_expression "*param_2 / 2" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (/ "/") (number_literal "2"))) () ")")) (compound_statement "{\n        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);\n        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);\n      }" ({ "{") (expression_statement "iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);" (assignment_expression "iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10)" (identifier "iVar6") (= "=") (pointer_expression "*(int *)(*(long *)(param_2 + 4) + lVar10)" (* "*") (cast_expression "(int *)(*(long *)(param_2 + 4) + lVar10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(long *)(param_2 + 4) + lVar10)" (( "(") (binary_expression "*(long *)(param_2 + 4) + lVar10" (pointer_expression "*(long *)(param_2 + 4)" (* "*") (cast_expression "(long *)(param_2 + 4)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 4)" (( "(") (binary_expression "param_2 + 4" (identifier "param_2") (+ "+") (number_literal "4")) () ")")))) (+ "+") (identifier "lVar10")) () ")"))))) (; ";")) (expression_statement "iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);" (assignment_expression "iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10)" (identifier "iVar8") (= "=") (pointer_expression "*(int *)(*(long *)(param_2 + 4) + 4 + lVar10)" (* "*") (cast_expression "(int *)(*(long *)(param_2 + 4) + 4 + lVar10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(long *)(param_2 + 4) + 4 + lVar10)" (( "(") (binary_expression "*(long *)(param_2 + 4) + 4 + lVar10" (binary_expression "*(long *)(param_2 + 4) + 4" (pointer_expression "*(long *)(param_2 + 4)" (* "*") (cast_expression "(long *)(param_2 + 4)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 4)" (( "(") (binary_expression "param_2 + 4" (identifier "param_2") (+ "+") (number_literal "4")) () ")")))) (+ "+") (number_literal "4")) (+ "+") (identifier "lVar10")) () ")"))))) (; ";")) (} "}")) (else_clause "else {\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }" (else "else") (compound_statement "{\n        iVar6 = (iVar4 - *param_2 / 2) * 2;\n        iVar8 = iVar6 + 1;\n      }" ({ "{") (expression_statement "iVar6 = (iVar4 - *param_2 / 2) * 2;" (assignment_expression "iVar6 = (iVar4 - *param_2 / 2) * 2" (identifier "iVar6") (= "=") (binary_expression "(iVar4 - *param_2 / 2) * 2" (parenthesized_expression "(iVar4 - *param_2 / 2)" (( "(") (binary_expression "iVar4 - *param_2 / 2" (identifier "iVar4") (- "-") (binary_expression "*param_2 / 2" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (/ "/") (number_literal "2"))) () ")")) (* "*") (number_literal "2"))) (; ";")) (expression_statement "iVar8 = iVar6 + 1;" (assignment_expression "iVar8 = iVar6 + 1" (identifier "iVar8") (= "=") (binary_expression "iVar6 + 1" (identifier "iVar6") (+ "+") (number_literal "1"))) (; ";")) (} "}")))) (expression_statement "lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);" (assignment_expression "lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6)" (identifier "lVar3") (= "=") (binary_expression "(long)iVar6 * 0x50 + *(long *)(param_2 + 6)" (binary_expression "(long)iVar6 * 0x50" (cast_expression "(long)iVar6" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar6")) (* "*") (number_literal "0x50")) (+ "+") (pointer_expression "*(long *)(param_2 + 6)" (* "*") (cast_expression "(long *)(param_2 + 6)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 6)" (( "(") (binary_expression "param_2 + 6" (identifier "param_2") (+ "+") (number_literal "6")) () ")")))))) (; ";")) (expression_statement "iVar9 = iVar8;" (assignment_expression "iVar9 = iVar8" (identifier "iVar9") (= "=") (identifier "iVar8")) (; ";")) (if_statement "if ((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)) {\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }" (if "if") (parenthesized_expression "((*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0))" (( "(") (binary_expression "(*(long *)(lVar3 + 0x18) != 0) &&\n         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)" (parenthesized_expression "(*(long *)(lVar3 + 0x18) != 0)" (( "(") (binary_expression "*(long *)(lVar3 + 0x18) != 0" (pointer_expression "*(long *)(lVar3 + 0x18)" (* "*") (cast_expression "(long *)(lVar3 + 0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x18)" (( "(") (binary_expression "lVar3 + 0x18" (identifier "lVar3") (+ "+") (number_literal "0x18")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0)" (( "(") (comma_expression "lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0" (assignment_expression "lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6)" (identifier "lVar5") (= "=") (binary_expression "(long)iVar8 * 0x50 + *(long *)(param_2 + 6)" (binary_expression "(long)iVar8 * 0x50" (cast_expression "(long)iVar8" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar8")) (* "*") (number_literal "0x50")) (+ "+") (pointer_expression "*(long *)(param_2 + 6)" (* "*") (cast_expression "(long *)(param_2 + 6)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 6)" (( "(") (binary_expression "param_2 + 6" (identifier "param_2") (+ "+") (number_literal "6")) () ")")))))) (, ",") (comma_expression "iVar9 = iVar6,\n         *(long *)(lVar5 + 0x18) != 0" (assignment_expression "iVar9 = iVar6" (identifier "iVar9") (= "=") (identifier "iVar6")) (, ",") (binary_expression "*(long *)(lVar5 + 0x18) != 0" (pointer_expression "*(long *)(lVar5 + 0x18)" (* "*") (cast_expression "(long *)(lVar5 + 0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar5 + 0x18)" (( "(") (binary_expression "lVar5 + 0x18" (identifier "lVar5") (+ "+") (number_literal "0x18")) () ")")))) (!= "!=") (number_literal "0")))) () ")"))) () ")")) (compound_statement "{\n        local_44 = 0;\n        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));\n        iVar9 = iVar8;\n        if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }\n      }" ({ "{") (expression_statement "local_44 = 0;" (assignment_expression "local_44 = 0" (identifier "local_44") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14));" (assignment_expression "iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14))" (identifier "iVar1") (= "=") (call_expression "(**(code **)(*(long *)(param_2 + 2) + 0x40))\n                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14))" (parenthesized_expression "(**(code **)(*(long *)(param_2 + 2) + 0x40))" (( "(") (pointer_expression "**(code **)(*(long *)(param_2 + 2) + 0x40)" (* "*") (pointer_expression "*(code **)(*(long *)(param_2 + 2) + 0x40)" (* "*") (cast_expression "(code **)(*(long *)(param_2 + 2) + 0x40)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(long *)(param_2 + 2) + 0x40)" (( "(") (binary_expression "*(long *)(param_2 + 2) + 0x40" (pointer_expression "*(long *)(param_2 + 2)" (* "*") (cast_expression "(long *)(param_2 + 2)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 2)" (( "(") (binary_expression "param_2 + 2" (identifier "param_2") (+ "+") (number_literal "2")) () ")")))) (+ "+") (number_literal "0x40")) () ")"))))) () ")")) (argument_list "(*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),\n                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),\n                           *(undefined4 *)(lVar5 + 0x14))" (( "(") (pointer_expression "*(long *)(param_2 + 2)" (* "*") (cast_expression "(long *)(param_2 + 2)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 2)" (( "(") (binary_expression "param_2 + 2" (identifier "param_2") (+ "+") (number_literal "2")) () ")")))) (, ",") (pointer_expression "&local_44" (& "&") (identifier "local_44")) (, ",") (pointer_expression "*(undefined8 *)(lVar3 + 0x28)" (* "*") (cast_expression "(undefined8 *)(lVar3 + 0x28)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x28)" (( "(") (binary_expression "lVar3 + 0x28" (identifier "lVar3") (+ "+") (number_literal "0x28")) () ")")))) (, ",") (pointer_expression "*(undefined4 *)(lVar3 + 0x14)" (* "*") (cast_expression "(undefined4 *)(lVar3 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x14)" (( "(") (binary_expression "lVar3 + 0x14" (identifier "lVar3") (+ "+") (number_literal "0x14")) () ")")))) (, ",") (pointer_expression "*(undefined8 *)(lVar5 + 0x28)" (* "*") (cast_expression "(undefined8 *)(lVar5 + 0x28)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar5 + 0x28)" (( "(") (binary_expression "lVar5 + 0x28" (identifier "lVar5") (+ "+") (number_literal "0x28")) () ")")))) (, ",") (pointer_expression "*(undefined4 *)(lVar5 + 0x14)" (* "*") (cast_expression "(undefined4 *)(lVar5 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar5 + 0x14)" (( "(") (binary_expression "lVar5 + 0x14" (identifier "lVar5") (+ "+") (number_literal "0x14")) () ")")))) () ")")))) (; ";")) (expression_statement "iVar9 = iVar8;" (assignment_expression "iVar9 = iVar8" (identifier "iVar9") (= "=") (identifier "iVar8")) (; ";")) (if_statement "if (iVar1 < 1) {\n          iVar9 = iVar6;\n        }" (if "if") (parenthesized_expression "(iVar1 < 1)" (( "(") (binary_expression "iVar1 < 1" (identifier "iVar1") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n          iVar9 = iVar6;\n        }" ({ "{") (expression_statement "iVar9 = iVar6;" (assignment_expression "iVar9 = iVar6" (identifier "iVar9") (= "=") (identifier "iVar6")) (; ";")) (} "}"))) (} "}"))) (expression_statement "*(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;" (assignment_expression "*(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9" (pointer_expression "*(int *)(*(long *)(param_2 + 4) + lVar7)" (* "*") (cast_expression "(int *)(*(long *)(param_2 + 4) + lVar7)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(long *)(param_2 + 4) + lVar7)" (( "(") (binary_expression "*(long *)(param_2 + 4) + lVar7" (pointer_expression "*(long *)(param_2 + 4)" (* "*") (cast_expression "(long *)(param_2 + 4)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 4)" (( "(") (binary_expression "param_2 + 4" (identifier "param_2") (+ "+") (number_literal "4")) () ")")))) (+ "+") (identifier "lVar7")) () ")")))) (= "=") (identifier "iVar9")) (; ";")) (expression_statement "lVar7 = lVar7 + -4;" (assignment_expression "lVar7 = lVar7 + -4" (identifier "lVar7") (= "=") (binary_expression "lVar7 + -4" (identifier "lVar7") (+ "+") (number_literal "-4"))) (; ";")) (expression_statement "lVar10 = lVar10 + -8;" (assignment_expression "lVar10 = lVar10 + -8" (identifier "lVar10") (= "=") (binary_expression "lVar10 + -8" (identifier "lVar10") (+ "+") (number_literal "-8"))) (; ";")) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + -1" (identifier "iVar4") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (; ";")) (} "}"))) (expression_statement "uVar2 = (ulong)*(byte *)(*(long *)(param_1 + 0x18) + 0x13);" (assignment_expression "uVar2 = (ulong)*(byte *)(*(long *)(param_1 + 0x18) + 0x13)" (identifier "uVar2") (= "=") (binary_expression "(ulong)*(byte *)(*(long *)(param_1 + 0x18) + 0x13)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (* "*") (cast_expression "(byte *)(*(long *)(param_1 + 0x18) + 0x13)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(long *)(param_1 + 0x18) + 0x13)" (( "(") (binary_expression "*(long *)(param_1 + 0x18) + 0x13" (pointer_expression "*(long *)(param_1 + 0x18)" (* "*") (cast_expression "(long *)(param_1 + 0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (+ "+") (number_literal "0x13")) () ")"))))) (; ";")) (labeled_statement "LAB_0013e090:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" (statement_identifier "LAB_0013e090") (: ":") (if_statement "if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" (if "if") (parenthesized_expression "(local_40 != *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_40 != *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (!= "!=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\n                    \n    __stack_chk_fail();\n  }" ({ "{") (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

int function_1(type_1 *pTask,type_2 *pMerger,int var_3)

{
  type_3 *pPVar1;
  type_4 var_7;
  int var_10;
  int var_2;
  int var_9;
  long var_6;
  int iVar7;
  int iVar8;
  long var_8;
  long var_1;
  int bCached;
  long var_11;
  
  var_11 = *(long *)(var_1 + 0x28);
  pMerger->pTask = pTask;
  var_2 = pMerger->nTree;
  if (0 < var_2) {
    var_6 = 0;
    do {
      if (var_3 == 2) {
        var_7 = var_4(pMerger->aReadr + (long)var_2 + -1);
      }
      else {
        var_7 = var_5((type_3 *)((long)&pMerger->aReadr->iReadOff + var_6),0);
      }
      if (var_7 != 0) goto LAB_0013e090;
      var_6 = var_6 + 0x50;
      var_2 = var_2 + -1;
    } while (var_2 != 0);
  }
  var_2 = pMerger->nTree + -1;
  if (0 < var_2) {
    var_6 = (long)var_2 * 4;
    var_8 = (long)var_2 << 3;
    do {
      if (var_2 < pMerger->nTree / 2) {
        var_9 = *(int *)((long)pMerger->aTree + var_8);
        iVar7 = *(int *)((long)pMerger->aTree + var_8 + 4);
      }
      else {
        var_9 = (var_2 - pMerger->nTree / 2) * 2;
        iVar7 = var_9 + 1;
      }
      pPVar1 = pMerger->aReadr;
      iVar8 = iVar7;
      if ((pPVar1[var_9].pFd != (type_5 *)0x0) &&
         (iVar8 = var_9, pPVar1[iVar7].pFd != (type_5 *)0x0)) {
        bCached = 0;
        var_10 = (*pMerger->pTask->xCompare)
                          (pMerger->pTask,&bCached,pPVar1[var_9].aKey,pPVar1[var_9].nKey,
                           pPVar1[iVar7].aKey,pPVar1[iVar7].nKey);
        iVar8 = iVar7;
        if (var_10 < 1) {
          iVar8 = var_9;
        }
      }
      *(int *)((long)pMerger->aTree + var_6) = iVar8;
      var_6 = var_6 + -4;
      var_8 = var_8 + -8;
      var_2 = var_2 + -1;
    } while (var_2 != 0);
  }
  var_7 = (type_4)pTask->pUnpacked->errCode;
LAB_0013e090:
  if (var_11 != *(long *)(var_1 + 0x28)) {
                    /* WARNING: Subroutine does not return */
    var_12();
  }
  return var_7;
}


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

ulong MASKED(long param_1,int *param_2,int param_3)

{
  int iVar1;
  ulong uVar2;
  long lVar3;
  int iVar4;
  long lVar5;
  int iVar6;
  long lVar7;
  int iVar8;
  int iVar9;
  long lVar10;
  long in_FS_OFFSET;
  undefined4 local_44;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  *(long *)(param_2 + 2) = param_1;
  iVar4 = *param_2;
  if (0 < iVar4) {
    lVar7 = 0;
    do {
      if (param_3 == 2) {
        uVar2 = FUN_0013d9a2(*(long *)(param_2 + 6) + -0x50 + (long)iVar4 * 0x50);
      }
      else {
        uVar2 = FUN_0013def6(lVar7 + *(long *)(param_2 + 6),0);
      }
      if ((int)uVar2 != 0) goto LAB_0013e090;
      lVar7 = lVar7 + 0x50;
      iVar4 = iVar4 + -1;
    } while (iVar4 != 0);
  }
  iVar4 = *param_2 + -1;
  if (0 < iVar4) {
    lVar7 = (long)iVar4 * 4;
    lVar10 = (long)iVar4 << 3;
    do {
      if (iVar4 < *param_2 / 2) {
        iVar6 = *(int *)(*(long *)(param_2 + 4) + lVar10);
        iVar8 = *(int *)(*(long *)(param_2 + 4) + 4 + lVar10);
      }
      else {
        iVar6 = (iVar4 - *param_2 / 2) * 2;
        iVar8 = iVar6 + 1;
      }
      lVar3 = (long)iVar6 * 0x50 + *(long *)(param_2 + 6);
      iVar9 = iVar8;
      if ((*(long *)(lVar3 + 0x18) != 0) &&
         (lVar5 = (long)iVar8 * 0x50 + *(long *)(param_2 + 6), iVar9 = iVar6,
         *(long *)(lVar5 + 0x18) != 0)) {
        local_44 = 0;
        iVar1 = (**(code **)(*(long *)(param_2 + 2) + 0x40))
                          (*(long *)(param_2 + 2),&local_44,*(undefined8 *)(lVar3 + 0x28),
                           *(undefined4 *)(lVar3 + 0x14),*(undefined8 *)(lVar5 + 0x28),
                           *(undefined4 *)(lVar5 + 0x14));
        iVar9 = iVar8;
        if (iVar1 < 1) {
          iVar9 = iVar6;
        }
      }
      *(int *)(*(long *)(param_2 + 4) + lVar7) = iVar9;
      lVar7 = lVar7 + -4;
      lVar10 = lVar10 + -8;
      iVar4 = iVar4 + -1;
    } while (iVar4 != 0);
  }
  uVar2 = (ulong)*(byte *)(*(long *)(param_1 + 0x18) + 0x13);
LAB_0013e090:
  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return uVar2;
}

