
void __regparm3
fts3SegReaderSort(Fts3SegReader **apSegment,int nSegment,int nSuspect,
                 _func_int_Fts3SegReader_ptr_Fts3SegReader_ptr *xCmp)

{
  Fts3SegReader *pFVar1;
  int iVar2;
  int iVar3;
  Fts3SegReader **ppFVar4;
  int local_24;
  Fts3SegReader **local_20;
  
  local_24 = nSegment + -2;
  if (nSuspect != nSegment) {
    local_24 = nSuspect + -1;
  }
  if (-1 < local_24) {
    local_20 = apSegment + local_24;
    do {
      iVar3 = local_24;
      ppFVar4 = local_20;
      if (local_24 < nSegment + -1) {
        do {
          iVar2 = (*xCmp)(*ppFVar4,ppFVar4[1]);
          if (iVar2 < 0) break;
          pFVar1 = ppFVar4[1];
          iVar3 = iVar3 + 1;
          ppFVar4[1] = *ppFVar4;
          *ppFVar4 = pFVar1;
          ppFVar4 = ppFVar4 + 1;
        } while (nSegment + -1 != iVar3);
      }
      local_24 = local_24 + -1;
      local_20 = local_20 + -1;
    } while (local_24 != -1);
  }
  return;
}



void __regparm3 FUN_0001ec10(int param_1,int param_2,int param_3,code *param_4)

{
  undefined4 uVar1;
  int iVar2;
  int iVar3;
  undefined4 *puVar4;
  int local_24;
  undefined4 *local_20;
  
  local_24 = param_2 + -2;
  if (param_3 != param_2) {
    local_24 = param_3 + -1;
  }
  if (-1 < local_24) {
    local_20 = (undefined4 *)(param_1 + local_24 * 4);
    do {
      iVar3 = local_24;
      puVar4 = local_20;
      if (local_24 < param_2 + -1) {
        do {
          iVar2 = (*param_4)(*puVar4,puVar4[1]);
          if (iVar2 < 0) break;
          uVar1 = puVar4[1];
          iVar3 = iVar3 + 1;
          puVar4[1] = *puVar4;
          *puVar4 = uVar1;
          puVar4 = puVar4 + 1;
        } while (param_2 + -1 != iVar3);
      }
      local_24 = local_24 + -1;
      local_20 = local_20 + -1;
    } while (local_24 != -1);
  }
  return;
}


