
png_charp png_format_number(png_const_charp start,png_charp end,int format,png_alloc_size_t number)

{
  png_charp pcVar1;
  int iVar2;
  
  pcVar1 = end + -1;
  end[-1] = '\0';
  if (start < pcVar1) {
    iVar2 = 0;
    do {
      if ((number == 0) && (0 < iVar2)) {
        return pcVar1;
      }
      iVar2 = iVar2 + 1;
      if ((uint)format < 6) {
                    /* WARNING: Could not emulate address calculation at 0x0001999c */
                    /* WARNING: Treating indirect jump as call */
        pcVar1 = (png_charp)(*(code *)(&_gp + *(int *)(PTR_s_nt_0005301c + format * 4 + -0xd20)))();
        return pcVar1;
      }
      number = 0;
    } while (start < pcVar1);
  }
  return pcVar1;
}



void FUN_00019960(uint param_1,int param_2,uint param_3,int param_4)

{
  int iVar1;
  
  *(undefined1 *)(param_2 + -1) = 0;
  if (param_1 < param_2 - 1U) {
    iVar1 = 0;
    do {
      if ((param_4 == 0) && (0 < iVar1)) {
        return;
      }
      iVar1 = iVar1 + 1;
      if (param_3 < 6) {
                    /* WARNING: Could not emulate address calculation at 0x0001999c */
                    /* WARNING: Treating indirect jump as call */
        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();
        return;
      }
      param_4 = 0;
    } while (param_1 < param_2 - 1U);
  }
  return;
}


