; LLVM IR from niessner/Matterport :: code/gaps/pkgs/png (pngread)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.png_struct_def = type { [1 x %struct.__jmp_buf_tag], ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, i32, i32, i32, %struct.z_stream_s, ptr, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, %struct.png_row_info_struct, i32, i32, ptr, i16, i16, [5 x i8], i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i16, i8, float, %struct.png_color_16_struct, %struct.png_color_16_struct, ptr, i32, i32, i32, float, float, ptr, ptr, ptr, ptr, ptr, ptr, %struct.png_color_8_struct, %struct.png_color_8_struct, ptr, %struct.png_color_16_struct, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i64, i64, i64, i64, i32, i32, i64, i64, ptr, ptr, ptr, ptr, ptr, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, ptr, i8, i16, i16, i16, i32, i32, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i32, i32, i32, %struct.png_unknown_chunk_t, i32, i32, ptr, i32 }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%struct.z_stream_s = type { ptr, i32, i64, ptr, i32, i64, ptr, ptr, ptr, ptr, ptr, i32, i64, i64 }
%struct.png_row_info_struct = type { i32, i64, i8, i8, i8, i8 }
%struct.png_color_8_struct = type { i8, i8, i8, i8, i8 }
%struct.png_color_16_struct = type { i8, i16, i16, i16, i16 }
%struct.png_unknown_chunk_t = type { [5 x i8], ptr, i64, i8 }

@__const.png_read_end.png_IHDR = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_IDAT = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_IEND = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_PLTE = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_bKGD = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_cHRM = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_gAMA = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_hIST = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_iCCP = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_iTXt = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_oFFs = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_pCAL = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_pHYs = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_sBIT = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_sCAL = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_sPLT = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_sRGB = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_tEXt = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_tIME = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_tRNS = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_zTXt = external hidden unnamed_addr constant [5 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare void @png_error(ptr noundef, ptr noundef) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

declare i32 @png_read_chunk_header(ptr noundef) #1

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #3

declare void @png_handle_IHDR(ptr noundef, ptr noundef, i32 noundef) #1

declare void @png_handle_IEND(ptr noundef, ptr noundef, i32 noundef) #1

declare i32 @png_handle_as_unknown(ptr noundef, ptr noundef) #1

declare void @png_handle_unknown(ptr noundef, ptr noundef, i32 noundef) #1

declare void @png_handle_PLTE(ptr noundef, ptr noundef, i32 noundef) #1

declare void @png_handle_bKGD(ptr noundef, ptr noundef, i32 noundef) #1

declare void @png_handle_cHRM(ptr noundef, ptr noundef, i32 noundef) #1

declare void @png_handle_gAMA(ptr noundef, ptr noundef, i32 noundef) #1

declare void @png_handle_hIST(ptr noundef, ptr noundef, i32 noundef) #1

declare void @png_handle_oFFs(ptr noundef, ptr noundef, i32 noundef) #1

declare void @png_handle_pCAL(ptr noundef, ptr noundef, i32 noundef) #1

declare void @png_handle_sCAL(ptr noundef, ptr noundef, i32 noundef) #1

declare void @png_handle_pHYs(ptr noundef, ptr noundef, i32 noundef) #1

declare void @png_handle_sBIT(ptr noundef, ptr noundef, i32 noundef) #1

declare void @png_handle_sRGB(ptr noundef, ptr noundef, i32 noundef) #1

declare void @png_handle_iCCP(ptr noundef, ptr noundef, i32 noundef) #1

declare void @png_handle_sPLT(ptr noundef, ptr noundef, i32 noundef) #1

declare void @png_handle_tEXt(ptr noundef, ptr noundef, i32 noundef) #1

declare void @png_handle_tIME(ptr noundef, ptr noundef, i32 noundef) #1

declare void @png_handle_tRNS(ptr noundef, ptr noundef, i32 noundef) #1

declare void @png_handle_zTXt(ptr noundef, ptr noundef, i32 noundef) #1

declare void @png_handle_iTXt(ptr noundef, ptr noundef, i32 noundef) #1

declare i32 @png_crc_finish(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @png_read_end(ptr noundef %0, ptr noundef %1) #4 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [5 x i8], align 1
  %6 = alloca [5 x i8], align 1
  %7 = alloca [5 x i8], align 1
  %8 = alloca [5 x i8], align 1
  %9 = alloca [5 x i8], align 1
  %10 = alloca [5 x i8], align 1
  %11 = alloca [5 x i8], align 1
  %12 = alloca [5 x i8], align 1
  %13 = alloca [5 x i8], align 1
  %14 = alloca [5 x i8], align 1
  %15 = alloca [5 x i8], align 1
  %16 = alloca [5 x i8], align 1
  %17 = alloca [5 x i8], align 1
  %18 = alloca [5 x i8], align 1
  %19 = alloca [5 x i8], align 1
  %20 = alloca [5 x i8], align 1
  %21 = alloca [5 x i8], align 1
  %22 = alloca [5 x i8], align 1
  %23 = alloca [5 x i8], align 1
  %24 = alloca [5 x i8], align 1
  %25 = alloca [5 x i8], align 1
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = icmp eq ptr %28, null
  br i1 %29, label %30, label %31

30:                                               ; preds = %2
  br label %308

31:                                               ; preds = %2
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = call i32 @png_crc_finish(ptr noundef %32, i32 noundef 0)
  br label %34

34:                                               ; preds = %301, %31
  call void @llvm.lifetime.start.p0(i64 5, ptr %5) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %5, ptr align 1 @__const.png_read_end.png_IHDR, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %6) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %6, ptr align 1 @__const.png_read_end.png_IDAT, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %7) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %7, ptr align 1 @__const.png_read_end.png_IEND, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %8) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %8, ptr align 1 @__const.png_read_end.png_PLTE, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %9) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %9, ptr align 1 @__const.png_read_end.png_bKGD, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %10) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %10, ptr align 1 @__const.png_read_end.png_cHRM, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %11) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %11, ptr align 1 @__const.png_read_end.png_gAMA, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %12) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %12, ptr align 1 @__const.png_read_end.png_hIST, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %13) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %13, ptr align 1 @__const.png_read_end.png_iCCP, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %14) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %14, ptr align 1 @__const.png_read_end.png_iTXt, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %15) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %15, ptr align 1 @__const.png_read_end.png_oFFs, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %16) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %16, ptr align 1 @__const.png_read_end.png_pCAL, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %17) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %17, ptr align 1 @__const.png_read_end.png_pHYs, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %18) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %18, ptr align 1 @__const.png_read_end.png_sBIT, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %19) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %19, ptr align 1 @__const.png_read_end.png_sCAL, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %20) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %20, ptr align 1 @__const.png_read_end.png_sPLT, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %21) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %21, ptr align 1 @__const.png_read_end.png_sRGB, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %22) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %22, ptr align 1 @__const.png_read_end.png_tEXt, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %23) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %23, ptr align 1 @__const.png_read_end.png_tIME, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %24) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %24, ptr align 1 @__const.png_read_end.png_tRNS, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %25) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %25, ptr align 1 @__const.png_read_end.png_zTXt, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = call i32 @png_read_chunk_header(ptr noundef %35)
  store i32 %36, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.png_struct_def, ptr %37, i32 0, i32 44
  %39 = getelementptr inbounds [5 x i8], ptr %38, i64 0, i64 0
  store ptr %39, ptr %27, align 8, !tbaa !5
  %40 = load ptr, ptr %27, align 8, !tbaa !5
  %41 = getelementptr inbounds [5 x i8], ptr %5, i64 0, i64 0
  %42 = call i32 @memcmp(ptr noundef %40, ptr noundef %41, i64 noundef 4) #6
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %48, label %44

