
void png_write_chunk_end(png_structrp png_ptr)

{
  undefined *puVar1;
  int iVar2;
  png_const_bytep in_a1;
  png_uint_32 *ppVar3;
  png_const_bytep in_a2;
  size_t in_a3;
  undefined *puVar4;
  png_byte buf [4];
  
  puVar1 = PTR___stack_chk_guard_000534bc;
  puVar4 = PTR_png_save_uint_32_000533e0;
  iVar2 = *(int *)PTR___stack_chk_guard_000534bc;
  if (png_ptr != (png_structrp)0x0) {
    in_a1 = buf;
    png_ptr->io_state = 0x82;
    (*(code *)puVar4)(in_a1,png_ptr->crc);
    in_a2 = &DAT_00000004;
    png_write_data(png_ptr,in_a1,4);
  }
  if (iVar2 == *(int *)puVar1) {
    return;
  }
  puVar4 = PTR___stack_chk_fail_00053484;
  (*(code *)PTR___stack_chk_fail_00053484)();
  if (png_ptr == (png_structrp)0x0) {
    return;
  }
  if (-1 < (int)in_a3) {
    png_write_chunk_header(png_ptr,(png_uint_32)in_a1,in_a3);
    (**(code **)(puVar4 + 0x197d4))(png_ptr,in_a2,in_a3);
                    /* WARNING: Could not recover jumptable at 0x00039da8. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    (**(code **)(puVar4 + 0x196e0))(png_ptr);
    return;
  }
  ppVar3 = (png_uint_32 *)(*(int *)(puVar4 + 0x192f4) + 0x2168);
  (**(code **)(puVar4 + 0x196e4))();
  png_write_complete_chunk(png_ptr,*ppVar3,in_a2,in_a3);
  return;
}



void png_write_chunk_end(int param_1,undefined4 param_2,undefined4 param_3,int param_4)

{
  undefined *puVar1;
  undefined *puVar2;
  undefined1 auStack_18 [4];
  int local_14;
  
  puVar1 = PTR___stack_chk_guard_000534bc;
  puVar2 = PTR_png_save_uint_32_000533e0;
  local_14 = *(int *)PTR___stack_chk_guard_000534bc;
  if (param_1 != 0) {
    *(undefined4 *)(param_1 + 0x380) = 0x82;
    (*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8));
    param_3 = 4;
    FUN_00035160(param_1,auStack_18,4);
  }
  if (local_14 == *(int *)puVar1) {
    return;
  }
  puVar2 = PTR___stack_chk_fail_00053484;
  (*(code *)PTR___stack_chk_fail_00053484)();
  if (param_1 == 0) {
    return;
  }
  if (-1 < param_4) {
    FUN_00039938();
    (**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4);
                    /* WARNING: Could not recover jumptable at 0x00039da8. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    (**(code **)(puVar2 + 0x196e0))(param_1);
    return;
  }
  (**(code **)(puVar2 + 0x196e4))();
  FUN_00039d28();
  return;
}


lui gp,0x2
addiu gp,gp,0x1368
addu gp,gp,t9
addiu sp,sp,-0x30
sw s2,0x28(sp)
lw s2,-0x7b34(gp)
sw gp,0x10(sp)
sw ra,0x2c(sp)
sw s1,0x24(sp)
sw s0,0x20(sp)
lw v0,0x0(s2)
sw v0,0x1c(sp)
beq a0,zero,0x00039cf8
_lw t9,-0x7c10(gp)
li v0,0x82
lw a1,0x1e8(a0)
addiu s1,sp,0x18
sw v0,0x380(a0)
or s0,a0,zero
jalr t9
_or a0,s1,zero
li a2,0x4
lw gp,0x10(sp)
or a1,s1,zero
lw t9,-0x7d3c(gp)
bal 0x00035160
_or a0,s0,zero
lw gp,0x10(sp)
lw v1,0x1c(sp)
lw v0,0x0(s2)
bne v1,v0,0x00039d1c
_lw ra,0x2c(sp)
lw s2,0x28(sp)
lw s1,0x24(sp)
lw s0,0x20(sp)
jr ra
_addiu sp,sp,0x30
lw t9,-0x7b6c(gp)
jalr t9
_nop
(translation_unit "void png_write_chunk_end(int param_1,undefined4 param_2,undefined4 param_3,int param_4)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined1 auStack_18 [4];\n  int local_14;\n  \n  puVar1 = PTR___stack_chk_guard_000534bc;\n  puVar2 = PTR_png_save_uint_32_000533e0;\n  local_14 = *(int *)PTR___stack_chk_guard_000534bc;\n  if (param_1 != 0) {\n    *(undefined4 *)(param_1 + 0x380) = 0x82;\n    (*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8));\n    param_3 = 4;\n    FUN_00035160(param_1,auStack_18,4);\n  }\n  if (local_14 == *(int *)puVar1) {\n    return;\n  }\n  puVar2 = PTR___stack_chk_fail_00053484;\n  (*(code *)PTR___stack_chk_fail_00053484)();\n  if (param_1 == 0) {\n    return;\n  }\n  if (-1 < param_4) {\n    FUN_00039938();\n    (**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4);\n                    /* WARNING: Could not recover jumptable at 0x00039da8. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    (**(code **)(puVar2 + 0x196e0))(param_1);\n    return;\n  }\n  (**(code **)(puVar2 + 0x196e4))();\n  FUN_00039d28();\n  return;\n}\n\n" (function_definition "void png_write_chunk_end(int param_1,undefined4 param_2,undefined4 param_3,int param_4)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined1 auStack_18 [4];\n  int local_14;\n  \n  puVar1 = PTR___stack_chk_guard_000534bc;\n  puVar2 = PTR_png_save_uint_32_000533e0;\n  local_14 = *(int *)PTR___stack_chk_guard_000534bc;\n  if (param_1 != 0) {\n    *(undefined4 *)(param_1 + 0x380) = 0x82;\n    (*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8));\n    param_3 = 4;\n    FUN_00035160(param_1,auStack_18,4);\n  }\n  if (local_14 == *(int *)puVar1) {\n    return;\n  }\n  puVar2 = PTR___stack_chk_fail_00053484;\n  (*(code *)PTR___stack_chk_fail_00053484)();\n  if (param_1 == 0) {\n    return;\n  }\n  if (-1 < param_4) {\n    FUN_00039938();\n    (**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4);\n                    /* WARNING: Could not recover jumptable at 0x00039da8. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    (**(code **)(puVar2 + 0x196e0))(param_1);\n    return;\n  }\n  (**(code **)(puVar2 + 0x196e4))();\n  FUN_00039d28();\n  return;\n}" primitive_type (function_declarator "png_write_chunk_end(int param_1,undefined4 param_2,undefined4 param_3,int param_4)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined1 auStack_18 [4];\n  int local_14;\n  \n  puVar1 = PTR___stack_chk_guard_000534bc;\n  puVar2 = PTR_png_save_uint_32_000533e0;\n  local_14 = *(int *)PTR___stack_chk_guard_000534bc;\n  if (param_1 != 0) {\n    *(undefined4 *)(param_1 + 0x380) = 0x82;\n    (*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8));\n    param_3 = 4;\n    FUN_00035160(param_1,auStack_18,4);\n  }\n  if (local_14 == *(int *)puVar1) {\n    return;\n  }\n  puVar2 = PTR___stack_chk_fail_00053484;\n  (*(code *)PTR___stack_chk_fail_00053484)();\n  if (param_1 == 0) {\n    return;\n  }\n  if (-1 < param_4) {\n    FUN_00039938();\n    (**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4);\n                    /* WARNING: Could not recover jumptable at 0x00039da8. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    (**(code **)(puVar2 + 0x196e0))(param_1);\n    return;\n  }\n  (**(code **)(puVar2 + 0x196e4))();\n  FUN_00039d28();\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined1 auStack_18 [4];" type_identifier (array_declarator "auStack_18 [4]" identifier [ number_literal ]) ;) (declaration "int local_14;" primitive_type identifier ;) (expression_statement "puVar1 = PTR___stack_chk_guard_000534bc;" (assignment_expression "puVar1 = PTR___stack_chk_guard_000534bc" identifier = identifier) ;) (expression_statement "puVar2 = PTR_png_save_uint_32_000533e0;" (assignment_expression "puVar2 = PTR_png_save_uint_32_000533e0" identifier = identifier) ;) (expression_statement "local_14 = *(int *)PTR___stack_chk_guard_000534bc;" (assignment_expression "local_14 = *(int *)PTR___stack_chk_guard_000534bc" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_000534bc" * (cast_expression "(int *)PTR___stack_chk_guard_000534bc" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (param_1 != 0) {\n    *(undefined4 *)(param_1 + 0x380) = 0x82;\n    (*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8));\n    param_3 = 4;\n    FUN_00035160(param_1,auStack_18,4);\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    *(undefined4 *)(param_1 + 0x380) = 0x82;\n    (*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8));\n    param_3 = 4;\n    FUN_00035160(param_1,auStack_18,4);\n  }" { (expression_statement "*(undefined4 *)(param_1 + 0x380) = 0x82;" (assignment_expression "*(undefined4 *)(param_1 + 0x380) = 0x82" (pointer_expression "*(undefined4 *)(param_1 + 0x380)" * (cast_expression "(undefined4 *)(param_1 + 0x380)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x380)" ( (binary_expression "param_1 + 0x380" identifier + number_literal) )))) = number_literal) ;) (expression_statement "(*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8));" (call_expression "(*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8))" (parenthesized_expression "(*(code *)puVar2)" ( (pointer_expression "*(code *)puVar2" * (cast_expression "(code *)puVar2" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_18,*(undefined4 *)(param_1 + 0x1e8))" ( identifier , (pointer_expression "*(undefined4 *)(param_1 + 0x1e8)" * (cast_expression "(undefined4 *)(param_1 + 0x1e8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1e8)" ( (binary_expression "param_1 + 0x1e8" identifier + number_literal) )))) ))) ;) (expression_statement "param_3 = 4;" (assignment_expression "param_3 = 4" identifier = number_literal) ;) (expression_statement "FUN_00035160(param_1,auStack_18,4);" (call_expression "FUN_00035160(param_1,auStack_18,4)" identifier (argument_list "(param_1,auStack_18,4)" ( identifier , identifier , number_literal ))) ;) })) (if_statement "if (local_14 == *(int *)puVar1) {\n    return;\n  }" if (parenthesized_expression "(local_14 == *(int *)puVar1)" ( (binary_expression "local_14 == *(int *)puVar1" identifier == (pointer_expression "*(int *)puVar1" * (cast_expression "(int *)puVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "puVar2 = PTR___stack_chk_fail_00053484;" (assignment_expression "puVar2 = PTR___stack_chk_fail_00053484" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_00053484)();" (call_expression "(*(code *)PTR___stack_chk_fail_00053484)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00053484)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00053484" * (cast_expression "(code *)PTR___stack_chk_fail_00053484" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (if_statement "if (param_1 == 0) {\n    return;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (if_statement "if (-1 < param_4) {\n    FUN_00039938();\n    (**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4);\n                    /* WARNING: Could not recover jumptable at 0x00039da8. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    (**(code **)(puVar2 + 0x196e0))(param_1);\n    return;\n  }" if (parenthesized_expression "(-1 < param_4)" ( (binary_expression "-1 < param_4" number_literal < identifier) )) (compound_statement "{\n    FUN_00039938();\n    (**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4);\n                    /* WARNING: Could not recover jumptable at 0x00039da8. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    (**(code **)(puVar2 + 0x196e0))(param_1);\n    return;\n  }" { (expression_statement "FUN_00039938();" (call_expression "FUN_00039938()" identifier (argument_list "()" ( ))) ;) (expression_statement "(**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4);" (call_expression "(**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4)" (parenthesized_expression "(**(code **)(puVar2 + 0x197d4))" ( (pointer_expression "**(code **)(puVar2 + 0x197d4)" * (pointer_expression "*(code **)(puVar2 + 0x197d4)" * (cast_expression "(code **)(puVar2 + 0x197d4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar2 + 0x197d4)" ( (binary_expression "puVar2 + 0x197d4" identifier + number_literal) ))))) )) (argument_list "(param_1,param_3,param_4)" ( identifier , identifier , identifier ))) ;) comment comment (expression_statement "(**(code **)(puVar2 + 0x196e0))(param_1);" (call_expression "(**(code **)(puVar2 + 0x196e0))(param_1)" (parenthesized_expression "(**(code **)(puVar2 + 0x196e0))" ( (pointer_expression "**(code **)(puVar2 + 0x196e0)" * (pointer_expression "*(code **)(puVar2 + 0x196e0)" * (cast_expression "(code **)(puVar2 + 0x196e0)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar2 + 0x196e0)" ( (binary_expression "puVar2 + 0x196e0" identifier + number_literal) ))))) )) (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "(**(code **)(puVar2 + 0x196e4))();" (call_expression "(**(code **)(puVar2 + 0x196e4))()" (parenthesized_expression "(**(code **)(puVar2 + 0x196e4))" ( (pointer_expression "**(code **)(puVar2 + 0x196e4)" * (pointer_expression "*(code **)(puVar2 + 0x196e4)" * (cast_expression "(code **)(puVar2 + 0x196e4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar2 + 0x196e4)" ( (binary_expression "puVar2 + 0x196e4" identifier + number_literal) ))))) )) (argument_list "()" ( ))) ;) (expression_statement "FUN_00039d28();" (call_expression "FUN_00039d28()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void png_write_chunk_end(png_structrp png_ptr)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  png_const_bytep in_a1;\n  png_uint_32 *ppVar3;\n  png_const_bytep in_a2;\n  size_t in_a3;\n  undefined *puVar4;\n  png_byte buf [4];\n  \n  puVar1 = PTR___stack_chk_guard_000534bc;\n  puVar4 = PTR_png_save_uint_32_000533e0;\n  iVar2 = *(int *)PTR___stack_chk_guard_000534bc;\n  if (png_ptr != (png_structrp)0x0) {\n    in_a1 = buf;\n    png_ptr->io_state = 0x82;\n    (*(code *)puVar4)(in_a1,png_ptr->crc);\n    in_a2 = &DAT_00000004;\n    png_write_data(png_ptr,in_a1,4);\n  }\n  if (iVar2 == *(int *)puVar1) {\n    return;\n  }\n  puVar4 = PTR___stack_chk_fail_00053484;\n  (*(code *)PTR___stack_chk_fail_00053484)();\n  if (png_ptr == (png_structrp)0x0) {\n    return;\n  }\n  if (-1 < (int)in_a3) {\n    png_write_chunk_header(png_ptr,(png_uint_32)in_a1,in_a3);\n    (**(code **)(puVar4 + 0x197d4))(png_ptr,in_a2,in_a3);\n                    /* WARNING: Could not recover jumptable at 0x00039da8. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    (**(code **)(puVar4 + 0x196e0))(png_ptr);\n    return;\n  }\n  ppVar3 = (png_uint_32 *)(*(int *)(puVar4 + 0x192f4) + 0x2168);\n  (**(code **)(puVar4 + 0x196e4))();\n  png_write_complete_chunk(png_ptr,*ppVar3,in_a2,in_a3);\n  return;\n}\n\n" (function_definition "void png_write_chunk_end(png_structrp png_ptr)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  png_const_bytep in_a1;\n  png_uint_32 *ppVar3;\n  png_const_bytep in_a2;\n  size_t in_a3;\n  undefined *puVar4;\n  png_byte buf [4];\n  \n  puVar1 = PTR___stack_chk_guard_000534bc;\n  puVar4 = PTR_png_save_uint_32_000533e0;\n  iVar2 = *(int *)PTR___stack_chk_guard_000534bc;\n  if (png_ptr != (png_structrp)0x0) {\n    in_a1 = buf;\n    png_ptr->io_state = 0x82;\n    (*(code *)puVar4)(in_a1,png_ptr->crc);\n    in_a2 = &DAT_00000004;\n    png_write_data(png_ptr,in_a1,4);\n  }\n  if (iVar2 == *(int *)puVar1) {\n    return;\n  }\n  puVar4 = PTR___stack_chk_fail_00053484;\n  (*(code *)PTR___stack_chk_fail_00053484)();\n  if (png_ptr == (png_structrp)0x0) {\n    return;\n  }\n  if (-1 < (int)in_a3) {\n    png_write_chunk_header(png_ptr,(png_uint_32)in_a1,in_a3);\n    (**(code **)(puVar4 + 0x197d4))(png_ptr,in_a2,in_a3);\n                    /* WARNING: Could not recover jumptable at 0x00039da8. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    (**(code **)(puVar4 + 0x196e0))(png_ptr);\n    return;\n  }\n  ppVar3 = (png_uint_32 *)(*(int *)(puVar4 + 0x192f4) + 0x2168);\n  (**(code **)(puVar4 + 0x196e4))();\n  png_write_complete_chunk(png_ptr,*ppVar3,in_a2,in_a3);\n  return;\n}" primitive_type (function_declarator "png_write_chunk_end(png_structrp png_ptr)" identifier (parameter_list "(png_structrp png_ptr)" ( (parameter_declaration "png_structrp png_ptr" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  png_const_bytep in_a1;\n  png_uint_32 *ppVar3;\n  png_const_bytep in_a2;\n  size_t in_a3;\n  undefined *puVar4;\n  png_byte buf [4];\n  \n  puVar1 = PTR___stack_chk_guard_000534bc;\n  puVar4 = PTR_png_save_uint_32_000533e0;\n  iVar2 = *(int *)PTR___stack_chk_guard_000534bc;\n  if (png_ptr != (png_structrp)0x0) {\n    in_a1 = buf;\n    png_ptr->io_state = 0x82;\n    (*(code *)puVar4)(in_a1,png_ptr->crc);\n    in_a2 = &DAT_00000004;\n    png_write_data(png_ptr,in_a1,4);\n  }\n  if (iVar2 == *(int *)puVar1) {\n    return;\n  }\n  puVar4 = PTR___stack_chk_fail_00053484;\n  (*(code *)PTR___stack_chk_fail_00053484)();\n  if (png_ptr == (png_structrp)0x0) {\n    return;\n  }\n  if (-1 < (int)in_a3) {\n    png_write_chunk_header(png_ptr,(png_uint_32)in_a1,in_a3);\n    (**(code **)(puVar4 + 0x197d4))(png_ptr,in_a2,in_a3);\n                    /* WARNING: Could not recover jumptable at 0x00039da8. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    (**(code **)(puVar4 + 0x196e0))(png_ptr);\n    return;\n  }\n  ppVar3 = (png_uint_32 *)(*(int *)(puVar4 + 0x192f4) + 0x2168);\n  (**(code **)(puVar4 + 0x196e4))();\n  png_write_complete_chunk(png_ptr,*ppVar3,in_a2,in_a3);\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "png_const_bytep in_a1;" type_identifier identifier ;) (declaration "png_uint_32 *ppVar3;" type_identifier (pointer_declarator "*ppVar3" * identifier) ;) (declaration "png_const_bytep in_a2;" type_identifier identifier ;) (declaration "size_t in_a3;" primitive_type identifier ;) (declaration "undefined *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "png_byte buf [4];" type_identifier (array_declarator "buf [4]" identifier [ number_literal ]) ;) (expression_statement "puVar1 = PTR___stack_chk_guard_000534bc;" (assignment_expression "puVar1 = PTR___stack_chk_guard_000534bc" identifier = identifier) ;) (expression_statement "puVar4 = PTR_png_save_uint_32_000533e0;" (assignment_expression "puVar4 = PTR_png_save_uint_32_000533e0" identifier = identifier) ;) (expression_statement "iVar2 = *(int *)PTR___stack_chk_guard_000534bc;" (assignment_expression "iVar2 = *(int *)PTR___stack_chk_guard_000534bc" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_000534bc" * (cast_expression "(int *)PTR___stack_chk_guard_000534bc" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (png_ptr != (png_structrp)0x0) {\n    in_a1 = buf;\n    png_ptr->io_state = 0x82;\n    (*(code *)puVar4)(in_a1,png_ptr->crc);\n    in_a2 = &DAT_00000004;\n    png_write_data(png_ptr,in_a1,4);\n  }" if (parenthesized_expression "(png_ptr != (png_structrp)0x0)" ( (binary_expression "png_ptr != (png_structrp)0x0" identifier != (cast_expression "(png_structrp)0x0" ( (type_descriptor "png_structrp" type_identifier) ) number_literal)) )) (compound_statement "{\n    in_a1 = buf;\n    png_ptr->io_state = 0x82;\n    (*(code *)puVar4)(in_a1,png_ptr->crc);\n    in_a2 = &DAT_00000004;\n    png_write_data(png_ptr,in_a1,4);\n  }" { (expression_statement "in_a1 = buf;" (assignment_expression "in_a1 = buf" identifier = identifier) ;) (expression_statement "png_ptr->io_state = 0x82;" (assignment_expression "png_ptr->io_state = 0x82" (field_expression "png_ptr->io_state" identifier -> field_identifier) = number_literal) ;) (expression_statement "(*(code *)puVar4)(in_a1,png_ptr->crc);" (call_expression "(*(code *)puVar4)(in_a1,png_ptr->crc)" (parenthesized_expression "(*(code *)puVar4)" ( (pointer_expression "*(code *)puVar4" * (cast_expression "(code *)puVar4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(in_a1,png_ptr->crc)" ( identifier , (field_expression "png_ptr->crc" identifier -> field_identifier) ))) ;) (expression_statement "in_a2 = &DAT_00000004;" (assignment_expression "in_a2 = &DAT_00000004" identifier = (pointer_expression "&DAT_00000004" & identifier)) ;) (expression_statement "png_write_data(png_ptr,in_a1,4);" (call_expression "png_write_data(png_ptr,in_a1,4)" identifier (argument_list "(png_ptr,in_a1,4)" ( identifier , identifier , number_literal ))) ;) })) (if_statement "if (iVar2 == *(int *)puVar1) {\n    return;\n  }" if (parenthesized_expression "(iVar2 == *(int *)puVar1)" ( (binary_expression "iVar2 == *(int *)puVar1" identifier == (pointer_expression "*(int *)puVar1" * (cast_expression "(int *)puVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "puVar4 = PTR___stack_chk_fail_00053484;" (assignment_expression "puVar4 = PTR___stack_chk_fail_00053484" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_00053484)();" (call_expression "(*(code *)PTR___stack_chk_fail_00053484)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00053484)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00053484" * (cast_expression "(code *)PTR___stack_chk_fail_00053484" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (if_statement "if (png_ptr == (png_structrp)0x0) {\n    return;\n  }" if (parenthesized_expression "(png_ptr == (png_structrp)0x0)" ( (binary_expression "png_ptr == (png_structrp)0x0" identifier == (cast_expression "(png_structrp)0x0" ( (type_descriptor "png_structrp" type_identifier) ) number_literal)) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (if_statement "if (-1 < (int)in_a3) {\n    png_write_chunk_header(png_ptr,(png_uint_32)in_a1,in_a3);\n    (**(code **)(puVar4 + 0x197d4))(png_ptr,in_a2,in_a3);\n                    /* WARNING: Could not recover jumptable at 0x00039da8. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    (**(code **)(puVar4 + 0x196e0))(png_ptr);\n    return;\n  }" if (parenthesized_expression "(-1 < (int)in_a3)" ( (binary_expression "-1 < (int)in_a3" number_literal < (cast_expression "(int)in_a3" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    png_write_chunk_header(png_ptr,(png_uint_32)in_a1,in_a3);\n    (**(code **)(puVar4 + 0x197d4))(png_ptr,in_a2,in_a3);\n                    /* WARNING: Could not recover jumptable at 0x00039da8. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    (**(code **)(puVar4 + 0x196e0))(png_ptr);\n    return;\n  }" { (expression_statement "png_write_chunk_header(png_ptr,(png_uint_32)in_a1,in_a3);" (call_expression "png_write_chunk_header(png_ptr,(png_uint_32)in_a1,in_a3)" identifier (argument_list "(png_ptr,(png_uint_32)in_a1,in_a3)" ( identifier , (cast_expression "(png_uint_32)in_a1" ( (type_descriptor "png_uint_32" type_identifier) ) identifier) , identifier ))) ;) (expression_statement "(**(code **)(puVar4 + 0x197d4))(png_ptr,in_a2,in_a3);" (call_expression "(**(code **)(puVar4 + 0x197d4))(png_ptr,in_a2,in_a3)" (parenthesized_expression "(**(code **)(puVar4 + 0x197d4))" ( (pointer_expression "**(code **)(puVar4 + 0x197d4)" * (pointer_expression "*(code **)(puVar4 + 0x197d4)" * (cast_expression "(code **)(puVar4 + 0x197d4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar4 + 0x197d4)" ( (binary_expression "puVar4 + 0x197d4" identifier + number_literal) ))))) )) (argument_list "(png_ptr,in_a2,in_a3)" ( identifier , identifier , identifier ))) ;) comment comment (expression_statement "(**(code **)(puVar4 + 0x196e0))(png_ptr);" (call_expression "(**(code **)(puVar4 + 0x196e0))(png_ptr)" (parenthesized_expression "(**(code **)(puVar4 + 0x196e0))" ( (pointer_expression "**(code **)(puVar4 + 0x196e0)" * (pointer_expression "*(code **)(puVar4 + 0x196e0)" * (cast_expression "(code **)(puVar4 + 0x196e0)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar4 + 0x196e0)" ( (binary_expression "puVar4 + 0x196e0" identifier + number_literal) ))))) )) (argument_list "(png_ptr)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "ppVar3 = (png_uint_32 *)(*(int *)(puVar4 + 0x192f4) + 0x2168);" (assignment_expression "ppVar3 = (png_uint_32 *)(*(int *)(puVar4 + 0x192f4) + 0x2168)" identifier = (cast_expression "(png_uint_32 *)(*(int *)(puVar4 + 0x192f4) + 0x2168)" ( (type_descriptor "png_uint_32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(puVar4 + 0x192f4) + 0x2168)" ( (binary_expression "*(int *)(puVar4 + 0x192f4) + 0x2168" (pointer_expression "*(int *)(puVar4 + 0x192f4)" * (cast_expression "(int *)(puVar4 + 0x192f4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar4 + 0x192f4)" ( (binary_expression "puVar4 + 0x192f4" identifier + number_literal) )))) + number_literal) )))) ;) (expression_statement "(**(code **)(puVar4 + 0x196e4))();" (call_expression "(**(code **)(puVar4 + 0x196e4))()" (parenthesized_expression "(**(code **)(puVar4 + 0x196e4))" ( (pointer_expression "**(code **)(puVar4 + 0x196e4)" * (pointer_expression "*(code **)(puVar4 + 0x196e4)" * (cast_expression "(code **)(puVar4 + 0x196e4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar4 + 0x196e4)" ( (binary_expression "puVar4 + 0x196e4" identifier + number_literal) ))))) )) (argument_list "()" ( ))) ;) (expression_statement "png_write_complete_chunk(png_ptr,*ppVar3,in_a2,in_a3);" (call_expression "png_write_complete_chunk(png_ptr,*ppVar3,in_a2,in_a3)" identifier (argument_list "(png_ptr,*ppVar3,in_a2,in_a3)" ( identifier , (pointer_expression "*ppVar3" * identifier) , identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void png_write_chunk_end(int param_1,undefined4 param_2,undefined4 param_3,int param_4)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined1 auStack_18 [4];\n  int local_14;\n  \n  puVar1 = PTR___stack_chk_guard_000534bc;\n  puVar2 = PTR_png_save_uint_32_000533e0;\n  local_14 = *(int *)PTR___stack_chk_guard_000534bc;\n  if (param_1 != 0) {\n    *(undefined4 *)(param_1 + 0x380) = 0x82;\n    (*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8));\n    param_3 = 4;\n    FUN_00035160(param_1,auStack_18,4);\n  }\n  if (local_14 == *(int *)puVar1) {\n    return;\n  }\n  puVar2 = PTR___stack_chk_fail_00053484;\n  (*(code *)PTR___stack_chk_fail_00053484)();\n  if (param_1 == 0) {\n    return;\n  }\n  if (-1 < param_4) {\n    FUN_00039938();\n    (**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4);\n                    \n                    \n    (**(code **)(puVar2 + 0x196e0))(param_1);\n    return;\n  }\n  (**(code **)(puVar2 + 0x196e4))();\n  FUN_00039d28();\n  return;\n}\n\n" (function_definition "void png_write_chunk_end(int param_1,undefined4 param_2,undefined4 param_3,int param_4)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined1 auStack_18 [4];\n  int local_14;\n  \n  puVar1 = PTR___stack_chk_guard_000534bc;\n  puVar2 = PTR_png_save_uint_32_000533e0;\n  local_14 = *(int *)PTR___stack_chk_guard_000534bc;\n  if (param_1 != 0) {\n    *(undefined4 *)(param_1 + 0x380) = 0x82;\n    (*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8));\n    param_3 = 4;\n    FUN_00035160(param_1,auStack_18,4);\n  }\n  if (local_14 == *(int *)puVar1) {\n    return;\n  }\n  puVar2 = PTR___stack_chk_fail_00053484;\n  (*(code *)PTR___stack_chk_fail_00053484)();\n  if (param_1 == 0) {\n    return;\n  }\n  if (-1 < param_4) {\n    FUN_00039938();\n    (**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4);\n                    \n                    \n    (**(code **)(puVar2 + 0x196e0))(param_1);\n    return;\n  }\n  (**(code **)(puVar2 + 0x196e4))();\n  FUN_00039d28();\n  return;\n}" primitive_type (function_declarator "png_write_chunk_end(int param_1,undefined4 param_2,undefined4 param_3,int param_4)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined1 auStack_18 [4];\n  int local_14;\n  \n  puVar1 = PTR___stack_chk_guard_000534bc;\n  puVar2 = PTR_png_save_uint_32_000533e0;\n  local_14 = *(int *)PTR___stack_chk_guard_000534bc;\n  if (param_1 != 0) {\n    *(undefined4 *)(param_1 + 0x380) = 0x82;\n    (*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8));\n    param_3 = 4;\n    FUN_00035160(param_1,auStack_18,4);\n  }\n  if (local_14 == *(int *)puVar1) {\n    return;\n  }\n  puVar2 = PTR___stack_chk_fail_00053484;\n  (*(code *)PTR___stack_chk_fail_00053484)();\n  if (param_1 == 0) {\n    return;\n  }\n  if (-1 < param_4) {\n    FUN_00039938();\n    (**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4);\n                    \n                    \n    (**(code **)(puVar2 + 0x196e0))(param_1);\n    return;\n  }\n  (**(code **)(puVar2 + 0x196e4))();\n  FUN_00039d28();\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined1 auStack_18 [4];" type_identifier (array_declarator "auStack_18 [4]" identifier [ number_literal ]) ;) (declaration "int local_14;" primitive_type identifier ;) (expression_statement "puVar1 = PTR___stack_chk_guard_000534bc;" (assignment_expression "puVar1 = PTR___stack_chk_guard_000534bc" identifier = identifier) ;) (expression_statement "puVar2 = PTR_png_save_uint_32_000533e0;" (assignment_expression "puVar2 = PTR_png_save_uint_32_000533e0" identifier = identifier) ;) (expression_statement "local_14 = *(int *)PTR___stack_chk_guard_000534bc;" (assignment_expression "local_14 = *(int *)PTR___stack_chk_guard_000534bc" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_000534bc" * (cast_expression "(int *)PTR___stack_chk_guard_000534bc" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (param_1 != 0) {\n    *(undefined4 *)(param_1 + 0x380) = 0x82;\n    (*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8));\n    param_3 = 4;\n    FUN_00035160(param_1,auStack_18,4);\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    *(undefined4 *)(param_1 + 0x380) = 0x82;\n    (*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8));\n    param_3 = 4;\n    FUN_00035160(param_1,auStack_18,4);\n  }" { (expression_statement "*(undefined4 *)(param_1 + 0x380) = 0x82;" (assignment_expression "*(undefined4 *)(param_1 + 0x380) = 0x82" (pointer_expression "*(undefined4 *)(param_1 + 0x380)" * (cast_expression "(undefined4 *)(param_1 + 0x380)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x380)" ( (binary_expression "param_1 + 0x380" identifier + number_literal) )))) = number_literal) ;) (expression_statement "(*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8));" (call_expression "(*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8))" (parenthesized_expression "(*(code *)puVar2)" ( (pointer_expression "*(code *)puVar2" * (cast_expression "(code *)puVar2" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_18,*(undefined4 *)(param_1 + 0x1e8))" ( identifier , (pointer_expression "*(undefined4 *)(param_1 + 0x1e8)" * (cast_expression "(undefined4 *)(param_1 + 0x1e8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1e8)" ( (binary_expression "param_1 + 0x1e8" identifier + number_literal) )))) ))) ;) (expression_statement "param_3 = 4;" (assignment_expression "param_3 = 4" identifier = number_literal) ;) (expression_statement "FUN_00035160(param_1,auStack_18,4);" (call_expression "FUN_00035160(param_1,auStack_18,4)" identifier (argument_list "(param_1,auStack_18,4)" ( identifier , identifier , number_literal ))) ;) })) (if_statement "if (local_14 == *(int *)puVar1) {\n    return;\n  }" if (parenthesized_expression "(local_14 == *(int *)puVar1)" ( (binary_expression "local_14 == *(int *)puVar1" identifier == (pointer_expression "*(int *)puVar1" * (cast_expression "(int *)puVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "puVar2 = PTR___stack_chk_fail_00053484;" (assignment_expression "puVar2 = PTR___stack_chk_fail_00053484" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_00053484)();" (call_expression "(*(code *)PTR___stack_chk_fail_00053484)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00053484)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00053484" * (cast_expression "(code *)PTR___stack_chk_fail_00053484" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (if_statement "if (param_1 == 0) {\n    return;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (if_statement "if (-1 < param_4) {\n    FUN_00039938();\n    (**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4);\n                    \n                    \n    (**(code **)(puVar2 + 0x196e0))(param_1);\n    return;\n  }" if (parenthesized_expression "(-1 < param_4)" ( (binary_expression "-1 < param_4" number_literal < identifier) )) (compound_statement "{\n    FUN_00039938();\n    (**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4);\n                    \n                    \n    (**(code **)(puVar2 + 0x196e0))(param_1);\n    return;\n  }" { (expression_statement "FUN_00039938();" (call_expression "FUN_00039938()" identifier (argument_list "()" ( ))) ;) (expression_statement "(**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4);" (call_expression "(**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4)" (parenthesized_expression "(**(code **)(puVar2 + 0x197d4))" ( (pointer_expression "**(code **)(puVar2 + 0x197d4)" * (pointer_expression "*(code **)(puVar2 + 0x197d4)" * (cast_expression "(code **)(puVar2 + 0x197d4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar2 + 0x197d4)" ( (binary_expression "puVar2 + 0x197d4" identifier + number_literal) ))))) )) (argument_list "(param_1,param_3,param_4)" ( identifier , identifier , identifier ))) ;) (expression_statement "(**(code **)(puVar2 + 0x196e0))(param_1);" (call_expression "(**(code **)(puVar2 + 0x196e0))(param_1)" (parenthesized_expression "(**(code **)(puVar2 + 0x196e0))" ( (pointer_expression "**(code **)(puVar2 + 0x196e0)" * (pointer_expression "*(code **)(puVar2 + 0x196e0)" * (cast_expression "(code **)(puVar2 + 0x196e0)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar2 + 0x196e0)" ( (binary_expression "puVar2 + 0x196e0" identifier + number_literal) ))))) )) (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "(**(code **)(puVar2 + 0x196e4))();" (call_expression "(**(code **)(puVar2 + 0x196e4))()" (parenthesized_expression "(**(code **)(puVar2 + 0x196e4))" ( (pointer_expression "**(code **)(puVar2 + 0x196e4)" * (pointer_expression "*(code **)(puVar2 + 0x196e4)" * (cast_expression "(code **)(puVar2 + 0x196e4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar2 + 0x196e4)" ( (binary_expression "puVar2 + 0x196e4" identifier + number_literal) ))))) )) (argument_list "()" ( ))) ;) (expression_statement "FUN_00039d28();" (call_expression "FUN_00039d28()" identifier (argument_list "()" ( ))) ;) (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 (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( IDENT ))) ;) (return_statement return ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return ;) })))
(function_definition "void png_write_chunk_end(int param_1,undefined4 param_2,undefined4 param_3,int param_4)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined1 auStack_18 [4];\n  int local_14;\n  \n  puVar1 = PTR___stack_chk_guard_000534bc;\n  puVar2 = PTR_png_save_uint_32_000533e0;\n  local_14 = *(int *)PTR___stack_chk_guard_000534bc;\n  if (param_1 != 0) {\n    *(undefined4 *)(param_1 + 0x380) = 0x82;\n    (*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8));\n    param_3 = 4;\n    FUN_00035160(param_1,auStack_18,4);\n  }\n  if (local_14 == *(int *)puVar1) {\n    return;\n  }\n  puVar2 = PTR___stack_chk_fail_00053484;\n  (*(code *)PTR___stack_chk_fail_00053484)();\n  if (param_1 == 0) {\n    return;\n  }\n  if (-1 < param_4) {\n    FUN_00039938();\n    (**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4);\n                    \n                    \n    (**(code **)(puVar2 + 0x196e0))(param_1);\n    return;\n  }\n  (**(code **)(puVar2 + 0x196e4))();\n  FUN_00039d28();\n  return;\n}" (primitive_type "void") (function_declarator "png_write_chunk_end(int param_1,undefined4 param_2,undefined4 param_3,int param_4)" (identifier "png_write_chunk_end") (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,int param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined1 auStack_18 [4];\n  int local_14;\n  \n  puVar1 = PTR___stack_chk_guard_000534bc;\n  puVar2 = PTR_png_save_uint_32_000533e0;\n  local_14 = *(int *)PTR___stack_chk_guard_000534bc;\n  if (param_1 != 0) {\n    *(undefined4 *)(param_1 + 0x380) = 0x82;\n    (*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8));\n    param_3 = 4;\n    FUN_00035160(param_1,auStack_18,4);\n  }\n  if (local_14 == *(int *)puVar1) {\n    return;\n  }\n  puVar2 = PTR___stack_chk_fail_00053484;\n  (*(code *)PTR___stack_chk_fail_00053484)();\n  if (param_1 == 0) {\n    return;\n  }\n  if (-1 < param_4) {\n    FUN_00039938();\n    (**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4);\n                    \n                    \n    (**(code **)(puVar2 + 0x196e0))(param_1);\n    return;\n  }\n  (**(code **)(puVar2 + 0x196e4))();\n  FUN_00039d28();\n  return;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined *puVar2;" (type_identifier "undefined") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined1 auStack_18 [4];" (type_identifier "undefined1") (array_declarator "auStack_18 [4]" (identifier "auStack_18") ([ "[") (number_literal "4") (] "]")) (; ";")) (declaration "int local_14;" (primitive_type "int") (identifier "local_14") (; ";")) (expression_statement "puVar1 = PTR___stack_chk_guard_000534bc;" (assignment_expression "puVar1 = PTR___stack_chk_guard_000534bc" (identifier "puVar1") (= "=") (identifier "PTR___stack_chk_guard_000534bc")) (; ";")) (expression_statement "puVar2 = PTR_png_save_uint_32_000533e0;" (assignment_expression "puVar2 = PTR_png_save_uint_32_000533e0" (identifier "puVar2") (= "=") (identifier "PTR_png_save_uint_32_000533e0")) (; ";")) (expression_statement "local_14 = *(int *)PTR___stack_chk_guard_000534bc;" (assignment_expression "local_14 = *(int *)PTR___stack_chk_guard_000534bc" (identifier "local_14") (= "=") (pointer_expression "*(int *)PTR___stack_chk_guard_000534bc" (* "*") (cast_expression "(int *)PTR___stack_chk_guard_000534bc" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_guard_000534bc")))) (; ";")) (if_statement "if (param_1 != 0) {\n    *(undefined4 *)(param_1 + 0x380) = 0x82;\n    (*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8));\n    param_3 = 4;\n    FUN_00035160(param_1,auStack_18,4);\n  }" (if "if") (parenthesized_expression "(param_1 != 0)" (( "(") (binary_expression "param_1 != 0" (identifier "param_1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    *(undefined4 *)(param_1 + 0x380) = 0x82;\n    (*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8));\n    param_3 = 4;\n    FUN_00035160(param_1,auStack_18,4);\n  }" ({ "{") (expression_statement "*(undefined4 *)(param_1 + 0x380) = 0x82;" (assignment_expression "*(undefined4 *)(param_1 + 0x380) = 0x82" (pointer_expression "*(undefined4 *)(param_1 + 0x380)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x380)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x380)" (( "(") (binary_expression "param_1 + 0x380" (identifier "param_1") (+ "+") (number_literal "0x380")) () ")")))) (= "=") (number_literal "0x82")) (; ";")) (expression_statement "(*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8));" (call_expression "(*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8))" (parenthesized_expression "(*(code *)puVar2)" (( "(") (pointer_expression "*(code *)puVar2" (* "*") (cast_expression "(code *)puVar2" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar2"))) () ")")) (argument_list "(auStack_18,*(undefined4 *)(param_1 + 0x1e8))" (( "(") (identifier "auStack_18") (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x1e8)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x1e8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1e8)" (( "(") (binary_expression "param_1 + 0x1e8" (identifier "param_1") (+ "+") (number_literal "0x1e8")) () ")")))) () ")"))) (; ";")) (expression_statement "param_3 = 4;" (assignment_expression "param_3 = 4" (identifier "param_3") (= "=") (number_literal "4")) (; ";")) (expression_statement "FUN_00035160(param_1,auStack_18,4);" (call_expression "FUN_00035160(param_1,auStack_18,4)" (identifier "FUN_00035160") (argument_list "(param_1,auStack_18,4)" (( "(") (identifier "param_1") (, ",") (identifier "auStack_18") (, ",") (number_literal "4") () ")"))) (; ";")) (} "}"))) (if_statement "if (local_14 == *(int *)puVar1) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_14 == *(int *)puVar1)" (( "(") (binary_expression "local_14 == *(int *)puVar1" (identifier "local_14") (== "==") (pointer_expression "*(int *)puVar1" (* "*") (cast_expression "(int *)puVar1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1")))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "puVar2 = PTR___stack_chk_fail_00053484;" (assignment_expression "puVar2 = PTR___stack_chk_fail_00053484" (identifier "puVar2") (= "=") (identifier "PTR___stack_chk_fail_00053484")) (; ";")) (expression_statement "(*(code *)PTR___stack_chk_fail_00053484)();" (call_expression "(*(code *)PTR___stack_chk_fail_00053484)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00053484)" (( "(") (pointer_expression "*(code *)PTR___stack_chk_fail_00053484" (* "*") (cast_expression "(code *)PTR___stack_chk_fail_00053484" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_fail_00053484"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (if_statement "if (param_1 == 0) {\n    return;\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (-1 < param_4) {\n    FUN_00039938();\n    (**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4);\n                    \n                    \n    (**(code **)(puVar2 + 0x196e0))(param_1);\n    return;\n  }" (if "if") (parenthesized_expression "(-1 < param_4)" (( "(") (binary_expression "-1 < param_4" (number_literal "-1") (< "<") (identifier "param_4")) () ")")) (compound_statement "{\n    FUN_00039938();\n    (**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4);\n                    \n                    \n    (**(code **)(puVar2 + 0x196e0))(param_1);\n    return;\n  }" ({ "{") (expression_statement "FUN_00039938();" (call_expression "FUN_00039938()" (identifier "FUN_00039938") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "(**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4);" (call_expression "(**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4)" (parenthesized_expression "(**(code **)(puVar2 + 0x197d4))" (( "(") (pointer_expression "**(code **)(puVar2 + 0x197d4)" (* "*") (pointer_expression "*(code **)(puVar2 + 0x197d4)" (* "*") (cast_expression "(code **)(puVar2 + 0x197d4)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar2 + 0x197d4)" (( "(") (binary_expression "puVar2 + 0x197d4" (identifier "puVar2") (+ "+") (number_literal "0x197d4")) () ")"))))) () ")")) (argument_list "(param_1,param_3,param_4)" (( "(") (identifier "param_1") (, ",") (identifier "param_3") (, ",") (identifier "param_4") () ")"))) (; ";")) (expression_statement "(**(code **)(puVar2 + 0x196e0))(param_1);" (call_expression "(**(code **)(puVar2 + 0x196e0))(param_1)" (parenthesized_expression "(**(code **)(puVar2 + 0x196e0))" (( "(") (pointer_expression "**(code **)(puVar2 + 0x196e0)" (* "*") (pointer_expression "*(code **)(puVar2 + 0x196e0)" (* "*") (cast_expression "(code **)(puVar2 + 0x196e0)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar2 + 0x196e0)" (( "(") (binary_expression "puVar2 + 0x196e0" (identifier "puVar2") (+ "+") (number_literal "0x196e0")) () ")"))))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "(**(code **)(puVar2 + 0x196e4))();" (call_expression "(**(code **)(puVar2 + 0x196e4))()" (parenthesized_expression "(**(code **)(puVar2 + 0x196e4))" (( "(") (pointer_expression "**(code **)(puVar2 + 0x196e4)" (* "*") (pointer_expression "*(code **)(puVar2 + 0x196e4)" (* "*") (cast_expression "(code **)(puVar2 + 0x196e4)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar2 + 0x196e4)" (( "(") (binary_expression "puVar2 + 0x196e4" (identifier "puVar2") (+ "+") (number_literal "0x196e4")) () ")"))))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_00039d28();" (call_expression "FUN_00039d28()" (identifier "FUN_00039d28") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 var_1)

{
  type_2 *puVar1;
  int var_3;
  type_3 in_a1;
  type_4 *ppVar3;
  type_3 in_a2;
  size_t in_a3;
  type_2 *var_5;
  type_5 buf [4];
  
  puVar1 = PTR___stack_chk_guard_000534bc;
  var_5 = PTR_png_save_uint_32_000533e0;
  var_3 = *(int *)PTR___stack_chk_guard_000534bc;
  if (var_1 != (type_1)0x0) {
    in_a1 = buf;
    var_1->io_state = 0x82;
    (*(type_6 *)var_5)(in_a1,var_1->crc);
    in_a2 = &DAT_00000004;
    var_2(var_1,in_a1,4);
  }
  if (var_3 == *(int *)puVar1) {
    return;
  }
  var_5 = PTR___stack_chk_fail_00053484;
  (*(type_6 *)PTR___stack_chk_fail_00053484)();
  if (var_1 == (type_1)0x0) {
    return;
  }
  if (-1 < (int)in_a3) {
    var_4(var_1,(type_4)in_a1,in_a3);
    (**(type_6 **)(var_5 + 0x197d4))(var_1,in_a2,in_a3);
                    /* WARNING: Could not recover jumptable at 0x00039da8. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    (**(type_6 **)(var_5 + 0x196e0))(var_1);
    return;
  }
  ppVar3 = (type_4 *)(*(int *)(var_5 + 0x192f4) + 0x2168);
  (**(type_6 **)(var_5 + 0x196e4))();
  var_6(var_1,*ppVar3,in_a2,in_a3);
  return;
}


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

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

{
  undefined *puVar1;
  undefined *puVar2;
  undefined1 auStack_18 [4];
  int local_14;
  
  puVar1 = PTR___stack_chk_guard_000534bc;
  puVar2 = PTR_png_save_uint_32_000533e0;
  local_14 = *(int *)PTR___stack_chk_guard_000534bc;
  if (param_1 != 0) {
    *(undefined4 *)(param_1 + 0x380) = 0x82;
    (*(code *)puVar2)(auStack_18,*(undefined4 *)(param_1 + 0x1e8));
    param_3 = 4;
    FUN_00035160(param_1,auStack_18,4);
  }
  if (local_14 == *(int *)puVar1) {
    return;
  }
  puVar2 = PTR___stack_chk_fail_00053484;
  (*(code *)PTR___stack_chk_fail_00053484)();
  if (param_1 == 0) {
    return;
  }
  if (-1 < param_4) {
    FUN_00039938();
    (**(code **)(puVar2 + 0x197d4))(param_1,param_3,param_4);
                    /* WARNING: Could not recover jumptable at 0x00039da8. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    (**(code **)(puVar2 + 0x196e0))(param_1);
    return;
  }
  (**(code **)(puVar2 + 0x196e4))();
  FUN_00039d28();
  return;
}

