
/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */
/* DWARF original prototype: int vdbeSorterSort(SortSubtask * pTask, SorterList * pList, SorterList
   * pList) */

int __regparm3 vdbeSorterSort(SortSubtask *pTask,SorterList *pList,SorterList *pList_1)

{
  VdbeSorter *pVVar1;
  SorterCompare p_Var2;
  int *piVar3;
  SorterRecord *pSVar4;
  SorterRecord *pSVar5;
  UnpackedRecord *pUVar6;
  int *piVar7;
  int *piVar8;
  int *piVar9;
  SorterRecord *pSVar10;
  undefined4 in_stack_ffffffd8;
  
  pVVar1 = pTask->pSorter;
  if (pTask->pUnpacked == (UnpackedRecord *)0x0) {
    pUVar6 = sqlite3VdbeAllocUnpackedRecord(pVVar1->pKeyInfo);
    pTask->pUnpacked = pUVar6;
    if (pUVar6 == (UnpackedRecord *)0x0) {
      return 7;
    }
    pUVar6->nField = pTask->pSorter->pKeyInfo->nKeyField;
    pTask->pUnpacked->errCode = '\0';
    pVVar1 = pTask->pSorter;
  }
  pSVar4 = pList->pList;
  p_Var2 = vdbeSorterCompareInt;
  if (pVVar1->typeMask != '\x01') {
    p_Var2 = vdbeSorterCompare;
    if (pVVar1->typeMask == '\x02') {
      p_Var2 = vdbeSorterCompareText;
    }
  }
  pTask->xCompare = p_Var2;
  piVar3 = (int *)sqlite3MallocZero(CONCAT44(in_stack_ffffffd8,pList_1));
  piVar9 = piVar3;
  if (piVar3 == (int *)0x0) {
    return 7;
  }
joined_r0x0003d495:
  do {
    if (pSVar4 == (SorterRecord *)0x0) {
LAB_0003d4f1:
      piVar3 = piVar9 + 0x40;
      pSVar4 = (SorterRecord *)0x0;
      piVar7 = piVar9;
      do {
        pSVar10 = (SorterRecord *)*piVar9;
        pSVar5 = pSVar4;
        if ((pSVar10 != (SorterRecord *)0x0) && (pSVar5 = pSVar10, pSVar4 != (SorterRecord *)0x0)) {
          pSVar5 = vdbeSorterMerge(pTask,pSVar4,pSVar10);
        }
        pSVar4 = pSVar5;
        piVar9 = piVar9 + 1;
      } while (piVar3 != piVar9);
      pList->pList = pSVar4;
      sqlite3_free(piVar7);
      return (uint)pTask->pUnpacked->errCode;
    }
    pSVar10 = pList_1->pList;
    if (pSVar10 == (SorterRecord *)0x0) {
      pSVar10 = (pSVar4->u).pNext;
LAB_0003d4b8:
      (pSVar4->u).pNext = (SorterRecord *)0x0;
      pSVar5 = (SorterRecord *)*piVar3;
      piVar7 = piVar3;
      if (pSVar5 == (SorterRecord *)0x0) {
        *piVar3 = (int)pSVar4;
        pSVar4 = pSVar10;
        goto joined_r0x0003d495;
      }
    }
    else {
      if (pSVar10 != pSVar4) {
        pSVar10 = (SorterRecord *)((int)&((pSVar4->u).pNext)->nVal + (int)&pSVar10->nVal);
        goto LAB_0003d4b8;
      }
      (pSVar4->u).pNext = (SorterRecord *)0x0;
      pSVar5 = (SorterRecord *)*piVar3;
      if (pSVar5 == (SorterRecord *)0x0) {
        *piVar9 = (int)pSVar4;
        goto LAB_0003d4f1;
      }
      pSVar10 = (SorterRecord *)0x0;
      piVar7 = piVar3;
    }
    do {
      piVar8 = piVar7 + 1;
      pSVar4 = vdbeSorterMerge(pTask,pSVar4,pSVar5);
      *piVar7 = 0;
      pSVar5 = (SorterRecord *)*piVar8;
      piVar7 = piVar8;
    } while (pSVar5 != (SorterRecord *)0x0);
    *piVar8 = (int)pSVar4;
    pSVar4 = pSVar10;
  } while( true );
}



/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

undefined1 __regparm3 FUN_0003d420(int param_1,int *param_2,int *param_3)

{
  code *pcVar1;
  int *piVar2;
  int iVar3;
  int *piVar4;
  int *piVar5;
  int iVar6;
  bool bVar7;
  
  iVar6 = *(int *)(param_1 + 8);
  if (*(int *)(param_1 + 0xc) == 0) {
    iVar6 = FUN_00028830();
    *(int *)(param_1 + 0xc) = iVar6;
    if (iVar6 == 0) {
      return 7;
    }
    *(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6);
    *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0;
    iVar6 = *(int *)(param_1 + 8);
  }
  iVar3 = *param_2;
  pcVar1 = FUN_00055110;
  if (*(char *)(iVar6 + 0x3c) != '\x01') {
    pcVar1 = FUN_00054f00;
    if (*(char *)(iVar6 + 0x3c) == '\x02') {
      pcVar1 = FUN_000552f0;
    }
  }
  *(code **)(param_1 + 0x20) = pcVar1;
  piVar2 = (int *)FUN_000261b0();
  if (piVar2 == (int *)0x0) {
    return 7;
  }
joined_r0x0003d495:
  do {
    if (iVar3 == 0) {
LAB_0003d4f1:
      iVar6 = 0;
      piVar5 = piVar2;
      do {
        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {
          iVar6 = FUN_0001d690();
        }
        piVar5 = piVar5 + 1;
      } while (piVar2 + 0x40 != piVar5);
      *param_2 = iVar6;
      FUN_000264d0(piVar2);
      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);
    }
    iVar6 = *param_3;
    if (iVar6 == 0) {
      iVar6 = *(int *)(iVar3 + 4);
LAB_0003d4b8:
      *(undefined4 *)(iVar3 + 4) = 0;
      piVar5 = piVar2;
      if (*piVar2 == 0) {
        *piVar2 = iVar3;
        iVar3 = iVar6;
        goto joined_r0x0003d495;
      }
    }
    else {
      if (iVar6 != iVar3) {
        iVar6 = iVar6 + *(int *)(iVar3 + 4);
        goto LAB_0003d4b8;
      }
      *(undefined4 *)(iVar3 + 4) = 0;
      if (*piVar2 == 0) {
        *piVar2 = iVar3;
        goto LAB_0003d4f1;
      }
      iVar6 = 0;
      piVar5 = piVar2;
    }
    do {
      piVar4 = piVar5 + 1;
      iVar3 = FUN_0001d690();
      *piVar5 = 0;
      piVar5 = piVar4;
    } while (*piVar4 != 0);
    *piVar4 = iVar3;
    iVar3 = iVar6;
  } while( true );
}


