
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

png_voidp png_realloc_array(png_const_structrp png_ptr,png_const_voidp old_array,int old_elements,
                           int add_elements,size_t element_size)

{
  longlong lVar1;
  png_voidp __dest;
  
  if (((0 < add_elements && element_size != 0) && (-1 < old_elements)) &&
     ((old_array != (png_const_voidp)0x0 || (old_elements < 1)))) {
    if ((add_elements <= 0x7fffffff - old_elements) &&
       (lVar1 = (ulonglong)(uint)(add_elements + old_elements) * (ulonglong)element_size,
       (int)((ulonglong)lVar1 >> 0x20) == 0)) {
      __dest = png_malloc_base(png_ptr,(png_alloc_size_t)lVar1);
      if (__dest != (png_voidp)0x0) {
        if (old_elements != 0) {
          memcpy(__dest,old_array,old_elements * element_size);
        }
        memset((void *)(old_elements * element_size + (int)__dest),0,element_size * add_elements);
        return __dest;
      }
    }
    return (png_voidp)0x0;
  }
                    /* WARNING: Subroutine does not return */
  png_error(png_ptr,"internal error: array realloc");
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void * FUN_0001cfa0(undefined4 param_1,void *param_2,int param_3,int param_4,uint param_5)

{
  longlong lVar1;
  void *__dest;
  
  if (((0 < param_4 && param_5 != 0) && (-1 < param_3)) &&
     ((param_2 != (void *)0x0 || (param_3 < 1)))) {
    if ((param_4 <= 0x7fffffff - param_3) &&
       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,
       (int)((ulonglong)lVar1 >> 0x20) == 0)) {
      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);
      if (__dest != (void *)0x0) {
        if (param_3 != 0) {
          memcpy(__dest,param_2,param_3 * param_5);
        }
        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);
        return __dest;
      }
    }
    return (void *)0x0;
  }
                    /* WARNING: Subroutine does not return */
  png_error(param_1,"internal error: array realloc");
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014970
ADD EBX,0x36dd7
SUB ESP,0x1c
MOV EBP,dword ptr [ESP + 0x3c]
MOV EDI,dword ptr [ESP + 0x40]
MOV ESI,dword ptr [ESP + 0x38]
TEST EBP,EBP
SETLE DL
TEST EDI,EDI
SETZ AL
OR DL,AL
JNZ 0x0001d073
TEST ESI,ESI
JS 0x0001d073
MOV EAX,dword ptr [ESP + 0x34]
TEST EAX,EAX
JNZ 0x0001cfe8
TEST ESI,ESI
JG 0x0001d073
MOV EAX,0x7fffffff
SUB EAX,ESI
CMP EAX,EBP
JL 0x0001d040
LEA EAX,[EBP + ESI*0x1]
MUL EDI
JO 0x0001d040
SUB ESP,0x8
PUSH EAX
PUSH dword ptr [ESP + 0x3c]
CALL 0x0001cf00
ADD ESP,0x10
MOV EDX,EAX
TEST EAX,EAX
JZ 0x0001d040
MOV ECX,ESI
IMUL ECX,EDI
TEST ESI,ESI
JNZ 0x0001d050
IMUL EDI,EBP
MOV dword ptr [ESP + 0x8],EDX
ADD ECX,EDX
SUB ESP,0x4
PUSH EDI
PUSH 0x0
PUSH ECX
CALL 0x00014640
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x8]
ADD ESP,0x1c
POP EBX
MOV EAX,EDX
POP ESI
POP EDI
POP EBP
RET
ADD ESP,0x1c
XOR EDX,EDX
POP EBX
MOV EAX,EDX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
PUSH ECX
MOV dword ptr [ESP + 0x14],ECX
PUSH dword ptr [ESP + 0x3c]
PUSH EAX
MOV dword ptr [ESP + 0x18],EAX
CALL 0x00014190
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0xc]
MOV EDX,dword ptr [ESP + 0x8]
JMP 0x0001d01a
SUB ESP,0x8
LEA EAX,[EBX + 0xfffed8cc]
PUSH EAX
PUSH dword ptr [ESP + 0x3c]
CALL 0x00014460
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid * FUN_0001cfa0(undefined4 param_1,void *param_2,int param_3,int param_4,uint param_5)\n\n{\n  longlong lVar1;\n  void *__dest;\n  \n  if (((0 < param_4 && param_5 != 0) && (-1 < param_3)) &&\n     ((param_2 != (void *)0x0 || (param_3 < 1)))) {\n    if ((param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);\n      if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }\n    }\n    return (void *)0x0;\n  }\n                    /* WARNING: Subroutine does not return */\n  png_error(param_1,"internal error: array realloc");\n}\n\n" comment (function_definition "void * FUN_0001cfa0(undefined4 param_1,void *param_2,int param_3,int param_4,uint param_5)\n\n{\n  longlong lVar1;\n  void *__dest;\n  \n  if (((0 < param_4 && param_5 != 0) && (-1 < param_3)) &&\n     ((param_2 != (void *)0x0 || (param_3 < 1)))) {\n    if ((param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);\n      if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }\n    }\n    return (void *)0x0;\n  }\n                    /* WARNING: Subroutine does not return */\n  png_error(param_1,"internal error: array realloc");\n}" primitive_type (pointer_declarator "* FUN_0001cfa0(undefined4 param_1,void *param_2,int param_3,int param_4,uint param_5)" * (function_declarator "FUN_0001cfa0(undefined4 param_1,void *param_2,int param_3,int param_4,uint param_5)" identifier (parameter_list "(undefined4 param_1,void *param_2,int param_3,int param_4,uint param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "uint param_5" type_identifier identifier) )))) (compound_statement "{\n  longlong lVar1;\n  void *__dest;\n  \n  if (((0 < param_4 && param_5 != 0) && (-1 < param_3)) &&\n     ((param_2 != (void *)0x0 || (param_3 < 1)))) {\n    if ((param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);\n      if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }\n    }\n    return (void *)0x0;\n  }\n                    /* WARNING: Subroutine does not return */\n  png_error(param_1,"internal error: array realloc");\n}" { (declaration "longlong lVar1;" type_identifier identifier ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (if_statement "if (((0 < param_4 && param_5 != 0) && (-1 < param_3)) &&\n     ((param_2 != (void *)0x0 || (param_3 < 1)))) {\n    if ((param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);\n      if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }\n    }\n    return (void *)0x0;\n  }" if (parenthesized_expression "(((0 < param_4 && param_5 != 0) && (-1 < param_3)) &&\n     ((param_2 != (void *)0x0 || (param_3 < 1))))" ( (binary_expression "((0 < param_4 && param_5 != 0) && (-1 < param_3)) &&\n     ((param_2 != (void *)0x0 || (param_3 < 1)))" (parenthesized_expression "((0 < param_4 && param_5 != 0) && (-1 < param_3))" ( (binary_expression "(0 < param_4 && param_5 != 0) && (-1 < param_3)" (parenthesized_expression "(0 < param_4 && param_5 != 0)" ( (binary_expression "0 < param_4 && param_5 != 0" (binary_expression "0 < param_4" number_literal < identifier) && (binary_expression "param_5 != 0" identifier != number_literal)) )) && (parenthesized_expression "(-1 < param_3)" ( (binary_expression "-1 < param_3" number_literal < identifier) ))) )) && (parenthesized_expression "((param_2 != (void *)0x0 || (param_3 < 1)))" ( (parenthesized_expression "(param_2 != (void *)0x0 || (param_3 < 1))" ( (binary_expression "param_2 != (void *)0x0 || (param_3 < 1)" (binary_expression "param_2 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) || (parenthesized_expression "(param_3 < 1)" ( (binary_expression "param_3 < 1" identifier < number_literal) ))) )) ))) )) (compound_statement "{\n    if ((param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);\n      if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }\n    }\n    return (void *)0x0;\n  }" { (if_statement "if ((param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);\n      if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }\n    }" if (parenthesized_expression "((param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0))" ( (binary_expression "(param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)" (parenthesized_expression "(param_4 <= 0x7fffffff - param_3)" ( (binary_expression "param_4 <= 0x7fffffff - param_3" identifier <= (binary_expression "0x7fffffff - param_3" number_literal - identifier)) )) && (parenthesized_expression "(lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)" ( (comma_expression "lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0" (assignment_expression "lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5" identifier = (binary_expression "(ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5" (call_expression "(ulonglong)(uint)(param_4 + param_3)" (call_expression "(ulonglong)(uint)" (parenthesized_expression "(ulonglong)" ( identifier )) (argument_list "(uint)" ( identifier ))) (argument_list "(param_4 + param_3)" ( (binary_expression "param_4 + param_3" identifier + identifier) ))) * (cast_expression "(ulonglong)param_5" ( (type_descriptor "ulonglong" type_identifier) ) identifier))) , (binary_expression "(int)((ulonglong)lVar1 >> 0x20) == 0" (cast_expression "(int)((ulonglong)lVar1 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)lVar1 >> 0x20)" ( (binary_expression "(ulonglong)lVar1 >> 0x20" (cast_expression "(ulonglong)lVar1" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) ))) == number_literal)) ))) )) (compound_statement "{\n      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);\n      if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }\n    }" { (expression_statement "__dest = (void *)FUN_0001cf00(param_1,(int)lVar1);" (assignment_expression "__dest = (void *)FUN_0001cf00(param_1,(int)lVar1)" identifier = (cast_expression "(void *)FUN_0001cf00(param_1,(int)lVar1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001cf00(param_1,(int)lVar1)" identifier (argument_list "(param_1,(int)lVar1)" ( identifier , (cast_expression "(int)lVar1" ( (type_descriptor "int" primitive_type) ) identifier) ))))) ;) (if_statement "if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }" if (parenthesized_expression "(__dest != (void *)0x0)" ( (binary_expression "__dest != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }" { (if_statement "if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n          memcpy(__dest,param_2,param_3 * param_5);\n        }" { (expression_statement "memcpy(__dest,param_2,param_3 * param_5);" (call_expression "memcpy(__dest,param_2,param_3 * param_5)" identifier (argument_list "(__dest,param_2,param_3 * param_5)" ( identifier , identifier , (binary_expression "param_3 * param_5" identifier * identifier) ))) ;) })) (expression_statement "memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);" (call_expression "memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4)" identifier (argument_list "((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4)" ( (cast_expression "(void *)(param_3 * param_5 + (int)__dest)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 * param_5 + (int)__dest)" ( (binary_expression "param_3 * param_5 + (int)__dest" (binary_expression "param_3 * param_5" identifier * identifier) + (cast_expression "(int)__dest" ( (type_descriptor "int" primitive_type) ) identifier)) ))) , number_literal , (binary_expression "param_5 * param_4" identifier * identifier) ))) ;) (return_statement "return __dest;" return identifier ;) })) })) (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) comment (expression_statement "png_error(param_1,"internal error: array realloc");" (call_expression "png_error(param_1,"internal error: array realloc")" identifier (argument_list "(param_1,"internal error: array realloc")" ( identifier , (string_literal ""internal error: array realloc"" " string_content ") ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\npng_voidp png_realloc_array(png_const_structrp png_ptr,png_const_voidp old_array,int old_elements,\n                           int add_elements,size_t element_size)\n\n{\n  longlong lVar1;\n  png_voidp __dest;\n  \n  if (((0 < add_elements && element_size != 0) && (-1 < old_elements)) &&\n     ((old_array != (png_const_voidp)0x0 || (old_elements < 1)))) {\n    if ((add_elements <= 0x7fffffff - old_elements) &&\n       (lVar1 = (ulonglong)(uint)(add_elements + old_elements) * (ulonglong)element_size,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = png_malloc_base(png_ptr,(png_alloc_size_t)lVar1);\n      if (__dest != (png_voidp)0x0) {\n        if (old_elements != 0) {\n          memcpy(__dest,old_array,old_elements * element_size);\n        }\n        memset((void *)(old_elements * element_size + (int)__dest),0,element_size * add_elements);\n        return __dest;\n      }\n    }\n    return (png_voidp)0x0;\n  }\n                    /* WARNING: Subroutine does not return */\n  png_error(png_ptr,"internal error: array realloc");\n}\n\n" comment comment (function_definition "png_voidp png_realloc_array(png_const_structrp png_ptr,png_const_voidp old_array,int old_elements,\n                           int add_elements,size_t element_size)\n\n{\n  longlong lVar1;\n  png_voidp __dest;\n  \n  if (((0 < add_elements && element_size != 0) && (-1 < old_elements)) &&\n     ((old_array != (png_const_voidp)0x0 || (old_elements < 1)))) {\n    if ((add_elements <= 0x7fffffff - old_elements) &&\n       (lVar1 = (ulonglong)(uint)(add_elements + old_elements) * (ulonglong)element_size,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = png_malloc_base(png_ptr,(png_alloc_size_t)lVar1);\n      if (__dest != (png_voidp)0x0) {\n        if (old_elements != 0) {\n          memcpy(__dest,old_array,old_elements * element_size);\n        }\n        memset((void *)(old_elements * element_size + (int)__dest),0,element_size * add_elements);\n        return __dest;\n      }\n    }\n    return (png_voidp)0x0;\n  }\n                    /* WARNING: Subroutine does not return */\n  png_error(png_ptr,"internal error: array realloc");\n}" type_identifier (function_declarator "png_realloc_array(png_const_structrp png_ptr,png_const_voidp old_array,int old_elements,\n                           int add_elements,size_t element_size)" identifier (parameter_list "(png_const_structrp png_ptr,png_const_voidp old_array,int old_elements,\n                           int add_elements,size_t element_size)" ( (parameter_declaration "png_const_structrp png_ptr" type_identifier identifier) , (parameter_declaration "png_const_voidp old_array" type_identifier identifier) , (parameter_declaration "int old_elements" primitive_type identifier) , (parameter_declaration "int add_elements" primitive_type identifier) , (parameter_declaration "size_t element_size" primitive_type identifier) ))) (compound_statement "{\n  longlong lVar1;\n  png_voidp __dest;\n  \n  if (((0 < add_elements && element_size != 0) && (-1 < old_elements)) &&\n     ((old_array != (png_const_voidp)0x0 || (old_elements < 1)))) {\n    if ((add_elements <= 0x7fffffff - old_elements) &&\n       (lVar1 = (ulonglong)(uint)(add_elements + old_elements) * (ulonglong)element_size,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = png_malloc_base(png_ptr,(png_alloc_size_t)lVar1);\n      if (__dest != (png_voidp)0x0) {\n        if (old_elements != 0) {\n          memcpy(__dest,old_array,old_elements * element_size);\n        }\n        memset((void *)(old_elements * element_size + (int)__dest),0,element_size * add_elements);\n        return __dest;\n      }\n    }\n    return (png_voidp)0x0;\n  }\n                    /* WARNING: Subroutine does not return */\n  png_error(png_ptr,"internal error: array realloc");\n}" { (declaration "longlong lVar1;" type_identifier identifier ;) (declaration "png_voidp __dest;" type_identifier identifier ;) (if_statement "if (((0 < add_elements && element_size != 0) && (-1 < old_elements)) &&\n     ((old_array != (png_const_voidp)0x0 || (old_elements < 1)))) {\n    if ((add_elements <= 0x7fffffff - old_elements) &&\n       (lVar1 = (ulonglong)(uint)(add_elements + old_elements) * (ulonglong)element_size,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = png_malloc_base(png_ptr,(png_alloc_size_t)lVar1);\n      if (__dest != (png_voidp)0x0) {\n        if (old_elements != 0) {\n          memcpy(__dest,old_array,old_elements * element_size);\n        }\n        memset((void *)(old_elements * element_size + (int)__dest),0,element_size * add_elements);\n        return __dest;\n      }\n    }\n    return (png_voidp)0x0;\n  }" if (parenthesized_expression "(((0 < add_elements && element_size != 0) && (-1 < old_elements)) &&\n     ((old_array != (png_const_voidp)0x0 || (old_elements < 1))))" ( (binary_expression "((0 < add_elements && element_size != 0) && (-1 < old_elements)) &&\n     ((old_array != (png_const_voidp)0x0 || (old_elements < 1)))" (parenthesized_expression "((0 < add_elements && element_size != 0) && (-1 < old_elements))" ( (binary_expression "(0 < add_elements && element_size != 0) && (-1 < old_elements)" (parenthesized_expression "(0 < add_elements && element_size != 0)" ( (binary_expression "0 < add_elements && element_size != 0" (binary_expression "0 < add_elements" number_literal < identifier) && (binary_expression "element_size != 0" identifier != number_literal)) )) && (parenthesized_expression "(-1 < old_elements)" ( (binary_expression "-1 < old_elements" number_literal < identifier) ))) )) && (parenthesized_expression "((old_array != (png_const_voidp)0x0 || (old_elements < 1)))" ( (parenthesized_expression "(old_array != (png_const_voidp)0x0 || (old_elements < 1))" ( (binary_expression "old_array != (png_const_voidp)0x0 || (old_elements < 1)" (binary_expression "old_array != (png_const_voidp)0x0" identifier != (cast_expression "(png_const_voidp)0x0" ( (type_descriptor "png_const_voidp" type_identifier) ) number_literal)) || (parenthesized_expression "(old_elements < 1)" ( (binary_expression "old_elements < 1" identifier < number_literal) ))) )) ))) )) (compound_statement "{\n    if ((add_elements <= 0x7fffffff - old_elements) &&\n       (lVar1 = (ulonglong)(uint)(add_elements + old_elements) * (ulonglong)element_size,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = png_malloc_base(png_ptr,(png_alloc_size_t)lVar1);\n      if (__dest != (png_voidp)0x0) {\n        if (old_elements != 0) {\n          memcpy(__dest,old_array,old_elements * element_size);\n        }\n        memset((void *)(old_elements * element_size + (int)__dest),0,element_size * add_elements);\n        return __dest;\n      }\n    }\n    return (png_voidp)0x0;\n  }" { (if_statement "if ((add_elements <= 0x7fffffff - old_elements) &&\n       (lVar1 = (ulonglong)(uint)(add_elements + old_elements) * (ulonglong)element_size,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = png_malloc_base(png_ptr,(png_alloc_size_t)lVar1);\n      if (__dest != (png_voidp)0x0) {\n        if (old_elements != 0) {\n          memcpy(__dest,old_array,old_elements * element_size);\n        }\n        memset((void *)(old_elements * element_size + (int)__dest),0,element_size * add_elements);\n        return __dest;\n      }\n    }" if (parenthesized_expression "((add_elements <= 0x7fffffff - old_elements) &&\n       (lVar1 = (ulonglong)(uint)(add_elements + old_elements) * (ulonglong)element_size,\n       (int)((ulonglong)lVar1 >> 0x20) == 0))" ( (binary_expression "(add_elements <= 0x7fffffff - old_elements) &&\n       (lVar1 = (ulonglong)(uint)(add_elements + old_elements) * (ulonglong)element_size,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)" (parenthesized_expression "(add_elements <= 0x7fffffff - old_elements)" ( (binary_expression "add_elements <= 0x7fffffff - old_elements" identifier <= (binary_expression "0x7fffffff - old_elements" number_literal - identifier)) )) && (parenthesized_expression "(lVar1 = (ulonglong)(uint)(add_elements + old_elements) * (ulonglong)element_size,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)" ( (comma_expression "lVar1 = (ulonglong)(uint)(add_elements + old_elements) * (ulonglong)element_size,\n       (int)((ulonglong)lVar1 >> 0x20) == 0" (assignment_expression "lVar1 = (ulonglong)(uint)(add_elements + old_elements) * (ulonglong)element_size" identifier = (binary_expression "(ulonglong)(uint)(add_elements + old_elements) * (ulonglong)element_size" (call_expression "(ulonglong)(uint)(add_elements + old_elements)" (call_expression "(ulonglong)(uint)" (parenthesized_expression "(ulonglong)" ( identifier )) (argument_list "(uint)" ( identifier ))) (argument_list "(add_elements + old_elements)" ( (binary_expression "add_elements + old_elements" identifier + identifier) ))) * (cast_expression "(ulonglong)element_size" ( (type_descriptor "ulonglong" type_identifier) ) identifier))) , (binary_expression "(int)((ulonglong)lVar1 >> 0x20) == 0" (cast_expression "(int)((ulonglong)lVar1 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)lVar1 >> 0x20)" ( (binary_expression "(ulonglong)lVar1 >> 0x20" (cast_expression "(ulonglong)lVar1" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) ))) == number_literal)) ))) )) (compound_statement "{\n      __dest = png_malloc_base(png_ptr,(png_alloc_size_t)lVar1);\n      if (__dest != (png_voidp)0x0) {\n        if (old_elements != 0) {\n          memcpy(__dest,old_array,old_elements * element_size);\n        }\n        memset((void *)(old_elements * element_size + (int)__dest),0,element_size * add_elements);\n        return __dest;\n      }\n    }" { (expression_statement "__dest = png_malloc_base(png_ptr,(png_alloc_size_t)lVar1);" (assignment_expression "__dest = png_malloc_base(png_ptr,(png_alloc_size_t)lVar1)" identifier = (call_expression "png_malloc_base(png_ptr,(png_alloc_size_t)lVar1)" identifier (argument_list "(png_ptr,(png_alloc_size_t)lVar1)" ( identifier , (cast_expression "(png_alloc_size_t)lVar1" ( (type_descriptor "png_alloc_size_t" type_identifier) ) identifier) )))) ;) (if_statement "if (__dest != (png_voidp)0x0) {\n        if (old_elements != 0) {\n          memcpy(__dest,old_array,old_elements * element_size);\n        }\n        memset((void *)(old_elements * element_size + (int)__dest),0,element_size * add_elements);\n        return __dest;\n      }" if (parenthesized_expression "(__dest != (png_voidp)0x0)" ( (binary_expression "__dest != (png_voidp)0x0" identifier != (cast_expression "(png_voidp)0x0" ( (type_descriptor "png_voidp" type_identifier) ) number_literal)) )) (compound_statement "{\n        if (old_elements != 0) {\n          memcpy(__dest,old_array,old_elements * element_size);\n        }\n        memset((void *)(old_elements * element_size + (int)__dest),0,element_size * add_elements);\n        return __dest;\n      }" { (if_statement "if (old_elements != 0) {\n          memcpy(__dest,old_array,old_elements * element_size);\n        }" if (parenthesized_expression "(old_elements != 0)" ( (binary_expression "old_elements != 0" identifier != number_literal) )) (compound_statement "{\n          memcpy(__dest,old_array,old_elements * element_size);\n        }" { (expression_statement "memcpy(__dest,old_array,old_elements * element_size);" (call_expression "memcpy(__dest,old_array,old_elements * element_size)" identifier (argument_list "(__dest,old_array,old_elements * element_size)" ( identifier , identifier , (binary_expression "old_elements * element_size" identifier * identifier) ))) ;) })) (expression_statement "memset((void *)(old_elements * element_size + (int)__dest),0,element_size * add_elements);" (call_expression "memset((void *)(old_elements * element_size + (int)__dest),0,element_size * add_elements)" identifier (argument_list "((void *)(old_elements * element_size + (int)__dest),0,element_size * add_elements)" ( (cast_expression "(void *)(old_elements * element_size + (int)__dest)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(old_elements * element_size + (int)__dest)" ( (binary_expression "old_elements * element_size + (int)__dest" (binary_expression "old_elements * element_size" identifier * identifier) + (cast_expression "(int)__dest" ( (type_descriptor "int" primitive_type) ) identifier)) ))) , number_literal , (binary_expression "element_size * add_elements" identifier * identifier) ))) ;) (return_statement "return __dest;" return identifier ;) })) })) (return_statement "return (png_voidp)0x0;" return (cast_expression "(png_voidp)0x0" ( (type_descriptor "png_voidp" type_identifier) ) number_literal) ;) })) comment (expression_statement "png_error(png_ptr,"internal error: array realloc");" (call_expression "png_error(png_ptr,"internal error: array realloc")" identifier (argument_list "(png_ptr,"internal error: array realloc")" ( identifier , (string_literal ""internal error: array realloc"" " string_content ") ))) ;) })))
(translation_unit "void * FUN_0001cfa0(undefined4 param_1,void *param_2,int param_3,int param_4,uint param_5)\n\n{\n  longlong lVar1;\n  void *__dest;\n  \n  if (((0 < param_4 && param_5 != 0) && (-1 < param_3)) &&\n     ((param_2 != (void *)0x0 || (param_3 < 1)))) {\n    if ((param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);\n      if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }\n    }\n    return (void *)0x0;\n  }\n                    \n  png_error(param_1,"internal error: array realloc");\n}\n\n" (function_definition "void * FUN_0001cfa0(undefined4 param_1,void *param_2,int param_3,int param_4,uint param_5)\n\n{\n  longlong lVar1;\n  void *__dest;\n  \n  if (((0 < param_4 && param_5 != 0) && (-1 < param_3)) &&\n     ((param_2 != (void *)0x0 || (param_3 < 1)))) {\n    if ((param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);\n      if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }\n    }\n    return (void *)0x0;\n  }\n                    \n  png_error(param_1,"internal error: array realloc");\n}" primitive_type (pointer_declarator "* FUN_0001cfa0(undefined4 param_1,void *param_2,int param_3,int param_4,uint param_5)" * (function_declarator "FUN_0001cfa0(undefined4 param_1,void *param_2,int param_3,int param_4,uint param_5)" identifier (parameter_list "(undefined4 param_1,void *param_2,int param_3,int param_4,uint param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "uint param_5" type_identifier identifier) )))) (compound_statement "{\n  longlong lVar1;\n  void *__dest;\n  \n  if (((0 < param_4 && param_5 != 0) && (-1 < param_3)) &&\n     ((param_2 != (void *)0x0 || (param_3 < 1)))) {\n    if ((param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);\n      if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }\n    }\n    return (void *)0x0;\n  }\n                    \n  png_error(param_1,"internal error: array realloc");\n}" { (declaration "longlong lVar1;" type_identifier identifier ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (if_statement "if (((0 < param_4 && param_5 != 0) && (-1 < param_3)) &&\n     ((param_2 != (void *)0x0 || (param_3 < 1)))) {\n    if ((param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);\n      if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }\n    }\n    return (void *)0x0;\n  }" if (parenthesized_expression "(((0 < param_4 && param_5 != 0) && (-1 < param_3)) &&\n     ((param_2 != (void *)0x0 || (param_3 < 1))))" ( (binary_expression "((0 < param_4 && param_5 != 0) && (-1 < param_3)) &&\n     ((param_2 != (void *)0x0 || (param_3 < 1)))" (parenthesized_expression "((0 < param_4 && param_5 != 0) && (-1 < param_3))" ( (binary_expression "(0 < param_4 && param_5 != 0) && (-1 < param_3)" (parenthesized_expression "(0 < param_4 && param_5 != 0)" ( (binary_expression "0 < param_4 && param_5 != 0" (binary_expression "0 < param_4" number_literal < identifier) && (binary_expression "param_5 != 0" identifier != number_literal)) )) && (parenthesized_expression "(-1 < param_3)" ( (binary_expression "-1 < param_3" number_literal < identifier) ))) )) && (parenthesized_expression "((param_2 != (void *)0x0 || (param_3 < 1)))" ( (parenthesized_expression "(param_2 != (void *)0x0 || (param_3 < 1))" ( (binary_expression "param_2 != (void *)0x0 || (param_3 < 1)" (binary_expression "param_2 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) || (parenthesized_expression "(param_3 < 1)" ( (binary_expression "param_3 < 1" identifier < number_literal) ))) )) ))) )) (compound_statement "{\n    if ((param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);\n      if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }\n    }\n    return (void *)0x0;\n  }" { (if_statement "if ((param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);\n      if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }\n    }" if (parenthesized_expression "((param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0))" ( (binary_expression "(param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)" (parenthesized_expression "(param_4 <= 0x7fffffff - param_3)" ( (binary_expression "param_4 <= 0x7fffffff - param_3" identifier <= (binary_expression "0x7fffffff - param_3" number_literal - identifier)) )) && (parenthesized_expression "(lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)" ( (comma_expression "lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0" (assignment_expression "lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5" identifier = (binary_expression "(ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5" (call_expression "(ulonglong)(uint)(param_4 + param_3)" (call_expression "(ulonglong)(uint)" (parenthesized_expression "(ulonglong)" ( identifier )) (argument_list "(uint)" ( identifier ))) (argument_list "(param_4 + param_3)" ( (binary_expression "param_4 + param_3" identifier + identifier) ))) * (cast_expression "(ulonglong)param_5" ( (type_descriptor "ulonglong" type_identifier) ) identifier))) , (binary_expression "(int)((ulonglong)lVar1 >> 0x20) == 0" (cast_expression "(int)((ulonglong)lVar1 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)lVar1 >> 0x20)" ( (binary_expression "(ulonglong)lVar1 >> 0x20" (cast_expression "(ulonglong)lVar1" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) ))) == number_literal)) ))) )) (compound_statement "{\n      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);\n      if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }\n    }" { (expression_statement "__dest = (void *)FUN_0001cf00(param_1,(int)lVar1);" (assignment_expression "__dest = (void *)FUN_0001cf00(param_1,(int)lVar1)" identifier = (cast_expression "(void *)FUN_0001cf00(param_1,(int)lVar1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001cf00(param_1,(int)lVar1)" identifier (argument_list "(param_1,(int)lVar1)" ( identifier , (cast_expression "(int)lVar1" ( (type_descriptor "int" primitive_type) ) identifier) ))))) ;) (if_statement "if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }" if (parenthesized_expression "(__dest != (void *)0x0)" ( (binary_expression "__dest != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }" { (if_statement "if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n          memcpy(__dest,param_2,param_3 * param_5);\n        }" { (expression_statement "memcpy(__dest,param_2,param_3 * param_5);" (call_expression "memcpy(__dest,param_2,param_3 * param_5)" identifier (argument_list "(__dest,param_2,param_3 * param_5)" ( identifier , identifier , (binary_expression "param_3 * param_5" identifier * identifier) ))) ;) })) (expression_statement "memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);" (call_expression "memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4)" identifier (argument_list "((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4)" ( (cast_expression "(void *)(param_3 * param_5 + (int)__dest)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 * param_5 + (int)__dest)" ( (binary_expression "param_3 * param_5 + (int)__dest" (binary_expression "param_3 * param_5" identifier * identifier) + (cast_expression "(int)__dest" ( (type_descriptor "int" primitive_type) ) identifier)) ))) , number_literal , (binary_expression "param_5 * param_4" identifier * identifier) ))) ;) (return_statement "return __dest;" return identifier ;) })) })) (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "png_error(param_1,"internal error: array realloc");" (call_expression "png_error(param_1,"internal error: array realloc")" identifier (argument_list "(param_1,"internal error: array realloc")" ( identifier , (string_literal ""internal error: array realloc"" " string_content ") ))) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression LIT < IDENT) && (binary_expression IDENT != LIT)) )) && (parenthesized_expression ( (binary_expression LIT < IDENT) ))) )) && (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) || (parenthesized_expression ( (binary_expression IDENT < LIT) ))) )) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT <= (binary_expression LIT - IDENT)) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression (call_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( IDENT ))) (argument_list ( (binary_expression IDENT + IDENT) ))) * (cast_expression ( (type_descriptor TYPE) ) IDENT))) , (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) ))) == LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE) ) IDENT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT * IDENT) ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT * IDENT) + (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) , LIT , (binary_expression IDENT * IDENT) ))) ;) (return_statement return IDENT ;) })) })) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") ))) ;) })))
(function_definition "void * FUN_0001cfa0(undefined4 param_1,void *param_2,int param_3,int param_4,uint param_5)\n\n{\n  longlong lVar1;\n  void *__dest;\n  \n  if (((0 < param_4 && param_5 != 0) && (-1 < param_3)) &&\n     ((param_2 != (void *)0x0 || (param_3 < 1)))) {\n    if ((param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);\n      if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }\n    }\n    return (void *)0x0;\n  }\n                    \n  png_error(param_1,"internal error: array realloc");\n}" (primitive_type "void") (pointer_declarator "* FUN_0001cfa0(undefined4 param_1,void *param_2,int param_3,int param_4,uint param_5)" (* "*") (function_declarator "FUN_0001cfa0(undefined4 param_1,void *param_2,int param_3,int param_4,uint param_5)" (identifier "FUN_0001cfa0") (parameter_list "(undefined4 param_1,void *param_2,int param_3,int param_4,uint param_5)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "void *param_2" (primitive_type "void") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) (, ",") (parameter_declaration "uint param_5" (type_identifier "uint") (identifier "param_5")) () ")")))) (compound_statement "{\n  longlong lVar1;\n  void *__dest;\n  \n  if (((0 < param_4 && param_5 != 0) && (-1 < param_3)) &&\n     ((param_2 != (void *)0x0 || (param_3 < 1)))) {\n    if ((param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);\n      if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }\n    }\n    return (void *)0x0;\n  }\n                    \n  png_error(param_1,"internal error: array realloc");\n}" ({ "{") (declaration "longlong lVar1;" (type_identifier "longlong") (identifier "lVar1") (; ";")) (declaration "void *__dest;" (primitive_type "void") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (if_statement "if (((0 < param_4 && param_5 != 0) && (-1 < param_3)) &&\n     ((param_2 != (void *)0x0 || (param_3 < 1)))) {\n    if ((param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);\n      if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }\n    }\n    return (void *)0x0;\n  }" (if "if") (parenthesized_expression "(((0 < param_4 && param_5 != 0) && (-1 < param_3)) &&\n     ((param_2 != (void *)0x0 || (param_3 < 1))))" (( "(") (binary_expression "((0 < param_4 && param_5 != 0) && (-1 < param_3)) &&\n     ((param_2 != (void *)0x0 || (param_3 < 1)))" (parenthesized_expression "((0 < param_4 && param_5 != 0) && (-1 < param_3))" (( "(") (binary_expression "(0 < param_4 && param_5 != 0) && (-1 < param_3)" (parenthesized_expression "(0 < param_4 && param_5 != 0)" (( "(") (binary_expression "0 < param_4 && param_5 != 0" (binary_expression "0 < param_4" (number_literal "0") (< "<") (identifier "param_4")) (&& "&&") (binary_expression "param_5 != 0" (identifier "param_5") (!= "!=") (number_literal "0"))) () ")")) (&& "&&") (parenthesized_expression "(-1 < param_3)" (( "(") (binary_expression "-1 < param_3" (number_literal "-1") (< "<") (identifier "param_3")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "((param_2 != (void *)0x0 || (param_3 < 1)))" (( "(") (parenthesized_expression "(param_2 != (void *)0x0 || (param_3 < 1))" (( "(") (binary_expression "param_2 != (void *)0x0 || (param_3 < 1)" (binary_expression "param_2 != (void *)0x0" (identifier "param_2") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (|| "||") (parenthesized_expression "(param_3 < 1)" (( "(") (binary_expression "param_3 < 1" (identifier "param_3") (< "<") (number_literal "1")) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\n    if ((param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);\n      if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }\n    }\n    return (void *)0x0;\n  }" ({ "{") (if_statement "if ((param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)) {\n      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);\n      if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }\n    }" (if "if") (parenthesized_expression "((param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0))" (( "(") (binary_expression "(param_4 <= 0x7fffffff - param_3) &&\n       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)" (parenthesized_expression "(param_4 <= 0x7fffffff - param_3)" (( "(") (binary_expression "param_4 <= 0x7fffffff - param_3" (identifier "param_4") (<= "<=") (binary_expression "0x7fffffff - param_3" (number_literal "0x7fffffff") (- "-") (identifier "param_3"))) () ")")) (&& "&&") (parenthesized_expression "(lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0)" (( "(") (comma_expression "lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,\n       (int)((ulonglong)lVar1 >> 0x20) == 0" (assignment_expression "lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5" (identifier "lVar1") (= "=") (binary_expression "(ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5" (call_expression "(ulonglong)(uint)(param_4 + param_3)" (call_expression "(ulonglong)(uint)" (parenthesized_expression "(ulonglong)" (( "(") (identifier "ulonglong") () ")")) (argument_list "(uint)" (( "(") (identifier "uint") () ")"))) (argument_list "(param_4 + param_3)" (( "(") (binary_expression "param_4 + param_3" (identifier "param_4") (+ "+") (identifier "param_3")) () ")"))) (* "*") (cast_expression "(ulonglong)param_5" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "param_5")))) (, ",") (binary_expression "(int)((ulonglong)lVar1 >> 0x20) == 0" (cast_expression "(int)((ulonglong)lVar1 >> 0x20)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((ulonglong)lVar1 >> 0x20)" (( "(") (binary_expression "(ulonglong)lVar1 >> 0x20" (cast_expression "(ulonglong)lVar1" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "lVar1")) (>> ">>") (number_literal "0x20")) () ")"))) (== "==") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);\n      if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }\n    }" ({ "{") (expression_statement "__dest = (void *)FUN_0001cf00(param_1,(int)lVar1);" (assignment_expression "__dest = (void *)FUN_0001cf00(param_1,(int)lVar1)" (identifier "__dest") (= "=") (cast_expression "(void *)FUN_0001cf00(param_1,(int)lVar1)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001cf00(param_1,(int)lVar1)" (identifier "FUN_0001cf00") (argument_list "(param_1,(int)lVar1)" (( "(") (identifier "param_1") (, ",") (cast_expression "(int)lVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "lVar1")) () ")"))))) (; ";")) (if_statement "if (__dest != (void *)0x0) {\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }" (if "if") (parenthesized_expression "(__dest != (void *)0x0)" (( "(") (binary_expression "__dest != (void *)0x0" (identifier "__dest") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }\n        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);\n        return __dest;\n      }" ({ "{") (if_statement "if (param_3 != 0) {\n          memcpy(__dest,param_2,param_3 * param_5);\n        }" (if "if") (parenthesized_expression "(param_3 != 0)" (( "(") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          memcpy(__dest,param_2,param_3 * param_5);\n        }" ({ "{") (expression_statement "memcpy(__dest,param_2,param_3 * param_5);" (call_expression "memcpy(__dest,param_2,param_3 * param_5)" (identifier "memcpy") (argument_list "(__dest,param_2,param_3 * param_5)" (( "(") (identifier "__dest") (, ",") (identifier "param_2") (, ",") (binary_expression "param_3 * param_5" (identifier "param_3") (* "*") (identifier "param_5")) () ")"))) (; ";")) (} "}"))) (expression_statement "memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);" (call_expression "memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4)" (identifier "memset") (argument_list "((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4)" (( "(") (cast_expression "(void *)(param_3 * param_5 + (int)__dest)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 * param_5 + (int)__dest)" (( "(") (binary_expression "param_3 * param_5 + (int)__dest" (binary_expression "param_3 * param_5" (identifier "param_3") (* "*") (identifier "param_5")) (+ "+") (cast_expression "(int)__dest" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__dest"))) () ")"))) (, ",") (number_literal "0") (, ",") (binary_expression "param_5 * param_4" (identifier "param_5") (* "*") (identifier "param_4")) () ")"))) (; ";")) (return_statement "return __dest;" (return "return") (identifier "__dest") (; ";")) (} "}"))) (} "}"))) (return_statement "return (void *)0x0;" (return "return") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (expression_statement "png_error(param_1,"internal error: array realloc");" (call_expression "png_error(param_1,"internal error: array realloc")" (identifier "png_error") (argument_list "(param_1,"internal error: array realloc")" (( "(") (identifier "param_1") (, ",") (string_literal ""internal error: array realloc"" (" """) (string_content "internal error: array realloc") (" """)) () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

type_1 function_1(type_2 png_ptr,type_3 var_4,int var_3,
                           int var_1,size_t var_2)

{
  type_4 lVar1;
  type_1 var_6;
  
  if (((0 < var_1 && var_2 != 0) && (-1 < var_3)) &&
     ((var_4 != (type_3)0x0 || (var_3 < 1)))) {
    if ((var_1 <= 0x7fffffff - var_3) &&
       (lVar1 = (type_5)(uint)(var_1 + var_3) * (type_5)var_2,
       (int)((type_5)lVar1 >> 0x20) == 0)) {
      var_6 = var_5(png_ptr,(type_6)lVar1);
      if (var_6 != (type_1)0x0) {
        if (var_3 != 0) {
          var_7(var_6,var_4,var_3 * var_2);
        }
        var_8((void *)(var_3 * var_2 + (int)var_6),0,var_2 * var_1);
        return var_6;
      }
    }
    return (type_1)0x0;
  }
                    /* WARNING: Subroutine does not return */
  var_9(png_ptr,"internal error: array realloc");
}


(translation_unit (function_definition type: (primitive_type) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (number_literal) right: (identifier)) right: (binary_expression left: (identifier) right: (number_literal)))) right: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))))) right: (parenthesized_expression (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (number_literal) right: (identifier)))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (binary_expression left: (call_expression function: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (identifier))) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)))) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal)))) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (binary_expression left: (identifier) right: (identifier))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) (number_literal) (binary_expression left: (identifier) right: (identifier))))) (return_statement (identifier)))))) (return_statement (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content))))))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void * MASKED(undefined4 param_1,void *param_2,int param_3,int param_4,uint param_5)

{
  longlong lVar1;
  void *__dest;
  
  if (((0 < param_4 && param_5 != 0) && (-1 < param_3)) &&
     ((param_2 != (void *)0x0 || (param_3 < 1)))) {
    if ((param_4 <= 0x7fffffff - param_3) &&
       (lVar1 = (ulonglong)(uint)(param_4 + param_3) * (ulonglong)param_5,
       (int)((ulonglong)lVar1 >> 0x20) == 0)) {
      __dest = (void *)FUN_0001cf00(param_1,(int)lVar1);
      if (__dest != (void *)0x0) {
        if (param_3 != 0) {
          memcpy(__dest,param_2,param_3 * param_5);
        }
        memset((void *)(param_3 * param_5 + (int)__dest),0,param_5 * param_4);
        return __dest;
      }
    }
    return (void *)0x0;
  }
                    /* WARNING: Subroutine does not return */
  png_error(param_1,"internal error: array realloc");
}