44:                                               ; preds = %34
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_IHDR(ptr noundef %45, ptr noundef %46, i32 noundef %47)
  br label %300

48:                                               ; preds = %34
  %49 = load ptr, ptr %27, align 8, !tbaa !5
  %50 = getelementptr inbounds [5 x i8], ptr %7, i64 0, i64 0
  %51 = call i32 @memcmp(ptr noundef %49, ptr noundef %50, i64 noundef 4) #6
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %57, label %53

53:                                               ; preds = %48
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_IEND(ptr noundef %54, ptr noundef %55, i32 noundef %56)
  br label %299

57:                                               ; preds = %48
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = load ptr, ptr %27, align 8, !tbaa !5
  %60 = call i32 @png_handle_as_unknown(ptr noundef %58, ptr noundef %59)
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %93

62:                                               ; preds = %57
  %63 = load ptr, ptr %27, align 8, !tbaa !5
  %64 = getelementptr inbounds [5 x i8], ptr %6, i64 0, i64 0
  %65 = call i32 @memcmp(ptr noundef %63, ptr noundef %64, i64 noundef 4) #6
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %79, label %67

67:                                               ; preds = %62
  %68 = load i32, ptr %26, align 4, !tbaa !9
  %69 = icmp ugt i32 %68, 0
  br i1 %69, label %76, label %70

70:                                               ; preds = %67
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.png_struct_def, ptr %71, i32 0, i32 13
  %73 = load i32, ptr %72, align 4, !tbaa !11
  %74 = and i32 %73, 8192
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %76, label %78

76:                                               ; preds = %70, %67
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  call void @png_error(ptr noundef %77, ptr noundef @.str.16)
  br label %78

78:                                               ; preds = %76, %70
  br label %79

79:                                               ; preds = %78, %62
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_unknown(ptr noundef %80, ptr noundef %81, i32 noundef %82)
  %83 = load ptr, ptr %27, align 8, !tbaa !5
  %84 = getelementptr inbounds [5 x i8], ptr %8, i64 0, i64 0
  %85 = call i32 @memcmp(ptr noundef %83, ptr noundef %84, i64 noundef 4) #6
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %92, label %87

87:                                               ; preds = %79
  %88 = load ptr, ptr %3, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.png_struct_def, ptr %88, i32 0, i32 13
  %90 = load i32, ptr %89, align 4, !tbaa !11
  %91 = or i32 %90, 2
  store i32 %91, ptr %89, align 4, !tbaa !11
  br label %92

92:                                               ; preds = %87, %79
  br label %298

93:                                               ; preds = %57
  %94 = load ptr, ptr %27, align 8, !tbaa !5
  %95 = getelementptr inbounds [5 x i8], ptr %6, i64 0, i64 0
  %96 = call i32 @memcmp(ptr noundef %94, ptr noundef %95, i64 noundef 4) #6
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %113, label %98

98:                                               ; preds = %93
  %99 = load i32, ptr %26, align 4, !tbaa !9
  %100 = icmp ugt i32 %99, 0
  br i1 %100, label %107, label %101

101:                                              ; preds = %98
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.png_struct_def, ptr %102, i32 0, i32 13
  %104 = load i32, ptr %103, align 4, !tbaa !11
  %105 = and i32 %104, 8192
  %106 = icmp ne i32 %105, 0
  br i1 %106, label %107, label %109