PUSH EBP
PUSH EDI
MOV EDI,EAX
PUSH ESI
CALL 0x000f5a00
ADD ESI,0x10daaa
PUSH EBX
SUB ESP,0x1c
MOV EAX,dword ptr [EAX + 0x8]
MOV dword ptr [ESP + 0xc],EDX
MOV EDX,dword ptr [EDI + 0xc]
MOV dword ptr [ESP],ECX
MOV dword ptr [ESP + 0x8],ESI
TEST EDX,EDX
JZ 0x0003d584
MOV ESI,dword ptr [ESP + 0xc]
MOVZX EDX,byte ptr [EAX + 0x3c]
MOV EBX,dword ptr [ESP + 0x8]
MOV ESI,dword ptr [ESI]
LEA EAX,[EBX + 0xfff0a23c]
CMP DL,0x1
JZ 0x0003d478
CMP DL,0x2
LEA EAX,[EBX + 0xfff0a02c]
LEA EDX,[EBX + 0xfff0a41c]
CMOVZ EAX,EDX
MOV dword ptr [EDI + 0x20],EAX
XOR EDX,EDX
MOV EAX,0x100
CALL 0x000261b0
MOV dword ptr [ESP + 0x4],EAX
TEST EAX,EAX
JZ 0x0003d5bd
TEST ESI,ESI
JZ 0x0003d4f1
MOV EAX,ESI
MOV ESI,dword ptr [ESP + 0x4]
LEA ESI,[ESI]
MOV EDX,dword ptr [ESP]
MOV EBP,dword ptr [EDX]
TEST EBP,EBP
JZ 0x0003d568
CMP EBP,EAX
JZ 0x0003d570
ADD EBP,dword ptr [EAX + 0x4]
MOV dword ptr [EAX + 0x4],0x0
MOV ECX,dword ptr [ESI]
TEST ECX,ECX
JZ 0x0003d553
MOV EBX,ESI
LEA ESI,[ESI]
NOP
MOV EDX,EAX
MOV EAX,EDI
ADD EBX,0x4
CALL 0x0001d690
MOV dword ptr [EBX + -0x4],0x0
MOV ECX,dword ptr [EBX]
TEST ECX,ECX
JNZ 0x0003d4d0
MOV dword ptr [EBX],EAX
MOV EAX,EBP
TEST EBP,EBP
JNZ 0x0003d4a0
MOV EAX,dword ptr [ESP + 0x4]
MOV EBX,EAX
LEA ESI,[EAX + 0x100]
XOR EAX,EAX
JMP 0x0003d518
MOV EDX,EAX
MOV EAX,EDI
CALL 0x0001d690
ADD EBX,0x4
CMP ESI,EBX
JZ 0x0003d52b
MOV ECX,dword ptr [EBX]
TEST ECX,ECX
JZ 0x0003d511
TEST EAX,EAX
JNZ 0x0003d508
ADD EBX,0x4
MOV EAX,ECX
CMP ESI,EBX
JNZ 0x0003d518
MOV ESI,dword ptr [ESP + 0xc]
SUB ESP,0xc
MOV dword ptr [ESI],EAX
PUSH dword ptr [ESP + 0x10]
MOV EBX,dword ptr [ESP + 0x18]
CALL 0x000264d0
MOV EAX,dword ptr [EDI + 0xc]
ADD ESP,0x10
MOVZX EAX,byte ptr [EAX + 0xb]
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EBX,ESI
MOV dword ptr [EBX],EAX
MOV EAX,EBP
TEST EBP,EBP
JNZ 0x0003d4a0
JMP 0x0003d4f1
MOV EBP,dword ptr [EAX + 0x4]
JMP 0x0003d4b8
MOV dword ptr [EAX + 0x4],0x0
MOV ECX,dword ptr [ESI]
TEST ECX,ECX
JZ 0x0003d5b0
XOR EBP,EBP
JMP 0x0003d4c9
MOV EAX,dword ptr [EAX + 0x1c]
CALL 0x00028830
MOV dword ptr [EDI + 0xc],EAX
TEST EAX,EAX
JZ 0x0003d5bd
MOV EDX,dword ptr [EDI + 0x8]
MOV EDX,dword ptr [EDX + 0x1c]
MOVZX EDX,word ptr [EDX + 0x6]
MOV word ptr [EAX + 0x8],DX
MOV EAX,dword ptr [EDI + 0xc]
MOV byte ptr [EAX + 0xb],0x0
MOV EAX,dword ptr [EDI + 0x8]
JMP 0x0003d44d
MOV ESI,EAX
MOV EAX,dword ptr [ESP + 0x4]
MOV dword ptr [EAX],ESI
JMP 0x0003d4f1
ADD ESP,0x1c
MOV EAX,0x7
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n\nundefined1 __regparm3 FUN_0003d420(int param_1,int *param_2,int *param_3)\n\n{\n  code *pcVar1;\n  int *piVar2;\n  int iVar3;\n  int *piVar4;\n  int *piVar5;\n  int iVar6;\n  bool bVar7;\n  \n  iVar6 = *(int *)(param_1 + 8);\n  if (*(int *)(param_1 + 0xc) == 0) {\n    iVar6 = FUN_00028830();\n    *(int *)(param_1 + 0xc) = iVar6;\n    if (iVar6 == 0) {\n      return 7;\n    }\n    *(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6);\n    *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0;\n    iVar6 = *(int *)(param_1 + 8);\n  }\n  iVar3 = *param_2;\n  pcVar1 = FUN_00055110;\n  if (*(char *)(iVar6 + 0x3c) != '\x01') {\n    pcVar1 = FUN_00054f00;\n    if (*(char *)(iVar6 + 0x3c) == '\x02') {\n      pcVar1 = FUN_000552f0;\n    }\n  }\n  *(code **)(param_1 + 0x20) = pcVar1;\n  piVar2 = (int *)FUN_000261b0();\n  if (piVar2 == (int *)0x0) {\n    return 7;\n  }\njoined_r0x0003d495:\n  do {\n    if (iVar3 == 0) {\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }\n    iVar6 = *param_3;\n    if (iVar6 == 0) {\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }\n    do {\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    } while (*piVar4 != 0);\n    *piVar4 = iVar3;\n    iVar3 = iVar6;\n  } while( true );\n}\n\n" comment (function_definition "undefined1 __regparm3 FUN_0003d420(int param_1,int *param_2,int *param_3)\n\n{\n  code *pcVar1;\n  int *piVar2;\n  int iVar3;\n  int *piVar4;\n  int *piVar5;\n  int iVar6;\n  bool bVar7;\n  \n  iVar6 = *(int *)(param_1 + 8);\n  if (*(int *)(param_1 + 0xc) == 0) {\n    iVar6 = FUN_00028830();\n    *(int *)(param_1 + 0xc) = iVar6;\n    if (iVar6 == 0) {\n      return 7;\n    }\n    *(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6);\n    *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0;\n    iVar6 = *(int *)(param_1 + 8);\n  }\n  iVar3 = *param_2;\n  pcVar1 = FUN_00055110;\n  if (*(char *)(iVar6 + 0x3c) != '\x01') {\n    pcVar1 = FUN_00054f00;\n    if (*(char *)(iVar6 + 0x3c) == '\x02') {\n      pcVar1 = FUN_000552f0;\n    }\n  }\n  *(code **)(param_1 + 0x20) = pcVar1;\n  piVar2 = (int *)FUN_000261b0();\n  if (piVar2 == (int *)0x0) {\n    return 7;\n  }\njoined_r0x0003d495:\n  do {\n    if (iVar3 == 0) {\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }\n    iVar6 = *param_3;\n    if (iVar6 == 0) {\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }\n    do {\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    } while (*piVar4 != 0);\n    *piVar4 = iVar3;\n    iVar3 = iVar6;\n  } while( true );\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0003d420(int param_1,int *param_2,int *param_3)" identifier (parameter_list "(int param_1,int *param_2,int *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  code *pcVar1;\n  int *piVar2;\n  int iVar3;\n  int *piVar4;\n  int *piVar5;\n  int iVar6;\n  bool bVar7;\n  \n  iVar6 = *(int *)(param_1 + 8);\n  if (*(int *)(param_1 + 0xc) == 0) {\n    iVar6 = FUN_00028830();\n    *(int *)(param_1 + 0xc) = iVar6;\n    if (iVar6 == 0) {\n      return 7;\n    }\n    *(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6);\n    *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0;\n    iVar6 = *(int *)(param_1 + 8);\n  }\n  iVar3 = *param_2;\n  pcVar1 = FUN_00055110;\n  if (*(char *)(iVar6 + 0x3c) != '\x01') {\n    pcVar1 = FUN_00054f00;\n    if (*(char *)(iVar6 + 0x3c) == '\x02') {\n      pcVar1 = FUN_000552f0;\n    }\n  }\n  *(code **)(param_1 + 0x20) = pcVar1;\n  piVar2 = (int *)FUN_000261b0();\n  if (piVar2 == (int *)0x0) {\n    return 7;\n  }\njoined_r0x0003d495:\n  do {\n    if (iVar3 == 0) {\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }\n    iVar6 = *param_3;\n    if (iVar6 == 0) {\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }\n    do {\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    } while (*piVar4 != 0);\n    *piVar4 = iVar3;\n    iVar3 = iVar6;\n  } while( true );\n}" { (declaration "code *pcVar1;" type_identifier (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "bool bVar7;" primitive_type identifier ;) (expression_statement "iVar6 = *(int *)(param_1 + 8);" (assignment_expression "iVar6 = *(int *)(param_1 + 8)" identifier = (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (if_statement "if (*(int *)(param_1 + 0xc) == 0) {\n    iVar6 = FUN_00028830();\n    *(int *)(param_1 + 0xc) = iVar6;\n    if (iVar6 == 0) {\n      return 7;\n    }\n    *(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6);\n    *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0;\n    iVar6 = *(int *)(param_1 + 8);\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0xc) == 0)" ( (binary_expression "*(int *)(param_1 + 0xc) == 0" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    iVar6 = FUN_00028830();\n    *(int *)(param_1 + 0xc) = iVar6;\n    if (iVar6 == 0) {\n      return 7;\n    }\n    *(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6);\n    *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0;\n    iVar6 = *(int *)(param_1 + 8);\n  }" { (expression_statement "iVar6 = FUN_00028830();" (assignment_expression "iVar6 = FUN_00028830()" identifier = (call_expression "FUN_00028830()" identifier (argument_list "()" ( )))) ;) (expression_statement "*(int *)(param_1 + 0xc) = iVar6;" (assignment_expression "*(int *)(param_1 + 0xc) = iVar6" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar6 == 0) {\n      return 7;\n    }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n      return 7;\n    }" { (return_statement "return 7;" return number_literal ;) })) (expression_statement "*(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6);" (assignment_expression "*(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6)" (pointer_expression "*(undefined2 *)(iVar6 + 8)" * (cast_expression "(undefined2 *)(iVar6 + 8)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 8)" ( (binary_expression "iVar6 + 8" identifier + number_literal) )))) = (pointer_expression "*(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6)" * (cast_expression "(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6)" ( (binary_expression "*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6" (pointer_expression "*(int *)(*(int *)(param_1 + 8) + 0x1c)" * (cast_expression "(int *)(*(int *)(param_1 + 8) + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 8) + 0x1c)" ( (binary_expression "*(int *)(param_1 + 8) + 0x1c" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) + number_literal) )))) + number_literal) ))))) ;) (expression_statement "*(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0;" (assignment_expression "*(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0" (pointer_expression "*(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb)" * (cast_expression "(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0xc) + 0xb)" ( (binary_expression "*(int *)(param_1 + 0xc) + 0xb" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) + number_literal) )))) = number_literal) ;) (expression_statement "iVar6 = *(int *)(param_1 + 8);" (assignment_expression "iVar6 = *(int *)(param_1 + 8)" identifier = (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) })) (expression_statement "iVar3 = *param_2;" (assignment_expression "iVar3 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "pcVar1 = FUN_00055110;" (assignment_expression "pcVar1 = FUN_00055110" identifier = identifier) ;) (if_statement "if (*(char *)(iVar6 + 0x3c) != '\x01') {\n    pcVar1 = FUN_00054f00;\n    if (*(char *)(iVar6 + 0x3c) == '\x02') {\n      pcVar1 = FUN_000552f0;\n    }\n  }" if (parenthesized_expression "(*(char *)(iVar6 + 0x3c) != '\x01')" ( (binary_expression "*(char *)(iVar6 + 0x3c) != '\x01'" (pointer_expression "*(char *)(iVar6 + 0x3c)" * (cast_expression "(char *)(iVar6 + 0x3c)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x3c)" ( (binary_expression "iVar6 + 0x3c" identifier + number_literal) )))) != (char_literal "'\x01'" ' escape_sequence ')) )) (compound_statement "{\n    pcVar1 = FUN_00054f00;\n    if (*(char *)(iVar6 + 0x3c) == '\x02') {\n      pcVar1 = FUN_000552f0;\n    }\n  }" { (expression_statement "pcVar1 = FUN_00054f00;" (assignment_expression "pcVar1 = FUN_00054f00" identifier = identifier) ;) (if_statement "if (*(char *)(iVar6 + 0x3c) == '\x02') {\n      pcVar1 = FUN_000552f0;\n    }" if (parenthesized_expression "(*(char *)(iVar6 + 0x3c) == '\x02')" ( (binary_expression "*(char *)(iVar6 + 0x3c) == '\x02'" (pointer_expression "*(char *)(iVar6 + 0x3c)" * (cast_expression "(char *)(iVar6 + 0x3c)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x3c)" ( (binary_expression "iVar6 + 0x3c" identifier + number_literal) )))) == (char_literal "'\x02'" ' escape_sequence ')) )) (compound_statement "{\n      pcVar1 = FUN_000552f0;\n    }" { (expression_statement "pcVar1 = FUN_000552f0;" (assignment_expression "pcVar1 = FUN_000552f0" identifier = identifier) ;) })) })) (expression_statement "*(code **)(param_1 + 0x20) = pcVar1;" (assignment_expression "*(code **)(param_1 + 0x20) = pcVar1" (pointer_expression "*(code **)(param_1 + 0x20)" * (cast_expression "(code **)(param_1 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = identifier) ;) (expression_statement "piVar2 = (int *)FUN_000261b0();" (assignment_expression "piVar2 = (int *)FUN_000261b0()" identifier = (cast_expression "(int *)FUN_000261b0()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000261b0()" identifier (argument_list "()" ( ))))) ;) (if_statement "if (piVar2 == (int *)0x0) {\n    return 7;\n  }" if (parenthesized_expression "(piVar2 == (int *)0x0)" ( (binary_expression "piVar2 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 7;\n  }" { (return_statement "return 7;" return number_literal ;) })) (labeled_statement "joined_r0x0003d495:\n  do {\n    if (iVar3 == 0) {\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }\n    iVar6 = *param_3;\n    if (iVar6 == 0) {\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }\n    do {\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    } while (*piVar4 != 0);\n    *piVar4 = iVar3;\n    iVar3 = iVar6;\n  } while( true );" statement_identifier : (do_statement "do {\n    if (iVar3 == 0) {\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }\n    iVar6 = *param_3;\n    if (iVar6 == 0) {\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }\n    do {\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    } while (*piVar4 != 0);\n    *piVar4 = iVar3;\n    iVar3 = iVar6;\n  } while( true );" do (compound_statement "{\n    if (iVar3 == 0) {\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }\n    iVar6 = *param_3;\n    if (iVar6 == 0) {\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }\n    do {\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    } while (*piVar4 != 0);\n    *piVar4 = iVar3;\n    iVar3 = iVar6;\n  }" { (if_statement "if (iVar3 == 0) {\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }" { (labeled_statement "LAB_0003d4f1:\n      iVar6 = 0;" statement_identifier : (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;)) (expression_statement "piVar5 = piVar2;" (assignment_expression "piVar5 = piVar2" identifier = identifier) ;) (do_statement "do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);" do (compound_statement "{\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      }" { (if_statement "if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }" if (parenthesized_expression "((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7))" ( (binary_expression "(*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)" (parenthesized_expression "(*piVar5 != 0)" ( (binary_expression "*piVar5 != 0" (pointer_expression "*piVar5" * identifier) != number_literal) )) && (parenthesized_expression "(bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)" ( (comma_expression "bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7" (assignment_expression "bVar7 = iVar6 != 0" identifier = (binary_expression "iVar6 != 0" identifier != number_literal)) , (comma_expression "iVar6 = *piVar5, bVar7" (assignment_expression "iVar6 = *piVar5" identifier = (pointer_expression "*piVar5" * identifier)) , identifier)) ))) )) (compound_statement "{\n          iVar6 = FUN_0001d690();\n        }" { (expression_statement "iVar6 = FUN_0001d690();" (assignment_expression "iVar6 = FUN_0001d690()" identifier = (call_expression "FUN_0001d690()" identifier (argument_list "()" ( )))) ;) })) (expression_statement "piVar5 = piVar5 + 1;" (assignment_expression "piVar5 = piVar5 + 1" identifier = (binary_expression "piVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(piVar2 + 0x40 != piVar5)" ( (binary_expression "piVar2 + 0x40 != piVar5" (binary_expression "piVar2 + 0x40" identifier + number_literal) != identifier) )) ;) (expression_statement "*param_2 = iVar6;" (assignment_expression "*param_2 = iVar6" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "FUN_000264d0(piVar2);" (call_expression "FUN_000264d0(piVar2)" identifier (argument_list "(piVar2)" ( identifier ))) ;) (return_statement "return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);" return (pointer_expression "*(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb)" * (cast_expression "(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0xc) + 0xb)" ( (binary_expression "*(int *)(param_1 + 0xc) + 0xb" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) + number_literal) )))) ;) })) (expression_statement "iVar6 = *param_3;" (assignment_expression "iVar6 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) (if_statement "if (iVar6 == 0) {\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }" { (expression_statement "iVar6 = *(int *)(iVar3 + 4);" (assignment_expression "iVar6 = *(int *)(iVar3 + 4)" identifier = (pointer_expression "*(int *)(iVar3 + 4)" * (cast_expression "(int *)(iVar3 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 4)" ( (binary_expression "iVar3 + 4" identifier + number_literal) ))))) ;) (labeled_statement "LAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;" statement_identifier : (expression_statement "*(undefined4 *)(iVar3 + 4) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 4) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 4)" * (cast_expression "(undefined4 *)(iVar3 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 4)" ( (binary_expression "iVar3 + 4" identifier + number_literal) )))) = number_literal) ;)) (expression_statement "piVar5 = piVar2;" (assignment_expression "piVar5 = piVar2" identifier = identifier) ;) (if_statement "if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }" if (parenthesized_expression "(*piVar2 == 0)" ( (binary_expression "*piVar2 == 0" (pointer_expression "*piVar2" * identifier) == number_literal) )) (compound_statement "{\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }" { (expression_statement "*piVar2 = iVar3;" (assignment_expression "*piVar2 = iVar3" (pointer_expression "*piVar2" * identifier) = identifier) ;) (expression_statement "iVar3 = iVar6;" (assignment_expression "iVar3 = iVar6" identifier = identifier) ;) (goto_statement "goto joined_r0x0003d495;" goto statement_identifier ;) })) }) (else_clause "else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }" else (compound_statement "{\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }" { (if_statement "if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }" if (parenthesized_expression "(iVar6 != iVar3)" ( (binary_expression "iVar6 != iVar3" identifier != identifier) )) (compound_statement "{\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }" { (expression_statement "iVar6 = iVar6 + *(int *)(iVar3 + 4);" (assignment_expression "iVar6 = iVar6 + *(int *)(iVar3 + 4)" identifier = (binary_expression "iVar6 + *(int *)(iVar3 + 4)" identifier + (pointer_expression "*(int *)(iVar3 + 4)" * (cast_expression "(int *)(iVar3 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 4)" ( (binary_expression "iVar3 + 4" identifier + number_literal) )))))) ;) (goto_statement "goto LAB_0003d4b8;" goto statement_identifier ;) })) (expression_statement "*(undefined4 *)(iVar3 + 4) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 4) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 4)" * (cast_expression "(undefined4 *)(iVar3 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 4)" ( (binary_expression "iVar3 + 4" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }" if (parenthesized_expression "(*piVar2 == 0)" ( (binary_expression "*piVar2 == 0" (pointer_expression "*piVar2" * identifier) == number_literal) )) (compound_statement "{\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }" { (expression_statement "*piVar2 = iVar3;" (assignment_expression "*piVar2 = iVar3" (pointer_expression "*piVar2" * identifier) = identifier) ;) (goto_statement "goto LAB_0003d4f1;" goto statement_identifier ;) })) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (expression_statement "piVar5 = piVar2;" (assignment_expression "piVar5 = piVar2" identifier = identifier) ;) }))) (do_statement "do {\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    } while (*piVar4 != 0);" do (compound_statement "{\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    }" { (expression_statement "piVar4 = piVar5 + 1;" (assignment_expression "piVar4 = piVar5 + 1" identifier = (binary_expression "piVar5 + 1" identifier + number_literal)) ;) (expression_statement "iVar3 = FUN_0001d690();" (assignment_expression "iVar3 = FUN_0001d690()" identifier = (call_expression "FUN_0001d690()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar5 = 0;" (assignment_expression "*piVar5 = 0" (pointer_expression "*piVar5" * identifier) = number_literal) ;) (expression_statement "piVar5 = piVar4;" (assignment_expression "piVar5 = piVar4" identifier = identifier) ;) }) while (parenthesized_expression "(*piVar4 != 0)" ( (binary_expression "*piVar4 != 0" (pointer_expression "*piVar4" * identifier) != number_literal) )) ;) (expression_statement "*piVar4 = iVar3;" (assignment_expression "*piVar4 = iVar3" (pointer_expression "*piVar4" * identifier) = identifier) ;) (expression_statement "iVar3 = iVar6;" (assignment_expression "iVar3 = iVar6" identifier = identifier) ;) }) while (parenthesized_expression "( true )" ( true )) ;)) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n/* DWARF original prototype: int vdbeSorterSort(SortSubtask * pTask, SorterList * pList, SorterList\n   * pList) */\n\nint __regparm3 vdbeSorterSort(SortSubtask *pTask,SorterList *pList,SorterList *pList_1)\n\n{\n  VdbeSorter *pVVar1;\n  SorterCompare p_Var2;\n  int *piVar3;\n  SorterRecord *pSVar4;\n  SorterRecord *pSVar5;\n  UnpackedRecord *pUVar6;\n  int *piVar7;\n  int *piVar8;\n  int *piVar9;\n  SorterRecord *pSVar10;\n  undefined4 in_stack_ffffffd8;\n  \n  pVVar1 = pTask->pSorter;\n  if (pTask->pUnpacked == (UnpackedRecord *)0x0) {\n    pUVar6 = sqlite3VdbeAllocUnpackedRecord(pVVar1->pKeyInfo);\n    pTask->pUnpacked = pUVar6;\n    if (pUVar6 == (UnpackedRecord *)0x0) {\n      return 7;\n    }\n    pUVar6->nField = pTask->pSorter->pKeyInfo->nKeyField;\n    pTask->pUnpacked->errCode = '\0';\n    pVVar1 = pTask->pSorter;\n  }\n  pSVar4 = pList->pList;\n  p_Var2 = vdbeSorterCompareInt;\n  if (pVVar1->typeMask != '\x01') {\n    p_Var2 = vdbeSorterCompare;\n    if (pVVar1->typeMask == '\x02') {\n      p_Var2 = vdbeSorterCompareText;\n    }\n  }\n  pTask->xCompare = p_Var2;\n  piVar3 = (int *)sqlite3MallocZero(CONCAT44(in_stack_ffffffd8,pList_1));\n  piVar9 = piVar3;\n  if (piVar3 == (int *)0x0) {\n    return 7;\n  }\njoined_r0x0003d495:\n  do {\n    if (pSVar4 == (SorterRecord *)0x0) {\nLAB_0003d4f1:\n      piVar3 = piVar9 + 0x40;\n      pSVar4 = (SorterRecord *)0x0;\n      piVar7 = piVar9;\n      do {\n        pSVar10 = (SorterRecord *)*piVar9;\n        pSVar5 = pSVar4;\n        if ((pSVar10 != (SorterRecord *)0x0) && (pSVar5 = pSVar10, pSVar4 != (SorterRecord *)0x0)) {\n          pSVar5 = vdbeSorterMerge(pTask,pSVar4,pSVar10);\n        }\n        pSVar4 = pSVar5;\n        piVar9 = piVar9 + 1;\n      } while (piVar3 != piVar9);\n      pList->pList = pSVar4;\n      sqlite3_free(piVar7);\n      return (uint)pTask->pUnpacked->errCode;\n    }\n    pSVar10 = pList_1->pList;\n    if (pSVar10 == (SorterRecord *)0x0) {\n      pSVar10 = (pSVar4->u).pNext;\nLAB_0003d4b8:\n      (pSVar4->u).pNext = (SorterRecord *)0x0;\n      pSVar5 = (SorterRecord *)*piVar3;\n      piVar7 = piVar3;\n      if (pSVar5 == (SorterRecord *)0x0) {\n        *piVar3 = (int)pSVar4;\n        pSVar4 = pSVar10;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (pSVar10 != pSVar4) {\n        pSVar10 = (SorterRecord *)((int)&((pSVar4->u).pNext)->nVal + (int)&pSVar10->nVal);\n        goto LAB_0003d4b8;\n      }\n      (pSVar4->u).pNext = (SorterRecord *)0x0;\n      pSVar5 = (SorterRecord *)*piVar3;\n      if (pSVar5 == (SorterRecord *)0x0) {\n        *piVar9 = (int)pSVar4;\n        goto LAB_0003d4f1;\n      }\n      pSVar10 = (SorterRecord *)0x0;\n      piVar7 = piVar3;\n    }\n    do {\n      piVar8 = piVar7 + 1;\n      pSVar4 = vdbeSorterMerge(pTask,pSVar4,pSVar5);\n      *piVar7 = 0;\n      pSVar5 = (SorterRecord *)*piVar8;\n      piVar7 = piVar8;\n    } while (pSVar5 != (SorterRecord *)0x0);\n    *piVar8 = (int)pSVar4;\n    pSVar4 = pSVar10;\n  } while( true );\n}\n\n" comment comment (function_definition "int __regparm3 vdbeSorterSort(SortSubtask *pTask,SorterList *pList,SorterList *pList_1)\n\n{\n  VdbeSorter *pVVar1;\n  SorterCompare p_Var2;\n  int *piVar3;\n  SorterRecord *pSVar4;\n  SorterRecord *pSVar5;\n  UnpackedRecord *pUVar6;\n  int *piVar7;\n  int *piVar8;\n  int *piVar9;\n  SorterRecord *pSVar10;\n  undefined4 in_stack_ffffffd8;\n  \n  pVVar1 = pTask->pSorter;\n  if (pTask->pUnpacked == (UnpackedRecord *)0x0) {\n    pUVar6 = sqlite3VdbeAllocUnpackedRecord(pVVar1->pKeyInfo);\n    pTask->pUnpacked = pUVar6;\n    if (pUVar6 == (UnpackedRecord *)0x0) {\n      return 7;\n    }\n    pUVar6->nField = pTask->pSorter->pKeyInfo->nKeyField;\n    pTask->pUnpacked->errCode = '\0';\n    pVVar1 = pTask->pSorter;\n  }\n  pSVar4 = pList->pList;\n  p_Var2 = vdbeSorterCompareInt;\n  if (pVVar1->typeMask != '\x01') {\n    p_Var2 = vdbeSorterCompare;\n    if (pVVar1->typeMask == '\x02') {\n      p_Var2 = vdbeSorterCompareText;\n    }\n  }\n  pTask->xCompare = p_Var2;\n  piVar3 = (int *)sqlite3MallocZero(CONCAT44(in_stack_ffffffd8,pList_1));\n  piVar9 = piVar3;\n  if (piVar3 == (int *)0x0) {\n    return 7;\n  }\njoined_r0x0003d495:\n  do {\n    if (pSVar4 == (SorterRecord *)0x0) {\nLAB_0003d4f1:\n      piVar3 = piVar9 + 0x40;\n      pSVar4 = (SorterRecord *)0x0;\n      piVar7 = piVar9;\n      do {\n        pSVar10 = (SorterRecord *)*piVar9;\n        pSVar5 = pSVar4;\n        if ((pSVar10 != (SorterRecord *)0x0) && (pSVar5 = pSVar10, pSVar4 != (SorterRecord *)0x0)) {\n          pSVar5 = vdbeSorterMerge(pTask,pSVar4,pSVar10);\n        }\n        pSVar4 = pSVar5;\n        piVar9 = piVar9 + 1;\n      } while (piVar3 != piVar9);\n      pList->pList = pSVar4;\n      sqlite3_free(piVar7);\n      return (uint)pTask->pUnpacked->errCode;\n    }\n    pSVar10 = pList_1->pList;\n    if (pSVar10 == (SorterRecord *)0x0) {\n      pSVar10 = (pSVar4->u).pNext;\nLAB_0003d4b8:\n      (pSVar4->u).pNext = (SorterRecord *)0x0;\n      pSVar5 = (SorterRecord *)*piVar3;\n      piVar7 = piVar3;\n      if (pSVar5 == (SorterRecord *)0x0) {\n        *piVar3 = (int)pSVar4;\n        pSVar4 = pSVar10;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (pSVar10 != pSVar4) {\n        pSVar10 = (SorterRecord *)((int)&((pSVar4->u).pNext)->nVal + (int)&pSVar10->nVal);\n        goto LAB_0003d4b8;\n      }\n      (pSVar4->u).pNext = (SorterRecord *)0x0;\n      pSVar5 = (SorterRecord *)*piVar3;\n      if (pSVar5 == (SorterRecord *)0x0) {\n        *piVar9 = (int)pSVar4;\n        goto LAB_0003d4f1;\n      }\n      pSVar10 = (SorterRecord *)0x0;\n      piVar7 = piVar3;\n    }\n    do {\n      piVar8 = piVar7 + 1;\n      pSVar4 = vdbeSorterMerge(pTask,pSVar4,pSVar5);\n      *piVar7 = 0;\n      pSVar5 = (SorterRecord *)*piVar8;\n      piVar7 = piVar8;\n    } while (pSVar5 != (SorterRecord *)0x0);\n    *piVar8 = (int)pSVar4;\n    pSVar4 = pSVar10;\n  } while( true );\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "vdbeSorterSort(SortSubtask *pTask,SorterList *pList,SorterList *pList_1)" identifier (parameter_list "(SortSubtask *pTask,SorterList *pList,SorterList *pList_1)" ( (parameter_declaration "SortSubtask *pTask" type_identifier (pointer_declarator "*pTask" * identifier)) , (parameter_declaration "SorterList *pList" type_identifier (pointer_declarator "*pList" * identifier)) , (parameter_declaration "SorterList *pList_1" type_identifier (pointer_declarator "*pList_1" * identifier)) ))) (compound_statement "{\n  VdbeSorter *pVVar1;\n  SorterCompare p_Var2;\n  int *piVar3;\n  SorterRecord *pSVar4;\n  SorterRecord *pSVar5;\n  UnpackedRecord *pUVar6;\n  int *piVar7;\n  int *piVar8;\n  int *piVar9;\n  SorterRecord *pSVar10;\n  undefined4 in_stack_ffffffd8;\n  \n  pVVar1 = pTask->pSorter;\n  if (pTask->pUnpacked == (UnpackedRecord *)0x0) {\n    pUVar6 = sqlite3VdbeAllocUnpackedRecord(pVVar1->pKeyInfo);\n    pTask->pUnpacked = pUVar6;\n    if (pUVar6 == (UnpackedRecord *)0x0) {\n      return 7;\n    }\n    pUVar6->nField = pTask->pSorter->pKeyInfo->nKeyField;\n    pTask->pUnpacked->errCode = '\0';\n    pVVar1 = pTask->pSorter;\n  }\n  pSVar4 = pList->pList;\n  p_Var2 = vdbeSorterCompareInt;\n  if (pVVar1->typeMask != '\x01') {\n    p_Var2 = vdbeSorterCompare;\n    if (pVVar1->typeMask == '\x02') {\n      p_Var2 = vdbeSorterCompareText;\n    }\n  }\n  pTask->xCompare = p_Var2;\n  piVar3 = (int *)sqlite3MallocZero(CONCAT44(in_stack_ffffffd8,pList_1));\n  piVar9 = piVar3;\n  if (piVar3 == (int *)0x0) {\n    return 7;\n  }\njoined_r0x0003d495:\n  do {\n    if (pSVar4 == (SorterRecord *)0x0) {\nLAB_0003d4f1:\n      piVar3 = piVar9 + 0x40;\n      pSVar4 = (SorterRecord *)0x0;\n      piVar7 = piVar9;\n      do {\n        pSVar10 = (SorterRecord *)*piVar9;\n        pSVar5 = pSVar4;\n        if ((pSVar10 != (SorterRecord *)0x0) && (pSVar5 = pSVar10, pSVar4 != (SorterRecord *)0x0)) {\n          pSVar5 = vdbeSorterMerge(pTask,pSVar4,pSVar10);\n        }\n        pSVar4 = pSVar5;\n        piVar9 = piVar9 + 1;\n      } while (piVar3 != piVar9);\n      pList->pList = pSVar4;\n      sqlite3_free(piVar7);\n      return (uint)pTask->pUnpacked->errCode;\n    }\n    pSVar10 = pList_1->pList;\n    if (pSVar10 == (SorterRecord *)0x0) {\n      pSVar10 = (pSVar4->u).pNext;\nLAB_0003d4b8:\n      (pSVar4->u).pNext = (SorterRecord *)0x0;\n      pSVar5 = (SorterRecord *)*piVar3;\n      piVar7 = piVar3;\n      if (pSVar5 == (SorterRecord *)0x0) {\n        *piVar3 = (int)pSVar4;\n        pSVar4 = pSVar10;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (pSVar10 != pSVar4) {\n        pSVar10 = (SorterRecord *)((int)&((pSVar4->u).pNext)->nVal + (int)&pSVar10->nVal);\n        goto LAB_0003d4b8;\n      }\n      (pSVar4->u).pNext = (SorterRecord *)0x0;\n      pSVar5 = (SorterRecord *)*piVar3;\n      if (pSVar5 == (SorterRecord *)0x0) {\n        *piVar9 = (int)pSVar4;\n        goto LAB_0003d4f1;\n      }\n      pSVar10 = (SorterRecord *)0x0;\n      piVar7 = piVar3;\n    }\n    do {\n      piVar8 = piVar7 + 1;\n      pSVar4 = vdbeSorterMerge(pTask,pSVar4,pSVar5);\n      *piVar7 = 0;\n      pSVar5 = (SorterRecord *)*piVar8;\n      piVar7 = piVar8;\n    } while (pSVar5 != (SorterRecord *)0x0);\n    *piVar8 = (int)pSVar4;\n    pSVar4 = pSVar10;\n  } while( true );\n}" { (declaration "VdbeSorter *pVVar1;" type_identifier (pointer_declarator "*pVVar1" * identifier) ;) (declaration "SorterCompare p_Var2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "SorterRecord *pSVar4;" type_identifier (pointer_declarator "*pSVar4" * identifier) ;) (declaration "SorterRecord *pSVar5;" type_identifier (pointer_declarator "*pSVar5" * identifier) ;) (declaration "UnpackedRecord *pUVar6;" type_identifier (pointer_declarator "*pUVar6" * identifier) ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (declaration "int *piVar8;" primitive_type (pointer_declarator "*piVar8" * identifier) ;) (declaration "int *piVar9;" primitive_type (pointer_declarator "*piVar9" * identifier) ;) (declaration "SorterRecord *pSVar10;" type_identifier (pointer_declarator "*pSVar10" * identifier) ;) (declaration "undefined4 in_stack_ffffffd8;" type_identifier identifier ;) (expression_statement "pVVar1 = pTask->pSorter;" (assignment_expression "pVVar1 = pTask->pSorter" identifier = (field_expression "pTask->pSorter" identifier -> field_identifier)) ;) (if_statement "if (pTask->pUnpacked == (UnpackedRecord *)0x0) {\n    pUVar6 = sqlite3VdbeAllocUnpackedRecord(pVVar1->pKeyInfo);\n    pTask->pUnpacked = pUVar6;\n    if (pUVar6 == (UnpackedRecord *)0x0) {\n      return 7;\n    }\n    pUVar6->nField = pTask->pSorter->pKeyInfo->nKeyField;\n    pTask->pUnpacked->errCode = '\0';\n    pVVar1 = pTask->pSorter;\n  }" if (parenthesized_expression "(pTask->pUnpacked == (UnpackedRecord *)0x0)" ( (binary_expression "pTask->pUnpacked == (UnpackedRecord *)0x0" (field_expression "pTask->pUnpacked" identifier -> field_identifier) == (cast_expression "(UnpackedRecord *)0x0" ( (type_descriptor "UnpackedRecord *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pUVar6 = sqlite3VdbeAllocUnpackedRecord(pVVar1->pKeyInfo);\n    pTask->pUnpacked = pUVar6;\n    if (pUVar6 == (UnpackedRecord *)0x0) {\n      return 7;\n    }\n    pUVar6->nField = pTask->pSorter->pKeyInfo->nKeyField;\n    pTask->pUnpacked->errCode = '\0';\n    pVVar1 = pTask->pSorter;\n  }" { (expression_statement "pUVar6 = sqlite3VdbeAllocUnpackedRecord(pVVar1->pKeyInfo);" (assignment_expression "pUVar6 = sqlite3VdbeAllocUnpackedRecord(pVVar1->pKeyInfo)" identifier = (call_expression "sqlite3VdbeAllocUnpackedRecord(pVVar1->pKeyInfo)" identifier (argument_list "(pVVar1->pKeyInfo)" ( (field_expression "pVVar1->pKeyInfo" identifier -> field_identifier) )))) ;) (expression_statement "pTask->pUnpacked = pUVar6;" (assignment_expression "pTask->pUnpacked = pUVar6" (field_expression "pTask->pUnpacked" identifier -> field_identifier) = identifier) ;) (if_statement "if (pUVar6 == (UnpackedRecord *)0x0) {\n      return 7;\n    }" if (parenthesized_expression "(pUVar6 == (UnpackedRecord *)0x0)" ( (binary_expression "pUVar6 == (UnpackedRecord *)0x0" identifier == (cast_expression "(UnpackedRecord *)0x0" ( (type_descriptor "UnpackedRecord *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 7;\n    }" { (return_statement "return 7;" return number_literal ;) })) (expression_statement "pUVar6->nField = pTask->pSorter->pKeyInfo->nKeyField;" (assignment_expression "pUVar6->nField = pTask->pSorter->pKeyInfo->nKeyField" (field_expression "pUVar6->nField" identifier -> field_identifier) = (field_expression "pTask->pSorter->pKeyInfo->nKeyField" (field_expression "pTask->pSorter->pKeyInfo" (field_expression "pTask->pSorter" identifier -> field_identifier) -> field_identifier) -> field_identifier)) ;) (expression_statement "pTask->pUnpacked->errCode = '\0';" (assignment_expression "pTask->pUnpacked->errCode = '\0'" (field_expression "pTask->pUnpacked->errCode" (field_expression "pTask->pUnpacked" identifier -> field_identifier) -> field_identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "pVVar1 = pTask->pSorter;" (assignment_expression "pVVar1 = pTask->pSorter" identifier = (field_expression "pTask->pSorter" identifier -> field_identifier)) ;) })) (expression_statement "pSVar4 = pList->pList;" (assignment_expression "pSVar4 = pList->pList" identifier = (field_expression "pList->pList" identifier -> field_identifier)) ;) (expression_statement "p_Var2 = vdbeSorterCompareInt;" (assignment_expression "p_Var2 = vdbeSorterCompareInt" identifier = identifier) ;) (if_statement "if (pVVar1->typeMask != '\x01') {\n    p_Var2 = vdbeSorterCompare;\n    if (pVVar1->typeMask == '\x02') {\n      p_Var2 = vdbeSorterCompareText;\n    }\n  }" if (parenthesized_expression "(pVVar1->typeMask != '\x01')" ( (binary_expression "pVVar1->typeMask != '\x01'" (field_expression "pVVar1->typeMask" identifier -> field_identifier) != (char_literal "'\x01'" ' escape_sequence ')) )) (compound_statement "{\n    p_Var2 = vdbeSorterCompare;\n    if (pVVar1->typeMask == '\x02') {\n      p_Var2 = vdbeSorterCompareText;\n    }\n  }" { (expression_statement "p_Var2 = vdbeSorterCompare;" (assignment_expression "p_Var2 = vdbeSorterCompare" identifier = identifier) ;) (if_statement "if (pVVar1->typeMask == '\x02') {\n      p_Var2 = vdbeSorterCompareText;\n    }" if (parenthesized_expression "(pVVar1->typeMask == '\x02')" ( (binary_expression "pVVar1->typeMask == '\x02'" (field_expression "pVVar1->typeMask" identifier -> field_identifier) == (char_literal "'\x02'" ' escape_sequence ')) )) (compound_statement "{\n      p_Var2 = vdbeSorterCompareText;\n    }" { (expression_statement "p_Var2 = vdbeSorterCompareText;" (assignment_expression "p_Var2 = vdbeSorterCompareText" identifier = identifier) ;) })) })) (expression_statement "pTask->xCompare = p_Var2;" (assignment_expression "pTask->xCompare = p_Var2" (field_expression "pTask->xCompare" identifier -> field_identifier) = identifier) ;) (expression_statement "piVar3 = (int *)sqlite3MallocZero(CONCAT44(in_stack_ffffffd8,pList_1));" (assignment_expression "piVar3 = (int *)sqlite3MallocZero(CONCAT44(in_stack_ffffffd8,pList_1))" identifier = (cast_expression "(int *)sqlite3MallocZero(CONCAT44(in_stack_ffffffd8,pList_1))" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3MallocZero(CONCAT44(in_stack_ffffffd8,pList_1))" identifier (argument_list "(CONCAT44(in_stack_ffffffd8,pList_1))" ( (call_expression "CONCAT44(in_stack_ffffffd8,pList_1)" identifier (argument_list "(in_stack_ffffffd8,pList_1)" ( identifier , identifier ))) ))))) ;) (expression_statement "piVar9 = piVar3;" (assignment_expression "piVar9 = piVar3" identifier = identifier) ;) (if_statement "if (piVar3 == (int *)0x0) {\n    return 7;\n  }" if (parenthesized_expression "(piVar3 == (int *)0x0)" ( (binary_expression "piVar3 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 7;\n  }" { (return_statement "return 7;" return number_literal ;) })) (labeled_statement "joined_r0x0003d495:\n  do {\n    if (pSVar4 == (SorterRecord *)0x0) {\nLAB_0003d4f1:\n      piVar3 = piVar9 + 0x40;\n      pSVar4 = (SorterRecord *)0x0;\n      piVar7 = piVar9;\n      do {\n        pSVar10 = (SorterRecord *)*piVar9;\n        pSVar5 = pSVar4;\n        if ((pSVar10 != (SorterRecord *)0x0) && (pSVar5 = pSVar10, pSVar4 != (SorterRecord *)0x0)) {\n          pSVar5 = vdbeSorterMerge(pTask,pSVar4,pSVar10);\n        }\n        pSVar4 = pSVar5;\n        piVar9 = piVar9 + 1;\n      } while (piVar3 != piVar9);\n      pList->pList = pSVar4;\n      sqlite3_free(piVar7);\n      return (uint)pTask->pUnpacked->errCode;\n    }\n    pSVar10 = pList_1->pList;\n    if (pSVar10 == (SorterRecord *)0x0) {\n      pSVar10 = (pSVar4->u).pNext;\nLAB_0003d4b8:\n      (pSVar4->u).pNext = (SorterRecord *)0x0;\n      pSVar5 = (SorterRecord *)*piVar3;\n      piVar7 = piVar3;\n      if (pSVar5 == (SorterRecord *)0x0) {\n        *piVar3 = (int)pSVar4;\n        pSVar4 = pSVar10;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (pSVar10 != pSVar4) {\n        pSVar10 = (SorterRecord *)((int)&((pSVar4->u).pNext)->nVal + (int)&pSVar10->nVal);\n        goto LAB_0003d4b8;\n      }\n      (pSVar4->u).pNext = (SorterRecord *)0x0;\n      pSVar5 = (SorterRecord *)*piVar3;\n      if (pSVar5 == (SorterRecord *)0x0) {\n        *piVar9 = (int)pSVar4;\n        goto LAB_0003d4f1;\n      }\n      pSVar10 = (SorterRecord *)0x0;\n      piVar7 = piVar3;\n    }\n    do {\n      piVar8 = piVar7 + 1;\n      pSVar4 = vdbeSorterMerge(pTask,pSVar4,pSVar5);\n      *piVar7 = 0;\n      pSVar5 = (SorterRecord *)*piVar8;\n      piVar7 = piVar8;\n    } while (pSVar5 != (SorterRecord *)0x0);\n    *piVar8 = (int)pSVar4;\n    pSVar4 = pSVar10;\n  } while( true );" statement_identifier : (do_statement "do {\n    if (pSVar4 == (SorterRecord *)0x0) {\nLAB_0003d4f1:\n      piVar3 = piVar9 + 0x40;\n      pSVar4 = (SorterRecord *)0x0;\n      piVar7 = piVar9;\n      do {\n        pSVar10 = (SorterRecord *)*piVar9;\n        pSVar5 = pSVar4;\n        if ((pSVar10 != (SorterRecord *)0x0) && (pSVar5 = pSVar10, pSVar4 != (SorterRecord *)0x0)) {\n          pSVar5 = vdbeSorterMerge(pTask,pSVar4,pSVar10);\n        }\n        pSVar4 = pSVar5;\n        piVar9 = piVar9 + 1;\n      } while (piVar3 != piVar9);\n      pList->pList = pSVar4;\n      sqlite3_free(piVar7);\n      return (uint)pTask->pUnpacked->errCode;\n    }\n    pSVar10 = pList_1->pList;\n    if (pSVar10 == (SorterRecord *)0x0) {\n      pSVar10 = (pSVar4->u).pNext;\nLAB_0003d4b8:\n      (pSVar4->u).pNext = (SorterRecord *)0x0;\n      pSVar5 = (SorterRecord *)*piVar3;\n      piVar7 = piVar3;\n      if (pSVar5 == (SorterRecord *)0x0) {\n        *piVar3 = (int)pSVar4;\n        pSVar4 = pSVar10;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (pSVar10 != pSVar4) {\n        pSVar10 = (SorterRecord *)((int)&((pSVar4->u).pNext)->nVal + (int)&pSVar10->nVal);\n        goto LAB_0003d4b8;\n      }\n      (pSVar4->u).pNext = (SorterRecord *)0x0;\n      pSVar5 = (SorterRecord *)*piVar3;\n      if (pSVar5 == (SorterRecord *)0x0) {\n        *piVar9 = (int)pSVar4;\n        goto LAB_0003d4f1;\n      }\n      pSVar10 = (SorterRecord *)0x0;\n      piVar7 = piVar3;\n    }\n    do {\n      piVar8 = piVar7 + 1;\n      pSVar4 = vdbeSorterMerge(pTask,pSVar4,pSVar5);\n      *piVar7 = 0;\n      pSVar5 = (SorterRecord *)*piVar8;\n      piVar7 = piVar8;\n    } while (pSVar5 != (SorterRecord *)0x0);\n    *piVar8 = (int)pSVar4;\n    pSVar4 = pSVar10;\n  } while( true );" do (compound_statement "{\n    if (pSVar4 == (SorterRecord *)0x0) {\nLAB_0003d4f1:\n      piVar3 = piVar9 + 0x40;\n      pSVar4 = (SorterRecord *)0x0;\n      piVar7 = piVar9;\n      do {\n        pSVar10 = (SorterRecord *)*piVar9;\n        pSVar5 = pSVar4;\n        if ((pSVar10 != (SorterRecord *)0x0) && (pSVar5 = pSVar10, pSVar4 != (SorterRecord *)0x0)) {\n          pSVar5 = vdbeSorterMerge(pTask,pSVar4,pSVar10);\n        }\n        pSVar4 = pSVar5;\n        piVar9 = piVar9 + 1;\n      } while (piVar3 != piVar9);\n      pList->pList = pSVar4;\n      sqlite3_free(piVar7);\n      return (uint)pTask->pUnpacked->errCode;\n    }\n    pSVar10 = pList_1->pList;\n    if (pSVar10 == (SorterRecord *)0x0) {\n      pSVar10 = (pSVar4->u).pNext;\nLAB_0003d4b8:\n      (pSVar4->u).pNext = (SorterRecord *)0x0;\n      pSVar5 = (SorterRecord *)*piVar3;\n      piVar7 = piVar3;\n      if (pSVar5 == (SorterRecord *)0x0) {\n        *piVar3 = (int)pSVar4;\n        pSVar4 = pSVar10;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (pSVar10 != pSVar4) {\n        pSVar10 = (SorterRecord *)((int)&((pSVar4->u).pNext)->nVal + (int)&pSVar10->nVal);\n        goto LAB_0003d4b8;\n      }\n      (pSVar4->u).pNext = (SorterRecord *)0x0;\n      pSVar5 = (SorterRecord *)*piVar3;\n      if (pSVar5 == (SorterRecord *)0x0) {\n        *piVar9 = (int)pSVar4;\n        goto LAB_0003d4f1;\n      }\n      pSVar10 = (SorterRecord *)0x0;\n      piVar7 = piVar3;\n    }\n    do {\n      piVar8 = piVar7 + 1;\n      pSVar4 = vdbeSorterMerge(pTask,pSVar4,pSVar5);\n      *piVar7 = 0;\n      pSVar5 = (SorterRecord *)*piVar8;\n      piVar7 = piVar8;\n    } while (pSVar5 != (SorterRecord *)0x0);\n    *piVar8 = (int)pSVar4;\n    pSVar4 = pSVar10;\n  }" { (if_statement "if (pSVar4 == (SorterRecord *)0x0) {\nLAB_0003d4f1:\n      piVar3 = piVar9 + 0x40;\n      pSVar4 = (SorterRecord *)0x0;\n      piVar7 = piVar9;\n      do {\n        pSVar10 = (SorterRecord *)*piVar9;\n        pSVar5 = pSVar4;\n        if ((pSVar10 != (SorterRecord *)0x0) && (pSVar5 = pSVar10, pSVar4 != (SorterRecord *)0x0)) {\n          pSVar5 = vdbeSorterMerge(pTask,pSVar4,pSVar10);\n        }\n        pSVar4 = pSVar5;\n        piVar9 = piVar9 + 1;\n      } while (piVar3 != piVar9);\n      pList->pList = pSVar4;\n      sqlite3_free(piVar7);\n      return (uint)pTask->pUnpacked->errCode;\n    }" if (parenthesized_expression "(pSVar4 == (SorterRecord *)0x0)" ( (binary_expression "pSVar4 == (SorterRecord *)0x0" identifier == (cast_expression "(SorterRecord *)0x0" ( (type_descriptor "SorterRecord *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_0003d4f1:\n      piVar3 = piVar9 + 0x40;\n      pSVar4 = (SorterRecord *)0x0;\n      piVar7 = piVar9;\n      do {\n        pSVar10 = (SorterRecord *)*piVar9;\n        pSVar5 = pSVar4;\n        if ((pSVar10 != (SorterRecord *)0x0) && (pSVar5 = pSVar10, pSVar4 != (SorterRecord *)0x0)) {\n          pSVar5 = vdbeSorterMerge(pTask,pSVar4,pSVar10);\n        }\n        pSVar4 = pSVar5;\n        piVar9 = piVar9 + 1;\n      } while (piVar3 != piVar9);\n      pList->pList = pSVar4;\n      sqlite3_free(piVar7);\n      return (uint)pTask->pUnpacked->errCode;\n    }" { (labeled_statement "LAB_0003d4f1:\n      piVar3 = piVar9 + 0x40;" statement_identifier : (expression_statement "piVar3 = piVar9 + 0x40;" (assignment_expression "piVar3 = piVar9 + 0x40" identifier = (binary_expression "piVar9 + 0x40" identifier + number_literal)) ;)) (expression_statement "pSVar4 = (SorterRecord *)0x0;" (assignment_expression "pSVar4 = (SorterRecord *)0x0" identifier = (cast_expression "(SorterRecord *)0x0" ( (type_descriptor "SorterRecord *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "piVar7 = piVar9;" (assignment_expression "piVar7 = piVar9" identifier = identifier) ;) (do_statement "do {\n        pSVar10 = (SorterRecord *)*piVar9;\n        pSVar5 = pSVar4;\n        if ((pSVar10 != (SorterRecord *)0x0) && (pSVar5 = pSVar10, pSVar4 != (SorterRecord *)0x0)) {\n          pSVar5 = vdbeSorterMerge(pTask,pSVar4,pSVar10);\n        }\n        pSVar4 = pSVar5;\n        piVar9 = piVar9 + 1;\n      } while (piVar3 != piVar9);" do (compound_statement "{\n        pSVar10 = (SorterRecord *)*piVar9;\n        pSVar5 = pSVar4;\n        if ((pSVar10 != (SorterRecord *)0x0) && (pSVar5 = pSVar10, pSVar4 != (SorterRecord *)0x0)) {\n          pSVar5 = vdbeSorterMerge(pTask,pSVar4,pSVar10);\n        }\n        pSVar4 = pSVar5;\n        piVar9 = piVar9 + 1;\n      }" { (expression_statement "pSVar10 = (SorterRecord *)*piVar9;" (assignment_expression "pSVar10 = (SorterRecord *)*piVar9" identifier = (cast_expression "(SorterRecord *)*piVar9" ( (type_descriptor "SorterRecord *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar9" * identifier))) ;) (expression_statement "pSVar5 = pSVar4;" (assignment_expression "pSVar5 = pSVar4" identifier = identifier) ;) (if_statement "if ((pSVar10 != (SorterRecord *)0x0) && (pSVar5 = pSVar10, pSVar4 != (SorterRecord *)0x0)) {\n          pSVar5 = vdbeSorterMerge(pTask,pSVar4,pSVar10);\n        }" if (parenthesized_expression "((pSVar10 != (SorterRecord *)0x0) && (pSVar5 = pSVar10, pSVar4 != (SorterRecord *)0x0))" ( (binary_expression "(pSVar10 != (SorterRecord *)0x0) && (pSVar5 = pSVar10, pSVar4 != (SorterRecord *)0x0)" (parenthesized_expression "(pSVar10 != (SorterRecord *)0x0)" ( (binary_expression "pSVar10 != (SorterRecord *)0x0" identifier != (cast_expression "(SorterRecord *)0x0" ( (type_descriptor "SorterRecord *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(pSVar5 = pSVar10, pSVar4 != (SorterRecord *)0x0)" ( (comma_expression "pSVar5 = pSVar10, pSVar4 != (SorterRecord *)0x0" (assignment_expression "pSVar5 = pSVar10" identifier = identifier) , (binary_expression "pSVar4 != (SorterRecord *)0x0" identifier != (cast_expression "(SorterRecord *)0x0" ( (type_descriptor "SorterRecord *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) (compound_statement "{\n          pSVar5 = vdbeSorterMerge(pTask,pSVar4,pSVar10);\n        }" { (expression_statement "pSVar5 = vdbeSorterMerge(pTask,pSVar4,pSVar10);" (assignment_expression "pSVar5 = vdbeSorterMerge(pTask,pSVar4,pSVar10)" identifier = (call_expression "vdbeSorterMerge(pTask,pSVar4,pSVar10)" identifier (argument_list "(pTask,pSVar4,pSVar10)" ( identifier , identifier , identifier )))) ;) })) (expression_statement "pSVar4 = pSVar5;" (assignment_expression "pSVar4 = pSVar5" identifier = identifier) ;) (expression_statement "piVar9 = piVar9 + 1;" (assignment_expression "piVar9 = piVar9 + 1" identifier = (binary_expression "piVar9 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(piVar3 != piVar9)" ( (binary_expression "piVar3 != piVar9" identifier != identifier) )) ;) (expression_statement "pList->pList = pSVar4;" (assignment_expression "pList->pList = pSVar4" (field_expression "pList->pList" identifier -> field_identifier) = identifier) ;) (expression_statement "sqlite3_free(piVar7);" (call_expression "sqlite3_free(piVar7)" identifier (argument_list "(piVar7)" ( identifier ))) ;) (return_statement "return (uint)pTask->pUnpacked->errCode;" return (cast_expression "(uint)pTask->pUnpacked->errCode" ( (type_descriptor "uint" type_identifier) ) (field_expression "pTask->pUnpacked->errCode" (field_expression "pTask->pUnpacked" identifier -> field_identifier) -> field_identifier)) ;) })) (expression_statement "pSVar10 = pList_1->pList;" (assignment_expression "pSVar10 = pList_1->pList" identifier = (field_expression "pList_1->pList" identifier -> field_identifier)) ;) (if_statement "if (pSVar10 == (SorterRecord *)0x0) {\n      pSVar10 = (pSVar4->u).pNext;\nLAB_0003d4b8:\n      (pSVar4->u).pNext = (SorterRecord *)0x0;\n      pSVar5 = (SorterRecord *)*piVar3;\n      piVar7 = piVar3;\n      if (pSVar5 == (SorterRecord *)0x0) {\n        *piVar3 = (int)pSVar4;\n        pSVar4 = pSVar10;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (pSVar10 != pSVar4) {\n        pSVar10 = (SorterRecord *)((int)&((pSVar4->u).pNext)->nVal + (int)&pSVar10->nVal);\n        goto LAB_0003d4b8;\n      }\n      (pSVar4->u).pNext = (SorterRecord *)0x0;\n      pSVar5 = (SorterRecord *)*piVar3;\n      if (pSVar5 == (SorterRecord *)0x0) {\n        *piVar9 = (int)pSVar4;\n        goto LAB_0003d4f1;\n      }\n      pSVar10 = (SorterRecord *)0x0;\n      piVar7 = piVar3;\n    }" if (parenthesized_expression "(pSVar10 == (SorterRecord *)0x0)" ( (binary_expression "pSVar10 == (SorterRecord *)0x0" identifier == (cast_expression "(SorterRecord *)0x0" ( (type_descriptor "SorterRecord *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pSVar10 = (pSVar4->u).pNext;\nLAB_0003d4b8:\n      (pSVar4->u).pNext = (SorterRecord *)0x0;\n      pSVar5 = (SorterRecord *)*piVar3;\n      piVar7 = piVar3;\n      if (pSVar5 == (SorterRecord *)0x0) {\n        *piVar3 = (int)pSVar4;\n        pSVar4 = pSVar10;\n        goto joined_r0x0003d495;\n      }\n    }" { (expression_statement "pSVar10 = (pSVar4->u).pNext;" (assignment_expression "pSVar10 = (pSVar4->u).pNext" identifier = (field_expression "(pSVar4->u).pNext" (parenthesized_expression "(pSVar4->u)" ( (field_expression "pSVar4->u" identifier -> field_identifier) )) . field_identifier)) ;) (labeled_statement "LAB_0003d4b8:\n      (pSVar4->u).pNext = (SorterRecord *)0x0;" statement_identifier : (expression_statement "(pSVar4->u).pNext = (SorterRecord *)0x0;" (assignment_expression "(pSVar4->u).pNext = (SorterRecord *)0x0" (field_expression "(pSVar4->u).pNext" (parenthesized_expression "(pSVar4->u)" ( (field_expression "pSVar4->u" identifier -> field_identifier) )) . field_identifier) = (cast_expression "(SorterRecord *)0x0" ( (type_descriptor "SorterRecord *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;)) (expression_statement "pSVar5 = (SorterRecord *)*piVar3;" (assignment_expression "pSVar5 = (SorterRecord *)*piVar3" identifier = (cast_expression "(SorterRecord *)*piVar3" ( (type_descriptor "SorterRecord *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar3" * identifier))) ;) (expression_statement "piVar7 = piVar3;" (assignment_expression "piVar7 = piVar3" identifier = identifier) ;) (if_statement "if (pSVar5 == (SorterRecord *)0x0) {\n        *piVar3 = (int)pSVar4;\n        pSVar4 = pSVar10;\n        goto joined_r0x0003d495;\n      }" if (parenthesized_expression "(pSVar5 == (SorterRecord *)0x0)" ( (binary_expression "pSVar5 == (SorterRecord *)0x0" identifier == (cast_expression "(SorterRecord *)0x0" ( (type_descriptor "SorterRecord *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *piVar3 = (int)pSVar4;\n        pSVar4 = pSVar10;\n        goto joined_r0x0003d495;\n      }" { (expression_statement "*piVar3 = (int)pSVar4;" (assignment_expression "*piVar3 = (int)pSVar4" (pointer_expression "*piVar3" * identifier) = (cast_expression "(int)pSVar4" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "pSVar4 = pSVar10;" (assignment_expression "pSVar4 = pSVar10" identifier = identifier) ;) (goto_statement "goto joined_r0x0003d495;" goto statement_identifier ;) })) }) (else_clause "else {\n      if (pSVar10 != pSVar4) {\n        pSVar10 = (SorterRecord *)((int)&((pSVar4->u).pNext)->nVal + (int)&pSVar10->nVal);\n        goto LAB_0003d4b8;\n      }\n      (pSVar4->u).pNext = (SorterRecord *)0x0;\n      pSVar5 = (SorterRecord *)*piVar3;\n      if (pSVar5 == (SorterRecord *)0x0) {\n        *piVar9 = (int)pSVar4;\n        goto LAB_0003d4f1;\n      }\n      pSVar10 = (SorterRecord *)0x0;\n      piVar7 = piVar3;\n    }" else (compound_statement "{\n      if (pSVar10 != pSVar4) {\n        pSVar10 = (SorterRecord *)((int)&((pSVar4->u).pNext)->nVal + (int)&pSVar10->nVal);\n        goto LAB_0003d4b8;\n      }\n      (pSVar4->u).pNext = (SorterRecord *)0x0;\n      pSVar5 = (SorterRecord *)*piVar3;\n      if (pSVar5 == (SorterRecord *)0x0) {\n        *piVar9 = (int)pSVar4;\n        goto LAB_0003d4f1;\n      }\n      pSVar10 = (SorterRecord *)0x0;\n      piVar7 = piVar3;\n    }" { (if_statement "if (pSVar10 != pSVar4) {\n        pSVar10 = (SorterRecord *)((int)&((pSVar4->u).pNext)->nVal + (int)&pSVar10->nVal);\n        goto LAB_0003d4b8;\n      }" if (parenthesized_expression "(pSVar10 != pSVar4)" ( (binary_expression "pSVar10 != pSVar4" identifier != identifier) )) (compound_statement "{\n        pSVar10 = (SorterRecord *)((int)&((pSVar4->u).pNext)->nVal + (int)&pSVar10->nVal);\n        goto LAB_0003d4b8;\n      }" { (expression_statement "pSVar10 = (SorterRecord *)((int)&((pSVar4->u).pNext)->nVal + (int)&pSVar10->nVal);" (assignment_expression "pSVar10 = (SorterRecord *)((int)&((pSVar4->u).pNext)->nVal + (int)&pSVar10->nVal)" identifier = (cast_expression "(SorterRecord *)((int)&((pSVar4->u).pNext)->nVal + (int)&pSVar10->nVal)" ( (type_descriptor "SorterRecord *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&((pSVar4->u).pNext)->nVal + (int)&pSVar10->nVal)" ( (binary_expression "(int)&((pSVar4->u).pNext)->nVal + (int)&pSVar10->nVal" (cast_expression "(int)&((pSVar4->u).pNext)->nVal" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&((pSVar4->u).pNext)->nVal" & (field_expression "((pSVar4->u).pNext)->nVal" (parenthesized_expression "((pSVar4->u).pNext)" ( (field_expression "(pSVar4->u).pNext" (parenthesized_expression "(pSVar4->u)" ( (field_expression "pSVar4->u" identifier -> field_identifier) )) . field_identifier) )) -> field_identifier))) + (cast_expression "(int)&pSVar10->nVal" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&pSVar10->nVal" & (field_expression "pSVar10->nVal" identifier -> field_identifier)))) )))) ;) (goto_statement "goto LAB_0003d4b8;" goto statement_identifier ;) })) (expression_statement "(pSVar4->u).pNext = (SorterRecord *)0x0;" (assignment_expression "(pSVar4->u).pNext = (SorterRecord *)0x0" (field_expression "(pSVar4->u).pNext" (parenthesized_expression "(pSVar4->u)" ( (field_expression "pSVar4->u" identifier -> field_identifier) )) . field_identifier) = (cast_expression "(SorterRecord *)0x0" ( (type_descriptor "SorterRecord *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pSVar5 = (SorterRecord *)*piVar3;" (assignment_expression "pSVar5 = (SorterRecord *)*piVar3" identifier = (cast_expression "(SorterRecord *)*piVar3" ( (type_descriptor "SorterRecord *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar3" * identifier))) ;) (if_statement "if (pSVar5 == (SorterRecord *)0x0) {\n        *piVar9 = (int)pSVar4;\n        goto LAB_0003d4f1;\n      }" if (parenthesized_expression "(pSVar5 == (SorterRecord *)0x0)" ( (binary_expression "pSVar5 == (SorterRecord *)0x0" identifier == (cast_expression "(SorterRecord *)0x0" ( (type_descriptor "SorterRecord *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *piVar9 = (int)pSVar4;\n        goto LAB_0003d4f1;\n      }" { (expression_statement "*piVar9 = (int)pSVar4;" (assignment_expression "*piVar9 = (int)pSVar4" (pointer_expression "*piVar9" * identifier) = (cast_expression "(int)pSVar4" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (goto_statement "goto LAB_0003d4f1;" goto statement_identifier ;) })) (expression_statement "pSVar10 = (SorterRecord *)0x0;" (assignment_expression "pSVar10 = (SorterRecord *)0x0" identifier = (cast_expression "(SorterRecord *)0x0" ( (type_descriptor "SorterRecord *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "piVar7 = piVar3;" (assignment_expression "piVar7 = piVar3" identifier = identifier) ;) }))) (do_statement "do {\n      piVar8 = piVar7 + 1;\n      pSVar4 = vdbeSorterMerge(pTask,pSVar4,pSVar5);\n      *piVar7 = 0;\n      pSVar5 = (SorterRecord *)*piVar8;\n      piVar7 = piVar8;\n    } while (pSVar5 != (SorterRecord *)0x0);" do (compound_statement "{\n      piVar8 = piVar7 + 1;\n      pSVar4 = vdbeSorterMerge(pTask,pSVar4,pSVar5);\n      *piVar7 = 0;\n      pSVar5 = (SorterRecord *)*piVar8;\n      piVar7 = piVar8;\n    }" { (expression_statement "piVar8 = piVar7 + 1;" (assignment_expression "piVar8 = piVar7 + 1" identifier = (binary_expression "piVar7 + 1" identifier + number_literal)) ;) (expression_statement "pSVar4 = vdbeSorterMerge(pTask,pSVar4,pSVar5);" (assignment_expression "pSVar4 = vdbeSorterMerge(pTask,pSVar4,pSVar5)" identifier = (call_expression "vdbeSorterMerge(pTask,pSVar4,pSVar5)" identifier (argument_list "(pTask,pSVar4,pSVar5)" ( identifier , identifier , identifier )))) ;) (expression_statement "*piVar7 = 0;" (assignment_expression "*piVar7 = 0" (pointer_expression "*piVar7" * identifier) = number_literal) ;) (expression_statement "pSVar5 = (SorterRecord *)*piVar8;" (assignment_expression "pSVar5 = (SorterRecord *)*piVar8" identifier = (cast_expression "(SorterRecord *)*piVar8" ( (type_descriptor "SorterRecord *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar8" * identifier))) ;) (expression_statement "piVar7 = piVar8;" (assignment_expression "piVar7 = piVar8" identifier = identifier) ;) }) while (parenthesized_expression "(pSVar5 != (SorterRecord *)0x0)" ( (binary_expression "pSVar5 != (SorterRecord *)0x0" identifier != (cast_expression "(SorterRecord *)0x0" ( (type_descriptor "SorterRecord *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (expression_statement "*piVar8 = (int)pSVar4;" (assignment_expression "*piVar8 = (int)pSVar4" (pointer_expression "*piVar8" * identifier) = (cast_expression "(int)pSVar4" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "pSVar4 = pSVar10;" (assignment_expression "pSVar4 = pSVar10" identifier = identifier) ;) }) while (parenthesized_expression "( true )" ( true )) ;)) })))
(translation_unit "undefined1 __regparm3 FUN_0003d420(int param_1,int *param_2,int *param_3)\n\n{\n  code *pcVar1;\n  int *piVar2;\n  int iVar3;\n  int *piVar4;\n  int *piVar5;\n  int iVar6;\n  bool bVar7;\n  \n  iVar6 = *(int *)(param_1 + 8);\n  if (*(int *)(param_1 + 0xc) == 0) {\n    iVar6 = FUN_00028830();\n    *(int *)(param_1 + 0xc) = iVar6;\n    if (iVar6 == 0) {\n      return 7;\n    }\n    *(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6);\n    *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0;\n    iVar6 = *(int *)(param_1 + 8);\n  }\n  iVar3 = *param_2;\n  pcVar1 = FUN_00055110;\n  if (*(char *)(iVar6 + 0x3c) != '\x01') {\n    pcVar1 = FUN_00054f00;\n    if (*(char *)(iVar6 + 0x3c) == '\x02') {\n      pcVar1 = FUN_000552f0;\n    }\n  }\n  *(code **)(param_1 + 0x20) = pcVar1;\n  piVar2 = (int *)FUN_000261b0();\n  if (piVar2 == (int *)0x0) {\n    return 7;\n  }\njoined_r0x0003d495:\n  do {\n    if (iVar3 == 0) {\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }\n    iVar6 = *param_3;\n    if (iVar6 == 0) {\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }\n    do {\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    } while (*piVar4 != 0);\n    *piVar4 = iVar3;\n    iVar3 = iVar6;\n  } while( true );\n}\n\n" (function_definition "undefined1 __regparm3 FUN_0003d420(int param_1,int *param_2,int *param_3)\n\n{\n  code *pcVar1;\n  int *piVar2;\n  int iVar3;\n  int *piVar4;\n  int *piVar5;\n  int iVar6;\n  bool bVar7;\n  \n  iVar6 = *(int *)(param_1 + 8);\n  if (*(int *)(param_1 + 0xc) == 0) {\n    iVar6 = FUN_00028830();\n    *(int *)(param_1 + 0xc) = iVar6;\n    if (iVar6 == 0) {\n      return 7;\n    }\n    *(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6);\n    *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0;\n    iVar6 = *(int *)(param_1 + 8);\n  }\n  iVar3 = *param_2;\n  pcVar1 = FUN_00055110;\n  if (*(char *)(iVar6 + 0x3c) != '\x01') {\n    pcVar1 = FUN_00054f00;\n    if (*(char *)(iVar6 + 0x3c) == '\x02') {\n      pcVar1 = FUN_000552f0;\n    }\n  }\n  *(code **)(param_1 + 0x20) = pcVar1;\n  piVar2 = (int *)FUN_000261b0();\n  if (piVar2 == (int *)0x0) {\n    return 7;\n  }\njoined_r0x0003d495:\n  do {\n    if (iVar3 == 0) {\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }\n    iVar6 = *param_3;\n    if (iVar6 == 0) {\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }\n    do {\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    } while (*piVar4 != 0);\n    *piVar4 = iVar3;\n    iVar3 = iVar6;\n  } while( true );\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0003d420(int param_1,int *param_2,int *param_3)" identifier (parameter_list "(int param_1,int *param_2,int *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  code *pcVar1;\n  int *piVar2;\n  int iVar3;\n  int *piVar4;\n  int *piVar5;\n  int iVar6;\n  bool bVar7;\n  \n  iVar6 = *(int *)(param_1 + 8);\n  if (*(int *)(param_1 + 0xc) == 0) {\n    iVar6 = FUN_00028830();\n    *(int *)(param_1 + 0xc) = iVar6;\n    if (iVar6 == 0) {\n      return 7;\n    }\n    *(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6);\n    *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0;\n    iVar6 = *(int *)(param_1 + 8);\n  }\n  iVar3 = *param_2;\n  pcVar1 = FUN_00055110;\n  if (*(char *)(iVar6 + 0x3c) != '\x01') {\n    pcVar1 = FUN_00054f00;\n    if (*(char *)(iVar6 + 0x3c) == '\x02') {\n      pcVar1 = FUN_000552f0;\n    }\n  }\n  *(code **)(param_1 + 0x20) = pcVar1;\n  piVar2 = (int *)FUN_000261b0();\n  if (piVar2 == (int *)0x0) {\n    return 7;\n  }\njoined_r0x0003d495:\n  do {\n    if (iVar3 == 0) {\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }\n    iVar6 = *param_3;\n    if (iVar6 == 0) {\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }\n    do {\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    } while (*piVar4 != 0);\n    *piVar4 = iVar3;\n    iVar3 = iVar6;\n  } while( true );\n}" { (declaration "code *pcVar1;" type_identifier (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "bool bVar7;" primitive_type identifier ;) (expression_statement "iVar6 = *(int *)(param_1 + 8);" (assignment_expression "iVar6 = *(int *)(param_1 + 8)" identifier = (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (if_statement "if (*(int *)(param_1 + 0xc) == 0) {\n    iVar6 = FUN_00028830();\n    *(int *)(param_1 + 0xc) = iVar6;\n    if (iVar6 == 0) {\n      return 7;\n    }\n    *(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6);\n    *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0;\n    iVar6 = *(int *)(param_1 + 8);\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0xc) == 0)" ( (binary_expression "*(int *)(param_1 + 0xc) == 0" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    iVar6 = FUN_00028830();\n    *(int *)(param_1 + 0xc) = iVar6;\n    if (iVar6 == 0) {\n      return 7;\n    }\n    *(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6);\n    *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0;\n    iVar6 = *(int *)(param_1 + 8);\n  }" { (expression_statement "iVar6 = FUN_00028830();" (assignment_expression "iVar6 = FUN_00028830()" identifier = (call_expression "FUN_00028830()" identifier (argument_list "()" ( )))) ;) (expression_statement "*(int *)(param_1 + 0xc) = iVar6;" (assignment_expression "*(int *)(param_1 + 0xc) = iVar6" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar6 == 0) {\n      return 7;\n    }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n      return 7;\n    }" { (return_statement "return 7;" return number_literal ;) })) (expression_statement "*(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6);" (assignment_expression "*(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6)" (pointer_expression "*(undefined2 *)(iVar6 + 8)" * (cast_expression "(undefined2 *)(iVar6 + 8)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 8)" ( (binary_expression "iVar6 + 8" identifier + number_literal) )))) = (pointer_expression "*(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6)" * (cast_expression "(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6)" ( (binary_expression "*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6" (pointer_expression "*(int *)(*(int *)(param_1 + 8) + 0x1c)" * (cast_expression "(int *)(*(int *)(param_1 + 8) + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 8) + 0x1c)" ( (binary_expression "*(int *)(param_1 + 8) + 0x1c" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) + number_literal) )))) + number_literal) ))))) ;) (expression_statement "*(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0;" (assignment_expression "*(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0" (pointer_expression "*(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb)" * (cast_expression "(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0xc) + 0xb)" ( (binary_expression "*(int *)(param_1 + 0xc) + 0xb" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) + number_literal) )))) = number_literal) ;) (expression_statement "iVar6 = *(int *)(param_1 + 8);" (assignment_expression "iVar6 = *(int *)(param_1 + 8)" identifier = (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) })) (expression_statement "iVar3 = *param_2;" (assignment_expression "iVar3 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "pcVar1 = FUN_00055110;" (assignment_expression "pcVar1 = FUN_00055110" identifier = identifier) ;) (if_statement "if (*(char *)(iVar6 + 0x3c) != '\x01') {\n    pcVar1 = FUN_00054f00;\n    if (*(char *)(iVar6 + 0x3c) == '\x02') {\n      pcVar1 = FUN_000552f0;\n    }\n  }" if (parenthesized_expression "(*(char *)(iVar6 + 0x3c) != '\x01')" ( (binary_expression "*(char *)(iVar6 + 0x3c) != '\x01'" (pointer_expression "*(char *)(iVar6 + 0x3c)" * (cast_expression "(char *)(iVar6 + 0x3c)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x3c)" ( (binary_expression "iVar6 + 0x3c" identifier + number_literal) )))) != (char_literal "'\x01'" ' escape_sequence ')) )) (compound_statement "{\n    pcVar1 = FUN_00054f00;\n    if (*(char *)(iVar6 + 0x3c) == '\x02') {\n      pcVar1 = FUN_000552f0;\n    }\n  }" { (expression_statement "pcVar1 = FUN_00054f00;" (assignment_expression "pcVar1 = FUN_00054f00" identifier = identifier) ;) (if_statement "if (*(char *)(iVar6 + 0x3c) == '\x02') {\n      pcVar1 = FUN_000552f0;\n    }" if (parenthesized_expression "(*(char *)(iVar6 + 0x3c) == '\x02')" ( (binary_expression "*(char *)(iVar6 + 0x3c) == '\x02'" (pointer_expression "*(char *)(iVar6 + 0x3c)" * (cast_expression "(char *)(iVar6 + 0x3c)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + 0x3c)" ( (binary_expression "iVar6 + 0x3c" identifier + number_literal) )))) == (char_literal "'\x02'" ' escape_sequence ')) )) (compound_statement "{\n      pcVar1 = FUN_000552f0;\n    }" { (expression_statement "pcVar1 = FUN_000552f0;" (assignment_expression "pcVar1 = FUN_000552f0" identifier = identifier) ;) })) })) (expression_statement "*(code **)(param_1 + 0x20) = pcVar1;" (assignment_expression "*(code **)(param_1 + 0x20) = pcVar1" (pointer_expression "*(code **)(param_1 + 0x20)" * (cast_expression "(code **)(param_1 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = identifier) ;) (expression_statement "piVar2 = (int *)FUN_000261b0();" (assignment_expression "piVar2 = (int *)FUN_000261b0()" identifier = (cast_expression "(int *)FUN_000261b0()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000261b0()" identifier (argument_list "()" ( ))))) ;) (if_statement "if (piVar2 == (int *)0x0) {\n    return 7;\n  }" if (parenthesized_expression "(piVar2 == (int *)0x0)" ( (binary_expression "piVar2 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 7;\n  }" { (return_statement "return 7;" return number_literal ;) })) (labeled_statement "joined_r0x0003d495:\n  do {\n    if (iVar3 == 0) {\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }\n    iVar6 = *param_3;\n    if (iVar6 == 0) {\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }\n    do {\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    } while (*piVar4 != 0);\n    *piVar4 = iVar3;\n    iVar3 = iVar6;\n  } while( true );" statement_identifier : (do_statement "do {\n    if (iVar3 == 0) {\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }\n    iVar6 = *param_3;\n    if (iVar6 == 0) {\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }\n    do {\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    } while (*piVar4 != 0);\n    *piVar4 = iVar3;\n    iVar3 = iVar6;\n  } while( true );" do (compound_statement "{\n    if (iVar3 == 0) {\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }\n    iVar6 = *param_3;\n    if (iVar6 == 0) {\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }\n    do {\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    } while (*piVar4 != 0);\n    *piVar4 = iVar3;\n    iVar3 = iVar6;\n  }" { (if_statement "if (iVar3 == 0) {\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }" { (labeled_statement "LAB_0003d4f1:\n      iVar6 = 0;" statement_identifier : (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;)) (expression_statement "piVar5 = piVar2;" (assignment_expression "piVar5 = piVar2" identifier = identifier) ;) (do_statement "do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);" do (compound_statement "{\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      }" { (if_statement "if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }" if (parenthesized_expression "((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7))" ( (binary_expression "(*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)" (parenthesized_expression "(*piVar5 != 0)" ( (binary_expression "*piVar5 != 0" (pointer_expression "*piVar5" * identifier) != number_literal) )) && (parenthesized_expression "(bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)" ( (comma_expression "bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7" (assignment_expression "bVar7 = iVar6 != 0" identifier = (binary_expression "iVar6 != 0" identifier != number_literal)) , (comma_expression "iVar6 = *piVar5, bVar7" (assignment_expression "iVar6 = *piVar5" identifier = (pointer_expression "*piVar5" * identifier)) , identifier)) ))) )) (compound_statement "{\n          iVar6 = FUN_0001d690();\n        }" { (expression_statement "iVar6 = FUN_0001d690();" (assignment_expression "iVar6 = FUN_0001d690()" identifier = (call_expression "FUN_0001d690()" identifier (argument_list "()" ( )))) ;) })) (expression_statement "piVar5 = piVar5 + 1;" (assignment_expression "piVar5 = piVar5 + 1" identifier = (binary_expression "piVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(piVar2 + 0x40 != piVar5)" ( (binary_expression "piVar2 + 0x40 != piVar5" (binary_expression "piVar2 + 0x40" identifier + number_literal) != identifier) )) ;) (expression_statement "*param_2 = iVar6;" (assignment_expression "*param_2 = iVar6" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "FUN_000264d0(piVar2);" (call_expression "FUN_000264d0(piVar2)" identifier (argument_list "(piVar2)" ( identifier ))) ;) (return_statement "return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);" return (pointer_expression "*(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb)" * (cast_expression "(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0xc) + 0xb)" ( (binary_expression "*(int *)(param_1 + 0xc) + 0xb" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) + number_literal) )))) ;) })) (expression_statement "iVar6 = *param_3;" (assignment_expression "iVar6 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) (if_statement "if (iVar6 == 0) {\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }" { (expression_statement "iVar6 = *(int *)(iVar3 + 4);" (assignment_expression "iVar6 = *(int *)(iVar3 + 4)" identifier = (pointer_expression "*(int *)(iVar3 + 4)" * (cast_expression "(int *)(iVar3 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 4)" ( (binary_expression "iVar3 + 4" identifier + number_literal) ))))) ;) (labeled_statement "LAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;" statement_identifier : (expression_statement "*(undefined4 *)(iVar3 + 4) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 4) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 4)" * (cast_expression "(undefined4 *)(iVar3 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 4)" ( (binary_expression "iVar3 + 4" identifier + number_literal) )))) = number_literal) ;)) (expression_statement "piVar5 = piVar2;" (assignment_expression "piVar5 = piVar2" identifier = identifier) ;) (if_statement "if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }" if (parenthesized_expression "(*piVar2 == 0)" ( (binary_expression "*piVar2 == 0" (pointer_expression "*piVar2" * identifier) == number_literal) )) (compound_statement "{\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }" { (expression_statement "*piVar2 = iVar3;" (assignment_expression "*piVar2 = iVar3" (pointer_expression "*piVar2" * identifier) = identifier) ;) (expression_statement "iVar3 = iVar6;" (assignment_expression "iVar3 = iVar6" identifier = identifier) ;) (goto_statement "goto joined_r0x0003d495;" goto statement_identifier ;) })) }) (else_clause "else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }" else (compound_statement "{\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }" { (if_statement "if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }" if (parenthesized_expression "(iVar6 != iVar3)" ( (binary_expression "iVar6 != iVar3" identifier != identifier) )) (compound_statement "{\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }" { (expression_statement "iVar6 = iVar6 + *(int *)(iVar3 + 4);" (assignment_expression "iVar6 = iVar6 + *(int *)(iVar3 + 4)" identifier = (binary_expression "iVar6 + *(int *)(iVar3 + 4)" identifier + (pointer_expression "*(int *)(iVar3 + 4)" * (cast_expression "(int *)(iVar3 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 4)" ( (binary_expression "iVar3 + 4" identifier + number_literal) )))))) ;) (goto_statement "goto LAB_0003d4b8;" goto statement_identifier ;) })) (expression_statement "*(undefined4 *)(iVar3 + 4) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 4) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 4)" * (cast_expression "(undefined4 *)(iVar3 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 4)" ( (binary_expression "iVar3 + 4" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }" if (parenthesized_expression "(*piVar2 == 0)" ( (binary_expression "*piVar2 == 0" (pointer_expression "*piVar2" * identifier) == number_literal) )) (compound_statement "{\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }" { (expression_statement "*piVar2 = iVar3;" (assignment_expression "*piVar2 = iVar3" (pointer_expression "*piVar2" * identifier) = identifier) ;) (goto_statement "goto LAB_0003d4f1;" goto statement_identifier ;) })) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (expression_statement "piVar5 = piVar2;" (assignment_expression "piVar5 = piVar2" identifier = identifier) ;) }))) (do_statement "do {\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    } while (*piVar4 != 0);" do (compound_statement "{\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    }" { (expression_statement "piVar4 = piVar5 + 1;" (assignment_expression "piVar4 = piVar5 + 1" identifier = (binary_expression "piVar5 + 1" identifier + number_literal)) ;) (expression_statement "iVar3 = FUN_0001d690();" (assignment_expression "iVar3 = FUN_0001d690()" identifier = (call_expression "FUN_0001d690()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar5 = 0;" (assignment_expression "*piVar5 = 0" (pointer_expression "*piVar5" * identifier) = number_literal) ;) (expression_statement "piVar5 = piVar4;" (assignment_expression "piVar5 = piVar4" identifier = identifier) ;) }) while (parenthesized_expression "(*piVar4 != 0)" ( (binary_expression "*piVar4 != 0" (pointer_expression "*piVar4" * identifier) != number_literal) )) ;) (expression_statement "*piVar4 = iVar3;" (assignment_expression "*piVar4 = iVar3" (pointer_expression "*piVar4" * identifier) = identifier) ;) (expression_statement "iVar3 = iVar6;" (assignment_expression "iVar3 = iVar6" identifier = identifier) ;) }) while (parenthesized_expression "( true )" ( true )) ;)) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return LIT ;) })) (labeled_statement statement_identifier : (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression IDENT != LIT)) , (comma_expression (assignment_expression IDENT = (pointer_expression * IDENT)) , IDENT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) != IDENT) )) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (labeled_statement statement_identifier : (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 IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (goto_statement goto statement_identifier ;) })) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }))) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( BOOL )) ;)) })))
(function_definition "undefined1 __regparm3 FUN_0003d420(int param_1,int *param_2,int *param_3)\n\n{\n  code *pcVar1;\n  int *piVar2;\n  int iVar3;\n  int *piVar4;\n  int *piVar5;\n  int iVar6;\n  bool bVar7;\n  \n  iVar6 = *(int *)(param_1 + 8);\n  if (*(int *)(param_1 + 0xc) == 0) {\n    iVar6 = FUN_00028830();\n    *(int *)(param_1 + 0xc) = iVar6;\n    if (iVar6 == 0) {\n      return 7;\n    }\n    *(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6);\n    *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0;\n    iVar6 = *(int *)(param_1 + 8);\n  }\n  iVar3 = *param_2;\n  pcVar1 = FUN_00055110;\n  if (*(char *)(iVar6 + 0x3c) != '\x01') {\n    pcVar1 = FUN_00054f00;\n    if (*(char *)(iVar6 + 0x3c) == '\x02') {\n      pcVar1 = FUN_000552f0;\n    }\n  }\n  *(code **)(param_1 + 0x20) = pcVar1;\n  piVar2 = (int *)FUN_000261b0();\n  if (piVar2 == (int *)0x0) {\n    return 7;\n  }\njoined_r0x0003d495:\n  do {\n    if (iVar3 == 0) {\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }\n    iVar6 = *param_3;\n    if (iVar6 == 0) {\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }\n    do {\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    } while (*piVar4 != 0);\n    *piVar4 = iVar3;\n    iVar3 = iVar6;\n  } while( true );\n}" (type_identifier "undefined1") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0003d420(int param_1,int *param_2,int *param_3)" (identifier "FUN_0003d420") (parameter_list "(int param_1,int *param_2,int *param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int *param_3" (primitive_type "int") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  code *pcVar1;\n  int *piVar2;\n  int iVar3;\n  int *piVar4;\n  int *piVar5;\n  int iVar6;\n  bool bVar7;\n  \n  iVar6 = *(int *)(param_1 + 8);\n  if (*(int *)(param_1 + 0xc) == 0) {\n    iVar6 = FUN_00028830();\n    *(int *)(param_1 + 0xc) = iVar6;\n    if (iVar6 == 0) {\n      return 7;\n    }\n    *(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6);\n    *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0;\n    iVar6 = *(int *)(param_1 + 8);\n  }\n  iVar3 = *param_2;\n  pcVar1 = FUN_00055110;\n  if (*(char *)(iVar6 + 0x3c) != '\x01') {\n    pcVar1 = FUN_00054f00;\n    if (*(char *)(iVar6 + 0x3c) == '\x02') {\n      pcVar1 = FUN_000552f0;\n    }\n  }\n  *(code **)(param_1 + 0x20) = pcVar1;\n  piVar2 = (int *)FUN_000261b0();\n  if (piVar2 == (int *)0x0) {\n    return 7;\n  }\njoined_r0x0003d495:\n  do {\n    if (iVar3 == 0) {\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }\n    iVar6 = *param_3;\n    if (iVar6 == 0) {\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }\n    do {\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    } while (*piVar4 != 0);\n    *piVar4 = iVar3;\n    iVar3 = iVar6;\n  } while( true );\n}" ({ "{") (declaration "code *pcVar1;" (type_identifier "code") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "int *piVar5;" (primitive_type "int") (pointer_declarator "*piVar5" (* "*") (identifier "piVar5")) (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "bool bVar7;" (primitive_type "bool") (identifier "bVar7") (; ";")) (expression_statement "iVar6 = *(int *)(param_1 + 8);" (assignment_expression "iVar6 = *(int *)(param_1 + 8)" (identifier "iVar6") (= "=") (pointer_expression "*(int *)(param_1 + 8)" (* "*") (cast_expression "(int *)(param_1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (if_statement "if (*(int *)(param_1 + 0xc) == 0) {\n    iVar6 = FUN_00028830();\n    *(int *)(param_1 + 0xc) = iVar6;\n    if (iVar6 == 0) {\n      return 7;\n    }\n    *(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6);\n    *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0;\n    iVar6 = *(int *)(param_1 + 8);\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0xc) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 0xc) == 0" (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar6 = FUN_00028830();\n    *(int *)(param_1 + 0xc) = iVar6;\n    if (iVar6 == 0) {\n      return 7;\n    }\n    *(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6);\n    *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0;\n    iVar6 = *(int *)(param_1 + 8);\n  }" ({ "{") (expression_statement "iVar6 = FUN_00028830();" (assignment_expression "iVar6 = FUN_00028830()" (identifier "iVar6") (= "=") (call_expression "FUN_00028830()" (identifier "FUN_00028830") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "*(int *)(param_1 + 0xc) = iVar6;" (assignment_expression "*(int *)(param_1 + 0xc) = iVar6" (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (identifier "iVar6")) (; ";")) (if_statement "if (iVar6 == 0) {\n      return 7;\n    }" (if "if") (parenthesized_expression "(iVar6 == 0)" (( "(") (binary_expression "iVar6 == 0" (identifier "iVar6") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return 7;\n    }" ({ "{") (return_statement "return 7;" (return "return") (number_literal "7") (; ";")) (} "}"))) (expression_statement "*(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6);" (assignment_expression "*(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6)" (pointer_expression "*(undefined2 *)(iVar6 + 8)" (* "*") (cast_expression "(undefined2 *)(iVar6 + 8)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + 8)" (( "(") (binary_expression "iVar6 + 8" (identifier "iVar6") (+ "+") (number_literal "8")) () ")")))) (= "=") (pointer_expression "*(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6)" (* "*") (cast_expression "(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6)" (( "(") (binary_expression "*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6" (pointer_expression "*(int *)(*(int *)(param_1 + 8) + 0x1c)" (* "*") (cast_expression "(int *)(*(int *)(param_1 + 8) + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 8) + 0x1c)" (( "(") (binary_expression "*(int *)(param_1 + 8) + 0x1c" (pointer_expression "*(int *)(param_1 + 8)" (* "*") (cast_expression "(int *)(param_1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (+ "+") (number_literal "0x1c")) () ")")))) (+ "+") (number_literal "6")) () ")"))))) (; ";")) (expression_statement "*(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0;" (assignment_expression "*(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0" (pointer_expression "*(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb)" (* "*") (cast_expression "(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0xc) + 0xb)" (( "(") (binary_expression "*(int *)(param_1 + 0xc) + 0xb" (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (+ "+") (number_literal "0xb")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar6 = *(int *)(param_1 + 8);" (assignment_expression "iVar6 = *(int *)(param_1 + 8)" (identifier "iVar6") (= "=") (pointer_expression "*(int *)(param_1 + 8)" (* "*") (cast_expression "(int *)(param_1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (} "}"))) (expression_statement "iVar3 = *param_2;" (assignment_expression "iVar3 = *param_2" (identifier "iVar3") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (expression_statement "pcVar1 = FUN_00055110;" (assignment_expression "pcVar1 = FUN_00055110" (identifier "pcVar1") (= "=") (identifier "FUN_00055110")) (; ";")) (if_statement "if (*(char *)(iVar6 + 0x3c) != '\x01') {\n    pcVar1 = FUN_00054f00;\n    if (*(char *)(iVar6 + 0x3c) == '\x02') {\n      pcVar1 = FUN_000552f0;\n    }\n  }" (if "if") (parenthesized_expression "(*(char *)(iVar6 + 0x3c) != '\x01')" (( "(") (binary_expression "*(char *)(iVar6 + 0x3c) != '\x01'" (pointer_expression "*(char *)(iVar6 + 0x3c)" (* "*") (cast_expression "(char *)(iVar6 + 0x3c)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + 0x3c)" (( "(") (binary_expression "iVar6 + 0x3c" (identifier "iVar6") (+ "+") (number_literal "0x3c")) () ")")))) (!= "!=") (char_literal "'\x01'" (' "'") (escape_sequence "\x01") (' "'"))) () ")")) (compound_statement "{\n    pcVar1 = FUN_00054f00;\n    if (*(char *)(iVar6 + 0x3c) == '\x02') {\n      pcVar1 = FUN_000552f0;\n    }\n  }" ({ "{") (expression_statement "pcVar1 = FUN_00054f00;" (assignment_expression "pcVar1 = FUN_00054f00" (identifier "pcVar1") (= "=") (identifier "FUN_00054f00")) (; ";")) (if_statement "if (*(char *)(iVar6 + 0x3c) == '\x02') {\n      pcVar1 = FUN_000552f0;\n    }" (if "if") (parenthesized_expression "(*(char *)(iVar6 + 0x3c) == '\x02')" (( "(") (binary_expression "*(char *)(iVar6 + 0x3c) == '\x02'" (pointer_expression "*(char *)(iVar6 + 0x3c)" (* "*") (cast_expression "(char *)(iVar6 + 0x3c)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + 0x3c)" (( "(") (binary_expression "iVar6 + 0x3c" (identifier "iVar6") (+ "+") (number_literal "0x3c")) () ")")))) (== "==") (char_literal "'\x02'" (' "'") (escape_sequence "\x02") (' "'"))) () ")")) (compound_statement "{\n      pcVar1 = FUN_000552f0;\n    }" ({ "{") (expression_statement "pcVar1 = FUN_000552f0;" (assignment_expression "pcVar1 = FUN_000552f0" (identifier "pcVar1") (= "=") (identifier "FUN_000552f0")) (; ";")) (} "}"))) (} "}"))) (expression_statement "*(code **)(param_1 + 0x20) = pcVar1;" (assignment_expression "*(code **)(param_1 + 0x20) = pcVar1" (pointer_expression "*(code **)(param_1 + 0x20)" (* "*") (cast_expression "(code **)(param_1 + 0x20)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (identifier "pcVar1")) (; ";")) (expression_statement "piVar2 = (int *)FUN_000261b0();" (assignment_expression "piVar2 = (int *)FUN_000261b0()" (identifier "piVar2") (= "=") (cast_expression "(int *)FUN_000261b0()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_000261b0()" (identifier "FUN_000261b0") (argument_list "()" (( "(") () ")"))))) (; ";")) (if_statement "if (piVar2 == (int *)0x0) {\n    return 7;\n  }" (if "if") (parenthesized_expression "(piVar2 == (int *)0x0)" (( "(") (binary_expression "piVar2 == (int *)0x0" (identifier "piVar2") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    return 7;\n  }" ({ "{") (return_statement "return 7;" (return "return") (number_literal "7") (; ";")) (} "}"))) (labeled_statement "joined_r0x0003d495:\n  do {\n    if (iVar3 == 0) {\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }\n    iVar6 = *param_3;\n    if (iVar6 == 0) {\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }\n    do {\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    } while (*piVar4 != 0);\n    *piVar4 = iVar3;\n    iVar3 = iVar6;\n  } while( true );" (statement_identifier "joined_r0x0003d495") (: ":") (do_statement "do {\n    if (iVar3 == 0) {\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }\n    iVar6 = *param_3;\n    if (iVar6 == 0) {\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }\n    do {\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    } while (*piVar4 != 0);\n    *piVar4 = iVar3;\n    iVar3 = iVar6;\n  } while( true );" (do "do") (compound_statement "{\n    if (iVar3 == 0) {\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }\n    iVar6 = *param_3;\n    if (iVar6 == 0) {\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }\n    do {\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    } while (*piVar4 != 0);\n    *piVar4 = iVar3;\n    iVar3 = iVar6;\n  }" ({ "{") (if_statement "if (iVar3 == 0) {\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\nLAB_0003d4f1:\n      iVar6 = 0;\n      piVar5 = piVar2;\n      do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);\n      *param_2 = iVar6;\n      FUN_000264d0(piVar2);\n      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);\n    }" ({ "{") (labeled_statement "LAB_0003d4f1:\n      iVar6 = 0;" (statement_identifier "LAB_0003d4f1") (: ":") (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" (identifier "iVar6") (= "=") (number_literal "0")) (; ";"))) (expression_statement "piVar5 = piVar2;" (assignment_expression "piVar5 = piVar2" (identifier "piVar5") (= "=") (identifier "piVar2")) (; ";")) (do_statement "do {\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      } while (piVar2 + 0x40 != piVar5);" (do "do") (compound_statement "{\n        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }\n        piVar5 = piVar5 + 1;\n      }" ({ "{") (if_statement "if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {\n          iVar6 = FUN_0001d690();\n        }" (if "if") (parenthesized_expression "((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7))" (( "(") (binary_expression "(*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)" (parenthesized_expression "(*piVar5 != 0)" (( "(") (binary_expression "*piVar5 != 0" (pointer_expression "*piVar5" (* "*") (identifier "piVar5")) (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)" (( "(") (comma_expression "bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7" (assignment_expression "bVar7 = iVar6 != 0" (identifier "bVar7") (= "=") (binary_expression "iVar6 != 0" (identifier "iVar6") (!= "!=") (number_literal "0"))) (, ",") (comma_expression "iVar6 = *piVar5, bVar7" (assignment_expression "iVar6 = *piVar5" (identifier "iVar6") (= "=") (pointer_expression "*piVar5" (* "*") (identifier "piVar5"))) (, ",") (identifier "bVar7"))) () ")"))) () ")")) (compound_statement "{\n          iVar6 = FUN_0001d690();\n        }" ({ "{") (expression_statement "iVar6 = FUN_0001d690();" (assignment_expression "iVar6 = FUN_0001d690()" (identifier "iVar6") (= "=") (call_expression "FUN_0001d690()" (identifier "FUN_0001d690") (argument_list "()" (( "(") () ")")))) (; ";")) (} "}"))) (expression_statement "piVar5 = piVar5 + 1;" (assignment_expression "piVar5 = piVar5 + 1" (identifier "piVar5") (= "=") (binary_expression "piVar5 + 1" (identifier "piVar5") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(piVar2 + 0x40 != piVar5)" (( "(") (binary_expression "piVar2 + 0x40 != piVar5" (binary_expression "piVar2 + 0x40" (identifier "piVar2") (+ "+") (number_literal "0x40")) (!= "!=") (identifier "piVar5")) () ")")) (; ";")) (expression_statement "*param_2 = iVar6;" (assignment_expression "*param_2 = iVar6" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "iVar6")) (; ";")) (expression_statement "FUN_000264d0(piVar2);" (call_expression "FUN_000264d0(piVar2)" (identifier "FUN_000264d0") (argument_list "(piVar2)" (( "(") (identifier "piVar2") () ")"))) (; ";")) (return_statement "return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);" (return "return") (pointer_expression "*(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb)" (* "*") (cast_expression "(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0xc) + 0xb)" (( "(") (binary_expression "*(int *)(param_1 + 0xc) + 0xb" (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (+ "+") (number_literal "0xb")) () ")")))) (; ";")) (} "}"))) (expression_statement "iVar6 = *param_3;" (assignment_expression "iVar6 = *param_3" (identifier "iVar6") (= "=") (pointer_expression "*param_3" (* "*") (identifier "param_3"))) (; ";")) (if_statement "if (iVar6 == 0) {\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }\n    else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }" (if "if") (parenthesized_expression "(iVar6 == 0)" (( "(") (binary_expression "iVar6 == 0" (identifier "iVar6") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar6 = *(int *)(iVar3 + 4);\nLAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;\n      piVar5 = piVar2;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }\n    }" ({ "{") (expression_statement "iVar6 = *(int *)(iVar3 + 4);" (assignment_expression "iVar6 = *(int *)(iVar3 + 4)" (identifier "iVar6") (= "=") (pointer_expression "*(int *)(iVar3 + 4)" (* "*") (cast_expression "(int *)(iVar3 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 4)" (( "(") (binary_expression "iVar3 + 4" (identifier "iVar3") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (labeled_statement "LAB_0003d4b8:\n      *(undefined4 *)(iVar3 + 4) = 0;" (statement_identifier "LAB_0003d4b8") (: ":") (expression_statement "*(undefined4 *)(iVar3 + 4) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 4) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 4)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 4)" (( "(") (binary_expression "iVar3 + 4" (identifier "iVar3") (+ "+") (number_literal "4")) () ")")))) (= "=") (number_literal "0")) (; ";"))) (expression_statement "piVar5 = piVar2;" (assignment_expression "piVar5 = piVar2" (identifier "piVar5") (= "=") (identifier "piVar2")) (; ";")) (if_statement "if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }" (if "if") (parenthesized_expression "(*piVar2 == 0)" (( "(") (binary_expression "*piVar2 == 0" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        *piVar2 = iVar3;\n        iVar3 = iVar6;\n        goto joined_r0x0003d495;\n      }" ({ "{") (expression_statement "*piVar2 = iVar3;" (assignment_expression "*piVar2 = iVar3" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (identifier "iVar3")) (; ";")) (expression_statement "iVar3 = iVar6;" (assignment_expression "iVar3 = iVar6" (identifier "iVar3") (= "=") (identifier "iVar6")) (; ";")) (goto_statement "goto joined_r0x0003d495;" (goto "goto") (statement_identifier "joined_r0x0003d495") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }" (else "else") (compound_statement "{\n      if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }\n      *(undefined4 *)(iVar3 + 4) = 0;\n      if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }\n      iVar6 = 0;\n      piVar5 = piVar2;\n    }" ({ "{") (if_statement "if (iVar6 != iVar3) {\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }" (if "if") (parenthesized_expression "(iVar6 != iVar3)" (( "(") (binary_expression "iVar6 != iVar3" (identifier "iVar6") (!= "!=") (identifier "iVar3")) () ")")) (compound_statement "{\n        iVar6 = iVar6 + *(int *)(iVar3 + 4);\n        goto LAB_0003d4b8;\n      }" ({ "{") (expression_statement "iVar6 = iVar6 + *(int *)(iVar3 + 4);" (assignment_expression "iVar6 = iVar6 + *(int *)(iVar3 + 4)" (identifier "iVar6") (= "=") (binary_expression "iVar6 + *(int *)(iVar3 + 4)" (identifier "iVar6") (+ "+") (pointer_expression "*(int *)(iVar3 + 4)" (* "*") (cast_expression "(int *)(iVar3 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 4)" (( "(") (binary_expression "iVar3 + 4" (identifier "iVar3") (+ "+") (number_literal "4")) () ")")))))) (; ";")) (goto_statement "goto LAB_0003d4b8;" (goto "goto") (statement_identifier "LAB_0003d4b8") (; ";")) (} "}"))) (expression_statement "*(undefined4 *)(iVar3 + 4) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 4) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 4)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 4)" (( "(") (binary_expression "iVar3 + 4" (identifier "iVar3") (+ "+") (number_literal "4")) () ")")))) (= "=") (number_literal "0")) (; ";")) (if_statement "if (*piVar2 == 0) {\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }" (if "if") (parenthesized_expression "(*piVar2 == 0)" (( "(") (binary_expression "*piVar2 == 0" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        *piVar2 = iVar3;\n        goto LAB_0003d4f1;\n      }" ({ "{") (expression_statement "*piVar2 = iVar3;" (assignment_expression "*piVar2 = iVar3" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (identifier "iVar3")) (; ";")) (goto_statement "goto LAB_0003d4f1;" (goto "goto") (statement_identifier "LAB_0003d4f1") (; ";")) (} "}"))) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" (identifier "iVar6") (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar5 = piVar2;" (assignment_expression "piVar5 = piVar2" (identifier "piVar5") (= "=") (identifier "piVar2")) (; ";")) (} "}")))) (do_statement "do {\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    } while (*piVar4 != 0);" (do "do") (compound_statement "{\n      piVar4 = piVar5 + 1;\n      iVar3 = FUN_0001d690();\n      *piVar5 = 0;\n      piVar5 = piVar4;\n    }" ({ "{") (expression_statement "piVar4 = piVar5 + 1;" (assignment_expression "piVar4 = piVar5 + 1" (identifier "piVar4") (= "=") (binary_expression "piVar5 + 1" (identifier "piVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar3 = FUN_0001d690();" (assignment_expression "iVar3 = FUN_0001d690()" (identifier "iVar3") (= "=") (call_expression "FUN_0001d690()" (identifier "FUN_0001d690") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "*piVar5 = 0;" (assignment_expression "*piVar5 = 0" (pointer_expression "*piVar5" (* "*") (identifier "piVar5")) (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar5 = piVar4;" (assignment_expression "piVar5 = piVar4" (identifier "piVar5") (= "=") (identifier "piVar4")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(*piVar4 != 0)" (( "(") (binary_expression "*piVar4 != 0" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (!= "!=") (number_literal "0")) () ")")) (; ";")) (expression_statement "*piVar4 = iVar3;" (assignment_expression "*piVar4 = iVar3" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (identifier "iVar3")) (; ";")) (expression_statement "iVar3 = iVar6;" (assignment_expression "iVar3 = iVar6" (identifier "iVar3") (= "=") (identifier "iVar6")) (; ";")) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";"))) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */
/* DWARF original prototype: int vdbeSorterSort(SortSubtask * pTask, SorterList * pList, SorterList
   * pList) */

int __regparm3 function_1(type_1 *pTask,type_2 *pList,type_2 *pList_1)

{
  type_3 *pVVar1;
  type_4 p_Var2;
  int *var_5;
  type_5 *var_6;
  type_5 *var_11;
  type_6 *var_2;
  int *var_12;
  int *piVar8;
  int *var_7;
  type_5 *var_8;
  type_7 in_stack_ffffffd8;
  
  pVVar1 = pTask->pSorter;
  if (pTask->pUnpacked == (type_6 *)0x0) {
    var_2 = var_1(pVVar1->pKeyInfo);
    pTask->pUnpacked = var_2;
    if (var_2 == (type_6 *)0x0) {
      return 7;
    }
    var_2->nField = pTask->pSorter->pKeyInfo->nKeyField;
    pTask->pUnpacked->errCode = '\0';
    pVVar1 = pTask->pSorter;
  }
  var_6 = pList->pList;
  p_Var2 = vdbeSorterCompareInt;
  if (pVVar1->typeMask != '\x01') {
    p_Var2 = vdbeSorterCompare;
    if (pVVar1->typeMask == '\x02') {
      p_Var2 = vdbeSorterCompareText;
    }
  }
  pTask->xCompare = p_Var2;
  var_5 = (int *)var_3(var_4(in_stack_ffffffd8,pList_1));
  var_7 = var_5;
  if (var_5 == (int *)0x0) {
    return 7;
  }
joined_r0x0003d495:
  do {
    if (var_6 == (type_5 *)0x0) {
LAB_0003d4f1:
      var_5 = var_7 + 0x40;
      var_6 = (type_5 *)0x0;
      var_12 = var_7;
      do {
        var_8 = (type_5 *)*var_7;
        var_11 = var_6;
        if ((var_8 != (type_5 *)0x0) && (var_11 = var_8, var_6 != (type_5 *)0x0)) {
          var_11 = var_9(pTask,var_6,var_8);
        }
        var_6 = var_11;
        var_7 = var_7 + 1;
      } while (var_5 != var_7);
      pList->pList = var_6;
      var_10(var_12);
      return (type_8)pTask->pUnpacked->errCode;
    }
    var_8 = pList_1->pList;
    if (var_8 == (type_5 *)0x0) {
      var_8 = (var_6->u).pNext;
LAB_0003d4b8:
      (var_6->u).pNext = (type_5 *)0x0;
      var_11 = (type_5 *)*var_5;
      var_12 = var_5;
      if (var_11 == (type_5 *)0x0) {
        *var_5 = (int)var_6;
        var_6 = var_8;
        goto joined_r0x0003d495;
      }
    }
    else {
      if (var_8 != var_6) {
        var_8 = (type_5 *)((int)&((var_6->u).pNext)->nVal + (int)&var_8->nVal);
        goto LAB_0003d4b8;
      }
      (var_6->u).pNext = (type_5 *)0x0;
      var_11 = (type_5 *)*var_5;
      if (var_11 == (type_5 *)0x0) {
        *var_7 = (int)var_6;
        goto LAB_0003d4f1;
      }
      var_8 = (type_5 *)0x0;
      var_12 = var_5;
    }
    do {
      piVar8 = var_12 + 1;
      var_6 = var_9(pTask,var_6,var_11);
      *var_12 = 0;
      var_11 = (type_5 *)*piVar8;
      var_12 = piVar8;
    } while (var_11 != (type_5 *)0x0);
    *piVar8 = (int)var_6;
    var_6 = var_8;
  } while( true );
}


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

/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

undefined1 __regparm3 MASKED(int param_1,int *param_2,int *param_3)

{
  code *pcVar1;
  int *piVar2;
  int iVar3;
  int *piVar4;
  int *piVar5;
  int iVar6;
  bool bVar7;
  
  iVar6 = *(int *)(param_1 + 8);
  if (*(int *)(param_1 + 0xc) == 0) {
    iVar6 = FUN_00028830();
    *(int *)(param_1 + 0xc) = iVar6;
    if (iVar6 == 0) {
      return 7;
    }
    *(undefined2 *)(iVar6 + 8) = *(undefined2 *)(*(int *)(*(int *)(param_1 + 8) + 0x1c) + 6);
    *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb) = 0;
    iVar6 = *(int *)(param_1 + 8);
  }
  iVar3 = *param_2;
  pcVar1 = FUN_00055110;
  if (*(char *)(iVar6 + 0x3c) != '\x01') {
    pcVar1 = FUN_00054f00;
    if (*(char *)(iVar6 + 0x3c) == '\x02') {
      pcVar1 = FUN_000552f0;
    }
  }
  *(code **)(param_1 + 0x20) = pcVar1;
  piVar2 = (int *)FUN_000261b0();
  if (piVar2 == (int *)0x0) {
    return 7;
  }
joined_r0x0003d495:
  do {
    if (iVar3 == 0) {
LAB_0003d4f1:
      iVar6 = 0;
      piVar5 = piVar2;
      do {
        if ((*piVar5 != 0) && (bVar7 = iVar6 != 0, iVar6 = *piVar5, bVar7)) {
          iVar6 = FUN_0001d690();
        }
        piVar5 = piVar5 + 1;
      } while (piVar2 + 0x40 != piVar5);
      *param_2 = iVar6;
      FUN_000264d0(piVar2);
      return *(undefined1 *)(*(int *)(param_1 + 0xc) + 0xb);
    }
    iVar6 = *param_3;
    if (iVar6 == 0) {
      iVar6 = *(int *)(iVar3 + 4);
LAB_0003d4b8:
      *(undefined4 *)(iVar3 + 4) = 0;
      piVar5 = piVar2;
      if (*piVar2 == 0) {
        *piVar2 = iVar3;
        iVar3 = iVar6;
        goto joined_r0x0003d495;
      }
    }
    else {
      if (iVar6 != iVar3) {
        iVar6 = iVar6 + *(int *)(iVar3 + 4);
        goto LAB_0003d4b8;
      }
      *(undefined4 *)(iVar3 + 4) = 0;
      if (*piVar2 == 0) {
        *piVar2 = iVar3;
        goto LAB_0003d4f1;
      }
      iVar6 = 0;
      piVar5 = piVar2;
    }
    do {
      piVar4 = piVar5 + 1;
      iVar3 = FUN_0001d690();
      *piVar5 = 0;
      piVar5 = piVar4;
    } while (*piVar4 != 0);
    *piVar4 = iVar3;
    iVar3 = iVar6;
  } while( true );
}

