
int png_crc_finish(png_structrp png_ptr,png_uint_32 skip)

{
  long lVar1;
  byte bVar2;
  int iVar3;
  uint uVar4;
  long in_FS_OFFSET;
  png_byte tmpbuf [1024];
  
  lVar1 = *(long *)(in_FS_OFFSET + 0x28);
  if (skip != 0) {
    uVar4 = skip & 0x3ff;
    do {
      if (uVar4 == skip) {
        png_crc_read(png_ptr,tmpbuf,skip);
        break;
      }
      skip = skip - 0x400;
      png_crc_read(png_ptr,tmpbuf,0x400);
    } while (skip != 0);
  }
  iVar3 = png_crc_error(png_ptr);
  if (iVar3 != 0) {
    if ((png_ptr->chunk_name & 0x20000000) == 0) {
      bVar2 = (byte)(png_ptr->flags >> 10);
    }
    else {
      bVar2 = (byte)(png_ptr->flags >> 9) ^ 1;
    }
    if ((bVar2 & 1) == 0) {
                    /* WARNING: Subroutine does not return */
      png_chunk_error(png_ptr,"CRC error");
    }
    png_chunk_warning(png_ptr,"CRC error");
    iVar3 = 1;
  }
  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {
    return iVar3;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}



undefined8 FUN_0011942d(long param_1,uint param_2)

{
  byte bVar1;
  undefined8 uVar2;
  uint uVar3;
  long in_FS_OFFSET;
  undefined1 auStack_438 [1032];
  long local_30;
  
  local_30 = *(long *)(in_FS_OFFSET + 0x28);
  if (param_2 != 0) {
    uVar3 = param_2 & 0x3ff;
    do {
      if (uVar3 == param_2) {
        FUN_00119344(param_1,auStack_438,param_2);
        break;
      }
      param_2 = param_2 - 0x400;
      FUN_00119344(param_1,auStack_438,0x400);
    } while (param_2 != 0);
  }
  uVar2 = FUN_00119371(param_1);
  if ((int)uVar2 != 0) {
    if ((*(byte *)(param_1 + 0x21b) & 0x20) == 0) {
      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);
    }
    else {
      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;
    }
    if ((bVar1 & 1) == 0) {
                    /* WARNING: Subroutine does not return */
      png_chunk_error(param_1,"CRC error");
    }
    png_chunk_warning(param_1,"CRC error");
    uVar2 = 1;
  }
  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}


PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x418
MOV RBP,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x408],RAX
XOR EAX,EAX
TEST ESI,ESI
JZ 0x00119491
MOV EBX,ESI
MOV R12D,ESI
AND R12D,0x3ff
MOV R13,RSP
JMP 0x0011947f
SUB EBX,0x400
MOV EDX,0x400
MOV RSI,R13
MOV RDI,RBP
CALL 0x00119344
TEST EBX,EBX
JZ 0x00119491
CMP R12D,EBX
JNZ 0x00119465
MOV RSI,RSP
MOV EDX,EBX
MOV RDI,RBP
CALL 0x00119344
MOV RDI,RBP
CALL 0x00119371
TEST EAX,EAX
JZ 0x001194cd
TEST byte ptr [RBP + 0x21b],0x20
JZ 0x001194ee
MOV EAX,dword ptr [RBP + 0x130]
SHR EAX,0x9
XOR EAX,0x1
AND EAX,0x1
TEST AL,AL
JZ 0x001194fc
LEA RSI,[0x12ac15]
MOV RDI,RBP
CALL 0x001066d0
MOV EAX,0x1
MOV RCX,qword ptr [RSP + 0x408]
XOR RCX,qword ptr FS:[0x28]
JNZ 0x0011950b
ADD RSP,0x418
POP RBX
POP RBP
POP R12
POP R13
RET
MOV EAX,dword ptr [RBP + 0x130]
SHR EAX,0xa
AND EAX,0x1
JMP 0x001194b5
LEA RSI,[0x12ac15]
MOV RDI,RBP
CALL 0x00106060
CALL 0x00106280
(translation_unit "undefined8 FUN_0011942d(long param_1,uint param_2)\n\n{\n  byte bVar1;\n  undefined8 uVar2;\n  uint uVar3;\n  long in_FS_OFFSET;\n  undefined1 auStack_438 [1032];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 != 0) {\n    uVar3 = param_2 & 0x3ff;\n    do {\n      if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }\n      param_2 = param_2 - 0x400;\n      FUN_00119344(param_1,auStack_438,0x400);\n    } while (param_2 != 0);\n  }\n  uVar2 = FUN_00119371(param_1);\n  if ((int)uVar2 != 0) {\n    if ((*(byte *)(param_1 + 0x21b) & 0x20) == 0) {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);\n    }\n    else {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }\n    if ((bVar1 & 1) == 0) {\n                    /* WARNING: Subroutine does not return */\n      png_chunk_error(param_1,"CRC error");\n    }\n    png_chunk_warning(param_1,"CRC error");\n    uVar2 = 1;\n  }\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "undefined8 FUN_0011942d(long param_1,uint param_2)\n\n{\n  byte bVar1;\n  undefined8 uVar2;\n  uint uVar3;\n  long in_FS_OFFSET;\n  undefined1 auStack_438 [1032];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 != 0) {\n    uVar3 = param_2 & 0x3ff;\n    do {\n      if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }\n      param_2 = param_2 - 0x400;\n      FUN_00119344(param_1,auStack_438,0x400);\n    } while (param_2 != 0);\n  }\n  uVar2 = FUN_00119371(param_1);\n  if ((int)uVar2 != 0) {\n    if ((*(byte *)(param_1 + 0x21b) & 0x20) == 0) {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);\n    }\n    else {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }\n    if ((bVar1 & 1) == 0) {\n                    /* WARNING: Subroutine does not return */\n      png_chunk_error(param_1,"CRC error");\n    }\n    png_chunk_warning(param_1,"CRC error");\n    uVar2 = 1;\n  }\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" type_identifier (function_declarator "FUN_0011942d(long param_1,uint param_2)" identifier (parameter_list "(long param_1,uint param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  byte bVar1;\n  undefined8 uVar2;\n  uint uVar3;\n  long in_FS_OFFSET;\n  undefined1 auStack_438 [1032];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 != 0) {\n    uVar3 = param_2 & 0x3ff;\n    do {\n      if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }\n      param_2 = param_2 - 0x400;\n      FUN_00119344(param_1,auStack_438,0x400);\n    } while (param_2 != 0);\n  }\n  uVar2 = FUN_00119371(param_1);\n  if ((int)uVar2 != 0) {\n    if ((*(byte *)(param_1 + 0x21b) & 0x20) == 0) {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);\n    }\n    else {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }\n    if ((bVar1 & 1) == 0) {\n                    /* WARNING: Subroutine does not return */\n      png_chunk_error(param_1,"CRC error");\n    }\n    png_chunk_warning(param_1,"CRC error");\n    uVar2 = 1;\n  }\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined1 auStack_438 [1032];" type_identifier (array_declarator "auStack_438 [1032]" identifier [ number_literal ]) ;) (declaration "long local_30;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_30 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_30 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (param_2 != 0) {\n    uVar3 = param_2 & 0x3ff;\n    do {\n      if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }\n      param_2 = param_2 - 0x400;\n      FUN_00119344(param_1,auStack_438,0x400);\n    } while (param_2 != 0);\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar3 = param_2 & 0x3ff;\n    do {\n      if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }\n      param_2 = param_2 - 0x400;\n      FUN_00119344(param_1,auStack_438,0x400);\n    } while (param_2 != 0);\n  }" { (expression_statement "uVar3 = param_2 & 0x3ff;" (assignment_expression "uVar3 = param_2 & 0x3ff" identifier = (binary_expression "param_2 & 0x3ff" identifier & number_literal)) ;) (do_statement "do {\n      if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }\n      param_2 = param_2 - 0x400;\n      FUN_00119344(param_1,auStack_438,0x400);\n    } while (param_2 != 0);" do (compound_statement "{\n      if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }\n      param_2 = param_2 - 0x400;\n      FUN_00119344(param_1,auStack_438,0x400);\n    }" { (if_statement "if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }" if (parenthesized_expression "(uVar3 == param_2)" ( (binary_expression "uVar3 == param_2" identifier == identifier) )) (compound_statement "{\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }" { (expression_statement "FUN_00119344(param_1,auStack_438,param_2);" (call_expression "FUN_00119344(param_1,auStack_438,param_2)" identifier (argument_list "(param_1,auStack_438,param_2)" ( identifier , identifier , identifier ))) ;) (break_statement "break;" break ;) })) (expression_statement "param_2 = param_2 - 0x400;" (assignment_expression "param_2 = param_2 - 0x400" identifier = (binary_expression "param_2 - 0x400" identifier - number_literal)) ;) (expression_statement "FUN_00119344(param_1,auStack_438,0x400);" (call_expression "FUN_00119344(param_1,auStack_438,0x400)" identifier (argument_list "(param_1,auStack_438,0x400)" ( identifier , identifier , number_literal ))) ;) }) while (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) ;) })) (expression_statement "uVar2 = FUN_00119371(param_1);" (assignment_expression "uVar2 = FUN_00119371(param_1)" identifier = (call_expression "FUN_00119371(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((int)uVar2 != 0) {\n    if ((*(byte *)(param_1 + 0x21b) & 0x20) == 0) {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);\n    }\n    else {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }\n    if ((bVar1 & 1) == 0) {\n                    /* WARNING: Subroutine does not return */\n      png_chunk_error(param_1,"CRC error");\n    }\n    png_chunk_warning(param_1,"CRC error");\n    uVar2 = 1;\n  }" if (parenthesized_expression "((int)uVar2 != 0)" ( (binary_expression "(int)uVar2 != 0" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) != number_literal) )) (compound_statement "{\n    if ((*(byte *)(param_1 + 0x21b) & 0x20) == 0) {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);\n    }\n    else {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }\n    if ((bVar1 & 1) == 0) {\n                    /* WARNING: Subroutine does not return */\n      png_chunk_error(param_1,"CRC error");\n    }\n    png_chunk_warning(param_1,"CRC error");\n    uVar2 = 1;\n  }" { (if_statement "if ((*(byte *)(param_1 + 0x21b) & 0x20) == 0) {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);\n    }\n    else {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }" if (parenthesized_expression "((*(byte *)(param_1 + 0x21b) & 0x20) == 0)" ( (binary_expression "(*(byte *)(param_1 + 0x21b) & 0x20) == 0" (parenthesized_expression "(*(byte *)(param_1 + 0x21b) & 0x20)" ( (binary_expression "*(byte *)(param_1 + 0x21b) & 0x20" (pointer_expression "*(byte *)(param_1 + 0x21b)" * (cast_expression "(byte *)(param_1 + 0x21b)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x21b)" ( (binary_expression "param_1 + 0x21b" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);\n    }" { (expression_statement "bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);" (assignment_expression "bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10)" identifier = (call_expression "(byte)(*(uint *)(param_1 + 0x130) >> 10)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(*(uint *)(param_1 + 0x130) >> 10)" ( (binary_expression "*(uint *)(param_1 + 0x130) >> 10" (pointer_expression "*(uint *)(param_1 + 0x130)" * (cast_expression "(uint *)(param_1 + 0x130)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x130)" ( (binary_expression "param_1 + 0x130" identifier + number_literal) )))) >> number_literal) )))) ;) }) (else_clause "else {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }" else (compound_statement "{\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }" { (expression_statement "bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;" (assignment_expression "bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1" identifier = (binary_expression "(byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1" (call_expression "(byte)(*(uint *)(param_1 + 0x130) >> 9)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(*(uint *)(param_1 + 0x130) >> 9)" ( (binary_expression "*(uint *)(param_1 + 0x130) >> 9" (pointer_expression "*(uint *)(param_1 + 0x130)" * (cast_expression "(uint *)(param_1 + 0x130)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x130)" ( (binary_expression "param_1 + 0x130" identifier + number_literal) )))) >> number_literal) ))) ^ number_literal)) ;) }))) (if_statement "if ((bVar1 & 1) == 0) {\n                    /* WARNING: Subroutine does not return */\n      png_chunk_error(param_1,"CRC error");\n    }" if (parenthesized_expression "((bVar1 & 1) == 0)" ( (binary_expression "(bVar1 & 1) == 0" (parenthesized_expression "(bVar1 & 1)" ( (binary_expression "bVar1 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      png_chunk_error(param_1,"CRC error");\n    }" { comment (expression_statement "png_chunk_error(param_1,"CRC error");" (call_expression "png_chunk_error(param_1,"CRC error")" identifier (argument_list "(param_1,"CRC error")" ( identifier , (string_literal ""CRC error"" " string_content ") ))) ;) })) (expression_statement "png_chunk_warning(param_1,"CRC error");" (call_expression "png_chunk_warning(param_1,"CRC error")" identifier (argument_list "(param_1,"CRC error")" ( identifier , (string_literal ""CRC error"" " string_content ") ))) ;) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) })) (if_statement "if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_30 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_30 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int png_crc_finish(png_structrp png_ptr,png_uint_32 skip)\n\n{\n  long lVar1;\n  byte bVar2;\n  int iVar3;\n  uint uVar4;\n  long in_FS_OFFSET;\n  png_byte tmpbuf [1024];\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  if (skip != 0) {\n    uVar4 = skip & 0x3ff;\n    do {\n      if (uVar4 == skip) {\n        png_crc_read(png_ptr,tmpbuf,skip);\n        break;\n      }\n      skip = skip - 0x400;\n      png_crc_read(png_ptr,tmpbuf,0x400);\n    } while (skip != 0);\n  }\n  iVar3 = png_crc_error(png_ptr);\n  if (iVar3 != 0) {\n    if ((png_ptr->chunk_name & 0x20000000) == 0) {\n      bVar2 = (byte)(png_ptr->flags >> 10);\n    }\n    else {\n      bVar2 = (byte)(png_ptr->flags >> 9) ^ 1;\n    }\n    if ((bVar2 & 1) == 0) {\n                    /* WARNING: Subroutine does not return */\n      png_chunk_error(png_ptr,"CRC error");\n    }\n    png_chunk_warning(png_ptr,"CRC error");\n    iVar3 = 1;\n  }\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "int png_crc_finish(png_structrp png_ptr,png_uint_32 skip)\n\n{\n  long lVar1;\n  byte bVar2;\n  int iVar3;\n  uint uVar4;\n  long in_FS_OFFSET;\n  png_byte tmpbuf [1024];\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  if (skip != 0) {\n    uVar4 = skip & 0x3ff;\n    do {\n      if (uVar4 == skip) {\n        png_crc_read(png_ptr,tmpbuf,skip);\n        break;\n      }\n      skip = skip - 0x400;\n      png_crc_read(png_ptr,tmpbuf,0x400);\n    } while (skip != 0);\n  }\n  iVar3 = png_crc_error(png_ptr);\n  if (iVar3 != 0) {\n    if ((png_ptr->chunk_name & 0x20000000) == 0) {\n      bVar2 = (byte)(png_ptr->flags >> 10);\n    }\n    else {\n      bVar2 = (byte)(png_ptr->flags >> 9) ^ 1;\n    }\n    if ((bVar2 & 1) == 0) {\n                    /* WARNING: Subroutine does not return */\n      png_chunk_error(png_ptr,"CRC error");\n    }\n    png_chunk_warning(png_ptr,"CRC error");\n    iVar3 = 1;\n  }\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "png_crc_finish(png_structrp png_ptr,png_uint_32 skip)" identifier (parameter_list "(png_structrp png_ptr,png_uint_32 skip)" ( (parameter_declaration "png_structrp png_ptr" type_identifier identifier) , (parameter_declaration "png_uint_32 skip" type_identifier identifier) ))) (compound_statement "{\n  long lVar1;\n  byte bVar2;\n  int iVar3;\n  uint uVar4;\n  long in_FS_OFFSET;\n  png_byte tmpbuf [1024];\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  if (skip != 0) {\n    uVar4 = skip & 0x3ff;\n    do {\n      if (uVar4 == skip) {\n        png_crc_read(png_ptr,tmpbuf,skip);\n        break;\n      }\n      skip = skip - 0x400;\n      png_crc_read(png_ptr,tmpbuf,0x400);\n    } while (skip != 0);\n  }\n  iVar3 = png_crc_error(png_ptr);\n  if (iVar3 != 0) {\n    if ((png_ptr->chunk_name & 0x20000000) == 0) {\n      bVar2 = (byte)(png_ptr->flags >> 10);\n    }\n    else {\n      bVar2 = (byte)(png_ptr->flags >> 9) ^ 1;\n    }\n    if ((bVar2 & 1) == 0) {\n                    /* WARNING: Subroutine does not return */\n      png_chunk_error(png_ptr,"CRC error");\n    }\n    png_chunk_warning(png_ptr,"CRC error");\n    iVar3 = 1;\n  }\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "png_byte tmpbuf [1024];" type_identifier (array_declarator "tmpbuf [1024]" identifier [ number_literal ]) ;) (expression_statement "lVar1 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "lVar1 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (skip != 0) {\n    uVar4 = skip & 0x3ff;\n    do {\n      if (uVar4 == skip) {\n        png_crc_read(png_ptr,tmpbuf,skip);\n        break;\n      }\n      skip = skip - 0x400;\n      png_crc_read(png_ptr,tmpbuf,0x400);\n    } while (skip != 0);\n  }" if (parenthesized_expression "(skip != 0)" ( (binary_expression "skip != 0" identifier != number_literal) )) (compound_statement "{\n    uVar4 = skip & 0x3ff;\n    do {\n      if (uVar4 == skip) {\n        png_crc_read(png_ptr,tmpbuf,skip);\n        break;\n      }\n      skip = skip - 0x400;\n      png_crc_read(png_ptr,tmpbuf,0x400);\n    } while (skip != 0);\n  }" { (expression_statement "uVar4 = skip & 0x3ff;" (assignment_expression "uVar4 = skip & 0x3ff" identifier = (binary_expression "skip & 0x3ff" identifier & number_literal)) ;) (do_statement "do {\n      if (uVar4 == skip) {\n        png_crc_read(png_ptr,tmpbuf,skip);\n        break;\n      }\n      skip = skip - 0x400;\n      png_crc_read(png_ptr,tmpbuf,0x400);\n    } while (skip != 0);" do (compound_statement "{\n      if (uVar4 == skip) {\n        png_crc_read(png_ptr,tmpbuf,skip);\n        break;\n      }\n      skip = skip - 0x400;\n      png_crc_read(png_ptr,tmpbuf,0x400);\n    }" { (if_statement "if (uVar4 == skip) {\n        png_crc_read(png_ptr,tmpbuf,skip);\n        break;\n      }" if (parenthesized_expression "(uVar4 == skip)" ( (binary_expression "uVar4 == skip" identifier == identifier) )) (compound_statement "{\n        png_crc_read(png_ptr,tmpbuf,skip);\n        break;\n      }" { (expression_statement "png_crc_read(png_ptr,tmpbuf,skip);" (call_expression "png_crc_read(png_ptr,tmpbuf,skip)" identifier (argument_list "(png_ptr,tmpbuf,skip)" ( identifier , identifier , identifier ))) ;) (break_statement "break;" break ;) })) (expression_statement "skip = skip - 0x400;" (assignment_expression "skip = skip - 0x400" identifier = (binary_expression "skip - 0x400" identifier - number_literal)) ;) (expression_statement "png_crc_read(png_ptr,tmpbuf,0x400);" (call_expression "png_crc_read(png_ptr,tmpbuf,0x400)" identifier (argument_list "(png_ptr,tmpbuf,0x400)" ( identifier , identifier , number_literal ))) ;) }) while (parenthesized_expression "(skip != 0)" ( (binary_expression "skip != 0" identifier != number_literal) )) ;) })) (expression_statement "iVar3 = png_crc_error(png_ptr);" (assignment_expression "iVar3 = png_crc_error(png_ptr)" identifier = (call_expression "png_crc_error(png_ptr)" identifier (argument_list "(png_ptr)" ( identifier )))) ;) (if_statement "if (iVar3 != 0) {\n    if ((png_ptr->chunk_name & 0x20000000) == 0) {\n      bVar2 = (byte)(png_ptr->flags >> 10);\n    }\n    else {\n      bVar2 = (byte)(png_ptr->flags >> 9) ^ 1;\n    }\n    if ((bVar2 & 1) == 0) {\n                    /* WARNING: Subroutine does not return */\n      png_chunk_error(png_ptr,"CRC error");\n    }\n    png_chunk_warning(png_ptr,"CRC error");\n    iVar3 = 1;\n  }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n    if ((png_ptr->chunk_name & 0x20000000) == 0) {\n      bVar2 = (byte)(png_ptr->flags >> 10);\n    }\n    else {\n      bVar2 = (byte)(png_ptr->flags >> 9) ^ 1;\n    }\n    if ((bVar2 & 1) == 0) {\n                    /* WARNING: Subroutine does not return */\n      png_chunk_error(png_ptr,"CRC error");\n    }\n    png_chunk_warning(png_ptr,"CRC error");\n    iVar3 = 1;\n  }" { (if_statement "if ((png_ptr->chunk_name & 0x20000000) == 0) {\n      bVar2 = (byte)(png_ptr->flags >> 10);\n    }\n    else {\n      bVar2 = (byte)(png_ptr->flags >> 9) ^ 1;\n    }" if (parenthesized_expression "((png_ptr->chunk_name & 0x20000000) == 0)" ( (binary_expression "(png_ptr->chunk_name & 0x20000000) == 0" (parenthesized_expression "(png_ptr->chunk_name & 0x20000000)" ( (binary_expression "png_ptr->chunk_name & 0x20000000" (field_expression "png_ptr->chunk_name" identifier -> field_identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n      bVar2 = (byte)(png_ptr->flags >> 10);\n    }" { (expression_statement "bVar2 = (byte)(png_ptr->flags >> 10);" (assignment_expression "bVar2 = (byte)(png_ptr->flags >> 10)" identifier = (call_expression "(byte)(png_ptr->flags >> 10)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(png_ptr->flags >> 10)" ( (binary_expression "png_ptr->flags >> 10" (field_expression "png_ptr->flags" identifier -> field_identifier) >> number_literal) )))) ;) }) (else_clause "else {\n      bVar2 = (byte)(png_ptr->flags >> 9) ^ 1;\n    }" else (compound_statement "{\n      bVar2 = (byte)(png_ptr->flags >> 9) ^ 1;\n    }" { (expression_statement "bVar2 = (byte)(png_ptr->flags >> 9) ^ 1;" (assignment_expression "bVar2 = (byte)(png_ptr->flags >> 9) ^ 1" identifier = (binary_expression "(byte)(png_ptr->flags >> 9) ^ 1" (call_expression "(byte)(png_ptr->flags >> 9)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(png_ptr->flags >> 9)" ( (binary_expression "png_ptr->flags >> 9" (field_expression "png_ptr->flags" identifier -> field_identifier) >> number_literal) ))) ^ number_literal)) ;) }))) (if_statement "if ((bVar2 & 1) == 0) {\n                    /* WARNING: Subroutine does not return */\n      png_chunk_error(png_ptr,"CRC error");\n    }" if (parenthesized_expression "((bVar2 & 1) == 0)" ( (binary_expression "(bVar2 & 1) == 0" (parenthesized_expression "(bVar2 & 1)" ( (binary_expression "bVar2 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      png_chunk_error(png_ptr,"CRC error");\n    }" { comment (expression_statement "png_chunk_error(png_ptr,"CRC error");" (call_expression "png_chunk_error(png_ptr,"CRC error")" identifier (argument_list "(png_ptr,"CRC error")" ( identifier , (string_literal ""CRC error"" " string_content ") ))) ;) })) (expression_statement "png_chunk_warning(png_ptr,"CRC error");" (call_expression "png_chunk_warning(png_ptr,"CRC error")" identifier (argument_list "(png_ptr,"CRC error")" ( identifier , (string_literal ""CRC error"" " string_content ") ))) ;) (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" identifier = number_literal) ;) })) (if_statement "if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar3;\n  }" if (parenthesized_expression "(lVar1 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "lVar1 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar3;\n  }" { (return_statement "return iVar3;" return identifier ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "undefined8 FUN_0011942d(long param_1,uint param_2)\n\n{\n  byte bVar1;\n  undefined8 uVar2;\n  uint uVar3;\n  long in_FS_OFFSET;\n  undefined1 auStack_438 [1032];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 != 0) {\n    uVar3 = param_2 & 0x3ff;\n    do {\n      if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }\n      param_2 = param_2 - 0x400;\n      FUN_00119344(param_1,auStack_438,0x400);\n    } while (param_2 != 0);\n  }\n  uVar2 = FUN_00119371(param_1);\n  if ((int)uVar2 != 0) {\n    if ((*(byte *)(param_1 + 0x21b) & 0x20) == 0) {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);\n    }\n    else {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }\n    if ((bVar1 & 1) == 0) {\n                    \n      png_chunk_error(param_1,"CRC error");\n    }\n    png_chunk_warning(param_1,"CRC error");\n    uVar2 = 1;\n  }\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}\n\n" (function_definition "undefined8 FUN_0011942d(long param_1,uint param_2)\n\n{\n  byte bVar1;\n  undefined8 uVar2;\n  uint uVar3;\n  long in_FS_OFFSET;\n  undefined1 auStack_438 [1032];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 != 0) {\n    uVar3 = param_2 & 0x3ff;\n    do {\n      if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }\n      param_2 = param_2 - 0x400;\n      FUN_00119344(param_1,auStack_438,0x400);\n    } while (param_2 != 0);\n  }\n  uVar2 = FUN_00119371(param_1);\n  if ((int)uVar2 != 0) {\n    if ((*(byte *)(param_1 + 0x21b) & 0x20) == 0) {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);\n    }\n    else {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }\n    if ((bVar1 & 1) == 0) {\n                    \n      png_chunk_error(param_1,"CRC error");\n    }\n    png_chunk_warning(param_1,"CRC error");\n    uVar2 = 1;\n  }\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}" type_identifier (function_declarator "FUN_0011942d(long param_1,uint param_2)" identifier (parameter_list "(long param_1,uint param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  byte bVar1;\n  undefined8 uVar2;\n  uint uVar3;\n  long in_FS_OFFSET;\n  undefined1 auStack_438 [1032];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 != 0) {\n    uVar3 = param_2 & 0x3ff;\n    do {\n      if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }\n      param_2 = param_2 - 0x400;\n      FUN_00119344(param_1,auStack_438,0x400);\n    } while (param_2 != 0);\n  }\n  uVar2 = FUN_00119371(param_1);\n  if ((int)uVar2 != 0) {\n    if ((*(byte *)(param_1 + 0x21b) & 0x20) == 0) {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);\n    }\n    else {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }\n    if ((bVar1 & 1) == 0) {\n                    \n      png_chunk_error(param_1,"CRC error");\n    }\n    png_chunk_warning(param_1,"CRC error");\n    uVar2 = 1;\n  }\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined1 auStack_438 [1032];" type_identifier (array_declarator "auStack_438 [1032]" identifier [ number_literal ]) ;) (declaration "long local_30;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_30 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_30 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (param_2 != 0) {\n    uVar3 = param_2 & 0x3ff;\n    do {\n      if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }\n      param_2 = param_2 - 0x400;\n      FUN_00119344(param_1,auStack_438,0x400);\n    } while (param_2 != 0);\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar3 = param_2 & 0x3ff;\n    do {\n      if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }\n      param_2 = param_2 - 0x400;\n      FUN_00119344(param_1,auStack_438,0x400);\n    } while (param_2 != 0);\n  }" { (expression_statement "uVar3 = param_2 & 0x3ff;" (assignment_expression "uVar3 = param_2 & 0x3ff" identifier = (binary_expression "param_2 & 0x3ff" identifier & number_literal)) ;) (do_statement "do {\n      if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }\n      param_2 = param_2 - 0x400;\n      FUN_00119344(param_1,auStack_438,0x400);\n    } while (param_2 != 0);" do (compound_statement "{\n      if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }\n      param_2 = param_2 - 0x400;\n      FUN_00119344(param_1,auStack_438,0x400);\n    }" { (if_statement "if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }" if (parenthesized_expression "(uVar3 == param_2)" ( (binary_expression "uVar3 == param_2" identifier == identifier) )) (compound_statement "{\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }" { (expression_statement "FUN_00119344(param_1,auStack_438,param_2);" (call_expression "FUN_00119344(param_1,auStack_438,param_2)" identifier (argument_list "(param_1,auStack_438,param_2)" ( identifier , identifier , identifier ))) ;) (break_statement "break;" break ;) })) (expression_statement "param_2 = param_2 - 0x400;" (assignment_expression "param_2 = param_2 - 0x400" identifier = (binary_expression "param_2 - 0x400" identifier - number_literal)) ;) (expression_statement "FUN_00119344(param_1,auStack_438,0x400);" (call_expression "FUN_00119344(param_1,auStack_438,0x400)" identifier (argument_list "(param_1,auStack_438,0x400)" ( identifier , identifier , number_literal ))) ;) }) while (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) ;) })) (expression_statement "uVar2 = FUN_00119371(param_1);" (assignment_expression "uVar2 = FUN_00119371(param_1)" identifier = (call_expression "FUN_00119371(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((int)uVar2 != 0) {\n    if ((*(byte *)(param_1 + 0x21b) & 0x20) == 0) {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);\n    }\n    else {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }\n    if ((bVar1 & 1) == 0) {\n                    \n      png_chunk_error(param_1,"CRC error");\n    }\n    png_chunk_warning(param_1,"CRC error");\n    uVar2 = 1;\n  }" if (parenthesized_expression "((int)uVar2 != 0)" ( (binary_expression "(int)uVar2 != 0" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) != number_literal) )) (compound_statement "{\n    if ((*(byte *)(param_1 + 0x21b) & 0x20) == 0) {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);\n    }\n    else {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }\n    if ((bVar1 & 1) == 0) {\n                    \n      png_chunk_error(param_1,"CRC error");\n    }\n    png_chunk_warning(param_1,"CRC error");\n    uVar2 = 1;\n  }" { (if_statement "if ((*(byte *)(param_1 + 0x21b) & 0x20) == 0) {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);\n    }\n    else {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }" if (parenthesized_expression "((*(byte *)(param_1 + 0x21b) & 0x20) == 0)" ( (binary_expression "(*(byte *)(param_1 + 0x21b) & 0x20) == 0" (parenthesized_expression "(*(byte *)(param_1 + 0x21b) & 0x20)" ( (binary_expression "*(byte *)(param_1 + 0x21b) & 0x20" (pointer_expression "*(byte *)(param_1 + 0x21b)" * (cast_expression "(byte *)(param_1 + 0x21b)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x21b)" ( (binary_expression "param_1 + 0x21b" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);\n    }" { (expression_statement "bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);" (assignment_expression "bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10)" identifier = (call_expression "(byte)(*(uint *)(param_1 + 0x130) >> 10)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(*(uint *)(param_1 + 0x130) >> 10)" ( (binary_expression "*(uint *)(param_1 + 0x130) >> 10" (pointer_expression "*(uint *)(param_1 + 0x130)" * (cast_expression "(uint *)(param_1 + 0x130)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x130)" ( (binary_expression "param_1 + 0x130" identifier + number_literal) )))) >> number_literal) )))) ;) }) (else_clause "else {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }" else (compound_statement "{\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }" { (expression_statement "bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;" (assignment_expression "bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1" identifier = (binary_expression "(byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1" (call_expression "(byte)(*(uint *)(param_1 + 0x130) >> 9)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(*(uint *)(param_1 + 0x130) >> 9)" ( (binary_expression "*(uint *)(param_1 + 0x130) >> 9" (pointer_expression "*(uint *)(param_1 + 0x130)" * (cast_expression "(uint *)(param_1 + 0x130)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x130)" ( (binary_expression "param_1 + 0x130" identifier + number_literal) )))) >> number_literal) ))) ^ number_literal)) ;) }))) (if_statement "if ((bVar1 & 1) == 0) {\n                    \n      png_chunk_error(param_1,"CRC error");\n    }" if (parenthesized_expression "((bVar1 & 1) == 0)" ( (binary_expression "(bVar1 & 1) == 0" (parenthesized_expression "(bVar1 & 1)" ( (binary_expression "bVar1 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n                    \n      png_chunk_error(param_1,"CRC error");\n    }" { (expression_statement "png_chunk_error(param_1,"CRC error");" (call_expression "png_chunk_error(param_1,"CRC error")" identifier (argument_list "(param_1,"CRC error")" ( identifier , (string_literal ""CRC error"" " string_content ") ))) ;) })) (expression_statement "png_chunk_warning(param_1,"CRC error");" (call_expression "png_chunk_warning(param_1,"CRC error")" identifier (argument_list "(param_1,"CRC error")" ( identifier , (string_literal ""CRC error"" " string_content ") ))) ;) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) })) (if_statement "if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_30 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_30 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) })) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (break_statement break ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) >> LIT) )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) >> LIT) ))) ^ LIT)) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "undefined8 FUN_0011942d(long param_1,uint param_2)\n\n{\n  byte bVar1;\n  undefined8 uVar2;\n  uint uVar3;\n  long in_FS_OFFSET;\n  undefined1 auStack_438 [1032];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 != 0) {\n    uVar3 = param_2 & 0x3ff;\n    do {\n      if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }\n      param_2 = param_2 - 0x400;\n      FUN_00119344(param_1,auStack_438,0x400);\n    } while (param_2 != 0);\n  }\n  uVar2 = FUN_00119371(param_1);\n  if ((int)uVar2 != 0) {\n    if ((*(byte *)(param_1 + 0x21b) & 0x20) == 0) {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);\n    }\n    else {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }\n    if ((bVar1 & 1) == 0) {\n                    \n      png_chunk_error(param_1,"CRC error");\n    }\n    png_chunk_warning(param_1,"CRC error");\n    uVar2 = 1;\n  }\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}" (type_identifier "undefined8") (function_declarator "FUN_0011942d(long param_1,uint param_2)" (identifier "FUN_0011942d") (parameter_list "(long param_1,uint param_2)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  byte bVar1;\n  undefined8 uVar2;\n  uint uVar3;\n  long in_FS_OFFSET;\n  undefined1 auStack_438 [1032];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 != 0) {\n    uVar3 = param_2 & 0x3ff;\n    do {\n      if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }\n      param_2 = param_2 - 0x400;\n      FUN_00119344(param_1,auStack_438,0x400);\n    } while (param_2 != 0);\n  }\n  uVar2 = FUN_00119371(param_1);\n  if ((int)uVar2 != 0) {\n    if ((*(byte *)(param_1 + 0x21b) & 0x20) == 0) {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);\n    }\n    else {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }\n    if ((bVar1 & 1) == 0) {\n                    \n      png_chunk_error(param_1,"CRC error");\n    }\n    png_chunk_warning(param_1,"CRC error");\n    uVar2 = 1;\n  }\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "undefined8 uVar2;" (type_identifier "undefined8") (identifier "uVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "undefined1 auStack_438 [1032];" (type_identifier "undefined1") (array_declarator "auStack_438 [1032]" (identifier "auStack_438") ([ "[") (number_literal "1032") (] "]")) (; ";")) (declaration "long local_30;" (sized_type_specifier "long" (long "long")) (identifier "local_30") (; ";")) (expression_statement "local_30 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_30 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_30") (= "=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (if_statement "if (param_2 != 0) {\n    uVar3 = param_2 & 0x3ff;\n    do {\n      if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }\n      param_2 = param_2 - 0x400;\n      FUN_00119344(param_1,auStack_438,0x400);\n    } while (param_2 != 0);\n  }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    uVar3 = param_2 & 0x3ff;\n    do {\n      if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }\n      param_2 = param_2 - 0x400;\n      FUN_00119344(param_1,auStack_438,0x400);\n    } while (param_2 != 0);\n  }" ({ "{") (expression_statement "uVar3 = param_2 & 0x3ff;" (assignment_expression "uVar3 = param_2 & 0x3ff" (identifier "uVar3") (= "=") (binary_expression "param_2 & 0x3ff" (identifier "param_2") (& "&") (number_literal "0x3ff"))) (; ";")) (do_statement "do {\n      if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }\n      param_2 = param_2 - 0x400;\n      FUN_00119344(param_1,auStack_438,0x400);\n    } while (param_2 != 0);" (do "do") (compound_statement "{\n      if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }\n      param_2 = param_2 - 0x400;\n      FUN_00119344(param_1,auStack_438,0x400);\n    }" ({ "{") (if_statement "if (uVar3 == param_2) {\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }" (if "if") (parenthesized_expression "(uVar3 == param_2)" (( "(") (binary_expression "uVar3 == param_2" (identifier "uVar3") (== "==") (identifier "param_2")) () ")")) (compound_statement "{\n        FUN_00119344(param_1,auStack_438,param_2);\n        break;\n      }" ({ "{") (expression_statement "FUN_00119344(param_1,auStack_438,param_2);" (call_expression "FUN_00119344(param_1,auStack_438,param_2)" (identifier "FUN_00119344") (argument_list "(param_1,auStack_438,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "auStack_438") (, ",") (identifier "param_2") () ")"))) (; ";")) (break_statement "break;" (break "break") (; ";")) (} "}"))) (expression_statement "param_2 = param_2 - 0x400;" (assignment_expression "param_2 = param_2 - 0x400" (identifier "param_2") (= "=") (binary_expression "param_2 - 0x400" (identifier "param_2") (- "-") (number_literal "0x400"))) (; ";")) (expression_statement "FUN_00119344(param_1,auStack_438,0x400);" (call_expression "FUN_00119344(param_1,auStack_438,0x400)" (identifier "FUN_00119344") (argument_list "(param_1,auStack_438,0x400)" (( "(") (identifier "param_1") (, ",") (identifier "auStack_438") (, ",") (number_literal "0x400") () ")"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (; ";")) (} "}"))) (expression_statement "uVar2 = FUN_00119371(param_1);" (assignment_expression "uVar2 = FUN_00119371(param_1)" (identifier "uVar2") (= "=") (call_expression "FUN_00119371(param_1)" (identifier "FUN_00119371") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if ((int)uVar2 != 0) {\n    if ((*(byte *)(param_1 + 0x21b) & 0x20) == 0) {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);\n    }\n    else {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }\n    if ((bVar1 & 1) == 0) {\n                    \n      png_chunk_error(param_1,"CRC error");\n    }\n    png_chunk_warning(param_1,"CRC error");\n    uVar2 = 1;\n  }" (if "if") (parenthesized_expression "((int)uVar2 != 0)" (( "(") (binary_expression "(int)uVar2 != 0" (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if ((*(byte *)(param_1 + 0x21b) & 0x20) == 0) {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);\n    }\n    else {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }\n    if ((bVar1 & 1) == 0) {\n                    \n      png_chunk_error(param_1,"CRC error");\n    }\n    png_chunk_warning(param_1,"CRC error");\n    uVar2 = 1;\n  }" ({ "{") (if_statement "if ((*(byte *)(param_1 + 0x21b) & 0x20) == 0) {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);\n    }\n    else {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }" (if "if") (parenthesized_expression "((*(byte *)(param_1 + 0x21b) & 0x20) == 0)" (( "(") (binary_expression "(*(byte *)(param_1 + 0x21b) & 0x20) == 0" (parenthesized_expression "(*(byte *)(param_1 + 0x21b) & 0x20)" (( "(") (binary_expression "*(byte *)(param_1 + 0x21b) & 0x20" (pointer_expression "*(byte *)(param_1 + 0x21b)" (* "*") (cast_expression "(byte *)(param_1 + 0x21b)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x21b)" (( "(") (binary_expression "param_1 + 0x21b" (identifier "param_1") (+ "+") (number_literal "0x21b")) () ")")))) (& "&") (number_literal "0x20")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);\n    }" ({ "{") (expression_statement "bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);" (assignment_expression "bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10)" (identifier "bVar1") (= "=") (call_expression "(byte)(*(uint *)(param_1 + 0x130) >> 10)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(*(uint *)(param_1 + 0x130) >> 10)" (( "(") (binary_expression "*(uint *)(param_1 + 0x130) >> 10" (pointer_expression "*(uint *)(param_1 + 0x130)" (* "*") (cast_expression "(uint *)(param_1 + 0x130)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x130)" (( "(") (binary_expression "param_1 + 0x130" (identifier "param_1") (+ "+") (number_literal "0x130")) () ")")))) (>> ">>") (number_literal "10")) () ")")))) (; ";")) (} "}")) (else_clause "else {\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }" (else "else") (compound_statement "{\n      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;\n    }" ({ "{") (expression_statement "bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;" (assignment_expression "bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1" (identifier "bVar1") (= "=") (binary_expression "(byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1" (call_expression "(byte)(*(uint *)(param_1 + 0x130) >> 9)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(*(uint *)(param_1 + 0x130) >> 9)" (( "(") (binary_expression "*(uint *)(param_1 + 0x130) >> 9" (pointer_expression "*(uint *)(param_1 + 0x130)" (* "*") (cast_expression "(uint *)(param_1 + 0x130)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x130)" (( "(") (binary_expression "param_1 + 0x130" (identifier "param_1") (+ "+") (number_literal "0x130")) () ")")))) (>> ">>") (number_literal "9")) () ")"))) (^ "^") (number_literal "1"))) (; ";")) (} "}")))) (if_statement "if ((bVar1 & 1) == 0) {\n                    \n      png_chunk_error(param_1,"CRC error");\n    }" (if "if") (parenthesized_expression "((bVar1 & 1) == 0)" (( "(") (binary_expression "(bVar1 & 1) == 0" (parenthesized_expression "(bVar1 & 1)" (( "(") (binary_expression "bVar1 & 1" (identifier "bVar1") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n      png_chunk_error(param_1,"CRC error");\n    }" ({ "{") (expression_statement "png_chunk_error(param_1,"CRC error");" (call_expression "png_chunk_error(param_1,"CRC error")" (identifier "png_chunk_error") (argument_list "(param_1,"CRC error")" (( "(") (identifier "param_1") (, ",") (string_literal ""CRC error"" (" """) (string_content "CRC error") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "png_chunk_warning(param_1,"CRC error");" (call_expression "png_chunk_warning(param_1,"CRC error")" (identifier "png_chunk_warning") (argument_list "(param_1,"CRC error")" (( "(") (identifier "param_1") (, ",") (string_literal ""CRC error"" (" """) (string_content "CRC error") (" """)) () ")"))) (; ";")) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" (identifier "uVar2") (= "=") (number_literal "1")) (; ";")) (} "}"))) (if_statement "if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" (if "if") (parenthesized_expression "(local_30 == *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_30 == *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_30") (== "==") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\n    return uVar2;\n  }" ({ "{") (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

int function_1(type_1 png_ptr,type_2 var_2)

{
  long var_10;
  type_3 var_7;
  int var_6;
  type_4 var_3;
  long var_1;
  type_5 tmpbuf [1024];
  
  var_10 = *(long *)(var_1 + 0x28);
  if (var_2 != 0) {
    var_3 = var_2 & 0x3ff;
    do {
      if (var_3 == var_2) {
        var_4(png_ptr,tmpbuf,var_2);
        break;
      }
      var_2 = var_2 - 0x400;
      var_4(png_ptr,tmpbuf,0x400);
    } while (var_2 != 0);
  }
  var_6 = var_5(png_ptr);
  if (var_6 != 0) {
    if ((png_ptr->chunk_name & 0x20000000) == 0) {
      var_7 = (type_3)(png_ptr->flags >> 10);
    }
    else {
      var_7 = (type_3)(png_ptr->flags >> 9) ^ 1;
    }
    if ((var_7 & 1) == 0) {
                    /* WARNING: Subroutine does not return */
      var_8(png_ptr,"CRC error");
    }
    var_9(png_ptr,"CRC error");
    var_6 = 1;
  }
  if (var_10 == *(long *)(var_1 + 0x28)) {
    return var_6;
  }
                    /* WARNING: Subroutine does not return */
  var_11();
}


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

undefined8 MASKED(long param_1,uint param_2)

{
  byte bVar1;
  undefined8 uVar2;
  uint uVar3;
  long in_FS_OFFSET;
  undefined1 auStack_438 [1032];
  long local_30;
  
  local_30 = *(long *)(in_FS_OFFSET + 0x28);
  if (param_2 != 0) {
    uVar3 = param_2 & 0x3ff;
    do {
      if (uVar3 == param_2) {
        FUN_00119344(param_1,auStack_438,param_2);
        break;
      }
      param_2 = param_2 - 0x400;
      FUN_00119344(param_1,auStack_438,0x400);
    } while (param_2 != 0);
  }
  uVar2 = FUN_00119371(param_1);
  if ((int)uVar2 != 0) {
    if ((*(byte *)(param_1 + 0x21b) & 0x20) == 0) {
      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 10);
    }
    else {
      bVar1 = (byte)(*(uint *)(param_1 + 0x130) >> 9) ^ 1;
    }
    if ((bVar1 & 1) == 0) {
                    /* WARNING: Subroutine does not return */
      png_chunk_error(param_1,"CRC error");
    }
    png_chunk_warning(param_1,"CRC error");
    uVar2 = 1;
  }
  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