107:                                              ; preds = %101, %98
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  call void @png_error(ptr noundef %108, ptr noundef @.str.16)
  br label %109

109:                                              ; preds = %107, %101
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = load i32, ptr %26, align 4, !tbaa !9
  %112 = call i32 @png_crc_finish(ptr noundef %110, i32 noundef %111)
  br label %297

113:                                              ; preds = %93
  %114 = load ptr, ptr %27, align 8, !tbaa !5
  %115 = getelementptr inbounds [5 x i8], ptr %8, i64 0, i64 0
  %116 = call i32 @memcmp(ptr noundef %114, ptr noundef %115, i64 noundef 4) #6
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %122, label %118

118:                                              ; preds = %113
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_PLTE(ptr noundef %119, ptr noundef %120, i32 noundef %121)
  br label %296

122:                                              ; preds = %113
  %123 = load ptr, ptr %27, align 8, !tbaa !5
  %124 = getelementptr inbounds [5 x i8], ptr %9, i64 0, i64 0
  %125 = call i32 @memcmp(ptr noundef %123, ptr noundef %124, i64 noundef 4) #6
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %131, label %127

127:                                              ; preds = %122
  %128 = load ptr, ptr %3, align 8, !tbaa !5
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_bKGD(ptr noundef %128, ptr noundef %129, i32 noundef %130)
  br label %295

131:                                              ; preds = %122
  %132 = load ptr, ptr %27, align 8, !tbaa !5
  %133 = getelementptr inbounds [5 x i8], ptr %10, i64 0, i64 0
  %134 = call i32 @memcmp(ptr noundef %132, ptr noundef %133, i64 noundef 4) #6
  %135 = icmp ne i32 %134, 0
  br i1 %135, label %140, label %136

136:                                              ; preds = %131
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  %139 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_cHRM(ptr noundef %137, ptr noundef %138, i32 noundef %139)
  br label %294

140:                                              ; preds = %131
  %141 = load ptr, ptr %27, align 8, !tbaa !5
  %142 = getelementptr inbounds [5 x i8], ptr %11, i64 0, i64 0
  %143 = call i32 @memcmp(ptr noundef %141, ptr noundef %142, i64 noundef 4) #6
  %144 = icmp ne i32 %143, 0
  br i1 %144, label %149, label %145

145:                                              ; preds = %140
  %146 = load ptr, ptr %3, align 8, !tbaa !5
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_gAMA(ptr noundef %146, ptr noundef %147, i32 noundef %148)
  br label %293

149:                                              ; preds = %140
  %150 = load ptr, ptr %27, align 8, !tbaa !5
  %151 = getelementptr inbounds [5 x i8], ptr %12, i64 0, i64 0
  %152 = call i32 @memcmp(ptr noundef %150, ptr noundef %151, i64 noundef 4) #6
  %153 = icmp ne i32 %152, 0
  br i1 %153, label %158, label %154

154:                                              ; preds = %149
  %155 = load ptr, ptr %3, align 8, !tbaa !5
  %156 = load ptr, ptr %4, align 8, !tbaa !5
  %157 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_hIST(ptr noundef %155, ptr noundef %156, i32 noundef %157)
  br label %292

158:                                              ; preds = %149
  %159 = load ptr, ptr %27, align 8, !tbaa !5
  %160 = getelementptr inbounds [5 x i8], ptr %15, i64 0, i64 0
  %161 = call i32 @memcmp(ptr noundef %159, ptr noundef %160, i64 noundef 4) #6
  %162 = icmp ne i32 %161, 0
  br i1 %162, label %167, label %163

163:                                              ; preds = %158
  %164 = load ptr, ptr %3, align 8, !tbaa !5
  %165 = load ptr, ptr %4, align 8, !tbaa !5
  %166 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_oFFs(ptr noundef %164, ptr noundef %165, i32 noundef %166)
  br label %291

167:                                              ; preds = %158
  %168 = load ptr, ptr %27, align 8, !tbaa !5
  %169 = getelementptr inbounds [5 x i8], ptr %16, i64 0, i64 0
  %170 = call i32 @memcmp(ptr noundef %168, ptr noundef %169, i64 noundef 4) #6
  %171 = icmp ne i32 %170, 0
  br i1 %171, label %176, label %172

172:                                              ; preds = %167
  %173 = load ptr, ptr %3, align 8, !tbaa !5
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  %175 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_pCAL(ptr noundef %173, ptr noundef %174, i32 noundef %175)
  br label %290

176:                                              ; preds = %167
  %177 = load ptr, ptr %27, align 8, !tbaa !5
  %178 = getelementptr inbounds [5 x i8], ptr %19, i64 0, i64 0
  %179 = call i32 @memcmp(ptr noundef %177, ptr noundef %178, i64 noundef 4) #6
  %180 = icmp ne i32 %179, 0
  br i1 %180, label %185, label %181

181:                                              ; preds = %176
  %182 = load ptr, ptr %3, align 8, !tbaa !5
  %183 = load ptr, ptr %4, align 8, !tbaa !5
  %184 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_sCAL(ptr noundef %182, ptr noundef %183, i32 noundef %184)
  br label %289

185:                                              ; preds = %176
  %186 = load ptr, ptr %27, align 8, !tbaa !5
  %187 = getelementptr inbounds [5 x i8], ptr %17, i64 0, i64 0
  %188 = call i32 @memcmp(ptr noundef %186, ptr noundef %187, i64 noundef 4) #6
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %194, label %190