lui gp,0x4
addiu gp,gp,0x1690
addu gp,gp,t9
addiu v0,a1,-0x1
sltu v1,a0,v0
beq v1,zero,0x00019a0c
_sb zero,-0x1(a1)
lw t1,-0x7fd4(gp)
sll v1,a2,0x2
lw t5,-0x7fd4(gp)
lui t6,0xcccc
or t7,zero,zero
addiu t1,t1,-0xd20
li t4,0x1
or a1,zero,zero
addu t1,t1,v1
li t2,0x5
li t8,0x2e
addiu t5,t5,-0xcfc
sltiu t3,a2,0x6
ori t6,t6,0xcccd
bne a3,zero,0x000199c4
_slt v1,a1,t4
beq v1,zero,0x00019ae0
_nop
beq t3,zero,0x00019ac0
_addiu a1,a1,0x1
lw v1,0x0(t1)
addu v1,v1,gp
jr v1
_nop
li t4,0x2
andi v1,a3,0xf
addu v1,v1,t5
addiu v0,v0,-0x1
srl a3,a3,0x4
lbu v1,0x0(v1)
sb v1,0x0(v0)
beq a2,t2,0x00019a98
_nop
sltu v1,a0,v0
bne v1,zero,0x000199b4
_nop
jr ra
_nop
or t4,a2,zero
multu a3,t6
addiu v0,v0,-0x1
mfhi t0
srl t0,t0,0x3
sll v1,t0,0x2
addu v1,v1,t0
sll v1,v1,0x1
subu v1,a3,v1
or a3,t0,zero
addu v1,v1,t5
lbu v1,0x0(v1)
b 0x000199f8
_sb v1,0x0(v0)
multu a3,t6
mfhi v1
srl v1,v1,0x3
sll t0,v1,0x2
addu v1,t0,v1
sll v1,v1,0x1
subu v1,a3,v1
or t7,t7,v1
beq t7,zero,0x00019a8c
_or t7,zero,zero
addu v1,v1,t5
addiu v0,v0,-0x1
li t7,0x1
lbu v1,0x0(v1)
sb v1,0x0(v0)
multu a3,t6
or t4,a2,zero
mfhi a3
srl a3,a3,0x3
bne a1,t2,0x00019a04
_sltu v1,a0,v0
sltu v1,a0,v0
beq v1,zero,0x00019ae0
_nop
beq t7,zero,0x00019ac8
_nop
sb t8,-0x1(v0)
b 0x00019a00
_addiu v0,v0,-0x1
b 0x00019a00
_or a3,zero,zero
bne a3,zero,0x000199c4
_slt v1,a1,t4
addiu v0,v0,-0x1
li v1,0x30
jr ra
_sb v1,0x0(v0)
jr ra
_nop
(translation_unit "void FUN_00019960(uint param_1,int param_2,uint param_3,int param_4)\n\n{\n  int iVar1;\n  \n  *(undefined1 *)(param_2 + -1) = 0;\n  if (param_1 < param_2 - 1U) {\n    iVar1 = 0;\n    do {\n      if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }\n      iVar1 = iVar1 + 1;\n      if (param_3 < 6) {\n                    /* WARNING: Could not emulate address calculation at 0x0001999c */\n                    /* WARNING: Treating indirect jump as call */\n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }\n      param_4 = 0;\n    } while (param_1 < param_2 - 1U);\n  }\n  return;\n}\n\n" (function_definition "void FUN_00019960(uint param_1,int param_2,uint param_3,int param_4)\n\n{\n  int iVar1;\n  \n  *(undefined1 *)(param_2 + -1) = 0;\n  if (param_1 < param_2 - 1U) {\n    iVar1 = 0;\n    do {\n      if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }\n      iVar1 = iVar1 + 1;\n      if (param_3 < 6) {\n                    /* WARNING: Could not emulate address calculation at 0x0001999c */\n                    /* WARNING: Treating indirect jump as call */\n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }\n      param_4 = 0;\n    } while (param_1 < param_2 - 1U);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00019960(uint param_1,int param_2,uint param_3,int param_4)" identifier (parameter_list "(uint param_1,int param_2,uint param_3,int param_4)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  *(undefined1 *)(param_2 + -1) = 0;\n  if (param_1 < param_2 - 1U) {\n    iVar1 = 0;\n    do {\n      if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }\n      iVar1 = iVar1 + 1;\n      if (param_3 < 6) {\n                    /* WARNING: Could not emulate address calculation at 0x0001999c */\n                    /* WARNING: Treating indirect jump as call */\n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }\n      param_4 = 0;\n    } while (param_1 < param_2 - 1U);\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "*(undefined1 *)(param_2 + -1) = 0;" (assignment_expression "*(undefined1 *)(param_2 + -1) = 0" (pointer_expression "*(undefined1 *)(param_2 + -1)" * (cast_expression "(undefined1 *)(param_2 + -1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + -1)" ( (binary_expression "param_2 + -1" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (param_1 < param_2 - 1U) {\n    iVar1 = 0;\n    do {\n      if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }\n      iVar1 = iVar1 + 1;\n      if (param_3 < 6) {\n                    /* WARNING: Could not emulate address calculation at 0x0001999c */\n                    /* WARNING: Treating indirect jump as call */\n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }\n      param_4 = 0;\n    } while (param_1 < param_2 - 1U);\n  }" if (parenthesized_expression "(param_1 < param_2 - 1U)" ( (binary_expression "param_1 < param_2 - 1U" identifier < (binary_expression "param_2 - 1U" identifier - number_literal)) )) (compound_statement "{\n    iVar1 = 0;\n    do {\n      if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }\n      iVar1 = iVar1 + 1;\n      if (param_3 < 6) {\n                    /* WARNING: Could not emulate address calculation at 0x0001999c */\n                    /* WARNING: Treating indirect jump as call */\n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }\n      param_4 = 0;\n    } while (param_1 < param_2 - 1U);\n  }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (do_statement "do {\n      if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }\n      iVar1 = iVar1 + 1;\n      if (param_3 < 6) {\n                    /* WARNING: Could not emulate address calculation at 0x0001999c */\n                    /* WARNING: Treating indirect jump as call */\n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }\n      param_4 = 0;\n    } while (param_1 < param_2 - 1U);" do (compound_statement "{\n      if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }\n      iVar1 = iVar1 + 1;\n      if (param_3 < 6) {\n                    /* WARNING: Could not emulate address calculation at 0x0001999c */\n                    /* WARNING: Treating indirect jump as call */\n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }\n      param_4 = 0;\n    }" { (if_statement "if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }" if (parenthesized_expression "((param_4 == 0) && (0 < iVar1))" ( (binary_expression "(param_4 == 0) && (0 < iVar1)" (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) )) && (parenthesized_expression "(0 < iVar1)" ( (binary_expression "0 < iVar1" number_literal < identifier) ))) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (if_statement "if (param_3 < 6) {\n                    /* WARNING: Could not emulate address calculation at 0x0001999c */\n                    /* WARNING: Treating indirect jump as call */\n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }" if (parenthesized_expression "(param_3 < 6)" ( (binary_expression "param_3 < 6" identifier < number_literal) )) (compound_statement "{\n                    /* WARNING: Could not emulate address calculation at 0x0001999c */\n                    /* WARNING: Treating indirect jump as call */\n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }" { comment comment (expression_statement "(*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();" (call_expression "(*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))()" (parenthesized_expression "(*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))" ( (pointer_expression "*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20))" * (cast_expression "(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20))" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20))" ( (binary_expression "&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)" (pointer_expression "&_gp_1" & identifier) + (pointer_expression "*(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)" * (cast_expression "(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)" ( (binary_expression "PTR_s_nt_0005301c + param_3 * 4 + -0xd20" (binary_expression "PTR_s_nt_0005301c + param_3 * 4" identifier + (binary_expression "param_3 * 4" identifier * number_literal)) + number_literal) ))))) )))) )) (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (expression_statement "param_4 = 0;" (assignment_expression "param_4 = 0" identifier = number_literal) ;) }) while (parenthesized_expression "(param_1 < param_2 - 1U)" ( (binary_expression "param_1 < param_2 - 1U" identifier < (binary_expression "param_2 - 1U" identifier - number_literal)) )) ;) })) (return_statement "return;" return ;) })))
(translation_unit "png_charp png_format_number(png_const_charp start,png_charp end,int format,png_alloc_size_t number)\n\n{\n  png_charp pcVar1;\n  int iVar2;\n  \n  pcVar1 = end + -1;\n  end[-1] = '\0';\n  if (start < pcVar1) {\n    iVar2 = 0;\n    do {\n      if ((number == 0) && (0 < iVar2)) {\n        return pcVar1;\n      }\n      iVar2 = iVar2 + 1;\n      if ((uint)format < 6) {\n                    /* WARNING: Could not emulate address calculation at 0x0001999c */\n                    /* WARNING: Treating indirect jump as call */\n        pcVar1 = (png_charp)(*(code *)(&_gp + *(int *)(PTR_s_nt_0005301c + format * 4 + -0xd20)))();\n        return pcVar1;\n      }\n      number = 0;\n    } while (start < pcVar1);\n  }\n  return pcVar1;\n}\n\n" (function_definition "png_charp png_format_number(png_const_charp start,png_charp end,int format,png_alloc_size_t number)\n\n{\n  png_charp pcVar1;\n  int iVar2;\n  \n  pcVar1 = end + -1;\n  end[-1] = '\0';\n  if (start < pcVar1) {\n    iVar2 = 0;\n    do {\n      if ((number == 0) && (0 < iVar2)) {\n        return pcVar1;\n      }\n      iVar2 = iVar2 + 1;\n      if ((uint)format < 6) {\n                    /* WARNING: Could not emulate address calculation at 0x0001999c */\n                    /* WARNING: Treating indirect jump as call */\n        pcVar1 = (png_charp)(*(code *)(&_gp + *(int *)(PTR_s_nt_0005301c + format * 4 + -0xd20)))();\n        return pcVar1;\n      }\n      number = 0;\n    } while (start < pcVar1);\n  }\n  return pcVar1;\n}" type_identifier (function_declarator "png_format_number(png_const_charp start,png_charp end,int format,png_alloc_size_t number)" identifier (parameter_list "(png_const_charp start,png_charp end,int format,png_alloc_size_t number)" ( (parameter_declaration "png_const_charp start" type_identifier identifier) , (parameter_declaration "png_charp end" type_identifier identifier) , (parameter_declaration "int format" primitive_type identifier) , (parameter_declaration "png_alloc_size_t number" type_identifier identifier) ))) (compound_statement "{\n  png_charp pcVar1;\n  int iVar2;\n  \n  pcVar1 = end + -1;\n  end[-1] = '\0';\n  if (start < pcVar1) {\n    iVar2 = 0;\n    do {\n      if ((number == 0) && (0 < iVar2)) {\n        return pcVar1;\n      }\n      iVar2 = iVar2 + 1;\n      if ((uint)format < 6) {\n                    /* WARNING: Could not emulate address calculation at 0x0001999c */\n                    /* WARNING: Treating indirect jump as call */\n        pcVar1 = (png_charp)(*(code *)(&_gp + *(int *)(PTR_s_nt_0005301c + format * 4 + -0xd20)))();\n        return pcVar1;\n      }\n      number = 0;\n    } while (start < pcVar1);\n  }\n  return pcVar1;\n}" { (declaration "png_charp pcVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "pcVar1 = end + -1;" (assignment_expression "pcVar1 = end + -1" identifier = (binary_expression "end + -1" identifier + number_literal)) ;) (expression_statement "end[-1] = '\0';" (assignment_expression "end[-1] = '\0'" (subscript_expression "end[-1]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (if_statement "if (start < pcVar1) {\n    iVar2 = 0;\n    do {\n      if ((number == 0) && (0 < iVar2)) {\n        return pcVar1;\n      }\n      iVar2 = iVar2 + 1;\n      if ((uint)format < 6) {\n                    /* WARNING: Could not emulate address calculation at 0x0001999c */\n                    /* WARNING: Treating indirect jump as call */\n        pcVar1 = (png_charp)(*(code *)(&_gp + *(int *)(PTR_s_nt_0005301c + format * 4 + -0xd20)))();\n        return pcVar1;\n      }\n      number = 0;\n    } while (start < pcVar1);\n  }" if (parenthesized_expression "(start < pcVar1)" ( (binary_expression "start < pcVar1" identifier < identifier) )) (compound_statement "{\n    iVar2 = 0;\n    do {\n      if ((number == 0) && (0 < iVar2)) {\n        return pcVar1;\n      }\n      iVar2 = iVar2 + 1;\n      if ((uint)format < 6) {\n                    /* WARNING: Could not emulate address calculation at 0x0001999c */\n                    /* WARNING: Treating indirect jump as call */\n        pcVar1 = (png_charp)(*(code *)(&_gp + *(int *)(PTR_s_nt_0005301c + format * 4 + -0xd20)))();\n        return pcVar1;\n      }\n      number = 0;\n    } while (start < pcVar1);\n  }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (do_statement "do {\n      if ((number == 0) && (0 < iVar2)) {\n        return pcVar1;\n      }\n      iVar2 = iVar2 + 1;\n      if ((uint)format < 6) {\n                    /* WARNING: Could not emulate address calculation at 0x0001999c */\n                    /* WARNING: Treating indirect jump as call */\n        pcVar1 = (png_charp)(*(code *)(&_gp + *(int *)(PTR_s_nt_0005301c + format * 4 + -0xd20)))();\n        return pcVar1;\n      }\n      number = 0;\n    } while (start < pcVar1);" do (compound_statement "{\n      if ((number == 0) && (0 < iVar2)) {\n        return pcVar1;\n      }\n      iVar2 = iVar2 + 1;\n      if ((uint)format < 6) {\n                    /* WARNING: Could not emulate address calculation at 0x0001999c */\n                    /* WARNING: Treating indirect jump as call */\n        pcVar1 = (png_charp)(*(code *)(&_gp + *(int *)(PTR_s_nt_0005301c + format * 4 + -0xd20)))();\n        return pcVar1;\n      }\n      number = 0;\n    }" { (if_statement "if ((number == 0) && (0 < iVar2)) {\n        return pcVar1;\n      }" if (parenthesized_expression "((number == 0) && (0 < iVar2))" ( (binary_expression "(number == 0) && (0 < iVar2)" (parenthesized_expression "(number == 0)" ( (binary_expression "number == 0" identifier == number_literal) )) && (parenthesized_expression "(0 < iVar2)" ( (binary_expression "0 < iVar2" number_literal < identifier) ))) )) (compound_statement "{\n        return pcVar1;\n      }" { (return_statement "return pcVar1;" return identifier ;) })) (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (if_statement "if ((uint)format < 6) {\n                    /* WARNING: Could not emulate address calculation at 0x0001999c */\n                    /* WARNING: Treating indirect jump as call */\n        pcVar1 = (png_charp)(*(code *)(&_gp + *(int *)(PTR_s_nt_0005301c + format * 4 + -0xd20)))();\n        return pcVar1;\n      }" if (parenthesized_expression "((uint)format < 6)" ( (binary_expression "(uint)format < 6" (cast_expression "(uint)format" ( (type_descriptor "uint" type_identifier) ) identifier) < number_literal) )) (compound_statement "{\n                    /* WARNING: Could not emulate address calculation at 0x0001999c */\n                    /* WARNING: Treating indirect jump as call */\n        pcVar1 = (png_charp)(*(code *)(&_gp + *(int *)(PTR_s_nt_0005301c + format * 4 + -0xd20)))();\n        return pcVar1;\n      }" { comment comment (expression_statement "pcVar1 = (png_charp)(*(code *)(&_gp + *(int *)(PTR_s_nt_0005301c + format * 4 + -0xd20)))();" (assignment_expression "pcVar1 = (png_charp)(*(code *)(&_gp + *(int *)(PTR_s_nt_0005301c + format * 4 + -0xd20)))()" identifier = (call_expression "(png_charp)(*(code *)(&_gp + *(int *)(PTR_s_nt_0005301c + format * 4 + -0xd20)))()" (call_expression "(png_charp)(*(code *)(&_gp + *(int *)(PTR_s_nt_0005301c + format * 4 + -0xd20)))" (parenthesized_expression "(png_charp)" ( identifier )) (argument_list "(*(code *)(&_gp + *(int *)(PTR_s_nt_0005301c + format * 4 + -0xd20)))" ( (pointer_expression "*(code *)(&_gp + *(int *)(PTR_s_nt_0005301c + format * 4 + -0xd20))" * (cast_expression "(code *)(&_gp + *(int *)(PTR_s_nt_0005301c + format * 4 + -0xd20))" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&_gp + *(int *)(PTR_s_nt_0005301c + format * 4 + -0xd20))" ( (binary_expression "&_gp + *(int *)(PTR_s_nt_0005301c + format * 4 + -0xd20)" (pointer_expression "&_gp" & identifier) + (pointer_expression "*(int *)(PTR_s_nt_0005301c + format * 4 + -0xd20)" * (cast_expression "(int *)(PTR_s_nt_0005301c + format * 4 + -0xd20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_s_nt_0005301c + format * 4 + -0xd20)" ( (binary_expression "PTR_s_nt_0005301c + format * 4 + -0xd20" (binary_expression "PTR_s_nt_0005301c + format * 4" identifier + (binary_expression "format * 4" identifier * number_literal)) + number_literal) ))))) )))) ))) (argument_list "()" ( )))) ;) (return_statement "return pcVar1;" return identifier ;) })) (expression_statement "number = 0;" (assignment_expression "number = 0" identifier = number_literal) ;) }) while (parenthesized_expression "(start < pcVar1)" ( (binary_expression "start < pcVar1" identifier < identifier) )) ;) })) (return_statement "return pcVar1;" return identifier ;) })))
(translation_unit "void FUN_00019960(uint param_1,int param_2,uint param_3,int param_4)\n\n{\n  int iVar1;\n  \n  *(undefined1 *)(param_2 + -1) = 0;\n  if (param_1 < param_2 - 1U) {\n    iVar1 = 0;\n    do {\n      if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }\n      iVar1 = iVar1 + 1;\n      if (param_3 < 6) {\n                    \n                    \n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }\n      param_4 = 0;\n    } while (param_1 < param_2 - 1U);\n  }\n  return;\n}\n\n" (function_definition "void FUN_00019960(uint param_1,int param_2,uint param_3,int param_4)\n\n{\n  int iVar1;\n  \n  *(undefined1 *)(param_2 + -1) = 0;\n  if (param_1 < param_2 - 1U) {\n    iVar1 = 0;\n    do {\n      if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }\n      iVar1 = iVar1 + 1;\n      if (param_3 < 6) {\n                    \n                    \n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }\n      param_4 = 0;\n    } while (param_1 < param_2 - 1U);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00019960(uint param_1,int param_2,uint param_3,int param_4)" identifier (parameter_list "(uint param_1,int param_2,uint param_3,int param_4)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  *(undefined1 *)(param_2 + -1) = 0;\n  if (param_1 < param_2 - 1U) {\n    iVar1 = 0;\n    do {\n      if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }\n      iVar1 = iVar1 + 1;\n      if (param_3 < 6) {\n                    \n                    \n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }\n      param_4 = 0;\n    } while (param_1 < param_2 - 1U);\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "*(undefined1 *)(param_2 + -1) = 0;" (assignment_expression "*(undefined1 *)(param_2 + -1) = 0" (pointer_expression "*(undefined1 *)(param_2 + -1)" * (cast_expression "(undefined1 *)(param_2 + -1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + -1)" ( (binary_expression "param_2 + -1" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (param_1 < param_2 - 1U) {\n    iVar1 = 0;\n    do {\n      if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }\n      iVar1 = iVar1 + 1;\n      if (param_3 < 6) {\n                    \n                    \n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }\n      param_4 = 0;\n    } while (param_1 < param_2 - 1U);\n  }" if (parenthesized_expression "(param_1 < param_2 - 1U)" ( (binary_expression "param_1 < param_2 - 1U" identifier < (binary_expression "param_2 - 1U" identifier - number_literal)) )) (compound_statement "{\n    iVar1 = 0;\n    do {\n      if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }\n      iVar1 = iVar1 + 1;\n      if (param_3 < 6) {\n                    \n                    \n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }\n      param_4 = 0;\n    } while (param_1 < param_2 - 1U);\n  }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (do_statement "do {\n      if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }\n      iVar1 = iVar1 + 1;\n      if (param_3 < 6) {\n                    \n                    \n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }\n      param_4 = 0;\n    } while (param_1 < param_2 - 1U);" do (compound_statement "{\n      if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }\n      iVar1 = iVar1 + 1;\n      if (param_3 < 6) {\n                    \n                    \n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }\n      param_4 = 0;\n    }" { (if_statement "if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }" if (parenthesized_expression "((param_4 == 0) && (0 < iVar1))" ( (binary_expression "(param_4 == 0) && (0 < iVar1)" (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) )) && (parenthesized_expression "(0 < iVar1)" ( (binary_expression "0 < iVar1" number_literal < identifier) ))) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (if_statement "if (param_3 < 6) {\n                    \n                    \n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }" if (parenthesized_expression "(param_3 < 6)" ( (binary_expression "param_3 < 6" identifier < number_literal) )) (compound_statement "{\n                    \n                    \n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }" { (expression_statement "(*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();" (call_expression "(*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))()" (parenthesized_expression "(*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))" ( (pointer_expression "*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20))" * (cast_expression "(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20))" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20))" ( (binary_expression "&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)" (pointer_expression "&_gp_1" & identifier) + (pointer_expression "*(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)" * (cast_expression "(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)" ( (binary_expression "PTR_s_nt_0005301c + param_3 * 4 + -0xd20" (binary_expression "PTR_s_nt_0005301c + param_3 * 4" identifier + (binary_expression "param_3 * 4" identifier * number_literal)) + number_literal) ))))) )))) )) (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (expression_statement "param_4 = 0;" (assignment_expression "param_4 = 0" identifier = number_literal) ;) }) while (parenthesized_expression "(param_1 < param_2 - 1U)" ( (binary_expression "param_1 < param_2 - 1U" identifier < (binary_expression "param_2 - 1U" identifier - number_literal)) )) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (binary_expression IDENT - LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (parenthesized_expression ( (binary_expression LIT < IDENT) ))) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression & IDENT) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + (binary_expression IDENT * LIT)) + LIT) ))))) )))) )) (argument_list ( ))) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) }) while (parenthesized_expression ( (binary_expression IDENT < (binary_expression IDENT - LIT)) )) ;) })) (return_statement return ;) })))
(function_definition "void FUN_00019960(uint param_1,int param_2,uint param_3,int param_4)\n\n{\n  int iVar1;\n  \n  *(undefined1 *)(param_2 + -1) = 0;\n  if (param_1 < param_2 - 1U) {\n    iVar1 = 0;\n    do {\n      if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }\n      iVar1 = iVar1 + 1;\n      if (param_3 < 6) {\n                    \n                    \n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }\n      param_4 = 0;\n    } while (param_1 < param_2 - 1U);\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00019960(uint param_1,int param_2,uint param_3,int param_4)" (identifier "FUN_00019960") (parameter_list "(uint param_1,int param_2,uint param_3,int param_4)" (( "(") (parameter_declaration "uint param_1" (type_identifier "uint") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  *(undefined1 *)(param_2 + -1) = 0;\n  if (param_1 < param_2 - 1U) {\n    iVar1 = 0;\n    do {\n      if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }\n      iVar1 = iVar1 + 1;\n      if (param_3 < 6) {\n                    \n                    \n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }\n      param_4 = 0;\n    } while (param_1 < param_2 - 1U);\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (expression_statement "*(undefined1 *)(param_2 + -1) = 0;" (assignment_expression "*(undefined1 *)(param_2 + -1) = 0" (pointer_expression "*(undefined1 *)(param_2 + -1)" (* "*") (cast_expression "(undefined1 *)(param_2 + -1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + -1)" (( "(") (binary_expression "param_2 + -1" (identifier "param_2") (+ "+") (number_literal "-1")) () ")")))) (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_1 < param_2 - 1U) {\n    iVar1 = 0;\n    do {\n      if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }\n      iVar1 = iVar1 + 1;\n      if (param_3 < 6) {\n                    \n                    \n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }\n      param_4 = 0;\n    } while (param_1 < param_2 - 1U);\n  }" (if "if") (parenthesized_expression "(param_1 < param_2 - 1U)" (( "(") (binary_expression "param_1 < param_2 - 1U" (identifier "param_1") (< "<") (binary_expression "param_2 - 1U" (identifier "param_2") (- "-") (number_literal "1U"))) () ")")) (compound_statement "{\n    iVar1 = 0;\n    do {\n      if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }\n      iVar1 = iVar1 + 1;\n      if (param_3 < 6) {\n                    \n                    \n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }\n      param_4 = 0;\n    } while (param_1 < param_2 - 1U);\n  }" ({ "{") (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" (identifier "iVar1") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }\n      iVar1 = iVar1 + 1;\n      if (param_3 < 6) {\n                    \n                    \n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }\n      param_4 = 0;\n    } while (param_1 < param_2 - 1U);" (do "do") (compound_statement "{\n      if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }\n      iVar1 = iVar1 + 1;\n      if (param_3 < 6) {\n                    \n                    \n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }\n      param_4 = 0;\n    }" ({ "{") (if_statement "if ((param_4 == 0) && (0 < iVar1)) {\n        return;\n      }" (if "if") (parenthesized_expression "((param_4 == 0) && (0 < iVar1))" (( "(") (binary_expression "(param_4 == 0) && (0 < iVar1)" (parenthesized_expression "(param_4 == 0)" (( "(") (binary_expression "param_4 == 0" (identifier "param_4") (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(0 < iVar1)" (( "(") (binary_expression "0 < iVar1" (number_literal "0") (< "<") (identifier "iVar1")) () ")"))) () ")")) (compound_statement "{\n        return;\n      }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" (identifier "iVar1") (= "=") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (param_3 < 6) {\n                    \n                    \n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }" (if "if") (parenthesized_expression "(param_3 < 6)" (( "(") (binary_expression "param_3 < 6" (identifier "param_3") (< "<") (number_literal "6")) () ")")) (compound_statement "{\n                    \n                    \n        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();\n        return;\n      }" ({ "{") (expression_statement "(*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();" (call_expression "(*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))()" (parenthesized_expression "(*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))" (( "(") (pointer_expression "*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20))" (* "*") (cast_expression "(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20))" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20))" (( "(") (binary_expression "&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)" (pointer_expression "&_gp_1" (& "&") (identifier "_gp_1")) (+ "+") (pointer_expression "*(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)" (* "*") (cast_expression "(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)" (( "(") (binary_expression "PTR_s_nt_0005301c + param_3 * 4 + -0xd20" (binary_expression "PTR_s_nt_0005301c + param_3 * 4" (identifier "PTR_s_nt_0005301c") (+ "+") (binary_expression "param_3 * 4" (identifier "param_3") (* "*") (number_literal "4"))) (+ "+") (number_literal "-0xd20")) () ")"))))) () ")")))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "param_4 = 0;" (assignment_expression "param_4 = 0" (identifier "param_4") (= "=") (number_literal "0")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_1 < param_2 - 1U)" (( "(") (binary_expression "param_1 < param_2 - 1U" (identifier "param_1") (< "<") (binary_expression "param_2 - 1U" (identifier "param_2") (- "-") (number_literal "1U"))) () ")")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

