
void dense_rankValueFunc(sqlite3_context *pCtx)

{
  undefined *UNRECOVERED_JUMPTABLE;
  int *piVar1;
  uint uVar2;
  int iVar3;
  uint uVar4;
  
  piVar1 = (int *)sqlite3_aggregate_context(pCtx,0x18);
  UNRECOVERED_JUMPTABLE = PTR_sqlite3_result_int64_0015b6f4;
  if (piVar1 == (int *)0x0) {
    return;
  }
  uVar4 = piVar1[1];
  if (piVar1[2] == 0 && piVar1[3] == 0) {
                    /* WARNING: Could not recover jumptable at 0x000581ac. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(pCtx);
    return;
  }
  uVar2 = uVar4 + 1;
  piVar1[1] = uVar2;
  iVar3 = (uint)(uVar2 < uVar4) + *piVar1;
  piVar1[2] = 0;
  *piVar1 = iVar3;
  piVar1[3] = 0;
                    /* WARNING: Could not recover jumptable at 0x000581ec. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  (*(code *)UNRECOVERED_JUMPTABLE)(pCtx,0,iVar3,uVar2);
  return;
}



void FUN_00058150(undefined4 param_1)

{
  undefined *puVar1;
  int *piVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  
  piVar2 = (int *)sqlite3_aggregate_context(param_1,0x18);
  puVar1 = PTR_sqlite3_result_int64_0015b6f4;
  if (piVar2 == (int *)0x0) {
    return;
  }
  uVar5 = piVar2[1];
  if (piVar2[2] == 0 && piVar2[3] == 0) {
    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1);
    return;
  }
  uVar3 = uVar5 + 1;
  piVar2[1] = uVar3;
  iVar4 = (uint)(uVar3 < uVar5) + *piVar2;
  piVar2[2] = 0;
  *piVar2 = iVar4;
  piVar2[3] = 0;
  (*(code *)puVar1)(param_1,0,iVar4,uVar3);
  return;
}


lui gp,0x11
addiu gp,gp,-0x4ba0
addu gp,gp,t9
addiu sp,sp,-0x20
lw t9,-0x7e48(gp)
li a1,0x18
sw gp,0x10(sp)
sw s0,0x18(sp)
sw ra,0x1c(sp)
bal 0x00057a7c
_or s0,a0,zero
beq v0,zero,0x000581f4
_lw gp,0x10(sp)
lw v1,0x8(v0)
lw a0,0xc(v0)
lw a2,0x0(v0)
or v1,v1,a0
bne v1,zero,0x000581b4
_lw a3,0x4(v0)
lw ra,0x1c(sp)
or a0,s0,zero
lw t9,-0x7ebc(gp)
lw s0,0x18(sp)
jr t9
_addiu sp,sp,0x20
addiu v1,a3,0x1
lw t9,-0x7ebc(gp)
or a0,zero,zero
sltu a3,v1,a3
sw v1,0x4(v0)
addu a2,a3,a2
sw a0,0x8(v0)
or a1,zero,zero
sw a2,0x0(v0)
or a0,s0,zero
sw a1,0xc(v0)
or a3,v1,zero
lw ra,0x1c(sp)
lw s0,0x18(sp)
jr t9
_addiu sp,sp,0x20
lw ra,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x20
(translation_unit "void FUN_00058150(undefined4 param_1)\n\n{\n  undefined *puVar1;\n  int *piVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  \n  piVar2 = (int *)sqlite3_aggregate_context(param_1,0x18);\n  puVar1 = PTR_sqlite3_result_int64_0015b6f4;\n  if (piVar2 == (int *)0x0) {\n    return;\n  }\n  uVar5 = piVar2[1];\n  if (piVar2[2] == 0 && piVar2[3] == 0) {\n    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1);\n    return;\n  }\n  uVar3 = uVar5 + 1;\n  piVar2[1] = uVar3;\n  iVar4 = (uint)(uVar3 < uVar5) + *piVar2;\n  piVar2[2] = 0;\n  *piVar2 = iVar4;\n  piVar2[3] = 0;\n  (*(code *)puVar1)(param_1,0,iVar4,uVar3);\n  return;\n}\n\n" (function_definition "void FUN_00058150(undefined4 param_1)\n\n{\n  undefined *puVar1;\n  int *piVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  \n  piVar2 = (int *)sqlite3_aggregate_context(param_1,0x18);\n  puVar1 = PTR_sqlite3_result_int64_0015b6f4;\n  if (piVar2 == (int *)0x0) {\n    return;\n  }\n  uVar5 = piVar2[1];\n  if (piVar2[2] == 0 && piVar2[3] == 0) {\n    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1);\n    return;\n  }\n  uVar3 = uVar5 + 1;\n  piVar2[1] = uVar3;\n  iVar4 = (uint)(uVar3 < uVar5) + *piVar2;\n  piVar2[2] = 0;\n  *piVar2 = iVar4;\n  piVar2[3] = 0;\n  (*(code *)puVar1)(param_1,0,iVar4,uVar3);\n  return;\n}" primitive_type (function_declarator "FUN_00058150(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int *piVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  \n  piVar2 = (int *)sqlite3_aggregate_context(param_1,0x18);\n  puVar1 = PTR_sqlite3_result_int64_0015b6f4;\n  if (piVar2 == (int *)0x0) {\n    return;\n  }\n  uVar5 = piVar2[1];\n  if (piVar2[2] == 0 && piVar2[3] == 0) {\n    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1);\n    return;\n  }\n  uVar3 = uVar5 + 1;\n  piVar2[1] = uVar3;\n  iVar4 = (uint)(uVar3 < uVar5) + *piVar2;\n  piVar2[2] = 0;\n  *piVar2 = iVar4;\n  piVar2[3] = 0;\n  (*(code *)puVar1)(param_1,0,iVar4,uVar3);\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "piVar2 = (int *)sqlite3_aggregate_context(param_1,0x18);" (assignment_expression "piVar2 = (int *)sqlite3_aggregate_context(param_1,0x18)" identifier = (cast_expression "(int *)sqlite3_aggregate_context(param_1,0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3_aggregate_context(param_1,0x18)" identifier (argument_list "(param_1,0x18)" ( identifier , number_literal ))))) ;) (expression_statement "puVar1 = PTR_sqlite3_result_int64_0015b6f4;" (assignment_expression "puVar1 = PTR_sqlite3_result_int64_0015b6f4" identifier = identifier) ;) (if_statement "if (piVar2 == (int *)0x0) {\n    return;\n  }" if (parenthesized_expression "(piVar2 == (int *)0x0)" ( (binary_expression "piVar2 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "uVar5 = piVar2[1];" (assignment_expression "uVar5 = piVar2[1]" identifier = (subscript_expression "piVar2[1]" identifier [ number_literal ])) ;) (if_statement "if (piVar2[2] == 0 && piVar2[3] == 0) {\n    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1);\n    return;\n  }" if (parenthesized_expression "(piVar2[2] == 0 && piVar2[3] == 0)" ( (binary_expression "piVar2[2] == 0 && piVar2[3] == 0" (binary_expression "piVar2[2] == 0" (subscript_expression "piVar2[2]" identifier [ number_literal ]) == number_literal) && (binary_expression "piVar2[3] == 0" (subscript_expression "piVar2[3]" identifier [ number_literal ]) == number_literal)) )) (compound_statement "{\n    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1);\n    return;\n  }" { (expression_statement "(*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1);" (call_expression "(*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1)" (parenthesized_expression "(*(code *)PTR_sqlite3_result_int64_0015b6f4)" ( (pointer_expression "*(code *)PTR_sqlite3_result_int64_0015b6f4" * (cast_expression "(code *)PTR_sqlite3_result_int64_0015b6f4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "uVar3 = uVar5 + 1;" (assignment_expression "uVar3 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) (expression_statement "piVar2[1] = uVar3;" (assignment_expression "piVar2[1] = uVar3" (subscript_expression "piVar2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar4 = (uint)(uVar3 < uVar5) + *piVar2;" (assignment_expression "iVar4 = (uint)(uVar3 < uVar5) + *piVar2" identifier = (binary_expression "(uint)(uVar3 < uVar5) + *piVar2" (call_expression "(uint)(uVar3 < uVar5)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar3 < uVar5)" ( (binary_expression "uVar3 < uVar5" identifier < identifier) ))) + (pointer_expression "*piVar2" * identifier))) ;) (expression_statement "piVar2[2] = 0;" (assignment_expression "piVar2[2] = 0" (subscript_expression "piVar2[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*piVar2 = iVar4;" (assignment_expression "*piVar2 = iVar4" (pointer_expression "*piVar2" * identifier) = identifier) ;) (expression_statement "piVar2[3] = 0;" (assignment_expression "piVar2[3] = 0" (subscript_expression "piVar2[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "(*(code *)puVar1)(param_1,0,iVar4,uVar3);" (call_expression "(*(code *)puVar1)(param_1,0,iVar4,uVar3)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,0,iVar4,uVar3)" ( identifier , number_literal , identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void dense_rankValueFunc(sqlite3_context *pCtx)\n\n{\n  undefined *UNRECOVERED_JUMPTABLE;\n  int *piVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  \n  piVar1 = (int *)sqlite3_aggregate_context(pCtx,0x18);\n  UNRECOVERED_JUMPTABLE = PTR_sqlite3_result_int64_0015b6f4;\n  if (piVar1 == (int *)0x0) {\n    return;\n  }\n  uVar4 = piVar1[1];\n  if (piVar1[2] == 0 && piVar1[3] == 0) {\n                    /* WARNING: Could not recover jumptable at 0x000581ac. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(pCtx);\n    return;\n  }\n  uVar2 = uVar4 + 1;\n  piVar1[1] = uVar2;\n  iVar3 = (uint)(uVar2 < uVar4) + *piVar1;\n  piVar1[2] = 0;\n  *piVar1 = iVar3;\n  piVar1[3] = 0;\n                    /* WARNING: Could not recover jumptable at 0x000581ec. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  (*(code *)UNRECOVERED_JUMPTABLE)(pCtx,0,iVar3,uVar2);\n  return;\n}\n\n" (function_definition "void dense_rankValueFunc(sqlite3_context *pCtx)\n\n{\n  undefined *UNRECOVERED_JUMPTABLE;\n  int *piVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  \n  piVar1 = (int *)sqlite3_aggregate_context(pCtx,0x18);\n  UNRECOVERED_JUMPTABLE = PTR_sqlite3_result_int64_0015b6f4;\n  if (piVar1 == (int *)0x0) {\n    return;\n  }\n  uVar4 = piVar1[1];\n  if (piVar1[2] == 0 && piVar1[3] == 0) {\n                    /* WARNING: Could not recover jumptable at 0x000581ac. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(pCtx);\n    return;\n  }\n  uVar2 = uVar4 + 1;\n  piVar1[1] = uVar2;\n  iVar3 = (uint)(uVar2 < uVar4) + *piVar1;\n  piVar1[2] = 0;\n  *piVar1 = iVar3;\n  piVar1[3] = 0;\n                    /* WARNING: Could not recover jumptable at 0x000581ec. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  (*(code *)UNRECOVERED_JUMPTABLE)(pCtx,0,iVar3,uVar2);\n  return;\n}" primitive_type (function_declarator "dense_rankValueFunc(sqlite3_context *pCtx)" identifier (parameter_list "(sqlite3_context *pCtx)" ( (parameter_declaration "sqlite3_context *pCtx" type_identifier (pointer_declarator "*pCtx" * identifier)) ))) (compound_statement "{\n  undefined *UNRECOVERED_JUMPTABLE;\n  int *piVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  \n  piVar1 = (int *)sqlite3_aggregate_context(pCtx,0x18);\n  UNRECOVERED_JUMPTABLE = PTR_sqlite3_result_int64_0015b6f4;\n  if (piVar1 == (int *)0x0) {\n    return;\n  }\n  uVar4 = piVar1[1];\n  if (piVar1[2] == 0 && piVar1[3] == 0) {\n                    /* WARNING: Could not recover jumptable at 0x000581ac. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(pCtx);\n    return;\n  }\n  uVar2 = uVar4 + 1;\n  piVar1[1] = uVar2;\n  iVar3 = (uint)(uVar2 < uVar4) + *piVar1;\n  piVar1[2] = 0;\n  *piVar1 = iVar3;\n  piVar1[3] = 0;\n                    /* WARNING: Could not recover jumptable at 0x000581ec. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  (*(code *)UNRECOVERED_JUMPTABLE)(pCtx,0,iVar3,uVar2);\n  return;\n}" { (declaration "undefined *UNRECOVERED_JUMPTABLE;" type_identifier (pointer_declarator "*UNRECOVERED_JUMPTABLE" * identifier) ;) (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "piVar1 = (int *)sqlite3_aggregate_context(pCtx,0x18);" (assignment_expression "piVar1 = (int *)sqlite3_aggregate_context(pCtx,0x18)" identifier = (cast_expression "(int *)sqlite3_aggregate_context(pCtx,0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3_aggregate_context(pCtx,0x18)" identifier (argument_list "(pCtx,0x18)" ( identifier , number_literal ))))) ;) (expression_statement "UNRECOVERED_JUMPTABLE = PTR_sqlite3_result_int64_0015b6f4;" (assignment_expression "UNRECOVERED_JUMPTABLE = PTR_sqlite3_result_int64_0015b6f4" identifier = identifier) ;) (if_statement "if (piVar1 == (int *)0x0) {\n    return;\n  }" if (parenthesized_expression "(piVar1 == (int *)0x0)" ( (binary_expression "piVar1 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "uVar4 = piVar1[1];" (assignment_expression "uVar4 = piVar1[1]" identifier = (subscript_expression "piVar1[1]" identifier [ number_literal ])) ;) (if_statement "if (piVar1[2] == 0 && piVar1[3] == 0) {\n                    /* WARNING: Could not recover jumptable at 0x000581ac. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(pCtx);\n    return;\n  }" if (parenthesized_expression "(piVar1[2] == 0 && piVar1[3] == 0)" ( (binary_expression "piVar1[2] == 0 && piVar1[3] == 0" (binary_expression "piVar1[2] == 0" (subscript_expression "piVar1[2]" identifier [ number_literal ]) == number_literal) && (binary_expression "piVar1[3] == 0" (subscript_expression "piVar1[3]" identifier [ number_literal ]) == number_literal)) )) (compound_statement "{\n                    /* WARNING: Could not recover jumptable at 0x000581ac. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(pCtx);\n    return;\n  }" { comment comment (expression_statement "(*(code *)PTR_sqlite3_result_int64_0015b6f4)(pCtx);" (call_expression "(*(code *)PTR_sqlite3_result_int64_0015b6f4)(pCtx)" (parenthesized_expression "(*(code *)PTR_sqlite3_result_int64_0015b6f4)" ( (pointer_expression "*(code *)PTR_sqlite3_result_int64_0015b6f4" * (cast_expression "(code *)PTR_sqlite3_result_int64_0015b6f4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pCtx)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "uVar2 = uVar4 + 1;" (assignment_expression "uVar2 = uVar4 + 1" identifier = (binary_expression "uVar4 + 1" identifier + number_literal)) ;) (expression_statement "piVar1[1] = uVar2;" (assignment_expression "piVar1[1] = uVar2" (subscript_expression "piVar1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar3 = (uint)(uVar2 < uVar4) + *piVar1;" (assignment_expression "iVar3 = (uint)(uVar2 < uVar4) + *piVar1" identifier = (binary_expression "(uint)(uVar2 < uVar4) + *piVar1" (call_expression "(uint)(uVar2 < uVar4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar2 < uVar4)" ( (binary_expression "uVar2 < uVar4" identifier < identifier) ))) + (pointer_expression "*piVar1" * identifier))) ;) (expression_statement "piVar1[2] = 0;" (assignment_expression "piVar1[2] = 0" (subscript_expression "piVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*piVar1 = iVar3;" (assignment_expression "*piVar1 = iVar3" (pointer_expression "*piVar1" * identifier) = identifier) ;) (expression_statement "piVar1[3] = 0;" (assignment_expression "piVar1[3] = 0" (subscript_expression "piVar1[3]" identifier [ number_literal ]) = number_literal) ;) comment comment (expression_statement "(*(code *)UNRECOVERED_JUMPTABLE)(pCtx,0,iVar3,uVar2);" (call_expression "(*(code *)UNRECOVERED_JUMPTABLE)(pCtx,0,iVar3,uVar2)" (parenthesized_expression "(*(code *)UNRECOVERED_JUMPTABLE)" ( (pointer_expression "*(code *)UNRECOVERED_JUMPTABLE" * (cast_expression "(code *)UNRECOVERED_JUMPTABLE" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pCtx,0,iVar3,uVar2)" ( identifier , number_literal , identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00058150(undefined4 param_1)\n\n{\n  undefined *puVar1;\n  int *piVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  \n  piVar2 = (int *)sqlite3_aggregate_context(param_1,0x18);\n  puVar1 = PTR_sqlite3_result_int64_0015b6f4;\n  if (piVar2 == (int *)0x0) {\n    return;\n  }\n  uVar5 = piVar2[1];\n  if (piVar2[2] == 0 && piVar2[3] == 0) {\n    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1);\n    return;\n  }\n  uVar3 = uVar5 + 1;\n  piVar2[1] = uVar3;\n  iVar4 = (uint)(uVar3 < uVar5) + *piVar2;\n  piVar2[2] = 0;\n  *piVar2 = iVar4;\n  piVar2[3] = 0;\n  (*(code *)puVar1)(param_1,0,iVar4,uVar3);\n  return;\n}\n\n" (function_definition "void FUN_00058150(undefined4 param_1)\n\n{\n  undefined *puVar1;\n  int *piVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  \n  piVar2 = (int *)sqlite3_aggregate_context(param_1,0x18);\n  puVar1 = PTR_sqlite3_result_int64_0015b6f4;\n  if (piVar2 == (int *)0x0) {\n    return;\n  }\n  uVar5 = piVar2[1];\n  if (piVar2[2] == 0 && piVar2[3] == 0) {\n    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1);\n    return;\n  }\n  uVar3 = uVar5 + 1;\n  piVar2[1] = uVar3;\n  iVar4 = (uint)(uVar3 < uVar5) + *piVar2;\n  piVar2[2] = 0;\n  *piVar2 = iVar4;\n  piVar2[3] = 0;\n  (*(code *)puVar1)(param_1,0,iVar4,uVar3);\n  return;\n}" primitive_type (function_declarator "FUN_00058150(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int *piVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  \n  piVar2 = (int *)sqlite3_aggregate_context(param_1,0x18);\n  puVar1 = PTR_sqlite3_result_int64_0015b6f4;\n  if (piVar2 == (int *)0x0) {\n    return;\n  }\n  uVar5 = piVar2[1];\n  if (piVar2[2] == 0 && piVar2[3] == 0) {\n    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1);\n    return;\n  }\n  uVar3 = uVar5 + 1;\n  piVar2[1] = uVar3;\n  iVar4 = (uint)(uVar3 < uVar5) + *piVar2;\n  piVar2[2] = 0;\n  *piVar2 = iVar4;\n  piVar2[3] = 0;\n  (*(code *)puVar1)(param_1,0,iVar4,uVar3);\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "piVar2 = (int *)sqlite3_aggregate_context(param_1,0x18);" (assignment_expression "piVar2 = (int *)sqlite3_aggregate_context(param_1,0x18)" identifier = (cast_expression "(int *)sqlite3_aggregate_context(param_1,0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3_aggregate_context(param_1,0x18)" identifier (argument_list "(param_1,0x18)" ( identifier , number_literal ))))) ;) (expression_statement "puVar1 = PTR_sqlite3_result_int64_0015b6f4;" (assignment_expression "puVar1 = PTR_sqlite3_result_int64_0015b6f4" identifier = identifier) ;) (if_statement "if (piVar2 == (int *)0x0) {\n    return;\n  }" if (parenthesized_expression "(piVar2 == (int *)0x0)" ( (binary_expression "piVar2 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "uVar5 = piVar2[1];" (assignment_expression "uVar5 = piVar2[1]" identifier = (subscript_expression "piVar2[1]" identifier [ number_literal ])) ;) (if_statement "if (piVar2[2] == 0 && piVar2[3] == 0) {\n    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1);\n    return;\n  }" if (parenthesized_expression "(piVar2[2] == 0 && piVar2[3] == 0)" ( (binary_expression "piVar2[2] == 0 && piVar2[3] == 0" (binary_expression "piVar2[2] == 0" (subscript_expression "piVar2[2]" identifier [ number_literal ]) == number_literal) && (binary_expression "piVar2[3] == 0" (subscript_expression "piVar2[3]" identifier [ number_literal ]) == number_literal)) )) (compound_statement "{\n    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1);\n    return;\n  }" { (expression_statement "(*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1);" (call_expression "(*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1)" (parenthesized_expression "(*(code *)PTR_sqlite3_result_int64_0015b6f4)" ( (pointer_expression "*(code *)PTR_sqlite3_result_int64_0015b6f4" * (cast_expression "(code *)PTR_sqlite3_result_int64_0015b6f4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "uVar3 = uVar5 + 1;" (assignment_expression "uVar3 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) (expression_statement "piVar2[1] = uVar3;" (assignment_expression "piVar2[1] = uVar3" (subscript_expression "piVar2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar4 = (uint)(uVar3 < uVar5) + *piVar2;" (assignment_expression "iVar4 = (uint)(uVar3 < uVar5) + *piVar2" identifier = (binary_expression "(uint)(uVar3 < uVar5) + *piVar2" (call_expression "(uint)(uVar3 < uVar5)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar3 < uVar5)" ( (binary_expression "uVar3 < uVar5" identifier < identifier) ))) + (pointer_expression "*piVar2" * identifier))) ;) (expression_statement "piVar2[2] = 0;" (assignment_expression "piVar2[2] = 0" (subscript_expression "piVar2[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*piVar2 = iVar4;" (assignment_expression "*piVar2 = iVar4" (pointer_expression "*piVar2" * identifier) = identifier) ;) (expression_statement "piVar2[3] = 0;" (assignment_expression "piVar2[3] = 0" (subscript_expression "piVar2[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "(*(code *)puVar1)(param_1,0,iVar4,uVar3);" (call_expression "(*(code *)puVar1)(param_1,0,iVar4,uVar3)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,0,iVar4,uVar3)" ( identifier , number_literal , identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) && (binary_expression (subscript_expression IDENT [ LIT ]) == LIT)) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT < IDENT) ))) + (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , LIT , IDENT , IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_00058150(undefined4 param_1)\n\n{\n  undefined *puVar1;\n  int *piVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  \n  piVar2 = (int *)sqlite3_aggregate_context(param_1,0x18);\n  puVar1 = PTR_sqlite3_result_int64_0015b6f4;\n  if (piVar2 == (int *)0x0) {\n    return;\n  }\n  uVar5 = piVar2[1];\n  if (piVar2[2] == 0 && piVar2[3] == 0) {\n    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1);\n    return;\n  }\n  uVar3 = uVar5 + 1;\n  piVar2[1] = uVar3;\n  iVar4 = (uint)(uVar3 < uVar5) + *piVar2;\n  piVar2[2] = 0;\n  *piVar2 = iVar4;\n  piVar2[3] = 0;\n  (*(code *)puVar1)(param_1,0,iVar4,uVar3);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00058150(undefined4 param_1)" (identifier "FUN_00058150") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  int *piVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  \n  piVar2 = (int *)sqlite3_aggregate_context(param_1,0x18);\n  puVar1 = PTR_sqlite3_result_int64_0015b6f4;\n  if (piVar2 == (int *)0x0) {\n    return;\n  }\n  uVar5 = piVar2[1];\n  if (piVar2[2] == 0 && piVar2[3] == 0) {\n    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1);\n    return;\n  }\n  uVar3 = uVar5 + 1;\n  piVar2[1] = uVar3;\n  iVar4 = (uint)(uVar3 < uVar5) + *piVar2;\n  piVar2[2] = 0;\n  *piVar2 = iVar4;\n  piVar2[3] = 0;\n  (*(code *)puVar1)(param_1,0,iVar4,uVar3);\n  return;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (expression_statement "piVar2 = (int *)sqlite3_aggregate_context(param_1,0x18);" (assignment_expression "piVar2 = (int *)sqlite3_aggregate_context(param_1,0x18)" (identifier "piVar2") (= "=") (cast_expression "(int *)sqlite3_aggregate_context(param_1,0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "sqlite3_aggregate_context(param_1,0x18)" (identifier "sqlite3_aggregate_context") (argument_list "(param_1,0x18)" (( "(") (identifier "param_1") (, ",") (number_literal "0x18") () ")"))))) (; ";")) (expression_statement "puVar1 = PTR_sqlite3_result_int64_0015b6f4;" (assignment_expression "puVar1 = PTR_sqlite3_result_int64_0015b6f4" (identifier "puVar1") (= "=") (identifier "PTR_sqlite3_result_int64_0015b6f4")) (; ";")) (if_statement "if (piVar2 == (int *)0x0) {\n    return;\n  }" (if "if") (parenthesized_expression "(piVar2 == (int *)0x0)" (( "(") (binary_expression "piVar2 == (int *)0x0" (identifier "piVar2") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "uVar5 = piVar2[1];" (assignment_expression "uVar5 = piVar2[1]" (identifier "uVar5") (= "=") (subscript_expression "piVar2[1]" (identifier "piVar2") ([ "[") (number_literal "1") (] "]"))) (; ";")) (if_statement "if (piVar2[2] == 0 && piVar2[3] == 0) {\n    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1);\n    return;\n  }" (if "if") (parenthesized_expression "(piVar2[2] == 0 && piVar2[3] == 0)" (( "(") (binary_expression "piVar2[2] == 0 && piVar2[3] == 0" (binary_expression "piVar2[2] == 0" (subscript_expression "piVar2[2]" (identifier "piVar2") ([ "[") (number_literal "2") (] "]")) (== "==") (number_literal "0")) (&& "&&") (binary_expression "piVar2[3] == 0" (subscript_expression "piVar2[3]" (identifier "piVar2") ([ "[") (number_literal "3") (] "]")) (== "==") (number_literal "0"))) () ")")) (compound_statement "{\n    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1);\n    return;\n  }" ({ "{") (expression_statement "(*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1);" (call_expression "(*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1)" (parenthesized_expression "(*(code *)PTR_sqlite3_result_int64_0015b6f4)" (( "(") (pointer_expression "*(code *)PTR_sqlite3_result_int64_0015b6f4" (* "*") (cast_expression "(code *)PTR_sqlite3_result_int64_0015b6f4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sqlite3_result_int64_0015b6f4"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "uVar3 = uVar5 + 1;" (assignment_expression "uVar3 = uVar5 + 1" (identifier "uVar3") (= "=") (binary_expression "uVar5 + 1" (identifier "uVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "piVar2[1] = uVar3;" (assignment_expression "piVar2[1] = uVar3" (subscript_expression "piVar2[1]" (identifier "piVar2") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar3")) (; ";")) (expression_statement "iVar4 = (uint)(uVar3 < uVar5) + *piVar2;" (assignment_expression "iVar4 = (uint)(uVar3 < uVar5) + *piVar2" (identifier "iVar4") (= "=") (binary_expression "(uint)(uVar3 < uVar5) + *piVar2" (call_expression "(uint)(uVar3 < uVar5)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(uVar3 < uVar5)" (( "(") (binary_expression "uVar3 < uVar5" (identifier "uVar3") (< "<") (identifier "uVar5")) () ")"))) (+ "+") (pointer_expression "*piVar2" (* "*") (identifier "piVar2")))) (; ";")) (expression_statement "piVar2[2] = 0;" (assignment_expression "piVar2[2] = 0" (subscript_expression "piVar2[2]" (identifier "piVar2") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*piVar2 = iVar4;" (assignment_expression "*piVar2 = iVar4" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (identifier "iVar4")) (; ";")) (expression_statement "piVar2[3] = 0;" (assignment_expression "piVar2[3] = 0" (subscript_expression "piVar2[3]" (identifier "piVar2") ([ "[") (number_literal "3") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "(*(code *)puVar1)(param_1,0,iVar4,uVar3);" (call_expression "(*(code *)puVar1)(param_1,0,iVar4,uVar3)" (parenthesized_expression "(*(code *)puVar1)" (( "(") (pointer_expression "*(code *)puVar1" (* "*") (cast_expression "(code *)puVar1" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1"))) () ")")) (argument_list "(param_1,0,iVar4,uVar3)" (( "(") (identifier "param_1") (, ",") (number_literal "0") (, ",") (identifier "iVar4") (, ",") (identifier "uVar3") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)) right: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier)))) (return_statement))) (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: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)))) right: (pointer_expression argument: (identifier))))) (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: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (number_literal) (identifier) (identifier)))) (return_statement))))

void MASKED(undefined4 param_1)

{
  undefined *puVar1;
  int *piVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  
  piVar2 = (int *)sqlite3_aggregate_context(param_1,0x18);
  puVar1 = PTR_sqlite3_result_int64_0015b6f4;
  if (piVar2 == (int *)0x0) {
    return;
  }
  uVar5 = piVar2[1];
  if (piVar2[2] == 0 && piVar2[3] == 0) {
    (*(code *)PTR_sqlite3_result_int64_0015b6f4)(param_1);
    return;
  }
  uVar3 = uVar5 + 1;
  piVar2[1] = uVar3;
  iVar4 = (uint)(uVar3 < uVar5) + *piVar2;
  piVar2[2] = 0;
  *piVar2 = iVar4;
  piVar2[3] = 0;
  (*(code *)puVar1)(param_1,0,iVar4,uVar3);
  return;
}