190:                                              ; preds = %185
  %191 = load ptr, ptr %3, align 8, !tbaa !5
  %192 = load ptr, ptr %4, align 8, !tbaa !5
  %193 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_pHYs(ptr noundef %191, ptr noundef %192, i32 noundef %193)
  br label %288

194:                                              ; preds = %185
  %195 = load ptr, ptr %27, align 8, !tbaa !5
  %196 = getelementptr inbounds [5 x i8], ptr %18, i64 0, i64 0
  %197 = call i32 @memcmp(ptr noundef %195, ptr noundef %196, i64 noundef 4) #6
  %198 = icmp ne i32 %197, 0
  br i1 %198, label %203, label %199

199:                                              ; preds = %194
  %200 = load ptr, ptr %3, align 8, !tbaa !5
  %201 = load ptr, ptr %4, align 8, !tbaa !5
  %202 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_sBIT(ptr noundef %200, ptr noundef %201, i32 noundef %202)
  br label %287

203:                                              ; preds = %194
  %204 = load ptr, ptr %27, align 8, !tbaa !5
  %205 = getelementptr inbounds [5 x i8], ptr %21, i64 0, i64 0
  %206 = call i32 @memcmp(ptr noundef %204, ptr noundef %205, i64 noundef 4) #6
  %207 = icmp ne i32 %206, 0
  br i1 %207, label %212, label %208

208:                                              ; preds = %203
  %209 = load ptr, ptr %3, align 8, !tbaa !5
  %210 = load ptr, ptr %4, align 8, !tbaa !5
  %211 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_sRGB(ptr noundef %209, ptr noundef %210, i32 noundef %211)
  br label %286

212:                                              ; preds = %203
  %213 = load ptr, ptr %27, align 8, !tbaa !5
  %214 = getelementptr inbounds [5 x i8], ptr %13, i64 0, i64 0
  %215 = call i32 @memcmp(ptr noundef %213, ptr noundef %214, i64 noundef 4) #6
  %216 = icmp ne i32 %215, 0
  br i1 %216, label %221, label %217

217:                                              ; preds = %212
  %218 = load ptr, ptr %3, align 8, !tbaa !5
  %219 = load ptr, ptr %4, align 8, !tbaa !5
  %220 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_iCCP(ptr noundef %218, ptr noundef %219, i32 noundef %220)
  br label %285

221:                                              ; preds = %212
  %222 = load ptr, ptr %27, align 8, !tbaa !5
  %223 = getelementptr inbounds [5 x i8], ptr %20, i64 0, i64 0
  %224 = call i32 @memcmp(ptr noundef %222, ptr noundef %223, i64 noundef 4) #6
  %225 = icmp ne i32 %224, 0
  br i1 %225, label %230, label %226

226:                                              ; preds = %221
  %227 = load ptr, ptr %3, align 8, !tbaa !5
  %228 = load ptr, ptr %4, align 8, !tbaa !5
  %229 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_sPLT(ptr noundef %227, ptr noundef %228, i32 noundef %229)
  br label %284

230:                                              ; preds = %221
  %231 = load ptr, ptr %27, align 8, !tbaa !5
  %232 = getelementptr inbounds [5 x i8], ptr %22, i64 0, i64 0
  %233 = call i32 @memcmp(ptr noundef %231, ptr noundef %232, i64 noundef 4) #6
  %234 = icmp ne i32 %233, 0
  br i1 %234, label %239, label %235

235:                                              ; preds = %230
  %236 = load ptr, ptr %3, align 8, !tbaa !5
  %237 = load ptr, ptr %4, align 8, !tbaa !5
  %238 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_tEXt(ptr noundef %236, ptr noundef %237, i32 noundef %238)
  br label %283

239:                                              ; preds = %230
  %240 = load ptr, ptr %27, align 8, !tbaa !5
  %241 = getelementptr inbounds [5 x i8], ptr %23, i64 0, i64 0
  %242 = call i32 @memcmp(ptr noundef %240, ptr noundef %241, i64 noundef 4) #6
  %243 = icmp ne i32 %242, 0
  br i1 %243, label %248, label %244

244:                                              ; preds = %239
  %245 = load ptr, ptr %3, align 8, !tbaa !5
  %246 = load ptr, ptr %4, align 8, !tbaa !5
  %247 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_tIME(ptr noundef %245, ptr noundef %246, i32 noundef %247)
  br label %282

248:                                              ; preds = %239
  %249 = load ptr, ptr %27, align 8, !tbaa !5
  %250 = getelementptr inbounds [5 x i8], ptr %24, i64 0, i64 0
  %251 = call i32 @memcmp(ptr noundef %249, ptr noundef %250, i64 noundef 4) #6
  %252 = icmp ne i32 %251, 0
  br i1 %252, label %257, label %253

253:                                              ; preds = %248
  %254 = load ptr, ptr %3, align 8, !tbaa !5
  %255 = load ptr, ptr %4, align 8, !tbaa !5
  %256 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_tRNS(ptr noundef %254, ptr noundef %255, i32 noundef %256)
  br label %281

257:                                              ; preds = %248
  %258 = load ptr, ptr %27, align 8, !tbaa !5
  %259 = getelementptr inbounds [5 x i8], ptr %25, i64 0, i64 0
  %260 = call i32 @memcmp(ptr noundef %258, ptr noundef %259, i64 noundef 4) #6
  %261 = icmp ne i32 %260, 0
  br i1 %261, label %266, label %262

