
void avgFinalize(sqlite3_context *context)

{
  void *pvVar1;
  
  pvVar1 = sqlite3_aggregate_context(context,0);
  if (pvVar1 != (void *)0x0) {
    if ((0 < *(int *)((int)pvVar1 + 0x10)) ||
       ((*(int *)((int)pvVar1 + 0x10) == 0 && (*(int *)((int)pvVar1 + 0x14) != 0)))) {
      (*(code *)PTR___floatdidf_0015b698)();
                    /* WARNING: Could not recover jumptable at 0x00058574. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      (*(code *)PTR_sqlite3_result_double_0015b76c)(context);
      return;
    }
  }
  return;
}



void FUN_000584e0(undefined4 param_1)

{
  int iVar1;
  
  iVar1 = sqlite3_aggregate_context(param_1,0);
  if (iVar1 != 0) {
    if ((0 < *(int *)(iVar1 + 0x10)) ||
       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))) {
      (*(code *)PTR_FUN_0015b698)();
                    /* WARNING: Could not recover jumptable at 0x00058574. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);
      return;
    }
  }
  return;
}


lui gp,0x11
addiu gp,gp,-0x4f30
addu gp,gp,t9
addiu sp,sp,-0x28
lw t9,-0x7e48(gp)
or a1,zero,zero
sw gp,0x10(sp)
sw s0,0x20(sp)
sw ra,0x24(sp)
bal 0x00057a7c
_or s0,a0,zero
beq v0,zero,0x00058528
_lw gp,0x10(sp)
lw a0,0x10(v0)
bgtz a0,0x00058540
_lw a1,0x14(v0)
beq a0,zero,0x00058538
_nop
lw ra,0x24(sp)
lw s0,0x20(sp)
jr ra
_addiu sp,sp,0x28
beq a1,zero,0x0005852c
_lw ra,0x24(sp)
lw t9,-0x7f18(gp)
jalr t9
_sw v0,0x1c(sp)
or a0,s0,zero
lw v0,0x1c(sp)
lw gp,0x10(sp)
lw ra,0x24(sp)
ldc1 f2,0x0(v0)
lw s0,0x20(sp)
addiu sp,sp,0x28
lw t9,-0x7e44(gp)
div.D f0,f2,f0
mfc1 a3,f0
jr t9
_mfhc1 a2,f0
(translation_unit "void FUN_000584e0(undefined4 param_1)\n\n{\n  int iVar1;\n  \n  iVar1 = sqlite3_aggregate_context(param_1,0);\n  if (iVar1 != 0) {\n    if ((0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))) {\n      (*(code *)PTR_FUN_0015b698)();\n                    /* WARNING: Could not recover jumptable at 0x00058574. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);\n      return;\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_000584e0(undefined4 param_1)\n\n{\n  int iVar1;\n  \n  iVar1 = sqlite3_aggregate_context(param_1,0);\n  if (iVar1 != 0) {\n    if ((0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))) {\n      (*(code *)PTR_FUN_0015b698)();\n                    /* WARNING: Could not recover jumptable at 0x00058574. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);\n      return;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_000584e0(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = sqlite3_aggregate_context(param_1,0);\n  if (iVar1 != 0) {\n    if ((0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))) {\n      (*(code *)PTR_FUN_0015b698)();\n                    /* WARNING: Could not recover jumptable at 0x00058574. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);\n      return;\n    }\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = sqlite3_aggregate_context(param_1,0);" (assignment_expression "iVar1 = sqlite3_aggregate_context(param_1,0)" identifier = (call_expression "sqlite3_aggregate_context(param_1,0)" identifier (argument_list "(param_1,0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 != 0) {\n    if ((0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))) {\n      (*(code *)PTR_FUN_0015b698)();\n                    /* WARNING: Could not recover jumptable at 0x00058574. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);\n      return;\n    }\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    if ((0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))) {\n      (*(code *)PTR_FUN_0015b698)();\n                    /* WARNING: Could not recover jumptable at 0x00058574. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);\n      return;\n    }\n  }" { (if_statement "if ((0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))) {\n      (*(code *)PTR_FUN_0015b698)();\n                    /* WARNING: Could not recover jumptable at 0x00058574. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);\n      return;\n    }" if (parenthesized_expression "((0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0))))" ( (binary_expression "(0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))" (parenthesized_expression "(0 < *(int *)(iVar1 + 0x10))" ( (binary_expression "0 < *(int *)(iVar1 + 0x10)" number_literal < (pointer_expression "*(int *)(iVar1 + 0x10)" * (cast_expression "(int *)(iVar1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) ))))) )) || (parenthesized_expression "((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))" ( (parenthesized_expression "(*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0))" ( (binary_expression "*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)" (binary_expression "*(int *)(iVar1 + 0x10) == 0" (pointer_expression "*(int *)(iVar1 + 0x10)" * (cast_expression "(int *)(iVar1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) )))) == number_literal) && (parenthesized_expression "(*(int *)(iVar1 + 0x14) != 0)" ( (binary_expression "*(int *)(iVar1 + 0x14) != 0" (pointer_expression "*(int *)(iVar1 + 0x14)" * (cast_expression "(int *)(iVar1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x14)" ( (binary_expression "iVar1 + 0x14" identifier + number_literal) )))) != number_literal) ))) )) ))) )) (compound_statement "{\n      (*(code *)PTR_FUN_0015b698)();\n                    /* WARNING: Could not recover jumptable at 0x00058574. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);\n      return;\n    }" { (expression_statement "(*(code *)PTR_FUN_0015b698)();" (call_expression "(*(code *)PTR_FUN_0015b698)()" (parenthesized_expression "(*(code *)PTR_FUN_0015b698)" ( (pointer_expression "*(code *)PTR_FUN_0015b698" * (cast_expression "(code *)PTR_FUN_0015b698" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) comment comment (expression_statement "(*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);" (call_expression "(*(code *)PTR_sqlite3_result_double_0015b76c)(param_1)" (parenthesized_expression "(*(code *)PTR_sqlite3_result_double_0015b76c)" ( (pointer_expression "*(code *)PTR_sqlite3_result_double_0015b76c" * (cast_expression "(code *)PTR_sqlite3_result_double_0015b76c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "void avgFinalize(sqlite3_context *context)\n\n{\n  void *pvVar1;\n  \n  pvVar1 = sqlite3_aggregate_context(context,0);\n  if (pvVar1 != (void *)0x0) {\n    if ((0 < *(int *)((int)pvVar1 + 0x10)) ||\n       ((*(int *)((int)pvVar1 + 0x10) == 0 && (*(int *)((int)pvVar1 + 0x14) != 0)))) {\n      (*(code *)PTR___floatdidf_0015b698)();\n                    /* WARNING: Could not recover jumptable at 0x00058574. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_sqlite3_result_double_0015b76c)(context);\n      return;\n    }\n  }\n  return;\n}\n\n" (function_definition "void avgFinalize(sqlite3_context *context)\n\n{\n  void *pvVar1;\n  \n  pvVar1 = sqlite3_aggregate_context(context,0);\n  if (pvVar1 != (void *)0x0) {\n    if ((0 < *(int *)((int)pvVar1 + 0x10)) ||\n       ((*(int *)((int)pvVar1 + 0x10) == 0 && (*(int *)((int)pvVar1 + 0x14) != 0)))) {\n      (*(code *)PTR___floatdidf_0015b698)();\n                    /* WARNING: Could not recover jumptable at 0x00058574. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_sqlite3_result_double_0015b76c)(context);\n      return;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "avgFinalize(sqlite3_context *context)" identifier (parameter_list "(sqlite3_context *context)" ( (parameter_declaration "sqlite3_context *context" type_identifier (pointer_declarator "*context" * identifier)) ))) (compound_statement "{\n  void *pvVar1;\n  \n  pvVar1 = sqlite3_aggregate_context(context,0);\n  if (pvVar1 != (void *)0x0) {\n    if ((0 < *(int *)((int)pvVar1 + 0x10)) ||\n       ((*(int *)((int)pvVar1 + 0x10) == 0 && (*(int *)((int)pvVar1 + 0x14) != 0)))) {\n      (*(code *)PTR___floatdidf_0015b698)();\n                    /* WARNING: Could not recover jumptable at 0x00058574. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_sqlite3_result_double_0015b76c)(context);\n      return;\n    }\n  }\n  return;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (expression_statement "pvVar1 = sqlite3_aggregate_context(context,0);" (assignment_expression "pvVar1 = sqlite3_aggregate_context(context,0)" identifier = (call_expression "sqlite3_aggregate_context(context,0)" identifier (argument_list "(context,0)" ( identifier , number_literal )))) ;) (if_statement "if (pvVar1 != (void *)0x0) {\n    if ((0 < *(int *)((int)pvVar1 + 0x10)) ||\n       ((*(int *)((int)pvVar1 + 0x10) == 0 && (*(int *)((int)pvVar1 + 0x14) != 0)))) {\n      (*(code *)PTR___floatdidf_0015b698)();\n                    /* WARNING: Could not recover jumptable at 0x00058574. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_sqlite3_result_double_0015b76c)(context);\n      return;\n    }\n  }" if (parenthesized_expression "(pvVar1 != (void *)0x0)" ( (binary_expression "pvVar1 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if ((0 < *(int *)((int)pvVar1 + 0x10)) ||\n       ((*(int *)((int)pvVar1 + 0x10) == 0 && (*(int *)((int)pvVar1 + 0x14) != 0)))) {\n      (*(code *)PTR___floatdidf_0015b698)();\n                    /* WARNING: Could not recover jumptable at 0x00058574. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_sqlite3_result_double_0015b76c)(context);\n      return;\n    }\n  }" { (if_statement "if ((0 < *(int *)((int)pvVar1 + 0x10)) ||\n       ((*(int *)((int)pvVar1 + 0x10) == 0 && (*(int *)((int)pvVar1 + 0x14) != 0)))) {\n      (*(code *)PTR___floatdidf_0015b698)();\n                    /* WARNING: Could not recover jumptable at 0x00058574. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_sqlite3_result_double_0015b76c)(context);\n      return;\n    }" if (parenthesized_expression "((0 < *(int *)((int)pvVar1 + 0x10)) ||\n       ((*(int *)((int)pvVar1 + 0x10) == 0 && (*(int *)((int)pvVar1 + 0x14) != 0))))" ( (binary_expression "(0 < *(int *)((int)pvVar1 + 0x10)) ||\n       ((*(int *)((int)pvVar1 + 0x10) == 0 && (*(int *)((int)pvVar1 + 0x14) != 0)))" (parenthesized_expression "(0 < *(int *)((int)pvVar1 + 0x10))" ( (binary_expression "0 < *(int *)((int)pvVar1 + 0x10)" number_literal < (pointer_expression "*(int *)((int)pvVar1 + 0x10)" * (cast_expression "(int *)((int)pvVar1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar1 + 0x10)" ( (binary_expression "(int)pvVar1 + 0x10" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) )) || (parenthesized_expression "((*(int *)((int)pvVar1 + 0x10) == 0 && (*(int *)((int)pvVar1 + 0x14) != 0)))" ( (parenthesized_expression "(*(int *)((int)pvVar1 + 0x10) == 0 && (*(int *)((int)pvVar1 + 0x14) != 0))" ( (binary_expression "*(int *)((int)pvVar1 + 0x10) == 0 && (*(int *)((int)pvVar1 + 0x14) != 0)" (binary_expression "*(int *)((int)pvVar1 + 0x10) == 0" (pointer_expression "*(int *)((int)pvVar1 + 0x10)" * (cast_expression "(int *)((int)pvVar1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar1 + 0x10)" ( (binary_expression "(int)pvVar1 + 0x10" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) == number_literal) && (parenthesized_expression "(*(int *)((int)pvVar1 + 0x14) != 0)" ( (binary_expression "*(int *)((int)pvVar1 + 0x14) != 0" (pointer_expression "*(int *)((int)pvVar1 + 0x14)" * (cast_expression "(int *)((int)pvVar1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar1 + 0x14)" ( (binary_expression "(int)pvVar1 + 0x14" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != number_literal) ))) )) ))) )) (compound_statement "{\n      (*(code *)PTR___floatdidf_0015b698)();\n                    /* WARNING: Could not recover jumptable at 0x00058574. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_sqlite3_result_double_0015b76c)(context);\n      return;\n    }" { (expression_statement "(*(code *)PTR___floatdidf_0015b698)();" (call_expression "(*(code *)PTR___floatdidf_0015b698)()" (parenthesized_expression "(*(code *)PTR___floatdidf_0015b698)" ( (pointer_expression "*(code *)PTR___floatdidf_0015b698" * (cast_expression "(code *)PTR___floatdidf_0015b698" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) comment comment (expression_statement "(*(code *)PTR_sqlite3_result_double_0015b76c)(context);" (call_expression "(*(code *)PTR_sqlite3_result_double_0015b76c)(context)" (parenthesized_expression "(*(code *)PTR_sqlite3_result_double_0015b76c)" ( (pointer_expression "*(code *)PTR_sqlite3_result_double_0015b76c" * (cast_expression "(code *)PTR_sqlite3_result_double_0015b76c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(context)" ( identifier ))) ;) (return_statement "return;" return ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_000584e0(undefined4 param_1)\n\n{\n  int iVar1;\n  \n  iVar1 = sqlite3_aggregate_context(param_1,0);\n  if (iVar1 != 0) {\n    if ((0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))) {\n      (*(code *)PTR_FUN_0015b698)();\n                    \n                    \n      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);\n      return;\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_000584e0(undefined4 param_1)\n\n{\n  int iVar1;\n  \n  iVar1 = sqlite3_aggregate_context(param_1,0);\n  if (iVar1 != 0) {\n    if ((0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))) {\n      (*(code *)PTR_FUN_0015b698)();\n                    \n                    \n      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);\n      return;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_000584e0(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = sqlite3_aggregate_context(param_1,0);\n  if (iVar1 != 0) {\n    if ((0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))) {\n      (*(code *)PTR_FUN_0015b698)();\n                    \n                    \n      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);\n      return;\n    }\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = sqlite3_aggregate_context(param_1,0);" (assignment_expression "iVar1 = sqlite3_aggregate_context(param_1,0)" identifier = (call_expression "sqlite3_aggregate_context(param_1,0)" identifier (argument_list "(param_1,0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 != 0) {\n    if ((0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))) {\n      (*(code *)PTR_FUN_0015b698)();\n                    \n                    \n      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);\n      return;\n    }\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    if ((0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))) {\n      (*(code *)PTR_FUN_0015b698)();\n                    \n                    \n      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);\n      return;\n    }\n  }" { (if_statement "if ((0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))) {\n      (*(code *)PTR_FUN_0015b698)();\n                    \n                    \n      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);\n      return;\n    }" if (parenthesized_expression "((0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0))))" ( (binary_expression "(0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))" (parenthesized_expression "(0 < *(int *)(iVar1 + 0x10))" ( (binary_expression "0 < *(int *)(iVar1 + 0x10)" number_literal < (pointer_expression "*(int *)(iVar1 + 0x10)" * (cast_expression "(int *)(iVar1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) ))))) )) || (parenthesized_expression "((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))" ( (parenthesized_expression "(*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0))" ( (binary_expression "*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)" (binary_expression "*(int *)(iVar1 + 0x10) == 0" (pointer_expression "*(int *)(iVar1 + 0x10)" * (cast_expression "(int *)(iVar1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) )))) == number_literal) && (parenthesized_expression "(*(int *)(iVar1 + 0x14) != 0)" ( (binary_expression "*(int *)(iVar1 + 0x14) != 0" (pointer_expression "*(int *)(iVar1 + 0x14)" * (cast_expression "(int *)(iVar1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x14)" ( (binary_expression "iVar1 + 0x14" identifier + number_literal) )))) != number_literal) ))) )) ))) )) (compound_statement "{\n      (*(code *)PTR_FUN_0015b698)();\n                    \n                    \n      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);\n      return;\n    }" { (expression_statement "(*(code *)PTR_FUN_0015b698)();" (call_expression "(*(code *)PTR_FUN_0015b698)()" (parenthesized_expression "(*(code *)PTR_FUN_0015b698)" ( (pointer_expression "*(code *)PTR_FUN_0015b698" * (cast_expression "(code *)PTR_FUN_0015b698" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "(*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);" (call_expression "(*(code *)PTR_sqlite3_result_double_0015b76c)(param_1)" (parenthesized_expression "(*(code *)PTR_sqlite3_result_double_0015b76c)" ( (pointer_expression "*(code *)PTR_sqlite3_result_double_0015b76c" * (cast_expression "(code *)PTR_sqlite3_result_double_0015b76c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) || (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) ))) )) ))) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (return_statement return ;) })) })) (return_statement return ;) })))
(function_definition "void FUN_000584e0(undefined4 param_1)\n\n{\n  int iVar1;\n  \n  iVar1 = sqlite3_aggregate_context(param_1,0);\n  if (iVar1 != 0) {\n    if ((0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))) {\n      (*(code *)PTR_FUN_0015b698)();\n                    \n                    \n      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);\n      return;\n    }\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_000584e0(undefined4 param_1)" (identifier "FUN_000584e0") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = sqlite3_aggregate_context(param_1,0);\n  if (iVar1 != 0) {\n    if ((0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))) {\n      (*(code *)PTR_FUN_0015b698)();\n                    \n                    \n      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);\n      return;\n    }\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (expression_statement "iVar1 = sqlite3_aggregate_context(param_1,0);" (assignment_expression "iVar1 = sqlite3_aggregate_context(param_1,0)" (identifier "iVar1") (= "=") (call_expression "sqlite3_aggregate_context(param_1,0)" (identifier "sqlite3_aggregate_context") (argument_list "(param_1,0)" (( "(") (identifier "param_1") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    if ((0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))) {\n      (*(code *)PTR_FUN_0015b698)();\n                    \n                    \n      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);\n      return;\n    }\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if ((0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))) {\n      (*(code *)PTR_FUN_0015b698)();\n                    \n                    \n      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);\n      return;\n    }\n  }" ({ "{") (if_statement "if ((0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))) {\n      (*(code *)PTR_FUN_0015b698)();\n                    \n                    \n      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);\n      return;\n    }" (if "if") (parenthesized_expression "((0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0))))" (( "(") (binary_expression "(0 < *(int *)(iVar1 + 0x10)) ||\n       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))" (parenthesized_expression "(0 < *(int *)(iVar1 + 0x10))" (( "(") (binary_expression "0 < *(int *)(iVar1 + 0x10)" (number_literal "0") (< "<") (pointer_expression "*(int *)(iVar1 + 0x10)" (* "*") (cast_expression "(int *)(iVar1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x10)" (( "(") (binary_expression "iVar1 + 0x10" (identifier "iVar1") (+ "+") (number_literal "0x10")) () ")"))))) () ")")) (|| "||") (parenthesized_expression "((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))" (( "(") (parenthesized_expression "(*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0))" (( "(") (binary_expression "*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)" (binary_expression "*(int *)(iVar1 + 0x10) == 0" (pointer_expression "*(int *)(iVar1 + 0x10)" (* "*") (cast_expression "(int *)(iVar1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x10)" (( "(") (binary_expression "iVar1 + 0x10" (identifier "iVar1") (+ "+") (number_literal "0x10")) () ")")))) (== "==") (number_literal "0")) (&& "&&") (parenthesized_expression "(*(int *)(iVar1 + 0x14) != 0)" (( "(") (binary_expression "*(int *)(iVar1 + 0x14) != 0" (pointer_expression "*(int *)(iVar1 + 0x14)" (* "*") (cast_expression "(int *)(iVar1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x14)" (( "(") (binary_expression "iVar1 + 0x14" (identifier "iVar1") (+ "+") (number_literal "0x14")) () ")")))) (!= "!=") (number_literal "0")) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\n      (*(code *)PTR_FUN_0015b698)();\n                    \n                    \n      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);\n      return;\n    }" ({ "{") (expression_statement "(*(code *)PTR_FUN_0015b698)();" (call_expression "(*(code *)PTR_FUN_0015b698)()" (parenthesized_expression "(*(code *)PTR_FUN_0015b698)" (( "(") (pointer_expression "*(code *)PTR_FUN_0015b698" (* "*") (cast_expression "(code *)PTR_FUN_0015b698" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_0015b698"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);" (call_expression "(*(code *)PTR_sqlite3_result_double_0015b76c)(param_1)" (parenthesized_expression "(*(code *)PTR_sqlite3_result_double_0015b76c)" (( "(") (pointer_expression "*(code *)PTR_sqlite3_result_double_0015b76c" (* "*") (cast_expression "(code *)PTR_sqlite3_result_double_0015b76c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sqlite3_result_double_0015b76c"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 *context)

{
  void *var_2;
  
  var_2 = var_1(context,0);
  if (var_2 != (void *)0x0) {
    if ((0 < *(int *)((int)var_2 + 0x10)) ||
       ((*(int *)((int)var_2 + 0x10) == 0 && (*(int *)((int)var_2 + 0x14) != 0)))) {
      (*(type_2 *)PTR___floatdidf_0015b698)();
                    /* WARNING: Could not recover jumptable at 0x00058574. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      (*(type_2 *)PTR_sqlite3_result_double_0015b76c)(context);
      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: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) right: (parenthesized_expression (parenthesized_expression (binary_expression left: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))))))) consequence: (compound_statement (expression_statement (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))) (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))))) (return_statement))))

void MASKED(undefined4 param_1)

{
  int iVar1;
  
  iVar1 = sqlite3_aggregate_context(param_1,0);
  if (iVar1 != 0) {
    if ((0 < *(int *)(iVar1 + 0x10)) ||
       ((*(int *)(iVar1 + 0x10) == 0 && (*(int *)(iVar1 + 0x14) != 0)))) {
      (*(code *)PTR_FUN_0015b698)();
                    /* WARNING: Could not recover jumptable at 0x00058574. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      (*(code *)PTR_sqlite3_result_double_0015b76c)(param_1);
      return;
    }
  }
  return;
}

