
int vdbePmaReaderNext(PmaReader *pReadr)

{
  IncrMerger *pIncr;
  SortSubtask *pSVar1;
  i64 iVar2;
  long lVar3;
  sqlite3_file *psVar4;
  i64 iVar5;
  int iVar6;
  int nByte;
  long in_FS_OFFSET;
  u64 nRec;
  void *pRet;
  long local_20;
  
  local_20 = *(long *)(in_FS_OFFSET + 0x28);
  nRec = 0;
  if (pReadr->iReadOff < pReadr->iEof) {
LAB_0012f765:
    iVar6 = vdbePmaReadVarint(pReadr,&nRec);
    if (iVar6 == 0) {
      nByte = (int)nRec;
      pReadr->nKey = nByte;
      if (pReadr->aMap == (u8 *)0x0) {
        iVar6 = vdbePmaReadBlob(pReadr,nByte,&pReadr->aKey);
      }
      else {
        pReadr->aKey = pReadr->aMap + pReadr->iReadOff;
        pReadr->iReadOff = (long)nByte + pReadr->iReadOff;
      }
    }
    goto LAB_0012f7a0;
  }
  pIncr = pReadr->pIncr;
  if (pIncr == (IncrMerger *)0x0) {
LAB_0012f7cb:
    iVar6 = 0;
  }
  else if (pIncr->bUseThread == 0) {
    iVar6 = vdbeIncrPopulate(pIncr);
    iVar2 = pIncr->aFile[1].iEof;
    lVar3 = pIncr->iStartOff;
    pIncr->aFile[0].pFd = pIncr->aFile[1].pFd;
    pIncr->aFile[0].iEof = iVar2;
    if (pIncr->aFile[0].iEof == lVar3) {
      pIncr->bEof = 1;
      if (iVar6 != 0) goto LAB_0012f7cd;
      goto LAB_0012f7cb;
    }
LAB_0012f73f:
    if (iVar6 == 0) {
      if (pIncr->bEof == 0) {
        iVar6 = vdbePmaReaderSeek(pIncr->pTask,pReadr,pIncr->aFile,pIncr->iStartOff);
        if (iVar6 != 0) goto LAB_0012f7a0;
        goto LAB_0012f765;
      }
      goto LAB_0012f7cb;
    }
  }
  else {
    pSVar1 = pIncr->pTask;
    if (pSVar1->pThread == (SQLiteThread *)0x0) {
      psVar4 = pIncr->aFile[1].pFd;
      iVar5 = pIncr->aFile[1].iEof;
      iVar2 = pIncr->aFile[0].iEof;
      pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;
      pIncr->aFile[0].pFd = psVar4;
      pIncr->aFile[0].iEof = iVar5;
      pIncr->aFile[1].iEof = iVar2;
LAB_0012f701:
      if (pIncr->aFile[0].iEof != pIncr->iStartOff) {
        iVar6 = sqlite3ThreadCreate(&pIncr->pTask->pThread,vdbeIncrPopulateThread,pIncr);
        goto LAB_0012f73f;
      }
      pIncr->bEof = 1;
      iVar6 = 0;
    }
    else {
      pRet = (void *)0x1;
      sqlite3ThreadJoin(pSVar1->pThread,&pRet);
      pSVar1->bDone = 0;
      pSVar1->pThread = (SQLiteThread *)0x0;
      iVar6 = (int)pRet;
      if (iVar6 == 0) {
        iVar2 = pIncr->aFile[0].iEof;
        psVar4 = pIncr->aFile[1].pFd;
        iVar5 = pIncr->aFile[1].iEof;
        pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;
        pIncr->aFile[1].iEof = iVar2;
        pIncr->aFile[0].pFd = psVar4;
        pIncr->aFile[0].iEof = iVar5;
        goto LAB_0012f701;
      }
    }
  }
LAB_0012f7cd:
  vdbePmaReaderClear(pReadr);
LAB_0012f7a0:
  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {
    return iVar6;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}



ulong FUN_0012f660(long *param_1)

{
  undefined8 *puVar1;
  long *plVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  uint uVar5;
  ulong uVar6;
  long in_FS_OFFSET;
  undefined8 local_30;
  undefined8 local_28;
  long local_20;
  
  local_20 = *(long *)(in_FS_OFFSET + 0x28);
  local_30 = 0;
  if (*param_1 < param_1[1]) {
LAB_0012f765:
    uVar6 = FUN_001213c0(param_1,&local_30);
    if ((int)uVar6 == 0) {
      *(int *)((long)param_1 + 0x14) = (int)local_30;
      if (param_1[8] == 0) {
        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);
      }
      else {
        param_1[5] = param_1[8] + *param_1;
        *param_1 = (long)(int)local_30 + *param_1;
      }
    }
    goto LAB_0012f7a0;
  }
  puVar1 = (undefined8 *)param_1[9];
  if (puVar1 == (undefined8 *)0x0) {
LAB_0012f7cb:
    uVar5 = 0;
  }
  else if (*(int *)(puVar1 + 4) == 0) {
    uVar5 = FUN_0012f4b0(puVar1);
    puVar1[5] = puVar1[7];
    puVar1[6] = puVar1[8];
    if (puVar1[6] == puVar1[2]) {
      *(undefined4 *)((long)puVar1 + 0x1c) = 1;
      if (uVar5 != 0) goto LAB_0012f7cd;
      goto LAB_0012f7cb;
    }
LAB_0012f73f:
    if (uVar5 == 0) {
      if (*(int *)((long)puVar1 + 0x1c) == 0) {
        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);
        if ((int)uVar6 != 0) goto LAB_0012f7a0;
        goto LAB_0012f765;
      }
      goto LAB_0012f7cb;
    }
  }
  else {
    plVar2 = (long *)*puVar1;
    if (*plVar2 == 0) {
      uVar4 = puVar1[7];
      uVar3 = puVar1[6];
      puVar1[7] = puVar1[5];
      puVar1[5] = uVar4;
      puVar1[6] = puVar1[8];
      puVar1[8] = uVar3;
LAB_0012f701:
      if (puVar1[6] != puVar1[2]) {
        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);
        goto LAB_0012f73f;
      }
      *(undefined4 *)((long)puVar1 + 0x1c) = 1;
      uVar5 = 0;
    }
    else {
      local_28 = 1;
      FUN_0012b850(*plVar2,&local_28);
      *(undefined4 *)(plVar2 + 1) = 0;
      *plVar2 = 0;
      uVar5 = (uint)local_28;
      if (uVar5 == 0) {
        uVar3 = puVar1[7];
        uVar4 = puVar1[8];
        puVar1[7] = puVar1[5];
        puVar1[8] = puVar1[6];
        puVar1[5] = uVar3;
        puVar1[6] = uVar4;
        goto LAB_0012f701;
      }
    }
  }
LAB_0012f7cd:
  FUN_0012b950(param_1);
  uVar6 = (ulong)uVar5;
LAB_0012f7a0:
  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {
    return uVar6;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}


PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x30
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RDI + 0x8]
MOV qword ptr [RSP + 0x18],0x0
CMP qword ptr [RDI],RAX
JL 0x0012f765
MOV RBX,qword ptr [RDI + 0x48]
TEST RBX,RBX
JZ 0x0012f7cb
MOV EDX,dword ptr [RBX + 0x20]
TEST EDX,EDX
JZ 0x0012f720
MOV R12,qword ptr [RBX]
MOV RDI,qword ptr [R12]
TEST RDI,RDI
JZ 0x0012f7e0
MOV qword ptr [RSP + 0x20],0x1
LEA RSI,[RSP + 0x20]
CALL 0x0012b850
MOV RDX,qword ptr [RSP + 0x20]
MOV dword ptr [R12 + 0x8],0x0
MOV qword ptr [R12],0x0
MOV EAX,EDX
TEST EDX,EDX
JNZ 0x0012f7cd
MOV RDX,qword ptr [RBX + 0x28]
MOV RAX,qword ptr [RBX + 0x30]
MOVDQU XMM2,xmmword ptr [RBX + 0x38]
MOV qword ptr [RBX + 0x38],RDX
MOV qword ptr [RBX + 0x40],RAX
MOVUPS xmmword ptr [RBX + 0x28],XMM2
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x30],RAX
JNZ 0x0012f810
MOV dword ptr [RBX + 0x1c],0x1
XOR EAX,EAX
JMP 0x0012f7cd
MOV RDI,RBX
CALL 0x0012f4b0
MOVDQU XMM0,xmmword ptr [RBX + 0x38]
MOV RCX,qword ptr [RBX + 0x10]
MOVUPS xmmword ptr [RBX + 0x28],XMM0
CMP qword ptr [RBX + 0x30],RCX
JZ 0x0012f7c0
TEST EAX,EAX
JNZ 0x0012f7cd
MOV EAX,dword ptr [RBX + 0x1c]
TEST EAX,EAX
JNZ 0x0012f7cb
MOV RCX,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [RBX]
LEA RDX,[RBX + 0x28]
MOV RSI,RBP
CALL 0x00119bf0
TEST EAX,EAX
JNZ 0x0012f7a0
LEA RSI,[RSP + 0x18]
MOV RDI,RBP
CALL 0x001213c0
TEST EAX,EAX
JNZ 0x0012f7a0
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RBP + 0x40]
MOV dword ptr [RBP + 0x14],ESI
TEST RDX,RDX
JZ 0x0012f800
MOV RCX,qword ptr [RBP]
MOVSXD RSI,ESI
ADD RDX,RCX
ADD RSI,RCX
MOV qword ptr [RBP + 0x28],RDX
MOV qword ptr [RBP],RSI
NOP dword ptr [RAX]
MOV RCX,qword ptr [RSP + 0x28]
XOR RCX,qword ptr FS:[0x28]
JNZ 0x0012f827
ADD RSP,0x30
POP RBX
POP RBP
POP R12
RET
MOV dword ptr [RBX + 0x1c],0x1
TEST EAX,EAX
JNZ 0x0012f7cd
XOR EAX,EAX
MOV RDI,RBP
MOV dword ptr [RSP + 0xc],EAX
CALL 0x0012b950
MOV EAX,dword ptr [RSP + 0xc]
JMP 0x0012f7a0
MOVDQU XMM1,xmmword ptr [RBX + 0x38]
MOV RDX,qword ptr [RBX + 0x28]
MOV RAX,qword ptr [RBX + 0x30]
MOV qword ptr [RBX + 0x38],RDX
MOVUPS xmmword ptr [RBX + 0x28],XMM1
MOV qword ptr [RBX + 0x40],RAX
JMP 0x0012f701
LEA RDX,[RBP + 0x28]
MOV RDI,RBP
CALL 0x00121220
JMP 0x0012f7a0
MOV RDI,qword ptr [RBX]
MOV RDX,RBX
LEA RSI,[0x12fb70]
CALL 0x00119d50
JMP 0x0012f73f
CALL 0x0010a140
(translation_unit "ulong FUN_0012f660(long *param_1)\n\n{\n  undefined8 *puVar1;\n  long *plVar2;\n  undefined8 uVar3;\n  undefined8 uVar4;\n  uint uVar5;\n  ulong uVar6;\n  long in_FS_OFFSET;\n  undefined8 local_30;\n  undefined8 local_28;\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  local_30 = 0;\n  if (*param_1 < param_1[1]) {\nLAB_0012f765:\n    uVar6 = FUN_001213c0(param_1,&local_30);\n    if ((int)uVar6 == 0) {\n      *(int *)((long)param_1 + 0x14) = (int)local_30;\n      if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }\n    }\n    goto LAB_0012f7a0;\n  }\n  puVar1 = (undefined8 *)param_1[9];\n  if (puVar1 == (undefined8 *)0x0) {\nLAB_0012f7cb:\n    uVar5 = 0;\n  }\n  else if (*(int *)(puVar1 + 4) == 0) {\n    uVar5 = FUN_0012f4b0(puVar1);\n    puVar1[5] = puVar1[7];\n    puVar1[6] = puVar1[8];\n    if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }\nLAB_0012f7cd:\n  FUN_0012b950(param_1);\n  uVar6 = (ulong)uVar5;\nLAB_0012f7a0:\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar6;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "ulong FUN_0012f660(long *param_1)\n\n{\n  undefined8 *puVar1;\n  long *plVar2;\n  undefined8 uVar3;\n  undefined8 uVar4;\n  uint uVar5;\n  ulong uVar6;\n  long in_FS_OFFSET;\n  undefined8 local_30;\n  undefined8 local_28;\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  local_30 = 0;\n  if (*param_1 < param_1[1]) {\nLAB_0012f765:\n    uVar6 = FUN_001213c0(param_1,&local_30);\n    if ((int)uVar6 == 0) {\n      *(int *)((long)param_1 + 0x14) = (int)local_30;\n      if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }\n    }\n    goto LAB_0012f7a0;\n  }\n  puVar1 = (undefined8 *)param_1[9];\n  if (puVar1 == (undefined8 *)0x0) {\nLAB_0012f7cb:\n    uVar5 = 0;\n  }\n  else if (*(int *)(puVar1 + 4) == 0) {\n    uVar5 = FUN_0012f4b0(puVar1);\n    puVar1[5] = puVar1[7];\n    puVar1[6] = puVar1[8];\n    if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }\nLAB_0012f7cd:\n  FUN_0012b950(param_1);\n  uVar6 = (ulong)uVar5;\nLAB_0012f7a0:\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar6;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" type_identifier (function_declarator "FUN_0012f660(long *param_1)" identifier (parameter_list "(long *param_1)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined8 *puVar1;\n  long *plVar2;\n  undefined8 uVar3;\n  undefined8 uVar4;\n  uint uVar5;\n  ulong uVar6;\n  long in_FS_OFFSET;\n  undefined8 local_30;\n  undefined8 local_28;\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  local_30 = 0;\n  if (*param_1 < param_1[1]) {\nLAB_0012f765:\n    uVar6 = FUN_001213c0(param_1,&local_30);\n    if ((int)uVar6 == 0) {\n      *(int *)((long)param_1 + 0x14) = (int)local_30;\n      if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }\n    }\n    goto LAB_0012f7a0;\n  }\n  puVar1 = (undefined8 *)param_1[9];\n  if (puVar1 == (undefined8 *)0x0) {\nLAB_0012f7cb:\n    uVar5 = 0;\n  }\n  else if (*(int *)(puVar1 + 4) == 0) {\n    uVar5 = FUN_0012f4b0(puVar1);\n    puVar1[5] = puVar1[7];\n    puVar1[6] = puVar1[8];\n    if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }\nLAB_0012f7cd:\n  FUN_0012b950(param_1);\n  uVar6 = (ulong)uVar5;\nLAB_0012f7a0:\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar6;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "undefined8 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "long *plVar2;" (sized_type_specifier "long" long) (pointer_declarator "*plVar2" * identifier) ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (declaration "undefined8 uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "ulong uVar6;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 local_30;" type_identifier identifier ;) (declaration "undefined8 local_28;" type_identifier identifier ;) (declaration "long local_20;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_20 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_20 = *(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 "local_30 = 0;" (assignment_expression "local_30 = 0" identifier = number_literal) ;) (if_statement "if (*param_1 < param_1[1]) {\nLAB_0012f765:\n    uVar6 = FUN_001213c0(param_1,&local_30);\n    if ((int)uVar6 == 0) {\n      *(int *)((long)param_1 + 0x14) = (int)local_30;\n      if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }\n    }\n    goto LAB_0012f7a0;\n  }" if (parenthesized_expression "(*param_1 < param_1[1])" ( (binary_expression "*param_1 < param_1[1]" (pointer_expression "*param_1" * identifier) < (subscript_expression "param_1[1]" identifier [ number_literal ])) )) (compound_statement "{\nLAB_0012f765:\n    uVar6 = FUN_001213c0(param_1,&local_30);\n    if ((int)uVar6 == 0) {\n      *(int *)((long)param_1 + 0x14) = (int)local_30;\n      if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }\n    }\n    goto LAB_0012f7a0;\n  }" { (labeled_statement "LAB_0012f765:\n    uVar6 = FUN_001213c0(param_1,&local_30);" statement_identifier : (expression_statement "uVar6 = FUN_001213c0(param_1,&local_30);" (assignment_expression "uVar6 = FUN_001213c0(param_1,&local_30)" identifier = (call_expression "FUN_001213c0(param_1,&local_30)" identifier (argument_list "(param_1,&local_30)" ( identifier , (pointer_expression "&local_30" & identifier) )))) ;)) (if_statement "if ((int)uVar6 == 0) {\n      *(int *)((long)param_1 + 0x14) = (int)local_30;\n      if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }\n    }" if (parenthesized_expression "((int)uVar6 == 0)" ( (binary_expression "(int)uVar6 == 0" (cast_expression "(int)uVar6" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal) )) (compound_statement "{\n      *(int *)((long)param_1 + 0x14) = (int)local_30;\n      if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }\n    }" { (expression_statement "*(int *)((long)param_1 + 0x14) = (int)local_30;" (assignment_expression "*(int *)((long)param_1 + 0x14) = (int)local_30" (pointer_expression "*(int *)((long)param_1 + 0x14)" * (cast_expression "(int *)((long)param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 0x14)" ( (binary_expression "(long)param_1 + 0x14" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = (cast_expression "(int)local_30" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }" if (parenthesized_expression "(param_1[8] == 0)" ( (binary_expression "param_1[8] == 0" (subscript_expression "param_1[8]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }" { (expression_statement "uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);" (assignment_expression "uVar6 = FUN_00121220(param_1,local_30,param_1 + 5)" identifier = (call_expression "FUN_00121220(param_1,local_30,param_1 + 5)" identifier (argument_list "(param_1,local_30,param_1 + 5)" ( identifier , identifier , (binary_expression "param_1 + 5" identifier + number_literal) )))) ;) }) (else_clause "else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }" else (compound_statement "{\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }" { (expression_statement "param_1[5] = param_1[8] + *param_1;" (assignment_expression "param_1[5] = param_1[8] + *param_1" (subscript_expression "param_1[5]" identifier [ number_literal ]) = (binary_expression "param_1[8] + *param_1" (subscript_expression "param_1[8]" identifier [ number_literal ]) + (pointer_expression "*param_1" * identifier))) ;) (expression_statement "*param_1 = (long)(int)local_30 + *param_1;" (assignment_expression "*param_1 = (long)(int)local_30 + *param_1" (pointer_expression "*param_1" * identifier) = (binary_expression "(long)(int)local_30 + *param_1" (cast_expression "(long)(int)local_30" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)local_30" ( (type_descriptor "int" primitive_type) ) identifier)) + (pointer_expression "*param_1" * identifier))) ;) }))) })) (goto_statement "goto LAB_0012f7a0;" goto statement_identifier ;) })) (expression_statement "puVar1 = (undefined8 *)param_1[9];" (assignment_expression "puVar1 = (undefined8 *)param_1[9]" identifier = (cast_expression "(undefined8 *)param_1[9]" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[9]" identifier [ number_literal ]))) ;) (if_statement "if (puVar1 == (undefined8 *)0x0) {\nLAB_0012f7cb:\n    uVar5 = 0;\n  }\n  else if (*(int *)(puVar1 + 4) == 0) {\n    uVar5 = FUN_0012f4b0(puVar1);\n    puVar1[5] = puVar1[7];\n    puVar1[6] = puVar1[8];\n    if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }" if (parenthesized_expression "(puVar1 == (undefined8 *)0x0)" ( (binary_expression "puVar1 == (undefined8 *)0x0" identifier == (cast_expression "(undefined8 *)0x0" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_0012f7cb:\n    uVar5 = 0;\n  }" { (labeled_statement "LAB_0012f7cb:\n    uVar5 = 0;" statement_identifier : (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;)) }) (else_clause "else if (*(int *)(puVar1 + 4) == 0) {\n    uVar5 = FUN_0012f4b0(puVar1);\n    puVar1[5] = puVar1[7];\n    puVar1[6] = puVar1[8];\n    if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }" else (if_statement "if (*(int *)(puVar1 + 4) == 0) {\n    uVar5 = FUN_0012f4b0(puVar1);\n    puVar1[5] = puVar1[7];\n    puVar1[6] = puVar1[8];\n    if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }" if (parenthesized_expression "(*(int *)(puVar1 + 4) == 0)" ( (binary_expression "*(int *)(puVar1 + 4) == 0" (pointer_expression "*(int *)(puVar1 + 4)" * (cast_expression "(int *)(puVar1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 4)" ( (binary_expression "puVar1 + 4" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    uVar5 = FUN_0012f4b0(puVar1);\n    puVar1[5] = puVar1[7];\n    puVar1[6] = puVar1[8];\n    if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }" { (expression_statement "uVar5 = FUN_0012f4b0(puVar1);" (assignment_expression "uVar5 = FUN_0012f4b0(puVar1)" identifier = (call_expression "FUN_0012f4b0(puVar1)" identifier (argument_list "(puVar1)" ( identifier )))) ;) (expression_statement "puVar1[5] = puVar1[7];" (assignment_expression "puVar1[5] = puVar1[7]" (subscript_expression "puVar1[5]" identifier [ number_literal ]) = (subscript_expression "puVar1[7]" identifier [ number_literal ])) ;) (expression_statement "puVar1[6] = puVar1[8];" (assignment_expression "puVar1[6] = puVar1[8]" (subscript_expression "puVar1[6]" identifier [ number_literal ]) = (subscript_expression "puVar1[8]" identifier [ number_literal ])) ;) (if_statement "if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }" if (parenthesized_expression "(puVar1[6] == puVar1[2])" ( (binary_expression "puVar1[6] == puVar1[2]" (subscript_expression "puVar1[6]" identifier [ number_literal ]) == (subscript_expression "puVar1[2]" identifier [ number_literal ])) )) (compound_statement "{\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }" { (expression_statement "*(undefined4 *)((long)puVar1 + 0x1c) = 1;" (assignment_expression "*(undefined4 *)((long)puVar1 + 0x1c) = 1" (pointer_expression "*(undefined4 *)((long)puVar1 + 0x1c)" * (cast_expression "(undefined4 *)((long)puVar1 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar1 + 0x1c)" ( (binary_expression "(long)puVar1 + 0x1c" (cast_expression "(long)puVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (if_statement "if (uVar5 != 0) goto LAB_0012f7cd;" if (parenthesized_expression "(uVar5 != 0)" ( (binary_expression "uVar5 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0012f7cd;" goto statement_identifier ;)) (goto_statement "goto LAB_0012f7cb;" goto statement_identifier ;) })) (labeled_statement "LAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }" statement_identifier : (if_statement "if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }" if (parenthesized_expression "(uVar5 == 0)" ( (binary_expression "uVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }" { (if_statement "if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }" if (parenthesized_expression "(*(int *)((long)puVar1 + 0x1c) == 0)" ( (binary_expression "*(int *)((long)puVar1 + 0x1c) == 0" (pointer_expression "*(int *)((long)puVar1 + 0x1c)" * (cast_expression "(int *)((long)puVar1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar1 + 0x1c)" ( (binary_expression "(long)puVar1 + 0x1c" (cast_expression "(long)puVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) == number_literal) )) (compound_statement "{\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }" { (expression_statement "uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);" (assignment_expression "uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2])" identifier = (call_expression "FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2])" identifier (argument_list "(*puVar1,param_1,puVar1 + 5,puVar1[2])" ( (pointer_expression "*puVar1" * identifier) , identifier , (binary_expression "puVar1 + 5" identifier + number_literal) , (subscript_expression "puVar1[2]" identifier [ number_literal ]) )))) ;) (if_statement "if ((int)uVar6 != 0) goto LAB_0012f7a0;" if (parenthesized_expression "((int)uVar6 != 0)" ( (binary_expression "(int)uVar6 != 0" (cast_expression "(int)uVar6" ( (type_descriptor "int" primitive_type) ) identifier) != number_literal) )) (goto_statement "goto LAB_0012f7a0;" goto statement_identifier ;)) (goto_statement "goto LAB_0012f765;" goto statement_identifier ;) })) (goto_statement "goto LAB_0012f7cb;" goto statement_identifier ;) }))) }) (else_clause "else {\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }" else (compound_statement "{\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }" { (expression_statement "plVar2 = (long *)*puVar1;" (assignment_expression "plVar2 = (long *)*puVar1" identifier = (cast_expression "(long *)*puVar1" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar1" * identifier))) ;) (if_statement "if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }" if (parenthesized_expression "(*plVar2 == 0)" ( (binary_expression "*plVar2 == 0" (pointer_expression "*plVar2" * identifier) == number_literal) )) (compound_statement "{\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }" { (expression_statement "uVar4 = puVar1[7];" (assignment_expression "uVar4 = puVar1[7]" identifier = (subscript_expression "puVar1[7]" identifier [ number_literal ])) ;) (expression_statement "uVar3 = puVar1[6];" (assignment_expression "uVar3 = puVar1[6]" identifier = (subscript_expression "puVar1[6]" identifier [ number_literal ])) ;) (expression_statement "puVar1[7] = puVar1[5];" (assignment_expression "puVar1[7] = puVar1[5]" (subscript_expression "puVar1[7]" identifier [ number_literal ]) = (subscript_expression "puVar1[5]" identifier [ number_literal ])) ;) (expression_statement "puVar1[5] = uVar4;" (assignment_expression "puVar1[5] = uVar4" (subscript_expression "puVar1[5]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[6] = puVar1[8];" (assignment_expression "puVar1[6] = puVar1[8]" (subscript_expression "puVar1[6]" identifier [ number_literal ]) = (subscript_expression "puVar1[8]" identifier [ number_literal ])) ;) (expression_statement "puVar1[8] = uVar3;" (assignment_expression "puVar1[8] = uVar3" (subscript_expression "puVar1[8]" identifier [ number_literal ]) = identifier) ;) (labeled_statement "LAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }" statement_identifier : (if_statement "if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }" if (parenthesized_expression "(puVar1[6] != puVar1[2])" ( (binary_expression "puVar1[6] != puVar1[2]" (subscript_expression "puVar1[6]" identifier [ number_literal ]) != (subscript_expression "puVar1[2]" identifier [ number_literal ])) )) (compound_statement "{\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }" { (expression_statement "uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);" (assignment_expression "uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1)" identifier = (call_expression "FUN_00119d50(*puVar1,FUN_0012fb70,puVar1)" identifier (argument_list "(*puVar1,FUN_0012fb70,puVar1)" ( (pointer_expression "*puVar1" * identifier) , identifier , identifier )))) ;) (goto_statement "goto LAB_0012f73f;" goto statement_identifier ;) }))) (expression_statement "*(undefined4 *)((long)puVar1 + 0x1c) = 1;" (assignment_expression "*(undefined4 *)((long)puVar1 + 0x1c) = 1" (pointer_expression "*(undefined4 *)((long)puVar1 + 0x1c)" * (cast_expression "(undefined4 *)((long)puVar1 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar1 + 0x1c)" ( (binary_expression "(long)puVar1 + 0x1c" (cast_expression "(long)puVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }" else (compound_statement "{\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }" { (expression_statement "local_28 = 1;" (assignment_expression "local_28 = 1" identifier = number_literal) ;) (expression_statement "FUN_0012b850(*plVar2,&local_28);" (call_expression "FUN_0012b850(*plVar2,&local_28)" identifier (argument_list "(*plVar2,&local_28)" ( (pointer_expression "*plVar2" * identifier) , (pointer_expression "&local_28" & identifier) ))) ;) (expression_statement "*(undefined4 *)(plVar2 + 1) = 0;" (assignment_expression "*(undefined4 *)(plVar2 + 1) = 0" (pointer_expression "*(undefined4 *)(plVar2 + 1)" * (cast_expression "(undefined4 *)(plVar2 + 1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(plVar2 + 1)" ( (binary_expression "plVar2 + 1" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*plVar2 = 0;" (assignment_expression "*plVar2 = 0" (pointer_expression "*plVar2" * identifier) = number_literal) ;) (expression_statement "uVar5 = (uint)local_28;" (assignment_expression "uVar5 = (uint)local_28" identifier = (cast_expression "(uint)local_28" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (if_statement "if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }" if (parenthesized_expression "(uVar5 == 0)" ( (binary_expression "uVar5 == 0" identifier == number_literal) )) (compound_statement "{\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }" { (expression_statement "uVar3 = puVar1[7];" (assignment_expression "uVar3 = puVar1[7]" identifier = (subscript_expression "puVar1[7]" identifier [ number_literal ])) ;) (expression_statement "uVar4 = puVar1[8];" (assignment_expression "uVar4 = puVar1[8]" identifier = (subscript_expression "puVar1[8]" identifier [ number_literal ])) ;) (expression_statement "puVar1[7] = puVar1[5];" (assignment_expression "puVar1[7] = puVar1[5]" (subscript_expression "puVar1[7]" identifier [ number_literal ]) = (subscript_expression "puVar1[5]" identifier [ number_literal ])) ;) (expression_statement "puVar1[8] = puVar1[6];" (assignment_expression "puVar1[8] = puVar1[6]" (subscript_expression "puVar1[8]" identifier [ number_literal ]) = (subscript_expression "puVar1[6]" identifier [ number_literal ])) ;) (expression_statement "puVar1[5] = uVar3;" (assignment_expression "puVar1[5] = uVar3" (subscript_expression "puVar1[5]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[6] = uVar4;" (assignment_expression "puVar1[6] = uVar4" (subscript_expression "puVar1[6]" identifier [ number_literal ]) = identifier) ;) (goto_statement "goto LAB_0012f701;" goto statement_identifier ;) })) }))) }))))) (labeled_statement "LAB_0012f7cd:\n  FUN_0012b950(param_1);" statement_identifier : (expression_statement "FUN_0012b950(param_1);" (call_expression "FUN_0012b950(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;)) (expression_statement "uVar6 = (ulong)uVar5;" (assignment_expression "uVar6 = (ulong)uVar5" identifier = (cast_expression "(ulong)uVar5" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) (labeled_statement "LAB_0012f7a0:\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar6;\n  }" statement_identifier : (if_statement "if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar6;\n  }" if (parenthesized_expression "(local_20 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_20 == *(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    return uVar6;\n  }" { (return_statement "return uVar6;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int vdbePmaReaderNext(PmaReader *pReadr)\n\n{\n  IncrMerger *pIncr;\n  SortSubtask *pSVar1;\n  i64 iVar2;\n  long lVar3;\n  sqlite3_file *psVar4;\n  i64 iVar5;\n  int iVar6;\n  int nByte;\n  long in_FS_OFFSET;\n  u64 nRec;\n  void *pRet;\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  nRec = 0;\n  if (pReadr->iReadOff < pReadr->iEof) {\nLAB_0012f765:\n    iVar6 = vdbePmaReadVarint(pReadr,&nRec);\n    if (iVar6 == 0) {\n      nByte = (int)nRec;\n      pReadr->nKey = nByte;\n      if (pReadr->aMap == (u8 *)0x0) {\n        iVar6 = vdbePmaReadBlob(pReadr,nByte,&pReadr->aKey);\n      }\n      else {\n        pReadr->aKey = pReadr->aMap + pReadr->iReadOff;\n        pReadr->iReadOff = (long)nByte + pReadr->iReadOff;\n      }\n    }\n    goto LAB_0012f7a0;\n  }\n  pIncr = pReadr->pIncr;\n  if (pIncr == (IncrMerger *)0x0) {\nLAB_0012f7cb:\n    iVar6 = 0;\n  }\n  else if (pIncr->bUseThread == 0) {\n    iVar6 = vdbeIncrPopulate(pIncr);\n    iVar2 = pIncr->aFile[1].iEof;\n    lVar3 = pIncr->iStartOff;\n    pIncr->aFile[0].pFd = pIncr->aFile[1].pFd;\n    pIncr->aFile[0].iEof = iVar2;\n    if (pIncr->aFile[0].iEof == lVar3) {\n      pIncr->bEof = 1;\n      if (iVar6 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (iVar6 == 0) {\n      if (pIncr->bEof == 0) {\n        iVar6 = vdbePmaReaderSeek(pIncr->pTask,pReadr,pIncr->aFile,pIncr->iStartOff);\n        if (iVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    pSVar1 = pIncr->pTask;\n    if (pSVar1->pThread == (SQLiteThread *)0x0) {\n      psVar4 = pIncr->aFile[1].pFd;\n      iVar5 = pIncr->aFile[1].iEof;\n      iVar2 = pIncr->aFile[0].iEof;\n      pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n      pIncr->aFile[0].pFd = psVar4;\n      pIncr->aFile[0].iEof = iVar5;\n      pIncr->aFile[1].iEof = iVar2;\nLAB_0012f701:\n      if (pIncr->aFile[0].iEof != pIncr->iStartOff) {\n        iVar6 = sqlite3ThreadCreate(&pIncr->pTask->pThread,vdbeIncrPopulateThread,pIncr);\n        goto LAB_0012f73f;\n      }\n      pIncr->bEof = 1;\n      iVar6 = 0;\n    }\n    else {\n      pRet = (void *)0x1;\n      sqlite3ThreadJoin(pSVar1->pThread,&pRet);\n      pSVar1->bDone = 0;\n      pSVar1->pThread = (SQLiteThread *)0x0;\n      iVar6 = (int)pRet;\n      if (iVar6 == 0) {\n        iVar2 = pIncr->aFile[0].iEof;\n        psVar4 = pIncr->aFile[1].pFd;\n        iVar5 = pIncr->aFile[1].iEof;\n        pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n        pIncr->aFile[1].iEof = iVar2;\n        pIncr->aFile[0].pFd = psVar4;\n        pIncr->aFile[0].iEof = iVar5;\n        goto LAB_0012f701;\n      }\n    }\n  }\nLAB_0012f7cd:\n  vdbePmaReaderClear(pReadr);\nLAB_0012f7a0:\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar6;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "int vdbePmaReaderNext(PmaReader *pReadr)\n\n{\n  IncrMerger *pIncr;\n  SortSubtask *pSVar1;\n  i64 iVar2;\n  long lVar3;\n  sqlite3_file *psVar4;\n  i64 iVar5;\n  int iVar6;\n  int nByte;\n  long in_FS_OFFSET;\n  u64 nRec;\n  void *pRet;\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  nRec = 0;\n  if (pReadr->iReadOff < pReadr->iEof) {\nLAB_0012f765:\n    iVar6 = vdbePmaReadVarint(pReadr,&nRec);\n    if (iVar6 == 0) {\n      nByte = (int)nRec;\n      pReadr->nKey = nByte;\n      if (pReadr->aMap == (u8 *)0x0) {\n        iVar6 = vdbePmaReadBlob(pReadr,nByte,&pReadr->aKey);\n      }\n      else {\n        pReadr->aKey = pReadr->aMap + pReadr->iReadOff;\n        pReadr->iReadOff = (long)nByte + pReadr->iReadOff;\n      }\n    }\n    goto LAB_0012f7a0;\n  }\n  pIncr = pReadr->pIncr;\n  if (pIncr == (IncrMerger *)0x0) {\nLAB_0012f7cb:\n    iVar6 = 0;\n  }\n  else if (pIncr->bUseThread == 0) {\n    iVar6 = vdbeIncrPopulate(pIncr);\n    iVar2 = pIncr->aFile[1].iEof;\n    lVar3 = pIncr->iStartOff;\n    pIncr->aFile[0].pFd = pIncr->aFile[1].pFd;\n    pIncr->aFile[0].iEof = iVar2;\n    if (pIncr->aFile[0].iEof == lVar3) {\n      pIncr->bEof = 1;\n      if (iVar6 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (iVar6 == 0) {\n      if (pIncr->bEof == 0) {\n        iVar6 = vdbePmaReaderSeek(pIncr->pTask,pReadr,pIncr->aFile,pIncr->iStartOff);\n        if (iVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    pSVar1 = pIncr->pTask;\n    if (pSVar1->pThread == (SQLiteThread *)0x0) {\n      psVar4 = pIncr->aFile[1].pFd;\n      iVar5 = pIncr->aFile[1].iEof;\n      iVar2 = pIncr->aFile[0].iEof;\n      pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n      pIncr->aFile[0].pFd = psVar4;\n      pIncr->aFile[0].iEof = iVar5;\n      pIncr->aFile[1].iEof = iVar2;\nLAB_0012f701:\n      if (pIncr->aFile[0].iEof != pIncr->iStartOff) {\n        iVar6 = sqlite3ThreadCreate(&pIncr->pTask->pThread,vdbeIncrPopulateThread,pIncr);\n        goto LAB_0012f73f;\n      }\n      pIncr->bEof = 1;\n      iVar6 = 0;\n    }\n    else {\n      pRet = (void *)0x1;\n      sqlite3ThreadJoin(pSVar1->pThread,&pRet);\n      pSVar1->bDone = 0;\n      pSVar1->pThread = (SQLiteThread *)0x0;\n      iVar6 = (int)pRet;\n      if (iVar6 == 0) {\n        iVar2 = pIncr->aFile[0].iEof;\n        psVar4 = pIncr->aFile[1].pFd;\n        iVar5 = pIncr->aFile[1].iEof;\n        pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n        pIncr->aFile[1].iEof = iVar2;\n        pIncr->aFile[0].pFd = psVar4;\n        pIncr->aFile[0].iEof = iVar5;\n        goto LAB_0012f701;\n      }\n    }\n  }\nLAB_0012f7cd:\n  vdbePmaReaderClear(pReadr);\nLAB_0012f7a0:\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar6;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "vdbePmaReaderNext(PmaReader *pReadr)" identifier (parameter_list "(PmaReader *pReadr)" ( (parameter_declaration "PmaReader *pReadr" type_identifier (pointer_declarator "*pReadr" * identifier)) ))) (compound_statement "{\n  IncrMerger *pIncr;\n  SortSubtask *pSVar1;\n  i64 iVar2;\n  long lVar3;\n  sqlite3_file *psVar4;\n  i64 iVar5;\n  int iVar6;\n  int nByte;\n  long in_FS_OFFSET;\n  u64 nRec;\n  void *pRet;\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  nRec = 0;\n  if (pReadr->iReadOff < pReadr->iEof) {\nLAB_0012f765:\n    iVar6 = vdbePmaReadVarint(pReadr,&nRec);\n    if (iVar6 == 0) {\n      nByte = (int)nRec;\n      pReadr->nKey = nByte;\n      if (pReadr->aMap == (u8 *)0x0) {\n        iVar6 = vdbePmaReadBlob(pReadr,nByte,&pReadr->aKey);\n      }\n      else {\n        pReadr->aKey = pReadr->aMap + pReadr->iReadOff;\n        pReadr->iReadOff = (long)nByte + pReadr->iReadOff;\n      }\n    }\n    goto LAB_0012f7a0;\n  }\n  pIncr = pReadr->pIncr;\n  if (pIncr == (IncrMerger *)0x0) {\nLAB_0012f7cb:\n    iVar6 = 0;\n  }\n  else if (pIncr->bUseThread == 0) {\n    iVar6 = vdbeIncrPopulate(pIncr);\n    iVar2 = pIncr->aFile[1].iEof;\n    lVar3 = pIncr->iStartOff;\n    pIncr->aFile[0].pFd = pIncr->aFile[1].pFd;\n    pIncr->aFile[0].iEof = iVar2;\n    if (pIncr->aFile[0].iEof == lVar3) {\n      pIncr->bEof = 1;\n      if (iVar6 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (iVar6 == 0) {\n      if (pIncr->bEof == 0) {\n        iVar6 = vdbePmaReaderSeek(pIncr->pTask,pReadr,pIncr->aFile,pIncr->iStartOff);\n        if (iVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    pSVar1 = pIncr->pTask;\n    if (pSVar1->pThread == (SQLiteThread *)0x0) {\n      psVar4 = pIncr->aFile[1].pFd;\n      iVar5 = pIncr->aFile[1].iEof;\n      iVar2 = pIncr->aFile[0].iEof;\n      pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n      pIncr->aFile[0].pFd = psVar4;\n      pIncr->aFile[0].iEof = iVar5;\n      pIncr->aFile[1].iEof = iVar2;\nLAB_0012f701:\n      if (pIncr->aFile[0].iEof != pIncr->iStartOff) {\n        iVar6 = sqlite3ThreadCreate(&pIncr->pTask->pThread,vdbeIncrPopulateThread,pIncr);\n        goto LAB_0012f73f;\n      }\n      pIncr->bEof = 1;\n      iVar6 = 0;\n    }\n    else {\n      pRet = (void *)0x1;\n      sqlite3ThreadJoin(pSVar1->pThread,&pRet);\n      pSVar1->bDone = 0;\n      pSVar1->pThread = (SQLiteThread *)0x0;\n      iVar6 = (int)pRet;\n      if (iVar6 == 0) {\n        iVar2 = pIncr->aFile[0].iEof;\n        psVar4 = pIncr->aFile[1].pFd;\n        iVar5 = pIncr->aFile[1].iEof;\n        pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n        pIncr->aFile[1].iEof = iVar2;\n        pIncr->aFile[0].pFd = psVar4;\n        pIncr->aFile[0].iEof = iVar5;\n        goto LAB_0012f701;\n      }\n    }\n  }\nLAB_0012f7cd:\n  vdbePmaReaderClear(pReadr);\nLAB_0012f7a0:\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar6;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "IncrMerger *pIncr;" type_identifier (pointer_declarator "*pIncr" * identifier) ;) (declaration "SortSubtask *pSVar1;" type_identifier (pointer_declarator "*pSVar1" * identifier) ;) (declaration "i64 iVar2;" type_identifier identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "sqlite3_file *psVar4;" type_identifier (pointer_declarator "*psVar4" * identifier) ;) (declaration "i64 iVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int nByte;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "u64 nRec;" type_identifier identifier ;) (declaration "void *pRet;" primitive_type (pointer_declarator "*pRet" * identifier) ;) (declaration "long local_20;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_20 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_20 = *(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 "nRec = 0;" (assignment_expression "nRec = 0" identifier = number_literal) ;) (if_statement "if (pReadr->iReadOff < pReadr->iEof) {\nLAB_0012f765:\n    iVar6 = vdbePmaReadVarint(pReadr,&nRec);\n    if (iVar6 == 0) {\n      nByte = (int)nRec;\n      pReadr->nKey = nByte;\n      if (pReadr->aMap == (u8 *)0x0) {\n        iVar6 = vdbePmaReadBlob(pReadr,nByte,&pReadr->aKey);\n      }\n      else {\n        pReadr->aKey = pReadr->aMap + pReadr->iReadOff;\n        pReadr->iReadOff = (long)nByte + pReadr->iReadOff;\n      }\n    }\n    goto LAB_0012f7a0;\n  }" if (parenthesized_expression "(pReadr->iReadOff < pReadr->iEof)" ( (binary_expression "pReadr->iReadOff < pReadr->iEof" (field_expression "pReadr->iReadOff" identifier -> field_identifier) < (field_expression "pReadr->iEof" identifier -> field_identifier)) )) (compound_statement "{\nLAB_0012f765:\n    iVar6 = vdbePmaReadVarint(pReadr,&nRec);\n    if (iVar6 == 0) {\n      nByte = (int)nRec;\n      pReadr->nKey = nByte;\n      if (pReadr->aMap == (u8 *)0x0) {\n        iVar6 = vdbePmaReadBlob(pReadr,nByte,&pReadr->aKey);\n      }\n      else {\n        pReadr->aKey = pReadr->aMap + pReadr->iReadOff;\n        pReadr->iReadOff = (long)nByte + pReadr->iReadOff;\n      }\n    }\n    goto LAB_0012f7a0;\n  }" { (labeled_statement "LAB_0012f765:\n    iVar6 = vdbePmaReadVarint(pReadr,&nRec);" statement_identifier : (expression_statement "iVar6 = vdbePmaReadVarint(pReadr,&nRec);" (assignment_expression "iVar6 = vdbePmaReadVarint(pReadr,&nRec)" identifier = (call_expression "vdbePmaReadVarint(pReadr,&nRec)" identifier (argument_list "(pReadr,&nRec)" ( identifier , (pointer_expression "&nRec" & identifier) )))) ;)) (if_statement "if (iVar6 == 0) {\n      nByte = (int)nRec;\n      pReadr->nKey = nByte;\n      if (pReadr->aMap == (u8 *)0x0) {\n        iVar6 = vdbePmaReadBlob(pReadr,nByte,&pReadr->aKey);\n      }\n      else {\n        pReadr->aKey = pReadr->aMap + pReadr->iReadOff;\n        pReadr->iReadOff = (long)nByte + pReadr->iReadOff;\n      }\n    }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n      nByte = (int)nRec;\n      pReadr->nKey = nByte;\n      if (pReadr->aMap == (u8 *)0x0) {\n        iVar6 = vdbePmaReadBlob(pReadr,nByte,&pReadr->aKey);\n      }\n      else {\n        pReadr->aKey = pReadr->aMap + pReadr->iReadOff;\n        pReadr->iReadOff = (long)nByte + pReadr->iReadOff;\n      }\n    }" { (expression_statement "nByte = (int)nRec;" (assignment_expression "nByte = (int)nRec" identifier = (cast_expression "(int)nRec" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "pReadr->nKey = nByte;" (assignment_expression "pReadr->nKey = nByte" (field_expression "pReadr->nKey" identifier -> field_identifier) = identifier) ;) (if_statement "if (pReadr->aMap == (u8 *)0x0) {\n        iVar6 = vdbePmaReadBlob(pReadr,nByte,&pReadr->aKey);\n      }\n      else {\n        pReadr->aKey = pReadr->aMap + pReadr->iReadOff;\n        pReadr->iReadOff = (long)nByte + pReadr->iReadOff;\n      }" if (parenthesized_expression "(pReadr->aMap == (u8 *)0x0)" ( (binary_expression "pReadr->aMap == (u8 *)0x0" (field_expression "pReadr->aMap" identifier -> field_identifier) == (cast_expression "(u8 *)0x0" ( (type_descriptor "u8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        iVar6 = vdbePmaReadBlob(pReadr,nByte,&pReadr->aKey);\n      }" { (expression_statement "iVar6 = vdbePmaReadBlob(pReadr,nByte,&pReadr->aKey);" (assignment_expression "iVar6 = vdbePmaReadBlob(pReadr,nByte,&pReadr->aKey)" identifier = (call_expression "vdbePmaReadBlob(pReadr,nByte,&pReadr->aKey)" identifier (argument_list "(pReadr,nByte,&pReadr->aKey)" ( identifier , identifier , (pointer_expression "&pReadr->aKey" & (field_expression "pReadr->aKey" identifier -> field_identifier)) )))) ;) }) (else_clause "else {\n        pReadr->aKey = pReadr->aMap + pReadr->iReadOff;\n        pReadr->iReadOff = (long)nByte + pReadr->iReadOff;\n      }" else (compound_statement "{\n        pReadr->aKey = pReadr->aMap + pReadr->iReadOff;\n        pReadr->iReadOff = (long)nByte + pReadr->iReadOff;\n      }" { (expression_statement "pReadr->aKey = pReadr->aMap + pReadr->iReadOff;" (assignment_expression "pReadr->aKey = pReadr->aMap + pReadr->iReadOff" (field_expression "pReadr->aKey" identifier -> field_identifier) = (binary_expression "pReadr->aMap + pReadr->iReadOff" (field_expression "pReadr->aMap" identifier -> field_identifier) + (field_expression "pReadr->iReadOff" identifier -> field_identifier))) ;) (expression_statement "pReadr->iReadOff = (long)nByte + pReadr->iReadOff;" (assignment_expression "pReadr->iReadOff = (long)nByte + pReadr->iReadOff" (field_expression "pReadr->iReadOff" identifier -> field_identifier) = (binary_expression "(long)nByte + pReadr->iReadOff" (cast_expression "(long)nByte" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (field_expression "pReadr->iReadOff" identifier -> field_identifier))) ;) }))) })) (goto_statement "goto LAB_0012f7a0;" goto statement_identifier ;) })) (expression_statement "pIncr = pReadr->pIncr;" (assignment_expression "pIncr = pReadr->pIncr" identifier = (field_expression "pReadr->pIncr" identifier -> field_identifier)) ;) (if_statement "if (pIncr == (IncrMerger *)0x0) {\nLAB_0012f7cb:\n    iVar6 = 0;\n  }\n  else if (pIncr->bUseThread == 0) {\n    iVar6 = vdbeIncrPopulate(pIncr);\n    iVar2 = pIncr->aFile[1].iEof;\n    lVar3 = pIncr->iStartOff;\n    pIncr->aFile[0].pFd = pIncr->aFile[1].pFd;\n    pIncr->aFile[0].iEof = iVar2;\n    if (pIncr->aFile[0].iEof == lVar3) {\n      pIncr->bEof = 1;\n      if (iVar6 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (iVar6 == 0) {\n      if (pIncr->bEof == 0) {\n        iVar6 = vdbePmaReaderSeek(pIncr->pTask,pReadr,pIncr->aFile,pIncr->iStartOff);\n        if (iVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    pSVar1 = pIncr->pTask;\n    if (pSVar1->pThread == (SQLiteThread *)0x0) {\n      psVar4 = pIncr->aFile[1].pFd;\n      iVar5 = pIncr->aFile[1].iEof;\n      iVar2 = pIncr->aFile[0].iEof;\n      pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n      pIncr->aFile[0].pFd = psVar4;\n      pIncr->aFile[0].iEof = iVar5;\n      pIncr->aFile[1].iEof = iVar2;\nLAB_0012f701:\n      if (pIncr->aFile[0].iEof != pIncr->iStartOff) {\n        iVar6 = sqlite3ThreadCreate(&pIncr->pTask->pThread,vdbeIncrPopulateThread,pIncr);\n        goto LAB_0012f73f;\n      }\n      pIncr->bEof = 1;\n      iVar6 = 0;\n    }\n    else {\n      pRet = (void *)0x1;\n      sqlite3ThreadJoin(pSVar1->pThread,&pRet);\n      pSVar1->bDone = 0;\n      pSVar1->pThread = (SQLiteThread *)0x0;\n      iVar6 = (int)pRet;\n      if (iVar6 == 0) {\n        iVar2 = pIncr->aFile[0].iEof;\n        psVar4 = pIncr->aFile[1].pFd;\n        iVar5 = pIncr->aFile[1].iEof;\n        pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n        pIncr->aFile[1].iEof = iVar2;\n        pIncr->aFile[0].pFd = psVar4;\n        pIncr->aFile[0].iEof = iVar5;\n        goto LAB_0012f701;\n      }\n    }\n  }" if (parenthesized_expression "(pIncr == (IncrMerger *)0x0)" ( (binary_expression "pIncr == (IncrMerger *)0x0" identifier == (cast_expression "(IncrMerger *)0x0" ( (type_descriptor "IncrMerger *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_0012f7cb:\n    iVar6 = 0;\n  }" { (labeled_statement "LAB_0012f7cb:\n    iVar6 = 0;" statement_identifier : (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;)) }) (else_clause "else if (pIncr->bUseThread == 0) {\n    iVar6 = vdbeIncrPopulate(pIncr);\n    iVar2 = pIncr->aFile[1].iEof;\n    lVar3 = pIncr->iStartOff;\n    pIncr->aFile[0].pFd = pIncr->aFile[1].pFd;\n    pIncr->aFile[0].iEof = iVar2;\n    if (pIncr->aFile[0].iEof == lVar3) {\n      pIncr->bEof = 1;\n      if (iVar6 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (iVar6 == 0) {\n      if (pIncr->bEof == 0) {\n        iVar6 = vdbePmaReaderSeek(pIncr->pTask,pReadr,pIncr->aFile,pIncr->iStartOff);\n        if (iVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    pSVar1 = pIncr->pTask;\n    if (pSVar1->pThread == (SQLiteThread *)0x0) {\n      psVar4 = pIncr->aFile[1].pFd;\n      iVar5 = pIncr->aFile[1].iEof;\n      iVar2 = pIncr->aFile[0].iEof;\n      pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n      pIncr->aFile[0].pFd = psVar4;\n      pIncr->aFile[0].iEof = iVar5;\n      pIncr->aFile[1].iEof = iVar2;\nLAB_0012f701:\n      if (pIncr->aFile[0].iEof != pIncr->iStartOff) {\n        iVar6 = sqlite3ThreadCreate(&pIncr->pTask->pThread,vdbeIncrPopulateThread,pIncr);\n        goto LAB_0012f73f;\n      }\n      pIncr->bEof = 1;\n      iVar6 = 0;\n    }\n    else {\n      pRet = (void *)0x1;\n      sqlite3ThreadJoin(pSVar1->pThread,&pRet);\n      pSVar1->bDone = 0;\n      pSVar1->pThread = (SQLiteThread *)0x0;\n      iVar6 = (int)pRet;\n      if (iVar6 == 0) {\n        iVar2 = pIncr->aFile[0].iEof;\n        psVar4 = pIncr->aFile[1].pFd;\n        iVar5 = pIncr->aFile[1].iEof;\n        pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n        pIncr->aFile[1].iEof = iVar2;\n        pIncr->aFile[0].pFd = psVar4;\n        pIncr->aFile[0].iEof = iVar5;\n        goto LAB_0012f701;\n      }\n    }\n  }" else (if_statement "if (pIncr->bUseThread == 0) {\n    iVar6 = vdbeIncrPopulate(pIncr);\n    iVar2 = pIncr->aFile[1].iEof;\n    lVar3 = pIncr->iStartOff;\n    pIncr->aFile[0].pFd = pIncr->aFile[1].pFd;\n    pIncr->aFile[0].iEof = iVar2;\n    if (pIncr->aFile[0].iEof == lVar3) {\n      pIncr->bEof = 1;\n      if (iVar6 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (iVar6 == 0) {\n      if (pIncr->bEof == 0) {\n        iVar6 = vdbePmaReaderSeek(pIncr->pTask,pReadr,pIncr->aFile,pIncr->iStartOff);\n        if (iVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    pSVar1 = pIncr->pTask;\n    if (pSVar1->pThread == (SQLiteThread *)0x0) {\n      psVar4 = pIncr->aFile[1].pFd;\n      iVar5 = pIncr->aFile[1].iEof;\n      iVar2 = pIncr->aFile[0].iEof;\n      pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n      pIncr->aFile[0].pFd = psVar4;\n      pIncr->aFile[0].iEof = iVar5;\n      pIncr->aFile[1].iEof = iVar2;\nLAB_0012f701:\n      if (pIncr->aFile[0].iEof != pIncr->iStartOff) {\n        iVar6 = sqlite3ThreadCreate(&pIncr->pTask->pThread,vdbeIncrPopulateThread,pIncr);\n        goto LAB_0012f73f;\n      }\n      pIncr->bEof = 1;\n      iVar6 = 0;\n    }\n    else {\n      pRet = (void *)0x1;\n      sqlite3ThreadJoin(pSVar1->pThread,&pRet);\n      pSVar1->bDone = 0;\n      pSVar1->pThread = (SQLiteThread *)0x0;\n      iVar6 = (int)pRet;\n      if (iVar6 == 0) {\n        iVar2 = pIncr->aFile[0].iEof;\n        psVar4 = pIncr->aFile[1].pFd;\n        iVar5 = pIncr->aFile[1].iEof;\n        pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n        pIncr->aFile[1].iEof = iVar2;\n        pIncr->aFile[0].pFd = psVar4;\n        pIncr->aFile[0].iEof = iVar5;\n        goto LAB_0012f701;\n      }\n    }\n  }" if (parenthesized_expression "(pIncr->bUseThread == 0)" ( (binary_expression "pIncr->bUseThread == 0" (field_expression "pIncr->bUseThread" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n    iVar6 = vdbeIncrPopulate(pIncr);\n    iVar2 = pIncr->aFile[1].iEof;\n    lVar3 = pIncr->iStartOff;\n    pIncr->aFile[0].pFd = pIncr->aFile[1].pFd;\n    pIncr->aFile[0].iEof = iVar2;\n    if (pIncr->aFile[0].iEof == lVar3) {\n      pIncr->bEof = 1;\n      if (iVar6 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (iVar6 == 0) {\n      if (pIncr->bEof == 0) {\n        iVar6 = vdbePmaReaderSeek(pIncr->pTask,pReadr,pIncr->aFile,pIncr->iStartOff);\n        if (iVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }" { (expression_statement "iVar6 = vdbeIncrPopulate(pIncr);" (assignment_expression "iVar6 = vdbeIncrPopulate(pIncr)" identifier = (call_expression "vdbeIncrPopulate(pIncr)" identifier (argument_list "(pIncr)" ( identifier )))) ;) (expression_statement "iVar2 = pIncr->aFile[1].iEof;" (assignment_expression "iVar2 = pIncr->aFile[1].iEof" identifier = (field_expression "pIncr->aFile[1].iEof" (subscript_expression "pIncr->aFile[1]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier)) ;) (expression_statement "lVar3 = pIncr->iStartOff;" (assignment_expression "lVar3 = pIncr->iStartOff" identifier = (field_expression "pIncr->iStartOff" identifier -> field_identifier)) ;) (expression_statement "pIncr->aFile[0].pFd = pIncr->aFile[1].pFd;" (assignment_expression "pIncr->aFile[0].pFd = pIncr->aFile[1].pFd" (field_expression "pIncr->aFile[0].pFd" (subscript_expression "pIncr->aFile[0]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier) = (field_expression "pIncr->aFile[1].pFd" (subscript_expression "pIncr->aFile[1]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier)) ;) (expression_statement "pIncr->aFile[0].iEof = iVar2;" (assignment_expression "pIncr->aFile[0].iEof = iVar2" (field_expression "pIncr->aFile[0].iEof" (subscript_expression "pIncr->aFile[0]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier) = identifier) ;) (if_statement "if (pIncr->aFile[0].iEof == lVar3) {\n      pIncr->bEof = 1;\n      if (iVar6 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }" if (parenthesized_expression "(pIncr->aFile[0].iEof == lVar3)" ( (binary_expression "pIncr->aFile[0].iEof == lVar3" (field_expression "pIncr->aFile[0].iEof" (subscript_expression "pIncr->aFile[0]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier) == identifier) )) (compound_statement "{\n      pIncr->bEof = 1;\n      if (iVar6 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }" { (expression_statement "pIncr->bEof = 1;" (assignment_expression "pIncr->bEof = 1" (field_expression "pIncr->bEof" identifier -> field_identifier) = number_literal) ;) (if_statement "if (iVar6 != 0) goto LAB_0012f7cd;" if (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0012f7cd;" goto statement_identifier ;)) (goto_statement "goto LAB_0012f7cb;" goto statement_identifier ;) })) (labeled_statement "LAB_0012f73f:\n    if (iVar6 == 0) {\n      if (pIncr->bEof == 0) {\n        iVar6 = vdbePmaReaderSeek(pIncr->pTask,pReadr,pIncr->aFile,pIncr->iStartOff);\n        if (iVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }" statement_identifier : (if_statement "if (iVar6 == 0) {\n      if (pIncr->bEof == 0) {\n        iVar6 = vdbePmaReaderSeek(pIncr->pTask,pReadr,pIncr->aFile,pIncr->iStartOff);\n        if (iVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n      if (pIncr->bEof == 0) {\n        iVar6 = vdbePmaReaderSeek(pIncr->pTask,pReadr,pIncr->aFile,pIncr->iStartOff);\n        if (iVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }" { (if_statement "if (pIncr->bEof == 0) {\n        iVar6 = vdbePmaReaderSeek(pIncr->pTask,pReadr,pIncr->aFile,pIncr->iStartOff);\n        if (iVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }" if (parenthesized_expression "(pIncr->bEof == 0)" ( (binary_expression "pIncr->bEof == 0" (field_expression "pIncr->bEof" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n        iVar6 = vdbePmaReaderSeek(pIncr->pTask,pReadr,pIncr->aFile,pIncr->iStartOff);\n        if (iVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }" { (expression_statement "iVar6 = vdbePmaReaderSeek(pIncr->pTask,pReadr,pIncr->aFile,pIncr->iStartOff);" (assignment_expression "iVar6 = vdbePmaReaderSeek(pIncr->pTask,pReadr,pIncr->aFile,pIncr->iStartOff)" identifier = (call_expression "vdbePmaReaderSeek(pIncr->pTask,pReadr,pIncr->aFile,pIncr->iStartOff)" identifier (argument_list "(pIncr->pTask,pReadr,pIncr->aFile,pIncr->iStartOff)" ( (field_expression "pIncr->pTask" identifier -> field_identifier) , identifier , (field_expression "pIncr->aFile" identifier -> field_identifier) , (field_expression "pIncr->iStartOff" identifier -> field_identifier) )))) ;) (if_statement "if (iVar6 != 0) goto LAB_0012f7a0;" if (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0012f7a0;" goto statement_identifier ;)) (goto_statement "goto LAB_0012f765;" goto statement_identifier ;) })) (goto_statement "goto LAB_0012f7cb;" goto statement_identifier ;) }))) }) (else_clause "else {\n    pSVar1 = pIncr->pTask;\n    if (pSVar1->pThread == (SQLiteThread *)0x0) {\n      psVar4 = pIncr->aFile[1].pFd;\n      iVar5 = pIncr->aFile[1].iEof;\n      iVar2 = pIncr->aFile[0].iEof;\n      pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n      pIncr->aFile[0].pFd = psVar4;\n      pIncr->aFile[0].iEof = iVar5;\n      pIncr->aFile[1].iEof = iVar2;\nLAB_0012f701:\n      if (pIncr->aFile[0].iEof != pIncr->iStartOff) {\n        iVar6 = sqlite3ThreadCreate(&pIncr->pTask->pThread,vdbeIncrPopulateThread,pIncr);\n        goto LAB_0012f73f;\n      }\n      pIncr->bEof = 1;\n      iVar6 = 0;\n    }\n    else {\n      pRet = (void *)0x1;\n      sqlite3ThreadJoin(pSVar1->pThread,&pRet);\n      pSVar1->bDone = 0;\n      pSVar1->pThread = (SQLiteThread *)0x0;\n      iVar6 = (int)pRet;\n      if (iVar6 == 0) {\n        iVar2 = pIncr->aFile[0].iEof;\n        psVar4 = pIncr->aFile[1].pFd;\n        iVar5 = pIncr->aFile[1].iEof;\n        pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n        pIncr->aFile[1].iEof = iVar2;\n        pIncr->aFile[0].pFd = psVar4;\n        pIncr->aFile[0].iEof = iVar5;\n        goto LAB_0012f701;\n      }\n    }\n  }" else (compound_statement "{\n    pSVar1 = pIncr->pTask;\n    if (pSVar1->pThread == (SQLiteThread *)0x0) {\n      psVar4 = pIncr->aFile[1].pFd;\n      iVar5 = pIncr->aFile[1].iEof;\n      iVar2 = pIncr->aFile[0].iEof;\n      pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n      pIncr->aFile[0].pFd = psVar4;\n      pIncr->aFile[0].iEof = iVar5;\n      pIncr->aFile[1].iEof = iVar2;\nLAB_0012f701:\n      if (pIncr->aFile[0].iEof != pIncr->iStartOff) {\n        iVar6 = sqlite3ThreadCreate(&pIncr->pTask->pThread,vdbeIncrPopulateThread,pIncr);\n        goto LAB_0012f73f;\n      }\n      pIncr->bEof = 1;\n      iVar6 = 0;\n    }\n    else {\n      pRet = (void *)0x1;\n      sqlite3ThreadJoin(pSVar1->pThread,&pRet);\n      pSVar1->bDone = 0;\n      pSVar1->pThread = (SQLiteThread *)0x0;\n      iVar6 = (int)pRet;\n      if (iVar6 == 0) {\n        iVar2 = pIncr->aFile[0].iEof;\n        psVar4 = pIncr->aFile[1].pFd;\n        iVar5 = pIncr->aFile[1].iEof;\n        pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n        pIncr->aFile[1].iEof = iVar2;\n        pIncr->aFile[0].pFd = psVar4;\n        pIncr->aFile[0].iEof = iVar5;\n        goto LAB_0012f701;\n      }\n    }\n  }" { (expression_statement "pSVar1 = pIncr->pTask;" (assignment_expression "pSVar1 = pIncr->pTask" identifier = (field_expression "pIncr->pTask" identifier -> field_identifier)) ;) (if_statement "if (pSVar1->pThread == (SQLiteThread *)0x0) {\n      psVar4 = pIncr->aFile[1].pFd;\n      iVar5 = pIncr->aFile[1].iEof;\n      iVar2 = pIncr->aFile[0].iEof;\n      pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n      pIncr->aFile[0].pFd = psVar4;\n      pIncr->aFile[0].iEof = iVar5;\n      pIncr->aFile[1].iEof = iVar2;\nLAB_0012f701:\n      if (pIncr->aFile[0].iEof != pIncr->iStartOff) {\n        iVar6 = sqlite3ThreadCreate(&pIncr->pTask->pThread,vdbeIncrPopulateThread,pIncr);\n        goto LAB_0012f73f;\n      }\n      pIncr->bEof = 1;\n      iVar6 = 0;\n    }\n    else {\n      pRet = (void *)0x1;\n      sqlite3ThreadJoin(pSVar1->pThread,&pRet);\n      pSVar1->bDone = 0;\n      pSVar1->pThread = (SQLiteThread *)0x0;\n      iVar6 = (int)pRet;\n      if (iVar6 == 0) {\n        iVar2 = pIncr->aFile[0].iEof;\n        psVar4 = pIncr->aFile[1].pFd;\n        iVar5 = pIncr->aFile[1].iEof;\n        pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n        pIncr->aFile[1].iEof = iVar2;\n        pIncr->aFile[0].pFd = psVar4;\n        pIncr->aFile[0].iEof = iVar5;\n        goto LAB_0012f701;\n      }\n    }" if (parenthesized_expression "(pSVar1->pThread == (SQLiteThread *)0x0)" ( (binary_expression "pSVar1->pThread == (SQLiteThread *)0x0" (field_expression "pSVar1->pThread" identifier -> field_identifier) == (cast_expression "(SQLiteThread *)0x0" ( (type_descriptor "SQLiteThread *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      psVar4 = pIncr->aFile[1].pFd;\n      iVar5 = pIncr->aFile[1].iEof;\n      iVar2 = pIncr->aFile[0].iEof;\n      pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n      pIncr->aFile[0].pFd = psVar4;\n      pIncr->aFile[0].iEof = iVar5;\n      pIncr->aFile[1].iEof = iVar2;\nLAB_0012f701:\n      if (pIncr->aFile[0].iEof != pIncr->iStartOff) {\n        iVar6 = sqlite3ThreadCreate(&pIncr->pTask->pThread,vdbeIncrPopulateThread,pIncr);\n        goto LAB_0012f73f;\n      }\n      pIncr->bEof = 1;\n      iVar6 = 0;\n    }" { (expression_statement "psVar4 = pIncr->aFile[1].pFd;" (assignment_expression "psVar4 = pIncr->aFile[1].pFd" identifier = (field_expression "pIncr->aFile[1].pFd" (subscript_expression "pIncr->aFile[1]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier)) ;) (expression_statement "iVar5 = pIncr->aFile[1].iEof;" (assignment_expression "iVar5 = pIncr->aFile[1].iEof" identifier = (field_expression "pIncr->aFile[1].iEof" (subscript_expression "pIncr->aFile[1]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier)) ;) (expression_statement "iVar2 = pIncr->aFile[0].iEof;" (assignment_expression "iVar2 = pIncr->aFile[0].iEof" identifier = (field_expression "pIncr->aFile[0].iEof" (subscript_expression "pIncr->aFile[0]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier)) ;) (expression_statement "pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;" (assignment_expression "pIncr->aFile[1].pFd = pIncr->aFile[0].pFd" (field_expression "pIncr->aFile[1].pFd" (subscript_expression "pIncr->aFile[1]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier) = (field_expression "pIncr->aFile[0].pFd" (subscript_expression "pIncr->aFile[0]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier)) ;) (expression_statement "pIncr->aFile[0].pFd = psVar4;" (assignment_expression "pIncr->aFile[0].pFd = psVar4" (field_expression "pIncr->aFile[0].pFd" (subscript_expression "pIncr->aFile[0]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier) = identifier) ;) (expression_statement "pIncr->aFile[0].iEof = iVar5;" (assignment_expression "pIncr->aFile[0].iEof = iVar5" (field_expression "pIncr->aFile[0].iEof" (subscript_expression "pIncr->aFile[0]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier) = identifier) ;) (expression_statement "pIncr->aFile[1].iEof = iVar2;" (assignment_expression "pIncr->aFile[1].iEof = iVar2" (field_expression "pIncr->aFile[1].iEof" (subscript_expression "pIncr->aFile[1]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier) = identifier) ;) (labeled_statement "LAB_0012f701:\n      if (pIncr->aFile[0].iEof != pIncr->iStartOff) {\n        iVar6 = sqlite3ThreadCreate(&pIncr->pTask->pThread,vdbeIncrPopulateThread,pIncr);\n        goto LAB_0012f73f;\n      }" statement_identifier : (if_statement "if (pIncr->aFile[0].iEof != pIncr->iStartOff) {\n        iVar6 = sqlite3ThreadCreate(&pIncr->pTask->pThread,vdbeIncrPopulateThread,pIncr);\n        goto LAB_0012f73f;\n      }" if (parenthesized_expression "(pIncr->aFile[0].iEof != pIncr->iStartOff)" ( (binary_expression "pIncr->aFile[0].iEof != pIncr->iStartOff" (field_expression "pIncr->aFile[0].iEof" (subscript_expression "pIncr->aFile[0]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier) != (field_expression "pIncr->iStartOff" identifier -> field_identifier)) )) (compound_statement "{\n        iVar6 = sqlite3ThreadCreate(&pIncr->pTask->pThread,vdbeIncrPopulateThread,pIncr);\n        goto LAB_0012f73f;\n      }" { (expression_statement "iVar6 = sqlite3ThreadCreate(&pIncr->pTask->pThread,vdbeIncrPopulateThread,pIncr);" (assignment_expression "iVar6 = sqlite3ThreadCreate(&pIncr->pTask->pThread,vdbeIncrPopulateThread,pIncr)" identifier = (call_expression "sqlite3ThreadCreate(&pIncr->pTask->pThread,vdbeIncrPopulateThread,pIncr)" identifier (argument_list "(&pIncr->pTask->pThread,vdbeIncrPopulateThread,pIncr)" ( (pointer_expression "&pIncr->pTask->pThread" & (field_expression "pIncr->pTask->pThread" (field_expression "pIncr->pTask" identifier -> field_identifier) -> field_identifier)) , identifier , identifier )))) ;) (goto_statement "goto LAB_0012f73f;" goto statement_identifier ;) }))) (expression_statement "pIncr->bEof = 1;" (assignment_expression "pIncr->bEof = 1" (field_expression "pIncr->bEof" identifier -> field_identifier) = number_literal) ;) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      pRet = (void *)0x1;\n      sqlite3ThreadJoin(pSVar1->pThread,&pRet);\n      pSVar1->bDone = 0;\n      pSVar1->pThread = (SQLiteThread *)0x0;\n      iVar6 = (int)pRet;\n      if (iVar6 == 0) {\n        iVar2 = pIncr->aFile[0].iEof;\n        psVar4 = pIncr->aFile[1].pFd;\n        iVar5 = pIncr->aFile[1].iEof;\n        pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n        pIncr->aFile[1].iEof = iVar2;\n        pIncr->aFile[0].pFd = psVar4;\n        pIncr->aFile[0].iEof = iVar5;\n        goto LAB_0012f701;\n      }\n    }" else (compound_statement "{\n      pRet = (void *)0x1;\n      sqlite3ThreadJoin(pSVar1->pThread,&pRet);\n      pSVar1->bDone = 0;\n      pSVar1->pThread = (SQLiteThread *)0x0;\n      iVar6 = (int)pRet;\n      if (iVar6 == 0) {\n        iVar2 = pIncr->aFile[0].iEof;\n        psVar4 = pIncr->aFile[1].pFd;\n        iVar5 = pIncr->aFile[1].iEof;\n        pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n        pIncr->aFile[1].iEof = iVar2;\n        pIncr->aFile[0].pFd = psVar4;\n        pIncr->aFile[0].iEof = iVar5;\n        goto LAB_0012f701;\n      }\n    }" { (expression_statement "pRet = (void *)0x1;" (assignment_expression "pRet = (void *)0x1" identifier = (cast_expression "(void *)0x1" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "sqlite3ThreadJoin(pSVar1->pThread,&pRet);" (call_expression "sqlite3ThreadJoin(pSVar1->pThread,&pRet)" identifier (argument_list "(pSVar1->pThread,&pRet)" ( (field_expression "pSVar1->pThread" identifier -> field_identifier) , (pointer_expression "&pRet" & identifier) ))) ;) (expression_statement "pSVar1->bDone = 0;" (assignment_expression "pSVar1->bDone = 0" (field_expression "pSVar1->bDone" identifier -> field_identifier) = number_literal) ;) (expression_statement "pSVar1->pThread = (SQLiteThread *)0x0;" (assignment_expression "pSVar1->pThread = (SQLiteThread *)0x0" (field_expression "pSVar1->pThread" identifier -> field_identifier) = (cast_expression "(SQLiteThread *)0x0" ( (type_descriptor "SQLiteThread *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "iVar6 = (int)pRet;" (assignment_expression "iVar6 = (int)pRet" identifier = (cast_expression "(int)pRet" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (iVar6 == 0) {\n        iVar2 = pIncr->aFile[0].iEof;\n        psVar4 = pIncr->aFile[1].pFd;\n        iVar5 = pIncr->aFile[1].iEof;\n        pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n        pIncr->aFile[1].iEof = iVar2;\n        pIncr->aFile[0].pFd = psVar4;\n        pIncr->aFile[0].iEof = iVar5;\n        goto LAB_0012f701;\n      }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n        iVar2 = pIncr->aFile[0].iEof;\n        psVar4 = pIncr->aFile[1].pFd;\n        iVar5 = pIncr->aFile[1].iEof;\n        pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;\n        pIncr->aFile[1].iEof = iVar2;\n        pIncr->aFile[0].pFd = psVar4;\n        pIncr->aFile[0].iEof = iVar5;\n        goto LAB_0012f701;\n      }" { (expression_statement "iVar2 = pIncr->aFile[0].iEof;" (assignment_expression "iVar2 = pIncr->aFile[0].iEof" identifier = (field_expression "pIncr->aFile[0].iEof" (subscript_expression "pIncr->aFile[0]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier)) ;) (expression_statement "psVar4 = pIncr->aFile[1].pFd;" (assignment_expression "psVar4 = pIncr->aFile[1].pFd" identifier = (field_expression "pIncr->aFile[1].pFd" (subscript_expression "pIncr->aFile[1]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier)) ;) (expression_statement "iVar5 = pIncr->aFile[1].iEof;" (assignment_expression "iVar5 = pIncr->aFile[1].iEof" identifier = (field_expression "pIncr->aFile[1].iEof" (subscript_expression "pIncr->aFile[1]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier)) ;) (expression_statement "pIncr->aFile[1].pFd = pIncr->aFile[0].pFd;" (assignment_expression "pIncr->aFile[1].pFd = pIncr->aFile[0].pFd" (field_expression "pIncr->aFile[1].pFd" (subscript_expression "pIncr->aFile[1]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier) = (field_expression "pIncr->aFile[0].pFd" (subscript_expression "pIncr->aFile[0]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier)) ;) (expression_statement "pIncr->aFile[1].iEof = iVar2;" (assignment_expression "pIncr->aFile[1].iEof = iVar2" (field_expression "pIncr->aFile[1].iEof" (subscript_expression "pIncr->aFile[1]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier) = identifier) ;) (expression_statement "pIncr->aFile[0].pFd = psVar4;" (assignment_expression "pIncr->aFile[0].pFd = psVar4" (field_expression "pIncr->aFile[0].pFd" (subscript_expression "pIncr->aFile[0]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier) = identifier) ;) (expression_statement "pIncr->aFile[0].iEof = iVar5;" (assignment_expression "pIncr->aFile[0].iEof = iVar5" (field_expression "pIncr->aFile[0].iEof" (subscript_expression "pIncr->aFile[0]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier) = identifier) ;) (goto_statement "goto LAB_0012f701;" goto statement_identifier ;) })) }))) }))))) (labeled_statement "LAB_0012f7cd:\n  vdbePmaReaderClear(pReadr);" statement_identifier : (expression_statement "vdbePmaReaderClear(pReadr);" (call_expression "vdbePmaReaderClear(pReadr)" identifier (argument_list "(pReadr)" ( identifier ))) ;)) (labeled_statement "LAB_0012f7a0:\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar6;\n  }" statement_identifier : (if_statement "if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar6;\n  }" if (parenthesized_expression "(local_20 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_20 == *(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    return iVar6;\n  }" { (return_statement "return iVar6;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "ulong FUN_0012f660(long *param_1)\n\n{\n  undefined8 *puVar1;\n  long *plVar2;\n  undefined8 uVar3;\n  undefined8 uVar4;\n  uint uVar5;\n  ulong uVar6;\n  long in_FS_OFFSET;\n  undefined8 local_30;\n  undefined8 local_28;\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  local_30 = 0;\n  if (*param_1 < param_1[1]) {\nLAB_0012f765:\n    uVar6 = FUN_001213c0(param_1,&local_30);\n    if ((int)uVar6 == 0) {\n      *(int *)((long)param_1 + 0x14) = (int)local_30;\n      if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }\n    }\n    goto LAB_0012f7a0;\n  }\n  puVar1 = (undefined8 *)param_1[9];\n  if (puVar1 == (undefined8 *)0x0) {\nLAB_0012f7cb:\n    uVar5 = 0;\n  }\n  else if (*(int *)(puVar1 + 4) == 0) {\n    uVar5 = FUN_0012f4b0(puVar1);\n    puVar1[5] = puVar1[7];\n    puVar1[6] = puVar1[8];\n    if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }\nLAB_0012f7cd:\n  FUN_0012b950(param_1);\n  uVar6 = (ulong)uVar5;\nLAB_0012f7a0:\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar6;\n  }\n                    \n  __stack_chk_fail();\n}\n\n" (function_definition "ulong FUN_0012f660(long *param_1)\n\n{\n  undefined8 *puVar1;\n  long *plVar2;\n  undefined8 uVar3;\n  undefined8 uVar4;\n  uint uVar5;\n  ulong uVar6;\n  long in_FS_OFFSET;\n  undefined8 local_30;\n  undefined8 local_28;\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  local_30 = 0;\n  if (*param_1 < param_1[1]) {\nLAB_0012f765:\n    uVar6 = FUN_001213c0(param_1,&local_30);\n    if ((int)uVar6 == 0) {\n      *(int *)((long)param_1 + 0x14) = (int)local_30;\n      if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }\n    }\n    goto LAB_0012f7a0;\n  }\n  puVar1 = (undefined8 *)param_1[9];\n  if (puVar1 == (undefined8 *)0x0) {\nLAB_0012f7cb:\n    uVar5 = 0;\n  }\n  else if (*(int *)(puVar1 + 4) == 0) {\n    uVar5 = FUN_0012f4b0(puVar1);\n    puVar1[5] = puVar1[7];\n    puVar1[6] = puVar1[8];\n    if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }\nLAB_0012f7cd:\n  FUN_0012b950(param_1);\n  uVar6 = (ulong)uVar5;\nLAB_0012f7a0:\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar6;\n  }\n                    \n  __stack_chk_fail();\n}" type_identifier (function_declarator "FUN_0012f660(long *param_1)" identifier (parameter_list "(long *param_1)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined8 *puVar1;\n  long *plVar2;\n  undefined8 uVar3;\n  undefined8 uVar4;\n  uint uVar5;\n  ulong uVar6;\n  long in_FS_OFFSET;\n  undefined8 local_30;\n  undefined8 local_28;\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  local_30 = 0;\n  if (*param_1 < param_1[1]) {\nLAB_0012f765:\n    uVar6 = FUN_001213c0(param_1,&local_30);\n    if ((int)uVar6 == 0) {\n      *(int *)((long)param_1 + 0x14) = (int)local_30;\n      if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }\n    }\n    goto LAB_0012f7a0;\n  }\n  puVar1 = (undefined8 *)param_1[9];\n  if (puVar1 == (undefined8 *)0x0) {\nLAB_0012f7cb:\n    uVar5 = 0;\n  }\n  else if (*(int *)(puVar1 + 4) == 0) {\n    uVar5 = FUN_0012f4b0(puVar1);\n    puVar1[5] = puVar1[7];\n    puVar1[6] = puVar1[8];\n    if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }\nLAB_0012f7cd:\n  FUN_0012b950(param_1);\n  uVar6 = (ulong)uVar5;\nLAB_0012f7a0:\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar6;\n  }\n                    \n  __stack_chk_fail();\n}" { (declaration "undefined8 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "long *plVar2;" (sized_type_specifier "long" long) (pointer_declarator "*plVar2" * identifier) ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (declaration "undefined8 uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "ulong uVar6;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 local_30;" type_identifier identifier ;) (declaration "undefined8 local_28;" type_identifier identifier ;) (declaration "long local_20;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_20 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_20 = *(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 "local_30 = 0;" (assignment_expression "local_30 = 0" identifier = number_literal) ;) (if_statement "if (*param_1 < param_1[1]) {\nLAB_0012f765:\n    uVar6 = FUN_001213c0(param_1,&local_30);\n    if ((int)uVar6 == 0) {\n      *(int *)((long)param_1 + 0x14) = (int)local_30;\n      if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }\n    }\n    goto LAB_0012f7a0;\n  }" if (parenthesized_expression "(*param_1 < param_1[1])" ( (binary_expression "*param_1 < param_1[1]" (pointer_expression "*param_1" * identifier) < (subscript_expression "param_1[1]" identifier [ number_literal ])) )) (compound_statement "{\nLAB_0012f765:\n    uVar6 = FUN_001213c0(param_1,&local_30);\n    if ((int)uVar6 == 0) {\n      *(int *)((long)param_1 + 0x14) = (int)local_30;\n      if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }\n    }\n    goto LAB_0012f7a0;\n  }" { (labeled_statement "LAB_0012f765:\n    uVar6 = FUN_001213c0(param_1,&local_30);" statement_identifier : (expression_statement "uVar6 = FUN_001213c0(param_1,&local_30);" (assignment_expression "uVar6 = FUN_001213c0(param_1,&local_30)" identifier = (call_expression "FUN_001213c0(param_1,&local_30)" identifier (argument_list "(param_1,&local_30)" ( identifier , (pointer_expression "&local_30" & identifier) )))) ;)) (if_statement "if ((int)uVar6 == 0) {\n      *(int *)((long)param_1 + 0x14) = (int)local_30;\n      if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }\n    }" if (parenthesized_expression "((int)uVar6 == 0)" ( (binary_expression "(int)uVar6 == 0" (cast_expression "(int)uVar6" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal) )) (compound_statement "{\n      *(int *)((long)param_1 + 0x14) = (int)local_30;\n      if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }\n    }" { (expression_statement "*(int *)((long)param_1 + 0x14) = (int)local_30;" (assignment_expression "*(int *)((long)param_1 + 0x14) = (int)local_30" (pointer_expression "*(int *)((long)param_1 + 0x14)" * (cast_expression "(int *)((long)param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 0x14)" ( (binary_expression "(long)param_1 + 0x14" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = (cast_expression "(int)local_30" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }" if (parenthesized_expression "(param_1[8] == 0)" ( (binary_expression "param_1[8] == 0" (subscript_expression "param_1[8]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }" { (expression_statement "uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);" (assignment_expression "uVar6 = FUN_00121220(param_1,local_30,param_1 + 5)" identifier = (call_expression "FUN_00121220(param_1,local_30,param_1 + 5)" identifier (argument_list "(param_1,local_30,param_1 + 5)" ( identifier , identifier , (binary_expression "param_1 + 5" identifier + number_literal) )))) ;) }) (else_clause "else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }" else (compound_statement "{\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }" { (expression_statement "param_1[5] = param_1[8] + *param_1;" (assignment_expression "param_1[5] = param_1[8] + *param_1" (subscript_expression "param_1[5]" identifier [ number_literal ]) = (binary_expression "param_1[8] + *param_1" (subscript_expression "param_1[8]" identifier [ number_literal ]) + (pointer_expression "*param_1" * identifier))) ;) (expression_statement "*param_1 = (long)(int)local_30 + *param_1;" (assignment_expression "*param_1 = (long)(int)local_30 + *param_1" (pointer_expression "*param_1" * identifier) = (binary_expression "(long)(int)local_30 + *param_1" (cast_expression "(long)(int)local_30" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)local_30" ( (type_descriptor "int" primitive_type) ) identifier)) + (pointer_expression "*param_1" * identifier))) ;) }))) })) (goto_statement "goto LAB_0012f7a0;" goto statement_identifier ;) })) (expression_statement "puVar1 = (undefined8 *)param_1[9];" (assignment_expression "puVar1 = (undefined8 *)param_1[9]" identifier = (cast_expression "(undefined8 *)param_1[9]" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[9]" identifier [ number_literal ]))) ;) (if_statement "if (puVar1 == (undefined8 *)0x0) {\nLAB_0012f7cb:\n    uVar5 = 0;\n  }\n  else if (*(int *)(puVar1 + 4) == 0) {\n    uVar5 = FUN_0012f4b0(puVar1);\n    puVar1[5] = puVar1[7];\n    puVar1[6] = puVar1[8];\n    if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }" if (parenthesized_expression "(puVar1 == (undefined8 *)0x0)" ( (binary_expression "puVar1 == (undefined8 *)0x0" identifier == (cast_expression "(undefined8 *)0x0" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_0012f7cb:\n    uVar5 = 0;\n  }" { (labeled_statement "LAB_0012f7cb:\n    uVar5 = 0;" statement_identifier : (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;)) }) (else_clause "else if (*(int *)(puVar1 + 4) == 0) {\n    uVar5 = FUN_0012f4b0(puVar1);\n    puVar1[5] = puVar1[7];\n    puVar1[6] = puVar1[8];\n    if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }" else (if_statement "if (*(int *)(puVar1 + 4) == 0) {\n    uVar5 = FUN_0012f4b0(puVar1);\n    puVar1[5] = puVar1[7];\n    puVar1[6] = puVar1[8];\n    if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }" if (parenthesized_expression "(*(int *)(puVar1 + 4) == 0)" ( (binary_expression "*(int *)(puVar1 + 4) == 0" (pointer_expression "*(int *)(puVar1 + 4)" * (cast_expression "(int *)(puVar1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 4)" ( (binary_expression "puVar1 + 4" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    uVar5 = FUN_0012f4b0(puVar1);\n    puVar1[5] = puVar1[7];\n    puVar1[6] = puVar1[8];\n    if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }" { (expression_statement "uVar5 = FUN_0012f4b0(puVar1);" (assignment_expression "uVar5 = FUN_0012f4b0(puVar1)" identifier = (call_expression "FUN_0012f4b0(puVar1)" identifier (argument_list "(puVar1)" ( identifier )))) ;) (expression_statement "puVar1[5] = puVar1[7];" (assignment_expression "puVar1[5] = puVar1[7]" (subscript_expression "puVar1[5]" identifier [ number_literal ]) = (subscript_expression "puVar1[7]" identifier [ number_literal ])) ;) (expression_statement "puVar1[6] = puVar1[8];" (assignment_expression "puVar1[6] = puVar1[8]" (subscript_expression "puVar1[6]" identifier [ number_literal ]) = (subscript_expression "puVar1[8]" identifier [ number_literal ])) ;) (if_statement "if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }" if (parenthesized_expression "(puVar1[6] == puVar1[2])" ( (binary_expression "puVar1[6] == puVar1[2]" (subscript_expression "puVar1[6]" identifier [ number_literal ]) == (subscript_expression "puVar1[2]" identifier [ number_literal ])) )) (compound_statement "{\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }" { (expression_statement "*(undefined4 *)((long)puVar1 + 0x1c) = 1;" (assignment_expression "*(undefined4 *)((long)puVar1 + 0x1c) = 1" (pointer_expression "*(undefined4 *)((long)puVar1 + 0x1c)" * (cast_expression "(undefined4 *)((long)puVar1 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar1 + 0x1c)" ( (binary_expression "(long)puVar1 + 0x1c" (cast_expression "(long)puVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (if_statement "if (uVar5 != 0) goto LAB_0012f7cd;" if (parenthesized_expression "(uVar5 != 0)" ( (binary_expression "uVar5 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0012f7cd;" goto statement_identifier ;)) (goto_statement "goto LAB_0012f7cb;" goto statement_identifier ;) })) (labeled_statement "LAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }" statement_identifier : (if_statement "if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }" if (parenthesized_expression "(uVar5 == 0)" ( (binary_expression "uVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }" { (if_statement "if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }" if (parenthesized_expression "(*(int *)((long)puVar1 + 0x1c) == 0)" ( (binary_expression "*(int *)((long)puVar1 + 0x1c) == 0" (pointer_expression "*(int *)((long)puVar1 + 0x1c)" * (cast_expression "(int *)((long)puVar1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar1 + 0x1c)" ( (binary_expression "(long)puVar1 + 0x1c" (cast_expression "(long)puVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) == number_literal) )) (compound_statement "{\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }" { (expression_statement "uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);" (assignment_expression "uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2])" identifier = (call_expression "FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2])" identifier (argument_list "(*puVar1,param_1,puVar1 + 5,puVar1[2])" ( (pointer_expression "*puVar1" * identifier) , identifier , (binary_expression "puVar1 + 5" identifier + number_literal) , (subscript_expression "puVar1[2]" identifier [ number_literal ]) )))) ;) (if_statement "if ((int)uVar6 != 0) goto LAB_0012f7a0;" if (parenthesized_expression "((int)uVar6 != 0)" ( (binary_expression "(int)uVar6 != 0" (cast_expression "(int)uVar6" ( (type_descriptor "int" primitive_type) ) identifier) != number_literal) )) (goto_statement "goto LAB_0012f7a0;" goto statement_identifier ;)) (goto_statement "goto LAB_0012f765;" goto statement_identifier ;) })) (goto_statement "goto LAB_0012f7cb;" goto statement_identifier ;) }))) }) (else_clause "else {\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }" else (compound_statement "{\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }" { (expression_statement "plVar2 = (long *)*puVar1;" (assignment_expression "plVar2 = (long *)*puVar1" identifier = (cast_expression "(long *)*puVar1" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar1" * identifier))) ;) (if_statement "if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }" if (parenthesized_expression "(*plVar2 == 0)" ( (binary_expression "*plVar2 == 0" (pointer_expression "*plVar2" * identifier) == number_literal) )) (compound_statement "{\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }" { (expression_statement "uVar4 = puVar1[7];" (assignment_expression "uVar4 = puVar1[7]" identifier = (subscript_expression "puVar1[7]" identifier [ number_literal ])) ;) (expression_statement "uVar3 = puVar1[6];" (assignment_expression "uVar3 = puVar1[6]" identifier = (subscript_expression "puVar1[6]" identifier [ number_literal ])) ;) (expression_statement "puVar1[7] = puVar1[5];" (assignment_expression "puVar1[7] = puVar1[5]" (subscript_expression "puVar1[7]" identifier [ number_literal ]) = (subscript_expression "puVar1[5]" identifier [ number_literal ])) ;) (expression_statement "puVar1[5] = uVar4;" (assignment_expression "puVar1[5] = uVar4" (subscript_expression "puVar1[5]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[6] = puVar1[8];" (assignment_expression "puVar1[6] = puVar1[8]" (subscript_expression "puVar1[6]" identifier [ number_literal ]) = (subscript_expression "puVar1[8]" identifier [ number_literal ])) ;) (expression_statement "puVar1[8] = uVar3;" (assignment_expression "puVar1[8] = uVar3" (subscript_expression "puVar1[8]" identifier [ number_literal ]) = identifier) ;) (labeled_statement "LAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }" statement_identifier : (if_statement "if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }" if (parenthesized_expression "(puVar1[6] != puVar1[2])" ( (binary_expression "puVar1[6] != puVar1[2]" (subscript_expression "puVar1[6]" identifier [ number_literal ]) != (subscript_expression "puVar1[2]" identifier [ number_literal ])) )) (compound_statement "{\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }" { (expression_statement "uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);" (assignment_expression "uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1)" identifier = (call_expression "FUN_00119d50(*puVar1,FUN_0012fb70,puVar1)" identifier (argument_list "(*puVar1,FUN_0012fb70,puVar1)" ( (pointer_expression "*puVar1" * identifier) , identifier , identifier )))) ;) (goto_statement "goto LAB_0012f73f;" goto statement_identifier ;) }))) (expression_statement "*(undefined4 *)((long)puVar1 + 0x1c) = 1;" (assignment_expression "*(undefined4 *)((long)puVar1 + 0x1c) = 1" (pointer_expression "*(undefined4 *)((long)puVar1 + 0x1c)" * (cast_expression "(undefined4 *)((long)puVar1 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar1 + 0x1c)" ( (binary_expression "(long)puVar1 + 0x1c" (cast_expression "(long)puVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }" else (compound_statement "{\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }" { (expression_statement "local_28 = 1;" (assignment_expression "local_28 = 1" identifier = number_literal) ;) (expression_statement "FUN_0012b850(*plVar2,&local_28);" (call_expression "FUN_0012b850(*plVar2,&local_28)" identifier (argument_list "(*plVar2,&local_28)" ( (pointer_expression "*plVar2" * identifier) , (pointer_expression "&local_28" & identifier) ))) ;) (expression_statement "*(undefined4 *)(plVar2 + 1) = 0;" (assignment_expression "*(undefined4 *)(plVar2 + 1) = 0" (pointer_expression "*(undefined4 *)(plVar2 + 1)" * (cast_expression "(undefined4 *)(plVar2 + 1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(plVar2 + 1)" ( (binary_expression "plVar2 + 1" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*plVar2 = 0;" (assignment_expression "*plVar2 = 0" (pointer_expression "*plVar2" * identifier) = number_literal) ;) (expression_statement "uVar5 = (uint)local_28;" (assignment_expression "uVar5 = (uint)local_28" identifier = (cast_expression "(uint)local_28" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (if_statement "if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }" if (parenthesized_expression "(uVar5 == 0)" ( (binary_expression "uVar5 == 0" identifier == number_literal) )) (compound_statement "{\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }" { (expression_statement "uVar3 = puVar1[7];" (assignment_expression "uVar3 = puVar1[7]" identifier = (subscript_expression "puVar1[7]" identifier [ number_literal ])) ;) (expression_statement "uVar4 = puVar1[8];" (assignment_expression "uVar4 = puVar1[8]" identifier = (subscript_expression "puVar1[8]" identifier [ number_literal ])) ;) (expression_statement "puVar1[7] = puVar1[5];" (assignment_expression "puVar1[7] = puVar1[5]" (subscript_expression "puVar1[7]" identifier [ number_literal ]) = (subscript_expression "puVar1[5]" identifier [ number_literal ])) ;) (expression_statement "puVar1[8] = puVar1[6];" (assignment_expression "puVar1[8] = puVar1[6]" (subscript_expression "puVar1[8]" identifier [ number_literal ]) = (subscript_expression "puVar1[6]" identifier [ number_literal ])) ;) (expression_statement "puVar1[5] = uVar3;" (assignment_expression "puVar1[5] = uVar3" (subscript_expression "puVar1[5]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[6] = uVar4;" (assignment_expression "puVar1[6] = uVar4" (subscript_expression "puVar1[6]" identifier [ number_literal ]) = identifier) ;) (goto_statement "goto LAB_0012f701;" goto statement_identifier ;) })) }))) }))))) (labeled_statement "LAB_0012f7cd:\n  FUN_0012b950(param_1);" statement_identifier : (expression_statement "FUN_0012b950(param_1);" (call_expression "FUN_0012b950(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;)) (expression_statement "uVar6 = (ulong)uVar5;" (assignment_expression "uVar6 = (ulong)uVar5" identifier = (cast_expression "(ulong)uVar5" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) (labeled_statement "LAB_0012f7a0:\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar6;\n  }" statement_identifier : (if_statement "if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar6;\n  }" if (parenthesized_expression "(local_20 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_20 == *(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    return uVar6;\n  }" { (return_statement "return uVar6;" return identifier ;) }))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE 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 IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) < (subscript_expression IDENT [ LIT ])) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) )))) ;)) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT + LIT) )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) + (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)) + (pointer_expression * IDENT))) ;) }))) })) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (subscript_expression IDENT [ LIT ])) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) )))) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (goto_statement goto statement_identifier ;) })) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , IDENT , (binary_expression IDENT + LIT) , (subscript_expression IDENT [ LIT ]) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) != LIT) )) (goto_statement goto statement_identifier ;)) (goto_statement goto statement_identifier ;) })) (goto_statement goto statement_identifier ;) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != (subscript_expression IDENT [ LIT ])) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , IDENT , IDENT )))) ;) (goto_statement goto statement_identifier ;) }))) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , (pointer_expression & IDENT) ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (goto_statement goto statement_identifier ;) })) }))) }))))) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (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 { (return_statement return IDENT ;) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "ulong FUN_0012f660(long *param_1)\n\n{\n  undefined8 *puVar1;\n  long *plVar2;\n  undefined8 uVar3;\n  undefined8 uVar4;\n  uint uVar5;\n  ulong uVar6;\n  long in_FS_OFFSET;\n  undefined8 local_30;\n  undefined8 local_28;\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  local_30 = 0;\n  if (*param_1 < param_1[1]) {\nLAB_0012f765:\n    uVar6 = FUN_001213c0(param_1,&local_30);\n    if ((int)uVar6 == 0) {\n      *(int *)((long)param_1 + 0x14) = (int)local_30;\n      if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }\n    }\n    goto LAB_0012f7a0;\n  }\n  puVar1 = (undefined8 *)param_1[9];\n  if (puVar1 == (undefined8 *)0x0) {\nLAB_0012f7cb:\n    uVar5 = 0;\n  }\n  else if (*(int *)(puVar1 + 4) == 0) {\n    uVar5 = FUN_0012f4b0(puVar1);\n    puVar1[5] = puVar1[7];\n    puVar1[6] = puVar1[8];\n    if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }\nLAB_0012f7cd:\n  FUN_0012b950(param_1);\n  uVar6 = (ulong)uVar5;\nLAB_0012f7a0:\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar6;\n  }\n                    \n  __stack_chk_fail();\n}" (type_identifier "ulong") (function_declarator "FUN_0012f660(long *param_1)" (identifier "FUN_0012f660") (parameter_list "(long *param_1)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  undefined8 *puVar1;\n  long *plVar2;\n  undefined8 uVar3;\n  undefined8 uVar4;\n  uint uVar5;\n  ulong uVar6;\n  long in_FS_OFFSET;\n  undefined8 local_30;\n  undefined8 local_28;\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  local_30 = 0;\n  if (*param_1 < param_1[1]) {\nLAB_0012f765:\n    uVar6 = FUN_001213c0(param_1,&local_30);\n    if ((int)uVar6 == 0) {\n      *(int *)((long)param_1 + 0x14) = (int)local_30;\n      if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }\n    }\n    goto LAB_0012f7a0;\n  }\n  puVar1 = (undefined8 *)param_1[9];\n  if (puVar1 == (undefined8 *)0x0) {\nLAB_0012f7cb:\n    uVar5 = 0;\n  }\n  else if (*(int *)(puVar1 + 4) == 0) {\n    uVar5 = FUN_0012f4b0(puVar1);\n    puVar1[5] = puVar1[7];\n    puVar1[6] = puVar1[8];\n    if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }\nLAB_0012f7cd:\n  FUN_0012b950(param_1);\n  uVar6 = (ulong)uVar5;\nLAB_0012f7a0:\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar6;\n  }\n                    \n  __stack_chk_fail();\n}" ({ "{") (declaration "undefined8 *puVar1;" (type_identifier "undefined8") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "long *plVar2;" (sized_type_specifier "long" (long "long")) (pointer_declarator "*plVar2" (* "*") (identifier "plVar2")) (; ";")) (declaration "undefined8 uVar3;" (type_identifier "undefined8") (identifier "uVar3") (; ";")) (declaration "undefined8 uVar4;" (type_identifier "undefined8") (identifier "uVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "ulong uVar6;" (type_identifier "ulong") (identifier "uVar6") (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "undefined8 local_30;" (type_identifier "undefined8") (identifier "local_30") (; ";")) (declaration "undefined8 local_28;" (type_identifier "undefined8") (identifier "local_28") (; ";")) (declaration "long local_20;" (sized_type_specifier "long" (long "long")) (identifier "local_20") (; ";")) (expression_statement "local_20 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_20 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_20") (= "=") (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 "local_30 = 0;" (assignment_expression "local_30 = 0" (identifier "local_30") (= "=") (number_literal "0")) (; ";")) (if_statement "if (*param_1 < param_1[1]) {\nLAB_0012f765:\n    uVar6 = FUN_001213c0(param_1,&local_30);\n    if ((int)uVar6 == 0) {\n      *(int *)((long)param_1 + 0x14) = (int)local_30;\n      if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }\n    }\n    goto LAB_0012f7a0;\n  }" (if "if") (parenthesized_expression "(*param_1 < param_1[1])" (( "(") (binary_expression "*param_1 < param_1[1]" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (< "<") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) () ")")) (compound_statement "{\nLAB_0012f765:\n    uVar6 = FUN_001213c0(param_1,&local_30);\n    if ((int)uVar6 == 0) {\n      *(int *)((long)param_1 + 0x14) = (int)local_30;\n      if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }\n    }\n    goto LAB_0012f7a0;\n  }" ({ "{") (labeled_statement "LAB_0012f765:\n    uVar6 = FUN_001213c0(param_1,&local_30);" (statement_identifier "LAB_0012f765") (: ":") (expression_statement "uVar6 = FUN_001213c0(param_1,&local_30);" (assignment_expression "uVar6 = FUN_001213c0(param_1,&local_30)" (identifier "uVar6") (= "=") (call_expression "FUN_001213c0(param_1,&local_30)" (identifier "FUN_001213c0") (argument_list "(param_1,&local_30)" (( "(") (identifier "param_1") (, ",") (pointer_expression "&local_30" (& "&") (identifier "local_30")) () ")")))) (; ";"))) (if_statement "if ((int)uVar6 == 0) {\n      *(int *)((long)param_1 + 0x14) = (int)local_30;\n      if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }\n    }" (if "if") (parenthesized_expression "((int)uVar6 == 0)" (( "(") (binary_expression "(int)uVar6 == 0" (cast_expression "(int)uVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar6")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      *(int *)((long)param_1 + 0x14) = (int)local_30;\n      if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }\n    }" ({ "{") (expression_statement "*(int *)((long)param_1 + 0x14) = (int)local_30;" (assignment_expression "*(int *)((long)param_1 + 0x14) = (int)local_30" (pointer_expression "*(int *)((long)param_1 + 0x14)" (* "*") (cast_expression "(int *)((long)param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)param_1 + 0x14)" (( "(") (binary_expression "(long)param_1 + 0x14" (cast_expression "(long)param_1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_1")) (+ "+") (number_literal "0x14")) () ")")))) (= "=") (cast_expression "(int)local_30" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_30"))) (; ";")) (if_statement "if (param_1[8] == 0) {\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }\n      else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }" (if "if") (parenthesized_expression "(param_1[8] == 0)" (( "(") (binary_expression "param_1[8] == 0" (subscript_expression "param_1[8]" (identifier "param_1") ([ "[") (number_literal "8") (] "]")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);\n      }" ({ "{") (expression_statement "uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);" (assignment_expression "uVar6 = FUN_00121220(param_1,local_30,param_1 + 5)" (identifier "uVar6") (= "=") (call_expression "FUN_00121220(param_1,local_30,param_1 + 5)" (identifier "FUN_00121220") (argument_list "(param_1,local_30,param_1 + 5)" (( "(") (identifier "param_1") (, ",") (identifier "local_30") (, ",") (binary_expression "param_1 + 5" (identifier "param_1") (+ "+") (number_literal "5")) () ")")))) (; ";")) (} "}")) (else_clause "else {\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }" (else "else") (compound_statement "{\n        param_1[5] = param_1[8] + *param_1;\n        *param_1 = (long)(int)local_30 + *param_1;\n      }" ({ "{") (expression_statement "param_1[5] = param_1[8] + *param_1;" (assignment_expression "param_1[5] = param_1[8] + *param_1" (subscript_expression "param_1[5]" (identifier "param_1") ([ "[") (number_literal "5") (] "]")) (= "=") (binary_expression "param_1[8] + *param_1" (subscript_expression "param_1[8]" (identifier "param_1") ([ "[") (number_literal "8") (] "]")) (+ "+") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "*param_1 = (long)(int)local_30 + *param_1;" (assignment_expression "*param_1 = (long)(int)local_30 + *param_1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (binary_expression "(long)(int)local_30 + *param_1" (cast_expression "(long)(int)local_30" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)local_30" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_30"))) (+ "+") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (} "}")))) (} "}"))) (goto_statement "goto LAB_0012f7a0;" (goto "goto") (statement_identifier "LAB_0012f7a0") (; ";")) (} "}"))) (expression_statement "puVar1 = (undefined8 *)param_1[9];" (assignment_expression "puVar1 = (undefined8 *)param_1[9]" (identifier "puVar1") (= "=") (cast_expression "(undefined8 *)param_1[9]" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[9]" (identifier "param_1") ([ "[") (number_literal "9") (] "]")))) (; ";")) (if_statement "if (puVar1 == (undefined8 *)0x0) {\nLAB_0012f7cb:\n    uVar5 = 0;\n  }\n  else if (*(int *)(puVar1 + 4) == 0) {\n    uVar5 = FUN_0012f4b0(puVar1);\n    puVar1[5] = puVar1[7];\n    puVar1[6] = puVar1[8];\n    if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }" (if "if") (parenthesized_expression "(puVar1 == (undefined8 *)0x0)" (( "(") (binary_expression "puVar1 == (undefined8 *)0x0" (identifier "puVar1") (== "==") (cast_expression "(undefined8 *)0x0" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\nLAB_0012f7cb:\n    uVar5 = 0;\n  }" ({ "{") (labeled_statement "LAB_0012f7cb:\n    uVar5 = 0;" (statement_identifier "LAB_0012f7cb") (: ":") (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";"))) (} "}")) (else_clause "else if (*(int *)(puVar1 + 4) == 0) {\n    uVar5 = FUN_0012f4b0(puVar1);\n    puVar1[5] = puVar1[7];\n    puVar1[6] = puVar1[8];\n    if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }" (else "else") (if_statement "if (*(int *)(puVar1 + 4) == 0) {\n    uVar5 = FUN_0012f4b0(puVar1);\n    puVar1[5] = puVar1[7];\n    puVar1[6] = puVar1[8];\n    if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }\n  else {\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }" (if "if") (parenthesized_expression "(*(int *)(puVar1 + 4) == 0)" (( "(") (binary_expression "*(int *)(puVar1 + 4) == 0" (pointer_expression "*(int *)(puVar1 + 4)" (* "*") (cast_expression "(int *)(puVar1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 4)" (( "(") (binary_expression "puVar1 + 4" (identifier "puVar1") (+ "+") (number_literal "4")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar5 = FUN_0012f4b0(puVar1);\n    puVar1[5] = puVar1[7];\n    puVar1[6] = puVar1[8];\n    if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }\nLAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }\n  }" ({ "{") (expression_statement "uVar5 = FUN_0012f4b0(puVar1);" (assignment_expression "uVar5 = FUN_0012f4b0(puVar1)" (identifier "uVar5") (= "=") (call_expression "FUN_0012f4b0(puVar1)" (identifier "FUN_0012f4b0") (argument_list "(puVar1)" (( "(") (identifier "puVar1") () ")")))) (; ";")) (expression_statement "puVar1[5] = puVar1[7];" (assignment_expression "puVar1[5] = puVar1[7]" (subscript_expression "puVar1[5]" (identifier "puVar1") ([ "[") (number_literal "5") (] "]")) (= "=") (subscript_expression "puVar1[7]" (identifier "puVar1") ([ "[") (number_literal "7") (] "]"))) (; ";")) (expression_statement "puVar1[6] = puVar1[8];" (assignment_expression "puVar1[6] = puVar1[8]" (subscript_expression "puVar1[6]" (identifier "puVar1") ([ "[") (number_literal "6") (] "]")) (= "=") (subscript_expression "puVar1[8]" (identifier "puVar1") ([ "[") (number_literal "8") (] "]"))) (; ";")) (if_statement "if (puVar1[6] == puVar1[2]) {\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }" (if "if") (parenthesized_expression "(puVar1[6] == puVar1[2])" (( "(") (binary_expression "puVar1[6] == puVar1[2]" (subscript_expression "puVar1[6]" (identifier "puVar1") ([ "[") (number_literal "6") (] "]")) (== "==") (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]"))) () ")")) (compound_statement "{\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      if (uVar5 != 0) goto LAB_0012f7cd;\n      goto LAB_0012f7cb;\n    }" ({ "{") (expression_statement "*(undefined4 *)((long)puVar1 + 0x1c) = 1;" (assignment_expression "*(undefined4 *)((long)puVar1 + 0x1c) = 1" (pointer_expression "*(undefined4 *)((long)puVar1 + 0x1c)" (* "*") (cast_expression "(undefined4 *)((long)puVar1 + 0x1c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)puVar1 + 0x1c)" (( "(") (binary_expression "(long)puVar1 + 0x1c" (cast_expression "(long)puVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "puVar1")) (+ "+") (number_literal "0x1c")) () ")")))) (= "=") (number_literal "1")) (; ";")) (if_statement "if (uVar5 != 0) goto LAB_0012f7cd;" (if "if") (parenthesized_expression "(uVar5 != 0)" (( "(") (binary_expression "uVar5 != 0" (identifier "uVar5") (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_0012f7cd;" (goto "goto") (statement_identifier "LAB_0012f7cd") (; ";"))) (goto_statement "goto LAB_0012f7cb;" (goto "goto") (statement_identifier "LAB_0012f7cb") (; ";")) (} "}"))) (labeled_statement "LAB_0012f73f:\n    if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }" (statement_identifier "LAB_0012f73f") (: ":") (if_statement "if (uVar5 == 0) {\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }" (if "if") (parenthesized_expression "(uVar5 == 0)" (( "(") (binary_expression "uVar5 == 0" (identifier "uVar5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }\n      goto LAB_0012f7cb;\n    }" ({ "{") (if_statement "if (*(int *)((long)puVar1 + 0x1c) == 0) {\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }" (if "if") (parenthesized_expression "(*(int *)((long)puVar1 + 0x1c) == 0)" (( "(") (binary_expression "*(int *)((long)puVar1 + 0x1c) == 0" (pointer_expression "*(int *)((long)puVar1 + 0x1c)" (* "*") (cast_expression "(int *)((long)puVar1 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)puVar1 + 0x1c)" (( "(") (binary_expression "(long)puVar1 + 0x1c" (cast_expression "(long)puVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "puVar1")) (+ "+") (number_literal "0x1c")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);\n        if ((int)uVar6 != 0) goto LAB_0012f7a0;\n        goto LAB_0012f765;\n      }" ({ "{") (expression_statement "uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);" (assignment_expression "uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2])" (identifier "uVar6") (= "=") (call_expression "FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2])" (identifier "FUN_00119bf0") (argument_list "(*puVar1,param_1,puVar1 + 5,puVar1[2])" (( "(") (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (, ",") (identifier "param_1") (, ",") (binary_expression "puVar1 + 5" (identifier "puVar1") (+ "+") (number_literal "5")) (, ",") (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")) () ")")))) (; ";")) (if_statement "if ((int)uVar6 != 0) goto LAB_0012f7a0;" (if "if") (parenthesized_expression "((int)uVar6 != 0)" (( "(") (binary_expression "(int)uVar6 != 0" (cast_expression "(int)uVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar6")) (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_0012f7a0;" (goto "goto") (statement_identifier "LAB_0012f7a0") (; ";"))) (goto_statement "goto LAB_0012f765;" (goto "goto") (statement_identifier "LAB_0012f765") (; ";")) (} "}"))) (goto_statement "goto LAB_0012f7cb;" (goto "goto") (statement_identifier "LAB_0012f7cb") (; ";")) (} "}")))) (} "}")) (else_clause "else {\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }" (else "else") (compound_statement "{\n    plVar2 = (long *)*puVar1;\n    if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }\n  }" ({ "{") (expression_statement "plVar2 = (long *)*puVar1;" (assignment_expression "plVar2 = (long *)*puVar1" (identifier "plVar2") (= "=") (cast_expression "(long *)*puVar1" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar1" (* "*") (identifier "puVar1")))) (; ";")) (if_statement "if (*plVar2 == 0) {\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }\n    else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }" (if "if") (parenthesized_expression "(*plVar2 == 0)" (( "(") (binary_expression "*plVar2 == 0" (pointer_expression "*plVar2" (* "*") (identifier "plVar2")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar4 = puVar1[7];\n      uVar3 = puVar1[6];\n      puVar1[7] = puVar1[5];\n      puVar1[5] = uVar4;\n      puVar1[6] = puVar1[8];\n      puVar1[8] = uVar3;\nLAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }\n      *(undefined4 *)((long)puVar1 + 0x1c) = 1;\n      uVar5 = 0;\n    }" ({ "{") (expression_statement "uVar4 = puVar1[7];" (assignment_expression "uVar4 = puVar1[7]" (identifier "uVar4") (= "=") (subscript_expression "puVar1[7]" (identifier "puVar1") ([ "[") (number_literal "7") (] "]"))) (; ";")) (expression_statement "uVar3 = puVar1[6];" (assignment_expression "uVar3 = puVar1[6]" (identifier "uVar3") (= "=") (subscript_expression "puVar1[6]" (identifier "puVar1") ([ "[") (number_literal "6") (] "]"))) (; ";")) (expression_statement "puVar1[7] = puVar1[5];" (assignment_expression "puVar1[7] = puVar1[5]" (subscript_expression "puVar1[7]" (identifier "puVar1") ([ "[") (number_literal "7") (] "]")) (= "=") (subscript_expression "puVar1[5]" (identifier "puVar1") ([ "[") (number_literal "5") (] "]"))) (; ";")) (expression_statement "puVar1[5] = uVar4;" (assignment_expression "puVar1[5] = uVar4" (subscript_expression "puVar1[5]" (identifier "puVar1") ([ "[") (number_literal "5") (] "]")) (= "=") (identifier "uVar4")) (; ";")) (expression_statement "puVar1[6] = puVar1[8];" (assignment_expression "puVar1[6] = puVar1[8]" (subscript_expression "puVar1[6]" (identifier "puVar1") ([ "[") (number_literal "6") (] "]")) (= "=") (subscript_expression "puVar1[8]" (identifier "puVar1") ([ "[") (number_literal "8") (] "]"))) (; ";")) (expression_statement "puVar1[8] = uVar3;" (assignment_expression "puVar1[8] = uVar3" (subscript_expression "puVar1[8]" (identifier "puVar1") ([ "[") (number_literal "8") (] "]")) (= "=") (identifier "uVar3")) (; ";")) (labeled_statement "LAB_0012f701:\n      if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }" (statement_identifier "LAB_0012f701") (: ":") (if_statement "if (puVar1[6] != puVar1[2]) {\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }" (if "if") (parenthesized_expression "(puVar1[6] != puVar1[2])" (( "(") (binary_expression "puVar1[6] != puVar1[2]" (subscript_expression "puVar1[6]" (identifier "puVar1") ([ "[") (number_literal "6") (] "]")) (!= "!=") (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]"))) () ")")) (compound_statement "{\n        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);\n        goto LAB_0012f73f;\n      }" ({ "{") (expression_statement "uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);" (assignment_expression "uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1)" (identifier "uVar5") (= "=") (call_expression "FUN_00119d50(*puVar1,FUN_0012fb70,puVar1)" (identifier "FUN_00119d50") (argument_list "(*puVar1,FUN_0012fb70,puVar1)" (( "(") (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (, ",") (identifier "FUN_0012fb70") (, ",") (identifier "puVar1") () ")")))) (; ";")) (goto_statement "goto LAB_0012f73f;" (goto "goto") (statement_identifier "LAB_0012f73f") (; ";")) (} "}")))) (expression_statement "*(undefined4 *)((long)puVar1 + 0x1c) = 1;" (assignment_expression "*(undefined4 *)((long)puVar1 + 0x1c) = 1" (pointer_expression "*(undefined4 *)((long)puVar1 + 0x1c)" (* "*") (cast_expression "(undefined4 *)((long)puVar1 + 0x1c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)puVar1 + 0x1c)" (( "(") (binary_expression "(long)puVar1 + 0x1c" (cast_expression "(long)puVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "puVar1")) (+ "+") (number_literal "0x1c")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }" (else "else") (compound_statement "{\n      local_28 = 1;\n      FUN_0012b850(*plVar2,&local_28);\n      *(undefined4 *)(plVar2 + 1) = 0;\n      *plVar2 = 0;\n      uVar5 = (uint)local_28;\n      if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }\n    }" ({ "{") (expression_statement "local_28 = 1;" (assignment_expression "local_28 = 1" (identifier "local_28") (= "=") (number_literal "1")) (; ";")) (expression_statement "FUN_0012b850(*plVar2,&local_28);" (call_expression "FUN_0012b850(*plVar2,&local_28)" (identifier "FUN_0012b850") (argument_list "(*plVar2,&local_28)" (( "(") (pointer_expression "*plVar2" (* "*") (identifier "plVar2")) (, ",") (pointer_expression "&local_28" (& "&") (identifier "local_28")) () ")"))) (; ";")) (expression_statement "*(undefined4 *)(plVar2 + 1) = 0;" (assignment_expression "*(undefined4 *)(plVar2 + 1) = 0" (pointer_expression "*(undefined4 *)(plVar2 + 1)" (* "*") (cast_expression "(undefined4 *)(plVar2 + 1)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(plVar2 + 1)" (( "(") (binary_expression "plVar2 + 1" (identifier "plVar2") (+ "+") (number_literal "1")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*plVar2 = 0;" (assignment_expression "*plVar2 = 0" (pointer_expression "*plVar2" (* "*") (identifier "plVar2")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar5 = (uint)local_28;" (assignment_expression "uVar5 = (uint)local_28" (identifier "uVar5") (= "=") (cast_expression "(uint)local_28" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "local_28"))) (; ";")) (if_statement "if (uVar5 == 0) {\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }" (if "if") (parenthesized_expression "(uVar5 == 0)" (( "(") (binary_expression "uVar5 == 0" (identifier "uVar5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        uVar3 = puVar1[7];\n        uVar4 = puVar1[8];\n        puVar1[7] = puVar1[5];\n        puVar1[8] = puVar1[6];\n        puVar1[5] = uVar3;\n        puVar1[6] = uVar4;\n        goto LAB_0012f701;\n      }" ({ "{") (expression_statement "uVar3 = puVar1[7];" (assignment_expression "uVar3 = puVar1[7]" (identifier "uVar3") (= "=") (subscript_expression "puVar1[7]" (identifier "puVar1") ([ "[") (number_literal "7") (] "]"))) (; ";")) (expression_statement "uVar4 = puVar1[8];" (assignment_expression "uVar4 = puVar1[8]" (identifier "uVar4") (= "=") (subscript_expression "puVar1[8]" (identifier "puVar1") ([ "[") (number_literal "8") (] "]"))) (; ";")) (expression_statement "puVar1[7] = puVar1[5];" (assignment_expression "puVar1[7] = puVar1[5]" (subscript_expression "puVar1[7]" (identifier "puVar1") ([ "[") (number_literal "7") (] "]")) (= "=") (subscript_expression "puVar1[5]" (identifier "puVar1") ([ "[") (number_literal "5") (] "]"))) (; ";")) (expression_statement "puVar1[8] = puVar1[6];" (assignment_expression "puVar1[8] = puVar1[6]" (subscript_expression "puVar1[8]" (identifier "puVar1") ([ "[") (number_literal "8") (] "]")) (= "=") (subscript_expression "puVar1[6]" (identifier "puVar1") ([ "[") (number_literal "6") (] "]"))) (; ";")) (expression_statement "puVar1[5] = uVar3;" (assignment_expression "puVar1[5] = uVar3" (subscript_expression "puVar1[5]" (identifier "puVar1") ([ "[") (number_literal "5") (] "]")) (= "=") (identifier "uVar3")) (; ";")) (expression_statement "puVar1[6] = uVar4;" (assignment_expression "puVar1[6] = uVar4" (subscript_expression "puVar1[6]" (identifier "puVar1") ([ "[") (number_literal "6") (] "]")) (= "=") (identifier "uVar4")) (; ";")) (goto_statement "goto LAB_0012f701;" (goto "goto") (statement_identifier "LAB_0012f701") (; ";")) (} "}"))) (} "}")))) (} "}")))))) (labeled_statement "LAB_0012f7cd:\n  FUN_0012b950(param_1);" (statement_identifier "LAB_0012f7cd") (: ":") (expression_statement "FUN_0012b950(param_1);" (call_expression "FUN_0012b950(param_1)" (identifier "FUN_0012b950") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";"))) (expression_statement "uVar6 = (ulong)uVar5;" (assignment_expression "uVar6 = (ulong)uVar5" (identifier "uVar6") (= "=") (cast_expression "(ulong)uVar5" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar5"))) (; ";")) (labeled_statement "LAB_0012f7a0:\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar6;\n  }" (statement_identifier "LAB_0012f7a0") (: ":") (if_statement "if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar6;\n  }" (if "if") (parenthesized_expression "(local_20 == *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_20 == *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_20") (== "==") (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    return uVar6;\n  }" ({ "{") (return_statement "return uVar6;" (return "return") (identifier "uVar6") (; ";")) (} "}")))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

int function_1(type_1 *pReadr)

{
  type_2 *var_5;
  type_3 *pSVar1;
  type_4 iVar2;
  long var_7;
  type_5 *psVar4;
  type_4 iVar5;
  int var_3;
  int nByte;
  long var_1;
  type_6 nRec;
  void *pRet;
  long var_12;
  
  var_12 = *(long *)(var_1 + 0x28);
  nRec = 0;
  if (pReadr->iReadOff < pReadr->iEof) {
LAB_0012f765:
    var_3 = var_2(pReadr,&nRec);
    if (var_3 == 0) {
      nByte = (int)nRec;
      pReadr->nKey = nByte;
      if (pReadr->aMap == (type_7 *)0x0) {
        var_3 = var_4(pReadr,nByte,&pReadr->aKey);
      }
      else {
        pReadr->aKey = pReadr->aMap + pReadr->iReadOff;
        pReadr->iReadOff = (long)nByte + pReadr->iReadOff;
      }
    }
    goto LAB_0012f7a0;
  }
  var_5 = pReadr->var_5;
  if (var_5 == (type_2 *)0x0) {
LAB_0012f7cb:
    var_3 = 0;
  }
  else if (var_5->bUseThread == 0) {
    var_3 = var_6(var_5);
    iVar2 = var_5->aFile[1].iEof;
    var_7 = var_5->iStartOff;
    var_5->aFile[0].pFd = var_5->aFile[1].pFd;
    var_5->aFile[0].iEof = iVar2;
    if (var_5->aFile[0].iEof == var_7) {
      var_5->bEof = 1;
      if (var_3 != 0) goto LAB_0012f7cd;
      goto LAB_0012f7cb;
    }
LAB_0012f73f:
    if (var_3 == 0) {
      if (var_5->bEof == 0) {
        var_3 = var_8(var_5->pTask,pReadr,var_5->aFile,var_5->iStartOff);
        if (var_3 != 0) goto LAB_0012f7a0;
        goto LAB_0012f765;
      }
      goto LAB_0012f7cb;
    }
  }
  else {
    pSVar1 = var_5->pTask;
    if (pSVar1->pThread == (type_8 *)0x0) {
      psVar4 = var_5->aFile[1].pFd;
      iVar5 = var_5->aFile[1].iEof;
      iVar2 = var_5->aFile[0].iEof;
      var_5->aFile[1].pFd = var_5->aFile[0].pFd;
      var_5->aFile[0].pFd = psVar4;
      var_5->aFile[0].iEof = iVar5;
      var_5->aFile[1].iEof = iVar2;
LAB_0012f701:
      if (var_5->aFile[0].iEof != var_5->iStartOff) {
        var_3 = var_9(&var_5->pTask->pThread,vdbeIncrPopulateThread,var_5);
        goto LAB_0012f73f;
      }
      var_5->bEof = 1;
      var_3 = 0;
    }
    else {
      pRet = (void *)0x1;
      var_10(pSVar1->pThread,&pRet);
      pSVar1->bDone = 0;
      pSVar1->pThread = (type_8 *)0x0;
      var_3 = (int)pRet;
      if (var_3 == 0) {
        iVar2 = var_5->aFile[0].iEof;
        psVar4 = var_5->aFile[1].pFd;
        iVar5 = var_5->aFile[1].iEof;
        var_5->aFile[1].pFd = var_5->aFile[0].pFd;
        var_5->aFile[1].iEof = iVar2;
        var_5->aFile[0].pFd = psVar4;
        var_5->aFile[0].iEof = iVar5;
        goto LAB_0012f701;
      }
    }
  }
LAB_0012f7cd:
  var_11(pReadr);
LAB_0012f7a0:
  if (var_12 == *(long *)(var_1 + 0x28)) {
    return var_3;
  }
                    /* WARNING: Subroutine does not return */
  var_13();
}


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

ulong MASKED(long *param_1)

{
  undefined8 *puVar1;
  long *plVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  uint uVar5;
  ulong uVar6;
  long in_FS_OFFSET;
  undefined8 local_30;
  undefined8 local_28;
  long local_20;
  
  local_20 = *(long *)(in_FS_OFFSET + 0x28);
  local_30 = 0;
  if (*param_1 < param_1[1]) {
LAB_0012f765:
    uVar6 = FUN_001213c0(param_1,&local_30);
    if ((int)uVar6 == 0) {
      *(int *)((long)param_1 + 0x14) = (int)local_30;
      if (param_1[8] == 0) {
        uVar6 = FUN_00121220(param_1,local_30,param_1 + 5);
      }
      else {
        param_1[5] = param_1[8] + *param_1;
        *param_1 = (long)(int)local_30 + *param_1;
      }
    }
    goto LAB_0012f7a0;
  }
  puVar1 = (undefined8 *)param_1[9];
  if (puVar1 == (undefined8 *)0x0) {
LAB_0012f7cb:
    uVar5 = 0;
  }
  else if (*(int *)(puVar1 + 4) == 0) {
    uVar5 = FUN_0012f4b0(puVar1);
    puVar1[5] = puVar1[7];
    puVar1[6] = puVar1[8];
    if (puVar1[6] == puVar1[2]) {
      *(undefined4 *)((long)puVar1 + 0x1c) = 1;
      if (uVar5 != 0) goto LAB_0012f7cd;
      goto LAB_0012f7cb;
    }
LAB_0012f73f:
    if (uVar5 == 0) {
      if (*(int *)((long)puVar1 + 0x1c) == 0) {
        uVar6 = FUN_00119bf0(*puVar1,param_1,puVar1 + 5,puVar1[2]);
        if ((int)uVar6 != 0) goto LAB_0012f7a0;
        goto LAB_0012f765;
      }
      goto LAB_0012f7cb;
    }
  }
  else {
    plVar2 = (long *)*puVar1;
    if (*plVar2 == 0) {
      uVar4 = puVar1[7];
      uVar3 = puVar1[6];
      puVar1[7] = puVar1[5];
      puVar1[5] = uVar4;
      puVar1[6] = puVar1[8];
      puVar1[8] = uVar3;
LAB_0012f701:
      if (puVar1[6] != puVar1[2]) {
        uVar5 = FUN_00119d50(*puVar1,FUN_0012fb70,puVar1);
        goto LAB_0012f73f;
      }
      *(undefined4 *)((long)puVar1 + 0x1c) = 1;
      uVar5 = 0;
    }
    else {
      local_28 = 1;
      FUN_0012b850(*plVar2,&local_28);
      *(undefined4 *)(plVar2 + 1) = 0;
      *plVar2 = 0;
      uVar5 = (uint)local_28;
      if (uVar5 == 0) {
        uVar3 = puVar1[7];
        uVar4 = puVar1[8];
        puVar1[7] = puVar1[5];
        puVar1[8] = puVar1[6];
        puVar1[5] = uVar3;
        puVar1[6] = uVar4;
        goto LAB_0012f701;
      }
    }
  }
LAB_0012f7cd:
  FUN_0012b950(param_1);
  uVar6 = (ulong)uVar5;
LAB_0012f7a0:
  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {
    return uVar6;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