262:                                              ; preds = %257
  %263 = load ptr, ptr %3, align 8, !tbaa !5
  %264 = load ptr, ptr %4, align 8, !tbaa !5
  %265 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_zTXt(ptr noundef %263, ptr noundef %264, i32 noundef %265)
  br label %280

266:                                              ; preds = %257
  %267 = load ptr, ptr %27, align 8, !tbaa !5
  %268 = getelementptr inbounds [5 x i8], ptr %14, i64 0, i64 0
  %269 = call i32 @memcmp(ptr noundef %267, ptr noundef %268, i64 noundef 4) #6
  %270 = icmp ne i32 %269, 0
  br i1 %270, label %275, label %271

271:                                              ; preds = %266
  %272 = load ptr, ptr %3, align 8, !tbaa !5
  %273 = load ptr, ptr %4, align 8, !tbaa !5
  %274 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_iTXt(ptr noundef %272, ptr noundef %273, i32 noundef %274)
  br label %279

275:                                              ; preds = %266
  %276 = load ptr, ptr %3, align 8, !tbaa !5
  %277 = load ptr, ptr %4, align 8, !tbaa !5
  %278 = load i32, ptr %26, align 4, !tbaa !9
  call void @png_handle_unknown(ptr noundef %276, ptr noundef %277, i32 noundef %278)
  br label %279

279:                                              ; preds = %275, %271
  br label %280

280:                                              ; preds = %279, %262
  br label %281

281:                                              ; preds = %280, %253
  br label %282

282:                                              ; preds = %281, %244
  br label %283

283:                                              ; preds = %282, %235
  br label %284

284:                                              ; preds = %283, %226
  br label %285

285:                                              ; preds = %284, %217
  br label %286

286:                                              ; preds = %285, %208
  br label %287

287:                                              ; preds = %286, %199
  br label %288

288:                                              ; preds = %287, %190
  br label %289

289:                                              ; preds = %288, %181
  br label %290

290:                                              ; preds = %289, %172
  br label %291

291:                                              ; preds = %290, %163
  br label %292

292:                                              ; preds = %291, %154
  br label %293

293:                                              ; preds = %292, %145
  br label %294

294:                                              ; preds = %293, %136
  br label %295

295:                                              ; preds = %294, %127
  br label %296

296:                                              ; preds = %295, %118
  br label %297

297:                                              ; preds = %296, %109
  br label %298

298:                                              ; preds = %297, %92
  br label %299

299:                                              ; preds = %298, %53
  br label %300

300:                                              ; preds = %299, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %5) #5
  br label %301

301:                                              ; preds = %300
  %302 = load ptr, ptr %3, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.png_struct_def, ptr %302, i32 0, i32 13
  %304 = load i32, ptr %303, align 4, !tbaa !11
  %305 = and i32 %304, 16
  %306 = icmp ne i32 %305, 0
  %307 = xor i1 %306, true
  br i1 %307, label %34, label %308, !llvm.loop !21

