
int __regparm3 vdbeSorterJoinAll(VdbeSorter *pSorter,int rcin)

{
  void *pvVar1;
  SortSubtask *pSVar2;
  int in_GS_OFFSET;
  void *pRet;
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (pSorter->nTask != 0) {
    pSVar2 = pSorter->aTask + (pSorter->nTask - 1);
    do {
      pvVar1 = (void *)0x0;
      if (pSVar2->pThread != (SQLiteThread *)0x0) {
        pRet = (void *)0x1;
        sqlite3ThreadJoin(pSVar2->pThread,&pRet);
        pSVar2->bDone = 0;
        pSVar2->pThread = (SQLiteThread *)0x0;
        pvVar1 = pRet;
      }
      if ((void *)rcin == (void *)0x0) {
        rcin = (int)pvVar1;
      }
      pSVar2 = pSVar2 + -1;
    } while (pSVar2 != (SortSubtask *)&pSorter->mxPmaSize);
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return (int)(void *)rcin;
}



uint __regparm3 FUN_00034a20(int param_1,uint param_2)

{
  int iVar1;
  int iVar2;
  int *piVar3;
  int in_GS_OFFSET;
  
  iVar2 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = *(byte *)(param_1 + 0x3b) - 1;
  if (iVar1 != -1) {
    piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c);
    do {
      iVar1 = *piVar3;
      if (iVar1 != 0) {
        FUN_000347b0();
        piVar3[1] = 0;
        *piVar3 = 0;
      }
      if (param_2 == 0) {
        param_2 = (uint)(iVar1 != 0);
      }
      piVar3 = piVar3 + -0xf;
    } while (piVar3 != (int *)(param_1 + 4));
  }
  if (iVar2 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_000a9ea0();
  }
  return param_2;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0x2c
MOVZX EDI,byte ptr [EAX + 0x3b]
MOV ECX,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0x1c],ECX
XOR ECX,ECX
LEA EBX,[EDI + -0x1]
CMP EBX,-0x1
JZ 0x00034ac0
IMUL EBX,EBX,0x3c
LEA ESI,[EAX + 0x4]
LEA EBX,[EAX + EBX*0x1 + 0x40]
IMUL EAX,EDI,-0x3c
IMUL EDI,EDI,0x3c
MOV dword ptr [ESP + 0x8],EAX
LEA EAX,[ESP + 0x18]
MOV EBP,EDI
MOV EDI,EDX
MOV dword ptr [ESP + 0xc],EAX
LEA ESI,[ESI]
MOV EAX,dword ptr [EBX]
XOR EDX,EDX
TEST EAX,EAX
JZ 0x00034a99
MOV EDX,dword ptr [ESP + 0xc]
MOV dword ptr [ESP + 0x18],0x1
CALL 0x000347b0
MOV EAX,dword ptr [ESP + 0x8]
MOV EDX,dword ptr [ESP + 0x18]
ADD EAX,EBX
MOV dword ptr [EAX + EBP*0x1 + 0x4],0x0
MOV dword ptr [EBX],0x0
TEST EDI,EDI
CMOVZ EDI,EDX
SUB EBX,0x3c
CMP EBX,ESI
JNZ 0x00034a68
MOV EBP,EDI
MOV ECX,dword ptr [ESP + 0x1c]
XOR ECX,dword ptr GS:[0x14]
MOV EAX,EBP
JNZ 0x00034ac4
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EBP,EDX
JMP 0x00034aa7
CALL 0x000a9ea0
(translation_unit "uint __regparm3 FUN_00034a20(int param_1,uint param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int in_GS_OFFSET;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = *(byte *)(param_1 + 0x3b) - 1;\n  if (iVar1 != -1) {\n    piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c);\n    do {\n      iVar1 = *piVar3;\n      if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }\n      if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }\n      piVar3 = piVar3 + -0xf;\n    } while (piVar3 != (int *)(param_1 + 4));\n  }\n  if (iVar2 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000a9ea0();\n  }\n  return param_2;\n}\n\n" (function_definition "uint __regparm3 FUN_00034a20(int param_1,uint param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int in_GS_OFFSET;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = *(byte *)(param_1 + 0x3b) - 1;\n  if (iVar1 != -1) {\n    piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c);\n    do {\n      iVar1 = *piVar3;\n      if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }\n      if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }\n      piVar3 = piVar3 + -0xf;\n    } while (piVar3 != (int *)(param_1 + 4));\n  }\n  if (iVar2 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000a9ea0();\n  }\n  return param_2;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_00034a20(int param_1,uint param_2)" identifier (parameter_list "(int param_1,uint param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int in_GS_OFFSET;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = *(byte *)(param_1 + 0x3b) - 1;\n  if (iVar1 != -1) {\n    piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c);\n    do {\n      iVar1 = *piVar3;\n      if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }\n      if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }\n      piVar3 = piVar3 + -0xf;\n    } while (piVar3 != (int *)(param_1 + 4));\n  }\n  if (iVar2 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000a9ea0();\n  }\n  return param_2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (expression_statement "iVar2 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar2 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = *(byte *)(param_1 + 0x3b) - 1;" (assignment_expression "iVar1 = *(byte *)(param_1 + 0x3b) - 1" identifier = (binary_expression "*(byte *)(param_1 + 0x3b) - 1" (pointer_expression "*(byte *)(param_1 + 0x3b)" * (cast_expression "(byte *)(param_1 + 0x3b)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3b)" ( (binary_expression "param_1 + 0x3b" identifier + number_literal) )))) - number_literal)) ;) (if_statement "if (iVar1 != -1) {\n    piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c);\n    do {\n      iVar1 = *piVar3;\n      if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }\n      if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }\n      piVar3 = piVar3 + -0xf;\n    } while (piVar3 != (int *)(param_1 + 4));\n  }" if (parenthesized_expression "(iVar1 != -1)" ( (binary_expression "iVar1 != -1" identifier != number_literal) )) (compound_statement "{\n    piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c);\n    do {\n      iVar1 = *piVar3;\n      if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }\n      if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }\n      piVar3 = piVar3 + -0xf;\n    } while (piVar3 != (int *)(param_1 + 4));\n  }" { (expression_statement "piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c);" (assignment_expression "piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c)" identifier = (cast_expression "(int *)(param_1 + 0x40 + iVar1 * 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40 + iVar1 * 0x3c)" ( (binary_expression "param_1 + 0x40 + iVar1 * 0x3c" (binary_expression "param_1 + 0x40" identifier + number_literal) + (binary_expression "iVar1 * 0x3c" identifier * number_literal)) )))) ;) (do_statement "do {\n      iVar1 = *piVar3;\n      if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }\n      if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }\n      piVar3 = piVar3 + -0xf;\n    } while (piVar3 != (int *)(param_1 + 4));" do (compound_statement "{\n      iVar1 = *piVar3;\n      if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }\n      if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }\n      piVar3 = piVar3 + -0xf;\n    }" { (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (if_statement "if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }" { (expression_statement "FUN_000347b0();" (call_expression "FUN_000347b0()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar3[1] = 0;" (assignment_expression "piVar3[1] = 0" (subscript_expression "piVar3[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*piVar3 = 0;" (assignment_expression "*piVar3 = 0" (pointer_expression "*piVar3" * identifier) = number_literal) ;) })) (if_statement "if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n        param_2 = (uint)(iVar1 != 0);\n      }" { (expression_statement "param_2 = (uint)(iVar1 != 0);" (assignment_expression "param_2 = (uint)(iVar1 != 0)" identifier = (call_expression "(uint)(iVar1 != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )))) ;) })) (expression_statement "piVar3 = piVar3 + -0xf;" (assignment_expression "piVar3 = piVar3 + -0xf" identifier = (binary_expression "piVar3 + -0xf" identifier + number_literal)) ;) }) while (parenthesized_expression "(piVar3 != (int *)(param_1 + 4))" ( (binary_expression "piVar3 != (int *)(param_1 + 4)" identifier != (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) )) ;) })) (if_statement "if (iVar2 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000a9ea0();\n  }" if (parenthesized_expression "(iVar2 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar2 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_000a9ea0();\n  }" { comment (expression_statement "FUN_000a9ea0();" (call_expression "FUN_000a9ea0()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return param_2;" return identifier ;) })))
(translation_unit "int __regparm3 vdbeSorterJoinAll(VdbeSorter *pSorter,int rcin)\n\n{\n  void *pvVar1;\n  SortSubtask *pSVar2;\n  int in_GS_OFFSET;\n  void *pRet;\n  int local_20;\n  \n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (pSorter->nTask != 0) {\n    pSVar2 = pSorter->aTask + (pSorter->nTask - 1);\n    do {\n      pvVar1 = (void *)0x0;\n      if (pSVar2->pThread != (SQLiteThread *)0x0) {\n        pRet = (void *)0x1;\n        sqlite3ThreadJoin(pSVar2->pThread,&pRet);\n        pSVar2->bDone = 0;\n        pSVar2->pThread = (SQLiteThread *)0x0;\n        pvVar1 = pRet;\n      }\n      if ((void *)rcin == (void *)0x0) {\n        rcin = (int)pvVar1;\n      }\n      pSVar2 = pSVar2 + -1;\n    } while (pSVar2 != (SortSubtask *)&pSorter->mxPmaSize);\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return (int)(void *)rcin;\n}\n\n" (function_definition "int __regparm3 vdbeSorterJoinAll(VdbeSorter *pSorter,int rcin)\n\n{\n  void *pvVar1;\n  SortSubtask *pSVar2;\n  int in_GS_OFFSET;\n  void *pRet;\n  int local_20;\n  \n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (pSorter->nTask != 0) {\n    pSVar2 = pSorter->aTask + (pSorter->nTask - 1);\n    do {\n      pvVar1 = (void *)0x0;\n      if (pSVar2->pThread != (SQLiteThread *)0x0) {\n        pRet = (void *)0x1;\n        sqlite3ThreadJoin(pSVar2->pThread,&pRet);\n        pSVar2->bDone = 0;\n        pSVar2->pThread = (SQLiteThread *)0x0;\n        pvVar1 = pRet;\n      }\n      if ((void *)rcin == (void *)0x0) {\n        rcin = (int)pvVar1;\n      }\n      pSVar2 = pSVar2 + -1;\n    } while (pSVar2 != (SortSubtask *)&pSorter->mxPmaSize);\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return (int)(void *)rcin;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "vdbeSorterJoinAll(VdbeSorter *pSorter,int rcin)" identifier (parameter_list "(VdbeSorter *pSorter,int rcin)" ( (parameter_declaration "VdbeSorter *pSorter" type_identifier (pointer_declarator "*pSorter" * identifier)) , (parameter_declaration "int rcin" primitive_type identifier) ))) (compound_statement "{\n  void *pvVar1;\n  SortSubtask *pSVar2;\n  int in_GS_OFFSET;\n  void *pRet;\n  int local_20;\n  \n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (pSorter->nTask != 0) {\n    pSVar2 = pSorter->aTask + (pSorter->nTask - 1);\n    do {\n      pvVar1 = (void *)0x0;\n      if (pSVar2->pThread != (SQLiteThread *)0x0) {\n        pRet = (void *)0x1;\n        sqlite3ThreadJoin(pSVar2->pThread,&pRet);\n        pSVar2->bDone = 0;\n        pSVar2->pThread = (SQLiteThread *)0x0;\n        pvVar1 = pRet;\n      }\n      if ((void *)rcin == (void *)0x0) {\n        rcin = (int)pvVar1;\n      }\n      pSVar2 = pSVar2 + -1;\n    } while (pSVar2 != (SortSubtask *)&pSorter->mxPmaSize);\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return (int)(void *)rcin;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "SortSubtask *pSVar2;" type_identifier (pointer_declarator "*pSVar2" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "void *pRet;" primitive_type (pointer_declarator "*pRet" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (pSorter->nTask != 0) {\n    pSVar2 = pSorter->aTask + (pSorter->nTask - 1);\n    do {\n      pvVar1 = (void *)0x0;\n      if (pSVar2->pThread != (SQLiteThread *)0x0) {\n        pRet = (void *)0x1;\n        sqlite3ThreadJoin(pSVar2->pThread,&pRet);\n        pSVar2->bDone = 0;\n        pSVar2->pThread = (SQLiteThread *)0x0;\n        pvVar1 = pRet;\n      }\n      if ((void *)rcin == (void *)0x0) {\n        rcin = (int)pvVar1;\n      }\n      pSVar2 = pSVar2 + -1;\n    } while (pSVar2 != (SortSubtask *)&pSorter->mxPmaSize);\n  }" if (parenthesized_expression "(pSorter->nTask != 0)" ( (binary_expression "pSorter->nTask != 0" (field_expression "pSorter->nTask" identifier -> field_identifier) != number_literal) )) (compound_statement "{\n    pSVar2 = pSorter->aTask + (pSorter->nTask - 1);\n    do {\n      pvVar1 = (void *)0x0;\n      if (pSVar2->pThread != (SQLiteThread *)0x0) {\n        pRet = (void *)0x1;\n        sqlite3ThreadJoin(pSVar2->pThread,&pRet);\n        pSVar2->bDone = 0;\n        pSVar2->pThread = (SQLiteThread *)0x0;\n        pvVar1 = pRet;\n      }\n      if ((void *)rcin == (void *)0x0) {\n        rcin = (int)pvVar1;\n      }\n      pSVar2 = pSVar2 + -1;\n    } while (pSVar2 != (SortSubtask *)&pSorter->mxPmaSize);\n  }" { (expression_statement "pSVar2 = pSorter->aTask + (pSorter->nTask - 1);" (assignment_expression "pSVar2 = pSorter->aTask + (pSorter->nTask - 1)" identifier = (binary_expression "pSorter->aTask + (pSorter->nTask - 1)" (field_expression "pSorter->aTask" identifier -> field_identifier) + (parenthesized_expression "(pSorter->nTask - 1)" ( (binary_expression "pSorter->nTask - 1" (field_expression "pSorter->nTask" identifier -> field_identifier) - number_literal) )))) ;) (do_statement "do {\n      pvVar1 = (void *)0x0;\n      if (pSVar2->pThread != (SQLiteThread *)0x0) {\n        pRet = (void *)0x1;\n        sqlite3ThreadJoin(pSVar2->pThread,&pRet);\n        pSVar2->bDone = 0;\n        pSVar2->pThread = (SQLiteThread *)0x0;\n        pvVar1 = pRet;\n      }\n      if ((void *)rcin == (void *)0x0) {\n        rcin = (int)pvVar1;\n      }\n      pSVar2 = pSVar2 + -1;\n    } while (pSVar2 != (SortSubtask *)&pSorter->mxPmaSize);" do (compound_statement "{\n      pvVar1 = (void *)0x0;\n      if (pSVar2->pThread != (SQLiteThread *)0x0) {\n        pRet = (void *)0x1;\n        sqlite3ThreadJoin(pSVar2->pThread,&pRet);\n        pSVar2->bDone = 0;\n        pSVar2->pThread = (SQLiteThread *)0x0;\n        pvVar1 = pRet;\n      }\n      if ((void *)rcin == (void *)0x0) {\n        rcin = (int)pvVar1;\n      }\n      pSVar2 = pSVar2 + -1;\n    }" { (expression_statement "pvVar1 = (void *)0x0;" (assignment_expression "pvVar1 = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (pSVar2->pThread != (SQLiteThread *)0x0) {\n        pRet = (void *)0x1;\n        sqlite3ThreadJoin(pSVar2->pThread,&pRet);\n        pSVar2->bDone = 0;\n        pSVar2->pThread = (SQLiteThread *)0x0;\n        pvVar1 = pRet;\n      }" if (parenthesized_expression "(pSVar2->pThread != (SQLiteThread *)0x0)" ( (binary_expression "pSVar2->pThread != (SQLiteThread *)0x0" (field_expression "pSVar2->pThread" identifier -> field_identifier) != (cast_expression "(SQLiteThread *)0x0" ( (type_descriptor "SQLiteThread *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        pRet = (void *)0x1;\n        sqlite3ThreadJoin(pSVar2->pThread,&pRet);\n        pSVar2->bDone = 0;\n        pSVar2->pThread = (SQLiteThread *)0x0;\n        pvVar1 = pRet;\n      }" { (expression_statement "pRet = (void *)0x1;" (assignment_expression "pRet = (void *)0x1" identifier = (cast_expression "(void *)0x1" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "sqlite3ThreadJoin(pSVar2->pThread,&pRet);" (call_expression "sqlite3ThreadJoin(pSVar2->pThread,&pRet)" identifier (argument_list "(pSVar2->pThread,&pRet)" ( (field_expression "pSVar2->pThread" identifier -> field_identifier) , (pointer_expression "&pRet" & identifier) ))) ;) (expression_statement "pSVar2->bDone = 0;" (assignment_expression "pSVar2->bDone = 0" (field_expression "pSVar2->bDone" identifier -> field_identifier) = number_literal) ;) (expression_statement "pSVar2->pThread = (SQLiteThread *)0x0;" (assignment_expression "pSVar2->pThread = (SQLiteThread *)0x0" (field_expression "pSVar2->pThread" identifier -> field_identifier) = (cast_expression "(SQLiteThread *)0x0" ( (type_descriptor "SQLiteThread *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pvVar1 = pRet;" (assignment_expression "pvVar1 = pRet" identifier = identifier) ;) })) (if_statement "if ((void *)rcin == (void *)0x0) {\n        rcin = (int)pvVar1;\n      }" if (parenthesized_expression "((void *)rcin == (void *)0x0)" ( (binary_expression "(void *)rcin == (void *)0x0" (cast_expression "(void *)rcin" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        rcin = (int)pvVar1;\n      }" { (expression_statement "rcin = (int)pvVar1;" (assignment_expression "rcin = (int)pvVar1" identifier = (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })) (expression_statement "pSVar2 = pSVar2 + -1;" (assignment_expression "pSVar2 = pSVar2 + -1" identifier = (binary_expression "pSVar2 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(pSVar2 != (SortSubtask *)&pSorter->mxPmaSize)" ( (binary_expression "pSVar2 != (SortSubtask *)&pSorter->mxPmaSize" identifier != (cast_expression "(SortSubtask *)&pSorter->mxPmaSize" ( (type_descriptor "SortSubtask *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pSorter->mxPmaSize" & (field_expression "pSorter->mxPmaSize" identifier -> field_identifier)))) )) ;) })) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return (int)(void *)rcin;" return (cast_expression "(int)(void *)rcin" ( (type_descriptor "int" primitive_type) ) (cast_expression "(void *)rcin" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) })))
(translation_unit "uint __regparm3 FUN_00034a20(int param_1,uint param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int in_GS_OFFSET;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = *(byte *)(param_1 + 0x3b) - 1;\n  if (iVar1 != -1) {\n    piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c);\n    do {\n      iVar1 = *piVar3;\n      if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }\n      if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }\n      piVar3 = piVar3 + -0xf;\n    } while (piVar3 != (int *)(param_1 + 4));\n  }\n  if (iVar2 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000a9ea0();\n  }\n  return param_2;\n}\n\n" (function_definition "uint __regparm3 FUN_00034a20(int param_1,uint param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int in_GS_OFFSET;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = *(byte *)(param_1 + 0x3b) - 1;\n  if (iVar1 != -1) {\n    piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c);\n    do {\n      iVar1 = *piVar3;\n      if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }\n      if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }\n      piVar3 = piVar3 + -0xf;\n    } while (piVar3 != (int *)(param_1 + 4));\n  }\n  if (iVar2 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000a9ea0();\n  }\n  return param_2;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_00034a20(int param_1,uint param_2)" identifier (parameter_list "(int param_1,uint param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int in_GS_OFFSET;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = *(byte *)(param_1 + 0x3b) - 1;\n  if (iVar1 != -1) {\n    piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c);\n    do {\n      iVar1 = *piVar3;\n      if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }\n      if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }\n      piVar3 = piVar3 + -0xf;\n    } while (piVar3 != (int *)(param_1 + 4));\n  }\n  if (iVar2 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000a9ea0();\n  }\n  return param_2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (expression_statement "iVar2 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar2 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = *(byte *)(param_1 + 0x3b) - 1;" (assignment_expression "iVar1 = *(byte *)(param_1 + 0x3b) - 1" identifier = (binary_expression "*(byte *)(param_1 + 0x3b) - 1" (pointer_expression "*(byte *)(param_1 + 0x3b)" * (cast_expression "(byte *)(param_1 + 0x3b)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3b)" ( (binary_expression "param_1 + 0x3b" identifier + number_literal) )))) - number_literal)) ;) (if_statement "if (iVar1 != -1) {\n    piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c);\n    do {\n      iVar1 = *piVar3;\n      if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }\n      if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }\n      piVar3 = piVar3 + -0xf;\n    } while (piVar3 != (int *)(param_1 + 4));\n  }" if (parenthesized_expression "(iVar1 != -1)" ( (binary_expression "iVar1 != -1" identifier != number_literal) )) (compound_statement "{\n    piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c);\n    do {\n      iVar1 = *piVar3;\n      if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }\n      if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }\n      piVar3 = piVar3 + -0xf;\n    } while (piVar3 != (int *)(param_1 + 4));\n  }" { (expression_statement "piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c);" (assignment_expression "piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c)" identifier = (cast_expression "(int *)(param_1 + 0x40 + iVar1 * 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40 + iVar1 * 0x3c)" ( (binary_expression "param_1 + 0x40 + iVar1 * 0x3c" (binary_expression "param_1 + 0x40" identifier + number_literal) + (binary_expression "iVar1 * 0x3c" identifier * number_literal)) )))) ;) (do_statement "do {\n      iVar1 = *piVar3;\n      if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }\n      if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }\n      piVar3 = piVar3 + -0xf;\n    } while (piVar3 != (int *)(param_1 + 4));" do (compound_statement "{\n      iVar1 = *piVar3;\n      if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }\n      if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }\n      piVar3 = piVar3 + -0xf;\n    }" { (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (if_statement "if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }" { (expression_statement "FUN_000347b0();" (call_expression "FUN_000347b0()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar3[1] = 0;" (assignment_expression "piVar3[1] = 0" (subscript_expression "piVar3[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*piVar3 = 0;" (assignment_expression "*piVar3 = 0" (pointer_expression "*piVar3" * identifier) = number_literal) ;) })) (if_statement "if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n        param_2 = (uint)(iVar1 != 0);\n      }" { (expression_statement "param_2 = (uint)(iVar1 != 0);" (assignment_expression "param_2 = (uint)(iVar1 != 0)" identifier = (call_expression "(uint)(iVar1 != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )))) ;) })) (expression_statement "piVar3 = piVar3 + -0xf;" (assignment_expression "piVar3 = piVar3 + -0xf" identifier = (binary_expression "piVar3 + -0xf" identifier + number_literal)) ;) }) while (parenthesized_expression "(piVar3 != (int *)(param_1 + 4))" ( (binary_expression "piVar3 != (int *)(param_1 + 4)" identifier != (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) )) ;) })) (if_statement "if (iVar2 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000a9ea0();\n  }" if (parenthesized_expression "(iVar2 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar2 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    FUN_000a9ea0();\n  }" { (expression_statement "FUN_000a9ea0();" (call_expression "FUN_000a9ea0()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return param_2;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * 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) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) - LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT * LIT)) )))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT != LIT) )))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "uint __regparm3 FUN_00034a20(int param_1,uint param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int in_GS_OFFSET;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = *(byte *)(param_1 + 0x3b) - 1;\n  if (iVar1 != -1) {\n    piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c);\n    do {\n      iVar1 = *piVar3;\n      if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }\n      if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }\n      piVar3 = piVar3 + -0xf;\n    } while (piVar3 != (int *)(param_1 + 4));\n  }\n  if (iVar2 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000a9ea0();\n  }\n  return param_2;\n}" (type_identifier "uint") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00034a20(int param_1,uint param_2)" (identifier "FUN_00034a20") (parameter_list "(int param_1,uint param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int in_GS_OFFSET;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = *(byte *)(param_1 + 0x3b) - 1;\n  if (iVar1 != -1) {\n    piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c);\n    do {\n      iVar1 = *piVar3;\n      if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }\n      if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }\n      piVar3 = piVar3 + -0xf;\n    } while (piVar3 != (int *)(param_1 + 4));\n  }\n  if (iVar2 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000a9ea0();\n  }\n  return param_2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (expression_statement "iVar2 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar2 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "iVar1 = *(byte *)(param_1 + 0x3b) - 1;" (assignment_expression "iVar1 = *(byte *)(param_1 + 0x3b) - 1" (identifier "iVar1") (= "=") (binary_expression "*(byte *)(param_1 + 0x3b) - 1" (pointer_expression "*(byte *)(param_1 + 0x3b)" (* "*") (cast_expression "(byte *)(param_1 + 0x3b)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x3b)" (( "(") (binary_expression "param_1 + 0x3b" (identifier "param_1") (+ "+") (number_literal "0x3b")) () ")")))) (- "-") (number_literal "1"))) (; ";")) (if_statement "if (iVar1 != -1) {\n    piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c);\n    do {\n      iVar1 = *piVar3;\n      if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }\n      if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }\n      piVar3 = piVar3 + -0xf;\n    } while (piVar3 != (int *)(param_1 + 4));\n  }" (if "if") (parenthesized_expression "(iVar1 != -1)" (( "(") (binary_expression "iVar1 != -1" (identifier "iVar1") (!= "!=") (number_literal "-1")) () ")")) (compound_statement "{\n    piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c);\n    do {\n      iVar1 = *piVar3;\n      if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }\n      if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }\n      piVar3 = piVar3 + -0xf;\n    } while (piVar3 != (int *)(param_1 + 4));\n  }" ({ "{") (expression_statement "piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c);" (assignment_expression "piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c)" (identifier "piVar3") (= "=") (cast_expression "(int *)(param_1 + 0x40 + iVar1 * 0x3c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x40 + iVar1 * 0x3c)" (( "(") (binary_expression "param_1 + 0x40 + iVar1 * 0x3c" (binary_expression "param_1 + 0x40" (identifier "param_1") (+ "+") (number_literal "0x40")) (+ "+") (binary_expression "iVar1 * 0x3c" (identifier "iVar1") (* "*") (number_literal "0x3c"))) () ")")))) (; ";")) (do_statement "do {\n      iVar1 = *piVar3;\n      if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }\n      if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }\n      piVar3 = piVar3 + -0xf;\n    } while (piVar3 != (int *)(param_1 + 4));" (do "do") (compound_statement "{\n      iVar1 = *piVar3;\n      if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }\n      if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }\n      piVar3 = piVar3 + -0xf;\n    }" ({ "{") (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" (identifier "iVar1") (= "=") (pointer_expression "*piVar3" (* "*") (identifier "piVar3"))) (; ";")) (if_statement "if (iVar1 != 0) {\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        FUN_000347b0();\n        piVar3[1] = 0;\n        *piVar3 = 0;\n      }" ({ "{") (expression_statement "FUN_000347b0();" (call_expression "FUN_000347b0()" (identifier "FUN_000347b0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "piVar3[1] = 0;" (assignment_expression "piVar3[1] = 0" (subscript_expression "piVar3[1]" (identifier "piVar3") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*piVar3 = 0;" (assignment_expression "*piVar3 = 0" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (if_statement "if (param_2 == 0) {\n        param_2 = (uint)(iVar1 != 0);\n      }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        param_2 = (uint)(iVar1 != 0);\n      }" ({ "{") (expression_statement "param_2 = (uint)(iVar1 != 0);" (assignment_expression "param_2 = (uint)(iVar1 != 0)" (identifier "param_2") (= "=") (call_expression "(uint)(iVar1 != 0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")))) (; ";")) (} "}"))) (expression_statement "piVar3 = piVar3 + -0xf;" (assignment_expression "piVar3 = piVar3 + -0xf" (identifier "piVar3") (= "=") (binary_expression "piVar3 + -0xf" (identifier "piVar3") (+ "+") (number_literal "-0xf"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(piVar3 != (int *)(param_1 + 4))" (( "(") (binary_expression "piVar3 != (int *)(param_1 + 4)" (identifier "piVar3") (!= "!=") (cast_expression "(int *)(param_1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) () ")")) (; ";")) (} "}"))) (if_statement "if (iVar2 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000a9ea0();\n  }" (if "if") (parenthesized_expression "(iVar2 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "iVar2 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar2") (!= "!=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n                    \n    FUN_000a9ea0();\n  }" ({ "{") (expression_statement "FUN_000a9ea0();" (call_expression "FUN_000a9ea0()" (identifier "FUN_000a9ea0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return param_2;" (return "return") (identifier "param_2") (; ";")) (} "}")))

int __regparm3 function_1(type_1 *pSorter,int rcin)

{
  void *pvVar1;
  type_2 *var_3;
  int var_1;
  void *pRet;
  int var_4;
  
  var_4 = *(int *)(var_1 + 0x14);
  if (pSorter->nTask != 0) {
    var_3 = pSorter->aTask + (pSorter->nTask - 1);
    do {
      pvVar1 = (void *)0x0;
      if (var_3->pThread != (type_3 *)0x0) {
        pRet = (void *)0x1;
        var_2(var_3->pThread,&pRet);
        var_3->bDone = 0;
        var_3->pThread = (type_3 *)0x0;
        pvVar1 = pRet;
      }
      if ((void *)rcin == (void *)0x0) {
        rcin = (int)pvVar1;
      }
      var_3 = var_3 + -1;
    } while (var_3 != (type_2 *)&pSorter->mxPmaSize);
  }
  if (var_4 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_5();
  }
  return (int)(void *)rcin;
}


(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: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator 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))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal))))))) (do_statement body: (compound_statement (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 (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (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: (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))))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (return_statement (identifier)))))

uint __regparm3 MASKED(int param_1,uint param_2)

{
  int iVar1;
  int iVar2;
  int *piVar3;
  int in_GS_OFFSET;
  
  iVar2 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = *(byte *)(param_1 + 0x3b) - 1;
  if (iVar1 != -1) {
    piVar3 = (int *)(param_1 + 0x40 + iVar1 * 0x3c);
    do {
      iVar1 = *piVar3;
      if (iVar1 != 0) {
        FUN_000347b0();
        piVar3[1] = 0;
        *piVar3 = 0;
      }
      if (param_2 == 0) {
        param_2 = (uint)(iVar1 != 0);
      }
      piVar3 = piVar3 + -0xf;
    } while (piVar3 != (int *)(param_1 + 4));
  }
  if (iVar2 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_000a9ea0();
  }
  return param_2;
}