type_1 function_1(type_2 var_2,type_1 var_1,int var_7,type_3 var_4)

{
  type_1 var_3;
  int var_5;
  
  var_3 = var_1 + -1;
  var_1[-1] = '\0';
  if (var_2 < var_3) {
    var_5 = 0;
    do {
      if ((var_4 == 0) && (0 < var_5)) {
        return var_3;
      }
      var_5 = var_5 + 1;
      if ((type_4)var_7 < 6) {
                    /* WARNING: Could not emulate address calculation at 0x0001999c */
                    /* WARNING: Treating indirect jump as call */
        var_3 = (type_1)(*(type_5 *)(&_gp + *(int *)(var_6 + var_7 * 4 + -0xd20)))();
        return var_3;
      }
      var_4 = 0;
    } while (var_2 < var_3);
  }
  return var_3;
}


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

void MASKED(uint param_1,int param_2,uint param_3,int param_4)

{
  int iVar1;
  
  *(undefined1 *)(param_2 + -1) = 0;
  if (param_1 < param_2 - 1U) {
    iVar1 = 0;
    do {
      if ((param_4 == 0) && (0 < iVar1)) {
        return;
      }
      iVar1 = iVar1 + 1;
      if (param_3 < 6) {
                    /* WARNING: Could not emulate address calculation at 0x0001999c */
                    /* WARNING: Treating indirect jump as call */
        (*(code *)(&_gp_1 + *(int *)(PTR_s_nt_0005301c + param_3 * 4 + -0xd20)))();
        return;
      }
      param_4 = 0;
    } while (param_1 < param_2 - 1U);
  }
  return;
}