PUSH EBP
PUSH EDI
LEA EDI,[ECX + -0x1]
PUSH ESI
PUSH EBX
LEA EBX,[EDX + -0x2]
SUB ESP,0x1c
CMP ECX,EDX
CMOVNZ EBX,EDI
MOV ESI,dword ptr [ESP + 0x30]
MOV dword ptr [ESP + 0x8],EBX
TEST EBX,EBX
JS 0x0001ec88
MOV ECX,EBX
LEA EBX,[EDX + -0x1]
LEA EAX,[EAX + ECX*0x4]
MOV dword ptr [ESP + 0xc],EAX
LEA ESI,[ESI]
MOV EAX,dword ptr [ESP + 0x8]
MOV EDI,dword ptr [ESP + 0xc]
MOV EBP,EAX
CMP EAX,EBX
JL 0x0001ec64
JMP 0x0001ec75
MOV EAX,dword ptr [EDI + 0x4]
MOV EDX,dword ptr [EDI]
ADD EBP,0x1
ADD EDI,0x4
MOV dword ptr [EDI],EDX
MOV dword ptr [EDI + -0x4],EAX
CMP EBX,EBP
JZ 0x0001ec75
SUB ESP,0x8
PUSH dword ptr [EDI + 0x4]
PUSH dword ptr [EDI]
CALL ESI
ADD ESP,0x10
TEST EAX,EAX
JNS 0x0001ec50
SUB dword ptr [ESP + 0x8],0x1
MOV EAX,dword ptr [ESP + 0x8]
SUB dword ptr [ESP + 0xc],0x4
CMP EAX,-0x1
JNZ 0x0001ec40
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "void __regparm3 FUN_0001ec10(int param_1,int param_2,int param_3,code *param_4)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int local_24;\n  undefined4 *local_20;\n  \n  local_24 = param_2 + -2;\n  if (param_3 != param_2) {\n    local_24 = param_3 + -1;\n  }\n  if (-1 < local_24) {\n    local_20 = (undefined4 *)(param_1 + local_24 * 4);\n    do {\n      iVar3 = local_24;\n      puVar4 = local_20;\n      if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_0001ec10(int param_1,int param_2,int param_3,code *param_4)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int local_24;\n  undefined4 *local_20;\n  \n  local_24 = param_2 + -2;\n  if (param_3 != param_2) {\n    local_24 = param_3 + -1;\n  }\n  if (-1 < local_24) {\n    local_20 = (undefined4 *)(param_1 + local_24 * 4);\n    do {\n      iVar3 = local_24;\n      puVar4 = local_20;\n      if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0001ec10(int param_1,int param_2,int param_3,code *param_4)" identifier (parameter_list "(int param_1,int param_2,int param_3,code *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "code *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int local_24;\n  undefined4 *local_20;\n  \n  local_24 = param_2 + -2;\n  if (param_3 != param_2) {\n    local_24 = param_3 + -1;\n  }\n  if (-1 < local_24) {\n    local_20 = (undefined4 *)(param_1 + local_24 * 4);\n    do {\n      iVar3 = local_24;\n      puVar4 = local_20;\n      if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);\n  }\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "undefined4 *local_20;" type_identifier (pointer_declarator "*local_20" * identifier) ;) (expression_statement "local_24 = param_2 + -2;" (assignment_expression "local_24 = param_2 + -2" identifier = (binary_expression "param_2 + -2" identifier + number_literal)) ;) (if_statement "if (param_3 != param_2) {\n    local_24 = param_3 + -1;\n  }" if (parenthesized_expression "(param_3 != param_2)" ( (binary_expression "param_3 != param_2" identifier != identifier) )) (compound_statement "{\n    local_24 = param_3 + -1;\n  }" { (expression_statement "local_24 = param_3 + -1;" (assignment_expression "local_24 = param_3 + -1" identifier = (binary_expression "param_3 + -1" identifier + number_literal)) ;) })) (if_statement "if (-1 < local_24) {\n    local_20 = (undefined4 *)(param_1 + local_24 * 4);\n    do {\n      iVar3 = local_24;\n      puVar4 = local_20;\n      if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);\n  }" if (parenthesized_expression "(-1 < local_24)" ( (binary_expression "-1 < local_24" number_literal < identifier) )) (compound_statement "{\n    local_20 = (undefined4 *)(param_1 + local_24 * 4);\n    do {\n      iVar3 = local_24;\n      puVar4 = local_20;\n      if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);\n  }" { (expression_statement "local_20 = (undefined4 *)(param_1 + local_24 * 4);" (assignment_expression "local_20 = (undefined4 *)(param_1 + local_24 * 4)" identifier = (cast_expression "(undefined4 *)(param_1 + local_24 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + local_24 * 4)" ( (binary_expression "param_1 + local_24 * 4" identifier + (binary_expression "local_24 * 4" identifier * number_literal)) )))) ;) (do_statement "do {\n      iVar3 = local_24;\n      puVar4 = local_20;\n      if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);" do (compound_statement "{\n      iVar3 = local_24;\n      puVar4 = local_20;\n      if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    }" { (expression_statement "iVar3 = local_24;" (assignment_expression "iVar3 = local_24" identifier = identifier) ;) (expression_statement "puVar4 = local_20;" (assignment_expression "puVar4 = local_20" identifier = identifier) ;) (if_statement "if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }" if (parenthesized_expression "(local_24 < param_2 + -1)" ( (binary_expression "local_24 < param_2 + -1" identifier < (binary_expression "param_2 + -1" identifier + number_literal)) )) (compound_statement "{\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }" { (do_statement "do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);" do (compound_statement "{\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        }" { (expression_statement "iVar2 = (*param_4)(*puVar4,puVar4[1]);" (assignment_expression "iVar2 = (*param_4)(*puVar4,puVar4[1])" identifier = (call_expression "(*param_4)(*puVar4,puVar4[1])" (parenthesized_expression "(*param_4)" ( (pointer_expression "*param_4" * identifier) )) (argument_list "(*puVar4,puVar4[1])" ( (pointer_expression "*puVar4" * identifier) , (subscript_expression "puVar4[1]" identifier [ number_literal ]) )))) ;) (if_statement "if (iVar2 < 0) break;" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (break_statement "break;" break ;)) (expression_statement "uVar1 = puVar4[1];" (assignment_expression "uVar1 = puVar4[1]" identifier = (subscript_expression "puVar4[1]" identifier [ number_literal ])) ;) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "puVar4[1] = *puVar4;" (assignment_expression "puVar4[1] = *puVar4" (subscript_expression "puVar4[1]" identifier [ number_literal ]) = (pointer_expression "*puVar4" * identifier)) ;) (expression_statement "*puVar4 = uVar1;" (assignment_expression "*puVar4 = uVar1" (pointer_expression "*puVar4" * identifier) = identifier) ;) (expression_statement "puVar4 = puVar4 + 1;" (assignment_expression "puVar4 = puVar4 + 1" identifier = (binary_expression "puVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2 + -1 != iVar3)" ( (binary_expression "param_2 + -1 != iVar3" (binary_expression "param_2 + -1" identifier + number_literal) != identifier) )) ;) })) (expression_statement "local_24 = local_24 + -1;" (assignment_expression "local_24 = local_24 + -1" identifier = (binary_expression "local_24 + -1" identifier + number_literal)) ;) (expression_statement "local_20 = local_20 + -1;" (assignment_expression "local_20 = local_20 + -1" identifier = (binary_expression "local_20 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(local_24 != -1)" ( (binary_expression "local_24 != -1" identifier != number_literal) )) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3\nfts3SegReaderSort(Fts3SegReader **apSegment,int nSegment,int nSuspect,\n                 _func_int_Fts3SegReader_ptr_Fts3SegReader_ptr *xCmp)\n\n{\n  Fts3SegReader *pFVar1;\n  int iVar2;\n  int iVar3;\n  Fts3SegReader **ppFVar4;\n  int local_24;\n  Fts3SegReader **local_20;\n  \n  local_24 = nSegment + -2;\n  if (nSuspect != nSegment) {\n    local_24 = nSuspect + -1;\n  }\n  if (-1 < local_24) {\n    local_20 = apSegment + local_24;\n    do {\n      iVar3 = local_24;\n      ppFVar4 = local_20;\n      if (local_24 < nSegment + -1) {\n        do {\n          iVar2 = (*xCmp)(*ppFVar4,ppFVar4[1]);\n          if (iVar2 < 0) break;\n          pFVar1 = ppFVar4[1];\n          iVar3 = iVar3 + 1;\n          ppFVar4[1] = *ppFVar4;\n          *ppFVar4 = pFVar1;\n          ppFVar4 = ppFVar4 + 1;\n        } while (nSegment + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);\n  }\n  return;\n}\n\n" (function_definition "void __regparm3\nfts3SegReaderSort(Fts3SegReader **apSegment,int nSegment,int nSuspect,\n                 _func_int_Fts3SegReader_ptr_Fts3SegReader_ptr *xCmp)\n\n{\n  Fts3SegReader *pFVar1;\n  int iVar2;\n  int iVar3;\n  Fts3SegReader **ppFVar4;\n  int local_24;\n  Fts3SegReader **local_20;\n  \n  local_24 = nSegment + -2;\n  if (nSuspect != nSegment) {\n    local_24 = nSuspect + -1;\n  }\n  if (-1 < local_24) {\n    local_20 = apSegment + local_24;\n    do {\n      iVar3 = local_24;\n      ppFVar4 = local_20;\n      if (local_24 < nSegment + -1) {\n        do {\n          iVar2 = (*xCmp)(*ppFVar4,ppFVar4[1]);\n          if (iVar2 < 0) break;\n          pFVar1 = ppFVar4[1];\n          iVar3 = iVar3 + 1;\n          ppFVar4[1] = *ppFVar4;\n          *ppFVar4 = pFVar1;\n          ppFVar4 = ppFVar4 + 1;\n        } while (nSegment + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "fts3SegReaderSort(Fts3SegReader **apSegment,int nSegment,int nSuspect,\n                 _func_int_Fts3SegReader_ptr_Fts3SegReader_ptr *xCmp)" identifier (parameter_list "(Fts3SegReader **apSegment,int nSegment,int nSuspect,\n                 _func_int_Fts3SegReader_ptr_Fts3SegReader_ptr *xCmp)" ( (parameter_declaration "Fts3SegReader **apSegment" type_identifier (pointer_declarator "**apSegment" * (pointer_declarator "*apSegment" * identifier))) , (parameter_declaration "int nSegment" primitive_type identifier) , (parameter_declaration "int nSuspect" primitive_type identifier) , (parameter_declaration "_func_int_Fts3SegReader_ptr_Fts3SegReader_ptr *xCmp" type_identifier (pointer_declarator "*xCmp" * identifier)) ))) (compound_statement "{\n  Fts3SegReader *pFVar1;\n  int iVar2;\n  int iVar3;\n  Fts3SegReader **ppFVar4;\n  int local_24;\n  Fts3SegReader **local_20;\n  \n  local_24 = nSegment + -2;\n  if (nSuspect != nSegment) {\n    local_24 = nSuspect + -1;\n  }\n  if (-1 < local_24) {\n    local_20 = apSegment + local_24;\n    do {\n      iVar3 = local_24;\n      ppFVar4 = local_20;\n      if (local_24 < nSegment + -1) {\n        do {\n          iVar2 = (*xCmp)(*ppFVar4,ppFVar4[1]);\n          if (iVar2 < 0) break;\n          pFVar1 = ppFVar4[1];\n          iVar3 = iVar3 + 1;\n          ppFVar4[1] = *ppFVar4;\n          *ppFVar4 = pFVar1;\n          ppFVar4 = ppFVar4 + 1;\n        } while (nSegment + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);\n  }\n  return;\n}" { (declaration "Fts3SegReader *pFVar1;" type_identifier (pointer_declarator "*pFVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "Fts3SegReader **ppFVar4;" type_identifier (pointer_declarator "**ppFVar4" * (pointer_declarator "*ppFVar4" * identifier)) ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "Fts3SegReader **local_20;" type_identifier (pointer_declarator "**local_20" * (pointer_declarator "*local_20" * identifier)) ;) (expression_statement "local_24 = nSegment + -2;" (assignment_expression "local_24 = nSegment + -2" identifier = (binary_expression "nSegment + -2" identifier + number_literal)) ;) (if_statement "if (nSuspect != nSegment) {\n    local_24 = nSuspect + -1;\n  }" if (parenthesized_expression "(nSuspect != nSegment)" ( (binary_expression "nSuspect != nSegment" identifier != identifier) )) (compound_statement "{\n    local_24 = nSuspect + -1;\n  }" { (expression_statement "local_24 = nSuspect + -1;" (assignment_expression "local_24 = nSuspect + -1" identifier = (binary_expression "nSuspect + -1" identifier + number_literal)) ;) })) (if_statement "if (-1 < local_24) {\n    local_20 = apSegment + local_24;\n    do {\n      iVar3 = local_24;\n      ppFVar4 = local_20;\n      if (local_24 < nSegment + -1) {\n        do {\n          iVar2 = (*xCmp)(*ppFVar4,ppFVar4[1]);\n          if (iVar2 < 0) break;\n          pFVar1 = ppFVar4[1];\n          iVar3 = iVar3 + 1;\n          ppFVar4[1] = *ppFVar4;\n          *ppFVar4 = pFVar1;\n          ppFVar4 = ppFVar4 + 1;\n        } while (nSegment + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);\n  }" if (parenthesized_expression "(-1 < local_24)" ( (binary_expression "-1 < local_24" number_literal < identifier) )) (compound_statement "{\n    local_20 = apSegment + local_24;\n    do {\n      iVar3 = local_24;\n      ppFVar4 = local_20;\n      if (local_24 < nSegment + -1) {\n        do {\n          iVar2 = (*xCmp)(*ppFVar4,ppFVar4[1]);\n          if (iVar2 < 0) break;\n          pFVar1 = ppFVar4[1];\n          iVar3 = iVar3 + 1;\n          ppFVar4[1] = *ppFVar4;\n          *ppFVar4 = pFVar1;\n          ppFVar4 = ppFVar4 + 1;\n        } while (nSegment + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);\n  }" { (expression_statement "local_20 = apSegment + local_24;" (assignment_expression "local_20 = apSegment + local_24" identifier = (binary_expression "apSegment + local_24" identifier + identifier)) ;) (do_statement "do {\n      iVar3 = local_24;\n      ppFVar4 = local_20;\n      if (local_24 < nSegment + -1) {\n        do {\n          iVar2 = (*xCmp)(*ppFVar4,ppFVar4[1]);\n          if (iVar2 < 0) break;\n          pFVar1 = ppFVar4[1];\n          iVar3 = iVar3 + 1;\n          ppFVar4[1] = *ppFVar4;\n          *ppFVar4 = pFVar1;\n          ppFVar4 = ppFVar4 + 1;\n        } while (nSegment + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);" do (compound_statement "{\n      iVar3 = local_24;\n      ppFVar4 = local_20;\n      if (local_24 < nSegment + -1) {\n        do {\n          iVar2 = (*xCmp)(*ppFVar4,ppFVar4[1]);\n          if (iVar2 < 0) break;\n          pFVar1 = ppFVar4[1];\n          iVar3 = iVar3 + 1;\n          ppFVar4[1] = *ppFVar4;\n          *ppFVar4 = pFVar1;\n          ppFVar4 = ppFVar4 + 1;\n        } while (nSegment + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    }" { (expression_statement "iVar3 = local_24;" (assignment_expression "iVar3 = local_24" identifier = identifier) ;) (expression_statement "ppFVar4 = local_20;" (assignment_expression "ppFVar4 = local_20" identifier = identifier) ;) (if_statement "if (local_24 < nSegment + -1) {\n        do {\n          iVar2 = (*xCmp)(*ppFVar4,ppFVar4[1]);\n          if (iVar2 < 0) break;\n          pFVar1 = ppFVar4[1];\n          iVar3 = iVar3 + 1;\n          ppFVar4[1] = *ppFVar4;\n          *ppFVar4 = pFVar1;\n          ppFVar4 = ppFVar4 + 1;\n        } while (nSegment + -1 != iVar3);\n      }" if (parenthesized_expression "(local_24 < nSegment + -1)" ( (binary_expression "local_24 < nSegment + -1" identifier < (binary_expression "nSegment + -1" identifier + number_literal)) )) (compound_statement "{\n        do {\n          iVar2 = (*xCmp)(*ppFVar4,ppFVar4[1]);\n          if (iVar2 < 0) break;\n          pFVar1 = ppFVar4[1];\n          iVar3 = iVar3 + 1;\n          ppFVar4[1] = *ppFVar4;\n          *ppFVar4 = pFVar1;\n          ppFVar4 = ppFVar4 + 1;\n        } while (nSegment + -1 != iVar3);\n      }" { (do_statement "do {\n          iVar2 = (*xCmp)(*ppFVar4,ppFVar4[1]);\n          if (iVar2 < 0) break;\n          pFVar1 = ppFVar4[1];\n          iVar3 = iVar3 + 1;\n          ppFVar4[1] = *ppFVar4;\n          *ppFVar4 = pFVar1;\n          ppFVar4 = ppFVar4 + 1;\n        } while (nSegment + -1 != iVar3);" do (compound_statement "{\n          iVar2 = (*xCmp)(*ppFVar4,ppFVar4[1]);\n          if (iVar2 < 0) break;\n          pFVar1 = ppFVar4[1];\n          iVar3 = iVar3 + 1;\n          ppFVar4[1] = *ppFVar4;\n          *ppFVar4 = pFVar1;\n          ppFVar4 = ppFVar4 + 1;\n        }" { (expression_statement "iVar2 = (*xCmp)(*ppFVar4,ppFVar4[1]);" (assignment_expression "iVar2 = (*xCmp)(*ppFVar4,ppFVar4[1])" identifier = (call_expression "(*xCmp)(*ppFVar4,ppFVar4[1])" (parenthesized_expression "(*xCmp)" ( (pointer_expression "*xCmp" * identifier) )) (argument_list "(*ppFVar4,ppFVar4[1])" ( (pointer_expression "*ppFVar4" * identifier) , (subscript_expression "ppFVar4[1]" identifier [ number_literal ]) )))) ;) (if_statement "if (iVar2 < 0) break;" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (break_statement "break;" break ;)) (expression_statement "pFVar1 = ppFVar4[1];" (assignment_expression "pFVar1 = ppFVar4[1]" identifier = (subscript_expression "ppFVar4[1]" identifier [ number_literal ])) ;) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "ppFVar4[1] = *ppFVar4;" (assignment_expression "ppFVar4[1] = *ppFVar4" (subscript_expression "ppFVar4[1]" identifier [ number_literal ]) = (pointer_expression "*ppFVar4" * identifier)) ;) (expression_statement "*ppFVar4 = pFVar1;" (assignment_expression "*ppFVar4 = pFVar1" (pointer_expression "*ppFVar4" * identifier) = identifier) ;) (expression_statement "ppFVar4 = ppFVar4 + 1;" (assignment_expression "ppFVar4 = ppFVar4 + 1" identifier = (binary_expression "ppFVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(nSegment + -1 != iVar3)" ( (binary_expression "nSegment + -1 != iVar3" (binary_expression "nSegment + -1" identifier + number_literal) != identifier) )) ;) })) (expression_statement "local_24 = local_24 + -1;" (assignment_expression "local_24 = local_24 + -1" identifier = (binary_expression "local_24 + -1" identifier + number_literal)) ;) (expression_statement "local_20 = local_20 + -1;" (assignment_expression "local_20 = local_20 + -1" identifier = (binary_expression "local_20 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(local_24 != -1)" ( (binary_expression "local_24 != -1" identifier != number_literal) )) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_0001ec10(int param_1,int param_2,int param_3,code *param_4)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int local_24;\n  undefined4 *local_20;\n  \n  local_24 = param_2 + -2;\n  if (param_3 != param_2) {\n    local_24 = param_3 + -1;\n  }\n  if (-1 < local_24) {\n    local_20 = (undefined4 *)(param_1 + local_24 * 4);\n    do {\n      iVar3 = local_24;\n      puVar4 = local_20;\n      if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_0001ec10(int param_1,int param_2,int param_3,code *param_4)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int local_24;\n  undefined4 *local_20;\n  \n  local_24 = param_2 + -2;\n  if (param_3 != param_2) {\n    local_24 = param_3 + -1;\n  }\n  if (-1 < local_24) {\n    local_20 = (undefined4 *)(param_1 + local_24 * 4);\n    do {\n      iVar3 = local_24;\n      puVar4 = local_20;\n      if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0001ec10(int param_1,int param_2,int param_3,code *param_4)" identifier (parameter_list "(int param_1,int param_2,int param_3,code *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "code *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int local_24;\n  undefined4 *local_20;\n  \n  local_24 = param_2 + -2;\n  if (param_3 != param_2) {\n    local_24 = param_3 + -1;\n  }\n  if (-1 < local_24) {\n    local_20 = (undefined4 *)(param_1 + local_24 * 4);\n    do {\n      iVar3 = local_24;\n      puVar4 = local_20;\n      if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);\n  }\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "undefined4 *local_20;" type_identifier (pointer_declarator "*local_20" * identifier) ;) (expression_statement "local_24 = param_2 + -2;" (assignment_expression "local_24 = param_2 + -2" identifier = (binary_expression "param_2 + -2" identifier + number_literal)) ;) (if_statement "if (param_3 != param_2) {\n    local_24 = param_3 + -1;\n  }" if (parenthesized_expression "(param_3 != param_2)" ( (binary_expression "param_3 != param_2" identifier != identifier) )) (compound_statement "{\n    local_24 = param_3 + -1;\n  }" { (expression_statement "local_24 = param_3 + -1;" (assignment_expression "local_24 = param_3 + -1" identifier = (binary_expression "param_3 + -1" identifier + number_literal)) ;) })) (if_statement "if (-1 < local_24) {\n    local_20 = (undefined4 *)(param_1 + local_24 * 4);\n    do {\n      iVar3 = local_24;\n      puVar4 = local_20;\n      if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);\n  }" if (parenthesized_expression "(-1 < local_24)" ( (binary_expression "-1 < local_24" number_literal < identifier) )) (compound_statement "{\n    local_20 = (undefined4 *)(param_1 + local_24 * 4);\n    do {\n      iVar3 = local_24;\n      puVar4 = local_20;\n      if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);\n  }" { (expression_statement "local_20 = (undefined4 *)(param_1 + local_24 * 4);" (assignment_expression "local_20 = (undefined4 *)(param_1 + local_24 * 4)" identifier = (cast_expression "(undefined4 *)(param_1 + local_24 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + local_24 * 4)" ( (binary_expression "param_1 + local_24 * 4" identifier + (binary_expression "local_24 * 4" identifier * number_literal)) )))) ;) (do_statement "do {\n      iVar3 = local_24;\n      puVar4 = local_20;\n      if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);" do (compound_statement "{\n      iVar3 = local_24;\n      puVar4 = local_20;\n      if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    }" { (expression_statement "iVar3 = local_24;" (assignment_expression "iVar3 = local_24" identifier = identifier) ;) (expression_statement "puVar4 = local_20;" (assignment_expression "puVar4 = local_20" identifier = identifier) ;) (if_statement "if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }" if (parenthesized_expression "(local_24 < param_2 + -1)" ( (binary_expression "local_24 < param_2 + -1" identifier < (binary_expression "param_2 + -1" identifier + number_literal)) )) (compound_statement "{\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }" { (do_statement "do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);" do (compound_statement "{\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        }" { (expression_statement "iVar2 = (*param_4)(*puVar4,puVar4[1]);" (assignment_expression "iVar2 = (*param_4)(*puVar4,puVar4[1])" identifier = (call_expression "(*param_4)(*puVar4,puVar4[1])" (parenthesized_expression "(*param_4)" ( (pointer_expression "*param_4" * identifier) )) (argument_list "(*puVar4,puVar4[1])" ( (pointer_expression "*puVar4" * identifier) , (subscript_expression "puVar4[1]" identifier [ number_literal ]) )))) ;) (if_statement "if (iVar2 < 0) break;" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (break_statement "break;" break ;)) (expression_statement "uVar1 = puVar4[1];" (assignment_expression "uVar1 = puVar4[1]" identifier = (subscript_expression "puVar4[1]" identifier [ number_literal ])) ;) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "puVar4[1] = *puVar4;" (assignment_expression "puVar4[1] = *puVar4" (subscript_expression "puVar4[1]" identifier [ number_literal ]) = (pointer_expression "*puVar4" * identifier)) ;) (expression_statement "*puVar4 = uVar1;" (assignment_expression "*puVar4 = uVar1" (pointer_expression "*puVar4" * identifier) = identifier) ;) (expression_statement "puVar4 = puVar4 + 1;" (assignment_expression "puVar4 = puVar4 + 1" identifier = (binary_expression "puVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2 + -1 != iVar3)" ( (binary_expression "param_2 + -1 != iVar3" (binary_expression "param_2 + -1" identifier + number_literal) != identifier) )) ;) })) (expression_statement "local_24 = local_24 + -1;" (assignment_expression "local_24 = local_24 + -1" identifier = (binary_expression "local_24 + -1" identifier + number_literal)) ;) (expression_statement "local_20 = local_20 + -1;" (assignment_expression "local_20 = local_20 + -1" identifier = (binary_expression "local_20 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(local_24 != -1)" ( (binary_expression "local_24 != -1" identifier != number_literal) )) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (binary_expression IDENT + LIT)) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( (pointer_expression * IDENT) , (subscript_expression IDENT [ LIT ]) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) != IDENT) )) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) })) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_0001ec10(int param_1,int param_2,int param_3,code *param_4)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int local_24;\n  undefined4 *local_20;\n  \n  local_24 = param_2 + -2;\n  if (param_3 != param_2) {\n    local_24 = param_3 + -1;\n  }\n  if (-1 < local_24) {\n    local_20 = (undefined4 *)(param_1 + local_24 * 4);\n    do {\n      iVar3 = local_24;\n      puVar4 = local_20;\n      if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);\n  }\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0001ec10(int param_1,int param_2,int param_3,code *param_4)" (identifier "FUN_0001ec10") (parameter_list "(int param_1,int param_2,int param_3,code *param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "code *param_4" (type_identifier "code") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int local_24;\n  undefined4 *local_20;\n  \n  local_24 = param_2 + -2;\n  if (param_3 != param_2) {\n    local_24 = param_3 + -1;\n  }\n  if (-1 < local_24) {\n    local_20 = (undefined4 *)(param_1 + local_24 * 4);\n    do {\n      iVar3 = local_24;\n      puVar4 = local_20;\n      if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);\n  }\n  return;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined4 *puVar4;" (type_identifier "undefined4") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (declaration "undefined4 *local_20;" (type_identifier "undefined4") (pointer_declarator "*local_20" (* "*") (identifier "local_20")) (; ";")) (expression_statement "local_24 = param_2 + -2;" (assignment_expression "local_24 = param_2 + -2" (identifier "local_24") (= "=") (binary_expression "param_2 + -2" (identifier "param_2") (+ "+") (number_literal "-2"))) (; ";")) (if_statement "if (param_3 != param_2) {\n    local_24 = param_3 + -1;\n  }" (if "if") (parenthesized_expression "(param_3 != param_2)" (( "(") (binary_expression "param_3 != param_2" (identifier "param_3") (!= "!=") (identifier "param_2")) () ")")) (compound_statement "{\n    local_24 = param_3 + -1;\n  }" ({ "{") (expression_statement "local_24 = param_3 + -1;" (assignment_expression "local_24 = param_3 + -1" (identifier "local_24") (= "=") (binary_expression "param_3 + -1" (identifier "param_3") (+ "+") (number_literal "-1"))) (; ";")) (} "}"))) (if_statement "if (-1 < local_24) {\n    local_20 = (undefined4 *)(param_1 + local_24 * 4);\n    do {\n      iVar3 = local_24;\n      puVar4 = local_20;\n      if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);\n  }" (if "if") (parenthesized_expression "(-1 < local_24)" (( "(") (binary_expression "-1 < local_24" (number_literal "-1") (< "<") (identifier "local_24")) () ")")) (compound_statement "{\n    local_20 = (undefined4 *)(param_1 + local_24 * 4);\n    do {\n      iVar3 = local_24;\n      puVar4 = local_20;\n      if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);\n  }" ({ "{") (expression_statement "local_20 = (undefined4 *)(param_1 + local_24 * 4);" (assignment_expression "local_20 = (undefined4 *)(param_1 + local_24 * 4)" (identifier "local_20") (= "=") (cast_expression "(undefined4 *)(param_1 + local_24 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + local_24 * 4)" (( "(") (binary_expression "param_1 + local_24 * 4" (identifier "param_1") (+ "+") (binary_expression "local_24 * 4" (identifier "local_24") (* "*") (number_literal "4"))) () ")")))) (; ";")) (do_statement "do {\n      iVar3 = local_24;\n      puVar4 = local_20;\n      if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    } while (local_24 != -1);" (do "do") (compound_statement "{\n      iVar3 = local_24;\n      puVar4 = local_20;\n      if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }\n      local_24 = local_24 + -1;\n      local_20 = local_20 + -1;\n    }" ({ "{") (expression_statement "iVar3 = local_24;" (assignment_expression "iVar3 = local_24" (identifier "iVar3") (= "=") (identifier "local_24")) (; ";")) (expression_statement "puVar4 = local_20;" (assignment_expression "puVar4 = local_20" (identifier "puVar4") (= "=") (identifier "local_20")) (; ";")) (if_statement "if (local_24 < param_2 + -1) {\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }" (if "if") (parenthesized_expression "(local_24 < param_2 + -1)" (( "(") (binary_expression "local_24 < param_2 + -1" (identifier "local_24") (< "<") (binary_expression "param_2 + -1" (identifier "param_2") (+ "+") (number_literal "-1"))) () ")")) (compound_statement "{\n        do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);\n      }" ({ "{") (do_statement "do {\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        } while (param_2 + -1 != iVar3);" (do "do") (compound_statement "{\n          iVar2 = (*param_4)(*puVar4,puVar4[1]);\n          if (iVar2 < 0) break;\n          uVar1 = puVar4[1];\n          iVar3 = iVar3 + 1;\n          puVar4[1] = *puVar4;\n          *puVar4 = uVar1;\n          puVar4 = puVar4 + 1;\n        }" ({ "{") (expression_statement "iVar2 = (*param_4)(*puVar4,puVar4[1]);" (assignment_expression "iVar2 = (*param_4)(*puVar4,puVar4[1])" (identifier "iVar2") (= "=") (call_expression "(*param_4)(*puVar4,puVar4[1])" (parenthesized_expression "(*param_4)" (( "(") (pointer_expression "*param_4" (* "*") (identifier "param_4")) () ")")) (argument_list "(*puVar4,puVar4[1])" (( "(") (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (, ",") (subscript_expression "puVar4[1]" (identifier "puVar4") ([ "[") (number_literal "1") (] "]")) () ")")))) (; ";")) (if_statement "if (iVar2 < 0) break;" (if "if") (parenthesized_expression "(iVar2 < 0)" (( "(") (binary_expression "iVar2 < 0" (identifier "iVar2") (< "<") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "uVar1 = puVar4[1];" (assignment_expression "uVar1 = puVar4[1]" (identifier "uVar1") (= "=") (subscript_expression "puVar4[1]" (identifier "puVar4") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" (identifier "iVar3") (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "puVar4[1] = *puVar4;" (assignment_expression "puVar4[1] = *puVar4" (subscript_expression "puVar4[1]" (identifier "puVar4") ([ "[") (number_literal "1") (] "]")) (= "=") (pointer_expression "*puVar4" (* "*") (identifier "puVar4"))) (; ";")) (expression_statement "*puVar4 = uVar1;" (assignment_expression "*puVar4 = uVar1" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (identifier "uVar1")) (; ";")) (expression_statement "puVar4 = puVar4 + 1;" (assignment_expression "puVar4 = puVar4 + 1" (identifier "puVar4") (= "=") (binary_expression "puVar4 + 1" (identifier "puVar4") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_2 + -1 != iVar3)" (( "(") (binary_expression "param_2 + -1 != iVar3" (binary_expression "param_2 + -1" (identifier "param_2") (+ "+") (number_literal "-1")) (!= "!=") (identifier "iVar3")) () ")")) (; ";")) (} "}"))) (expression_statement "local_24 = local_24 + -1;" (assignment_expression "local_24 = local_24 + -1" (identifier "local_24") (= "=") (binary_expression "local_24 + -1" (identifier "local_24") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "local_20 = local_20 + -1;" (assignment_expression "local_20 = local_20 + -1" (identifier "local_20") (= "=") (binary_expression "local_20 + -1" (identifier "local_20") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(local_24 != -1)" (( "(") (binary_expression "local_24 != -1" (identifier "local_24") (!= "!=") (number_literal "-1")) () ")")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

void __regparm3
function_1(type_1 **var_4,int var_1,int var_2,
                 type_2 *xCmp)

{
  type_1 *pFVar1;
  int var_5;
  int var_6;
  type_1 **var_7;
  int var_3;
  type_1 **var_8;
  
  var_3 = var_1 + -2;
  if (var_2 != var_1) {
    var_3 = var_2 + -1;
  }
  if (-1 < var_3) {
    var_8 = var_4 + var_3;
    do {
      var_6 = var_3;
      var_7 = var_8;
      if (var_3 < var_1 + -1) {
        do {
          var_5 = (*xCmp)(*var_7,var_7[1]);
          if (var_5 < 0) break;
          pFVar1 = var_7[1];
          var_6 = var_6 + 1;
          var_7[1] = *var_7;
          *var_7 = pFVar1;
          var_7 = var_7 + 1;
        } while (var_1 + -1 != var_6);
      }
      var_3 = var_3 + -1;
      var_8 = var_8 + -1;
    } while (var_3 != -1);
  }
  return;
}


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

void __regparm3 MASKED(int param_1,int param_2,int param_3,code *param_4)

{
  undefined4 uVar1;
  int iVar2;
  int iVar3;
  undefined4 *puVar4;
  int local_24;
  undefined4 *local_20;
  
  local_24 = param_2 + -2;
  if (param_3 != param_2) {
    local_24 = param_3 + -1;
  }
  if (-1 < local_24) {
    local_20 = (undefined4 *)(param_1 + local_24 * 4);
    do {
      iVar3 = local_24;
      puVar4 = local_20;
      if (local_24 < param_2 + -1) {
        do {
          iVar2 = (*param_4)(*puVar4,puVar4[1]);
          if (iVar2 < 0) break;
          uVar1 = puVar4[1];
          iVar3 = iVar3 + 1;
          puVar4[1] = *puVar4;
          *puVar4 = uVar1;
          puVar4 = puVar4 + 1;
        } while (param_2 + -1 != iVar3);
      }
      local_24 = local_24 + -1;
      local_20 = local_20 + -1;
    } while (local_24 != -1);
  }
  return;
}