308:                                              ; preds = %301, %30
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 284}
!12 = !{!"png_struct_def", !7, i64 0, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !7, i64 280, !7, i64 281, !10, i64 284, !10, i64 288, !10, i64 292, !13, i64 296, !6, i64 408, !14, i64 416, !10, i64 424, !10, i64 428, !10, i64 432, !10, i64 436, !10, i64 440, !10, i64 444, !10, i64 448, !10, i64 452, !10, i64 456, !14, i64 464, !14, i64 472, !10, i64 480, !10, i64 484, !6, i64 488, !6, i64 496, !6, i64 504, !6, i64 512, !6, i64 520, !6, i64 528, !15, i64 536, !10, i64 560, !10, i64 564, !6, i64 568, !16, i64 576, !16, i64 578, !7, i64 580, !7, i64 585, !7, i64 586, !7, i64 587, !7, i64 588, !7, i64 589, !7, i64 590, !7, i64 591, !7, i64 592, !7, i64 593, !7, i64 594, !7, i64 595, !7, i64 596, !16, i64 598, !7, i64 600, !17, i64 604, !18, i64 608, !18, i64 618, !6, i64 632, !10, i64 640, !10, i64 644, !10, i64 648, !17, i64 652, !17, i64 656, !6, i64 664, !6, i64 672, !6, i64 680, !6, i64 688, !6, i64 696, !6, i64 704, !19, i64 712, !19, i64 717, !6, i64 728, !18, i64 736, !6, i64 752, !6, i64 760, !6, i64 768, !6, i64 776, !6, i64 784, !6, i64 792, !6, i64 800, !6, i64 808, !6, i64 816, !10, i64 824, !10, i64 828, !14, i64 832, !14, i64 840, !14, i64 848, !14, i64 856, !10, i64 864, !10, i64 868, !14, i64 872, !14, i64 880, !6, i64 888, !6, i64 896, !6, i64 904, !6, i64 912, !6, i64 920, !7, i64 928, !7, i64 929, !6, i64 936, !6, i64 944, !6, i64 952, !6, i64 960, !6, i64 968, !6, i64 976, !10, i64 984, !6, i64 992, !6, i64 1000, !10, i64 1008, !6, i64 1016, !7, i64 1024, !16, i64 1026, !16, i64 1028, !16, i64 1030, !10, i64 1032, !10, i64 1036, !7, i64 1040, !6, i64 1048, !6, i64 1056, !6, i64 1064, !6, i64 1072, !6, i64 1080, !6, i64 1088, !6, i64 1096, !7, i64 1104, !10, i64 1108, !10, i64 1112, !10, i64 1116, !20, i64 1120, !10, i64 1152, !10, i64 1156, !6, i64 1160, !10, i64 1168}
!13 = !{!"z_stream_s", !6, i64 0, !10, i64 8, !14, i64 16, !6, i64 24, !10, i64 32, !14, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !14, i64 96, !14, i64 104}
!14 = !{!"long", !7, i64 0}
!15 = !{!"png_row_info_struct", !10, i64 0, !14, i64 8, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19}
!16 = !{!"short", !7, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = !{!"png_color_16_struct", !7, i64 0, !16, i64 2, !16, i64 4, !16, i64 6, !16, i64 8}
!19 = !{!"png_color_8_struct", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4}
!20 = !{!"png_unknown_chunk_t", !7, i64 0, !6, i64 8, !14, i64 16, !7, i64 24}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@__const.png_read_end.png_IHDR = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_IDAT = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_IEND = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_PLTE = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_bKGD = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_cHRM = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_gAMA = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_hIST = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_iCCP = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_iTXt = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_oFFs = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_pCAL = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_pHYs = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_sBIT = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_sCAL = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_sPLT = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_sRGB = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_tEXt = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_tIME = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_tRNS = external hidden unnamed_addr constant [5 x i8], align 1
@__const.png_read_end.png_zTXt = external hidden unnamed_addr constant [5 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [21 x i8], align 1

declare void @png_error(ptr noundef, ptr noundef) local_unnamed_addr #0

declare i32 @png_read_chunk_header(ptr noundef) local_unnamed_addr #0

declare void @png_handle_IHDR(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @png_handle_IEND(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare i32 @png_handle_as_unknown(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @png_handle_unknown(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @png_handle_PLTE(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @png_handle_bKGD(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @png_handle_cHRM(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @png_handle_gAMA(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @png_handle_hIST(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @png_handle_oFFs(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @png_handle_pCAL(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @png_handle_sCAL(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @png_handle_pHYs(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @png_handle_sBIT(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @png_handle_sRGB(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @png_handle_iCCP(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @png_handle_sPLT(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @png_handle_tEXt(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @png_handle_tIME(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @png_handle_tRNS(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @png_handle_zTXt(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @png_handle_iTXt(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare i32 @png_crc_finish(ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @png_read_end(ptr noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = icmp eq ptr %0, null
  br i1 %3, label %.loopexit, label %4

4:                                                ; preds = %2
  %5 = tail call i32 @png_crc_finish(ptr noundef nonnull %0, i32 noundef 0) #3
  %6 = getelementptr inbounds i8, ptr %0, i64 580
  %7 = getelementptr inbounds i8, ptr %0, i64 284
  br label %8

8:                                                ; preds = %70, %4
  %9 = tail call i32 @png_read_chunk_header(ptr noundef nonnull %0) #3
  %bcmp = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_IHDR, i64 4)
  %.not = icmp eq i32 %bcmp, 0
  br i1 %.not, label %10, label %11

10:                                               ; preds = %8
  tail call void @png_handle_IHDR(ptr noundef nonnull %0, ptr noundef %1, i32 noundef %9) #3
  br label %70

11:                                               ; preds = %8
  %bcmp104 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_IEND, i64 4)
  %.not105 = icmp eq i32 %bcmp104, 0
  br i1 %.not105, label %12, label %13

12:                                               ; preds = %11
  tail call void @png_handle_IEND(ptr noundef %0, ptr noundef %1, i32 noundef %9) #3
  br label %70

13:                                               ; preds = %11
  %14 = tail call i32 @png_handle_as_unknown(ptr noundef %0, ptr noundef nonnull %6) #3
  %.not106 = icmp eq i32 %14, 0
  %bcmp107 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_IDAT, i64 4)
  %.not108 = icmp eq i32 %bcmp107, 0
  br i1 %.not106, label %25, label %15

15:                                               ; preds = %13
  br i1 %.not108, label %16, label %21

16:                                               ; preds = %15
  %.not149 = icmp eq i32 %9, 0
  br i1 %.not149, label %17, label %20

17:                                               ; preds = %16
  %18 = load i32, ptr %7, align 4, !tbaa !5
  %19 = and i32 %18, 8192
  %.not150 = icmp eq i32 %19, 0
  br i1 %.not150, label %21, label %20

20:                                               ; preds = %17, %16
  tail call void @png_error(ptr noundef %0, ptr noundef nonnull @.str.16) #3
  br label %21

21:                                               ; preds = %17, %20, %15
  tail call void @png_handle_unknown(ptr noundef %0, ptr noundef %1, i32 noundef %9) #3
  %bcmp151 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_PLTE, i64 4)
  %.not152 = icmp eq i32 %bcmp151, 0
  br i1 %.not152, label %22, label %70

22:                                               ; preds = %21
  %23 = load i32, ptr %7, align 4, !tbaa !5
  %24 = or i32 %23, 2
  store i32 %24, ptr %7, align 4, !tbaa !5
  br label %70

25:                                               ; preds = %13
  br i1 %.not108, label %26, label %33

26:                                               ; preds = %25
  %.not109 = icmp eq i32 %9, 0
  br i1 %.not109, label %27, label %30

27:                                               ; preds = %26
  %28 = load i32, ptr %7, align 4, !tbaa !5
  %29 = and i32 %28, 8192
  %.not110 = icmp eq i32 %29, 0
  br i1 %.not110, label %31, label %30

30:                                               ; preds = %27, %26
  tail call void @png_error(ptr noundef %0, ptr noundef nonnull @.str.16) #3
  br label %31

31:                                               ; preds = %30, %27
  %32 = tail call i32 @png_crc_finish(ptr noundef %0, i32 noundef %9) #3
  br label %70

33:                                               ; preds = %25
  %bcmp111 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_PLTE, i64 4)
  %.not112 = icmp eq i32 %bcmp111, 0
  br i1 %.not112, label %34, label %35

34:                                               ; preds = %33
  tail call void @png_handle_PLTE(ptr noundef %0, ptr noundef %1, i32 noundef %9) #3
  br label %70

35:                                               ; preds = %33
  %bcmp113 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_bKGD, i64 4)
  %.not114 = icmp eq i32 %bcmp113, 0
  br i1 %.not114, label %36, label %37

36:                                               ; preds = %35
  tail call void @png_handle_bKGD(ptr noundef %0, ptr noundef %1, i32 noundef %9) #3
  br label %70

37:                                               ; preds = %35
  %bcmp115 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_cHRM, i64 4)
  %.not116 = icmp eq i32 %bcmp115, 0
  br i1 %.not116, label %38, label %39

38:                                               ; preds = %37
  tail call void @png_handle_cHRM(ptr noundef %0, ptr noundef %1, i32 noundef %9) #3
  br label %70

39:                                               ; preds = %37
  %bcmp117 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_gAMA, i64 4)
  %.not118 = icmp eq i32 %bcmp117, 0
  br i1 %.not118, label %40, label %41

40:                                               ; preds = %39
  tail call void @png_handle_gAMA(ptr noundef %0, ptr noundef %1, i32 noundef %9) #3
  br label %70

41:                                               ; preds = %39
  %bcmp119 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_hIST, i64 4)
  %.not120 = icmp eq i32 %bcmp119, 0
  br i1 %.not120, label %42, label %43

42:                                               ; preds = %41
  tail call void @png_handle_hIST(ptr noundef %0, ptr noundef %1, i32 noundef %9) #3
  br label %70

43:                                               ; preds = %41
  %bcmp121 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_oFFs, i64 4)
  %.not122 = icmp eq i32 %bcmp121, 0
  br i1 %.not122, label %44, label %45

44:                                               ; preds = %43
  tail call void @png_handle_oFFs(ptr noundef %0, ptr noundef %1, i32 noundef %9) #3
  br label %70

45:                                               ; preds = %43
  %bcmp123 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_pCAL, i64 4)
  %.not124 = icmp eq i32 %bcmp123, 0
  br i1 %.not124, label %46, label %47

46:                                               ; preds = %45
  tail call void @png_handle_pCAL(ptr noundef %0, ptr noundef %1, i32 noundef %9) #3
  br label %70

47:                                               ; preds = %45
  %bcmp125 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_sCAL, i64 4)
  %.not126 = icmp eq i32 %bcmp125, 0
  br i1 %.not126, label %48, label %49

48:                                               ; preds = %47
  tail call void @png_handle_sCAL(ptr noundef %0, ptr noundef %1, i32 noundef %9) #3
  br label %70

49:                                               ; preds = %47
  %bcmp127 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_pHYs, i64 4)
  %.not128 = icmp eq i32 %bcmp127, 0
  br i1 %.not128, label %50, label %51

50:                                               ; preds = %49
  tail call void @png_handle_pHYs(ptr noundef %0, ptr noundef %1, i32 noundef %9) #3
  br label %70

51:                                               ; preds = %49
  %bcmp129 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_sBIT, i64 4)
  %.not130 = icmp eq i32 %bcmp129, 0
  br i1 %.not130, label %52, label %53

52:                                               ; preds = %51
  tail call void @png_handle_sBIT(ptr noundef %0, ptr noundef %1, i32 noundef %9) #3
  br label %70

53:                                               ; preds = %51
  %bcmp131 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_sRGB, i64 4)
  %.not132 = icmp eq i32 %bcmp131, 0
  br i1 %.not132, label %54, label %55

54:                                               ; preds = %53
  tail call void @png_handle_sRGB(ptr noundef %0, ptr noundef %1, i32 noundef %9) #3
  br label %70

55:                                               ; preds = %53
  %bcmp133 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_iCCP, i64 4)
  %.not134 = icmp eq i32 %bcmp133, 0
  br i1 %.not134, label %56, label %57

56:                                               ; preds = %55
  tail call void @png_handle_iCCP(ptr noundef %0, ptr noundef %1, i32 noundef %9) #3
  br label %70

57:                                               ; preds = %55
  %bcmp135 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_sPLT, i64 4)
  %.not136 = icmp eq i32 %bcmp135, 0
  br i1 %.not136, label %58, label %59

58:                                               ; preds = %57
  tail call void @png_handle_sPLT(ptr noundef %0, ptr noundef %1, i32 noundef %9) #3
  br label %70

59:                                               ; preds = %57
  %bcmp137 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_tEXt, i64 4)
  %.not138 = icmp eq i32 %bcmp137, 0
  br i1 %.not138, label %60, label %61

60:                                               ; preds = %59
  tail call void @png_handle_tEXt(ptr noundef %0, ptr noundef %1, i32 noundef %9) #3
  br label %70

61:                                               ; preds = %59
  %bcmp139 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_tIME, i64 4)
  %.not140 = icmp eq i32 %bcmp139, 0
  br i1 %.not140, label %62, label %63

62:                                               ; preds = %61
  tail call void @png_handle_tIME(ptr noundef %0, ptr noundef %1, i32 noundef %9) #3
  br label %70

63:                                               ; preds = %61
  %bcmp141 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_tRNS, i64 4)
  %.not142 = icmp eq i32 %bcmp141, 0
  br i1 %.not142, label %64, label %65

64:                                               ; preds = %63
  tail call void @png_handle_tRNS(ptr noundef %0, ptr noundef %1, i32 noundef %9) #3
  br label %70

65:                                               ; preds = %63
  %bcmp143 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_zTXt, i64 4)
  %.not144 = icmp eq i32 %bcmp143, 0
  br i1 %.not144, label %66, label %67

66:                                               ; preds = %65
  tail call void @png_handle_zTXt(ptr noundef %0, ptr noundef %1, i32 noundef %9) #3
  br label %70

67:                                               ; preds = %65
  %bcmp145 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %6, ptr noundef nonnull dereferenceable(4) @__const.png_read_end.png_iTXt, i64 4)
  %.not146 = icmp eq i32 %bcmp145, 0
  br i1 %.not146, label %68, label %69

68:                                               ; preds = %67
  tail call void @png_handle_iTXt(ptr noundef %0, ptr noundef %1, i32 noundef %9) #3
  br label %70

69:                                               ; preds = %67
  tail call void @png_handle_unknown(ptr noundef %0, ptr noundef %1, i32 noundef %9) #3
  br label %70

70:                                               ; preds = %12, %31, %36, %40, %44, %48, %52, %56, %60, %64, %68, %69, %66, %62, %58, %54, %50, %46, %42, %38, %34, %21, %22, %10
  %71 = load i32, ptr %7, align 4, !tbaa !5
  %72 = and i32 %71, 16
  %.not153 = icmp eq i32 %72, 0
  br i1 %.not153, label %8, label %.loopexit, !llvm.loop !19

.loopexit:                                        ; preds = %70, %2
  ret void
}

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #2

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree nounwind willreturn memory(argmem: read) }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 284}
!6 = !{!"png_struct_def", !7, i64 0, !9, i64 200, !9, i64 208, !9, i64 216, !9, i64 224, !9, i64 232, !9, i64 240, !9, i64 248, !9, i64 256, !9, i64 264, !9, i64 272, !7, i64 280, !7, i64 281, !10, i64 284, !10, i64 288, !10, i64 292, !11, i64 296, !9, i64 408, !12, i64 416, !10, i64 424, !10, i64 428, !10, i64 432, !10, i64 436, !10, i64 440, !10, i64 444, !10, i64 448, !10, i64 452, !10, i64 456, !12, i64 464, !12, i64 472, !10, i64 480, !10, i64 484, !9, i64 488, !9, i64 496, !9, i64 504, !9, i64 512, !9, i64 520, !9, i64 528, !13, i64 536, !10, i64 560, !10, i64 564, !9, i64 568, !14, i64 576, !14, i64 578, !7, i64 580, !7, i64 585, !7, i64 586, !7, i64 587, !7, i64 588, !7, i64 589, !7, i64 590, !7, i64 591, !7, i64 592, !7, i64 593, !7, i64 594, !7, i64 595, !7, i64 596, !14, i64 598, !7, i64 600, !15, i64 604, !16, i64 608, !16, i64 618, !9, i64 632, !10, i64 640, !10, i64 644, !10, i64 648, !15, i64 652, !15, i64 656, !9, i64 664, !9, i64 672, !9, i64 680, !9, i64 688, !9, i64 696, !9, i64 704, !17, i64 712, !17, i64 717, !9, i64 728, !16, i64 736, !9, i64 752, !9, i64 760, !9, i64 768, !9, i64 776, !9, i64 784, !9, i64 792, !9, i64 800, !9, i64 808, !9, i64 816, !10, i64 824, !10, i64 828, !12, i64 832, !12, i64 840, !12, i64 848, !12, i64 856, !10, i64 864, !10, i64 868, !12, i64 872, !12, i64 880, !9, i64 888, !9, i64 896, !9, i64 904, !9, i64 912, !9, i64 920, !7, i64 928, !7, i64 929, !9, i64 936, !9, i64 944, !9, i64 952, !9, i64 960, !9, i64 968, !9, i64 976, !10, i64 984, !9, i64 992, !9, i64 1000, !10, i64 1008, !9, i64 1016, !7, i64 1024, !14, i64 1026, !14, i64 1028, !14, i64 1030, !10, i64 1032, !10, i64 1036, !7, i64 1040, !9, i64 1048, !9, i64 1056, !9, i64 1064, !9, i64 1072, !9, i64 1080, !9, i64 1088, !9, i64 1096, !7, i64 1104, !10, i64 1108, !10, i64 1112, !10, i64 1116, !18, i64 1120, !10, i64 1152, !10, i64 1156, !9, i64 1160, !10, i64 1168}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"any pointer", !7, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!"z_stream_s", !9, i64 0, !10, i64 8, !12, i64 16, !9, i64 24, !10, i64 32, !12, i64 40, !9, i64 48, !9, i64 56, !9, i64 64, !9, i64 72, !9, i64 80, !10, i64 88, !12, i64 96, !12, i64 104}
!12 = !{!"long", !7, i64 0}
!13 = !{!"png_row_info_struct", !10, i64 0, !12, i64 8, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19}
!14 = !{!"short", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!"png_color_16_struct", !7, i64 0, !14, i64 2, !14, i64 4, !14, i64 6, !14, i64 8}
!17 = !{!"png_color_8_struct", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4}
!18 = !{!"png_unknown_chunk_t", !7, i64 0, !9, i64 8, !12, i64 16, !7, i64 24}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass