; LLVM IR from ewconnell/Netlib :: Sources/ImageCodecs (png)

; 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.CDecoderInfo = type { ptr, ptr, i64, i64, i32, i64, i64, i32 }
%struct.PngContext = type { ptr, ptr, %struct.BufferPos }
%struct.BufferPos = type { ptr, i64, i64 }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }

@.str.1 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [71 x i8], align 1
@__PRETTY_FUNCTION__.pngDecodeInfo = external hidden unnamed_addr constant [70 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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

declare noalias ptr @png_create_info_struct(ptr noundef) #1

; Function Attrs: nounwind returns_twice
declare i32 @_setjmp(ptr noundef) #5

declare ptr @png_set_longjmp_fn(ptr noundef, ptr noundef, i64 noundef) #1

; Function Attrs: noreturn nounwind
declare void @longjmp(ptr noundef, i32 noundef) #2

declare i64 @png_get_rowbytes(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @readFn(ptr noundef, ptr noundef, i64 noundef) #6

; Function Attrs: nounwind uwtable
define dso_local void @pngDecodeInfo(ptr dead_on_unwind noalias writable sret(%struct.CDecoderInfo) align 8 %0, ptr noundef %1, i64 noundef %2, i32 noundef %3) #6 {
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i8, align 1
  %14 = alloca ptr, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i64 %2, ptr %6, align 8, !tbaa !9
  store i32 %3, ptr %7, align 4, !tbaa !11
  call void @llvm.memset.p0.i64(ptr align 8 %0, i8 0, i64 64, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %15 = call noalias ptr @malloc(i64 noundef 40) #8
  store ptr %15, ptr %8, align 8, !tbaa !5
  %16 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 40, i1 false)
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 0
  store ptr %17, ptr %18, align 8, !tbaa !13
  %19 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 2
  store i64 3, ptr %19, align 8, !tbaa !15
  %20 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 2
  %21 = load i64, ptr %20, align 8, !tbaa !15
  %22 = mul i64 %21, 8
  %23 = call noalias ptr @malloc(i64 noundef %22) #8
  %24 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 1
  store ptr %23, ptr %24, align 8, !tbaa !16
  %25 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 7
  store i32 0, ptr %25, align 8, !tbaa !17
  %26 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 6
  store i64 1, ptr %26, align 8, !tbaa !18
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.PngContext, ptr %28, i32 0, i32 2
  %30 = getelementptr inbounds %struct.BufferPos, ptr %29, i32 0, i32 0
  store ptr %27, ptr %30, align 8, !tbaa !19
  %31 = load i64, ptr %6, align 8, !tbaa !9
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.PngContext, ptr %32, i32 0, i32 2
  %34 = getelementptr inbounds %struct.BufferPos, ptr %33, i32 0, i32 1
  store i64 %31, ptr %34, align 8, !tbaa !22
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.PngContext, ptr %35, i32 0, i32 2
  %37 = getelementptr inbounds %struct.BufferPos, ptr %36, i32 0, i32 2
  store i64 0, ptr %37, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %38 = call noalias ptr @png_create_read_struct(ptr noundef @.str.2, ptr noundef null, ptr noundef null, ptr noundef null)
  store ptr %38, ptr %9, align 8, !tbaa !5
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.PngContext, ptr %40, i32 0, i32 0
  store ptr %39, ptr %41, align 8, !tbaa !24
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = icmp eq ptr %42, null
  br i1 %43, label %44, label %46

44:                                               ; preds = %4
  %45 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 7
  store i32 1, ptr %45, align 8, !tbaa !17
  store i32 1, ptr %10, align 4
  br label %253

46:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = call noalias ptr @png_create_info_struct(ptr noundef %47)
  store ptr %48, ptr %11, align 8, !tbaa !5
  %49 = load ptr, ptr %11, align 8, !tbaa !5
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.PngContext, ptr %50, i32 0, i32 1
  store ptr %49, ptr %51, align 8, !tbaa !25
  %52 = load ptr, ptr %11, align 8, !tbaa !5
  %53 = icmp eq ptr %52, null
  br i1 %53, label %54, label %56

54:                                               ; preds = %46
  call void @png_destroy_read_struct(ptr noundef %9, ptr noundef null, ptr noundef null)
  %55 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 7
  store i32 1, ptr %55, align 8, !tbaa !17
  store i32 1, ptr %10, align 4
  br label %252

56:                                               ; preds = %46
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = call ptr @png_set_longjmp_fn(ptr noundef %57, ptr noundef @longjmp, i64 noundef 200)
  %59 = getelementptr inbounds [1 x %struct.__jmp_buf_tag], ptr %58, i64 0, i64 0
  %60 = call i32 @_setjmp(ptr noundef %59) #9
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %64

62:                                               ; preds = %56
  call void @png_destroy_read_struct(ptr noundef %9, ptr noundef %11, ptr noundef null)
  %63 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 7
  store i32 1, ptr %63, align 8, !tbaa !17
  store i32 1, ptr %10, align 4
  br label %252

64:                                               ; preds = %56
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.PngContext, ptr %66, i32 0, i32 2
  call void @png_set_read_fn(ptr noundef %65, ptr noundef %67, ptr noundef @readFn)
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = load ptr, ptr %11, align 8, !tbaa !5
  call void @png_read_info(ptr noundef %68, ptr noundef %69)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  %71 = load ptr, ptr %11, align 8, !tbaa !5
  %72 = call zeroext i8 @png_get_bit_depth(ptr noundef %70, ptr noundef %71)
  %73 = zext i8 %72 to i32
  store i32 %73, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #7
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = load ptr, ptr %11, align 8, !tbaa !5
  %76 = call zeroext i8 @png_get_color_type(ptr noundef %74, ptr noundef %75)
  store i8 %76, ptr %13, align 1, !tbaa !26
  %77 = load i32, ptr %12, align 4, !tbaa !11
  %78 = icmp slt i32 %77, 8
  br i1 %78, label %79, label %81

79:                                               ; preds = %64
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_expand_gray_1_2_4_to_8(ptr noundef %80)
  br label %81

81:                                               ; preds = %79, %64
  %82 = load i32, ptr %7, align 4, !tbaa !11
  switch i32 %82, label %181 [
    i32 1, label %83
    i32 2, label %106
    i32 3, label %131
    i32 4, label %154
    i32 0, label %179
  ]

83:                                               ; preds = %81
  %84 = load i8, ptr %13, align 1, !tbaa !26
  %85 = zext i8 %84 to i32
  switch i32 %85, label %104 [
    i32 0, label %86
    i32 4, label %88
    i32 3, label %90
    i32 2, label %99
    i32 6, label %101
  ]

86:                                               ; preds = %83
  %87 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 6
  store i64 0, ptr %87, align 8, !tbaa !18
  br label %105

88:                                               ; preds = %83
  %89 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_strip_alpha(ptr noundef %89)
  br label %105

90:                                               ; preds = %83
  %91 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_expand(ptr noundef %91)
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  %94 = call i32 @png_get_valid(ptr noundef %92, ptr noundef %93, i32 noundef 16)
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %96, label %98

96:                                               ; preds = %90
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_tRNS_to_alpha(ptr noundef %97)
  br label %98

98:                                               ; preds = %96, %90
  br label %105

99:                                               ; preds = %83
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_rgb_to_gray(ptr noundef %100, i32 noundef 1, double noundef -1.000000e+00, double noundef -1.000000e+00)
  br label %105

101:                                              ; preds = %83
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_rgb_to_gray(ptr noundef %102, i32 noundef 1, double noundef -1.000000e+00, double noundef -1.000000e+00)
  %103 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_strip_alpha(ptr noundef %103)
  br label %105

104:                                              ; preds = %83
  call void @abort() #10
  unreachable

105:                                              ; preds = %101, %99, %98, %88, %86
  br label %181

106:                                              ; preds = %81
  %107 = load i8, ptr %13, align 1, !tbaa !26
  %108 = zext i8 %107 to i32
  switch i32 %108, label %129 [
    i32 0, label %109
    i32 4, label %111
    i32 3, label %113
    i32 2, label %124
    i32 6, label %127
  ]

109:                                              ; preds = %106
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_filler(ptr noundef %110, i32 noundef 255, i32 noundef 1)
  br label %130

111:                                              ; preds = %106
  %112 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 6
  store i64 0, ptr %112, align 8, !tbaa !18
  br label %130

113:                                              ; preds = %106
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_expand(ptr noundef %114)
  %115 = load ptr, ptr %9, align 8, !tbaa !5
  %116 = load ptr, ptr %11, align 8, !tbaa !5
  %117 = call i32 @png_get_valid(ptr noundef %115, ptr noundef %116, i32 noundef 16)
  %118 = icmp ne i32 %117, 0
  br i1 %118, label %119, label %121

119:                                              ; preds = %113
  %120 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_tRNS_to_alpha(ptr noundef %120)
  br label %121

121:                                              ; preds = %119, %113
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_rgb_to_gray(ptr noundef %122, i32 noundef 1, double noundef -1.000000e+00, double noundef -1.000000e+00)
  %123 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_filler(ptr noundef %123, i32 noundef 255, i32 noundef 1)
  br label %130

124:                                              ; preds = %106
  %125 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_rgb_to_gray(ptr noundef %125, i32 noundef 1, double noundef -1.000000e+00, double noundef -1.000000e+00)
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_filler(ptr noundef %126, i32 noundef 255, i32 noundef 1)
  br label %130

127:                                              ; preds = %106
  %128 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_rgb_to_gray(ptr noundef %128, i32 noundef 1, double noundef -1.000000e+00, double noundef -1.000000e+00)
  br label %130

129:                                              ; preds = %106
  call void @abort() #10
  unreachable

130:                                              ; preds = %127, %124, %121, %111, %109
  br label %181

131:                                              ; preds = %81
  %132 = load i8, ptr %13, align 1, !tbaa !26
  %133 = zext i8 %132 to i32
  switch i32 %133, label %152 [
    i32 0, label %134
    i32 4, label %136
    i32 3, label %139
    i32 2, label %148
    i32 6, label %150
  ]

134:                                              ; preds = %131
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_gray_to_rgb(ptr noundef %135)
  br label %153

136:                                              ; preds = %131
  %137 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_gray_to_rgb(ptr noundef %137)
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_strip_alpha(ptr noundef %138)
  br label %153

139:                                              ; preds = %131
  %140 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_expand(ptr noundef %140)
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  %142 = load ptr, ptr %11, align 8, !tbaa !5
  %143 = call i32 @png_get_valid(ptr noundef %141, ptr noundef %142, i32 noundef 16)
  %144 = icmp ne i32 %143, 0
  br i1 %144, label %145, label %147

145:                                              ; preds = %139
  %146 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_tRNS_to_alpha(ptr noundef %146)
  br label %147

147:                                              ; preds = %145, %139
  br label %153

148:                                              ; preds = %131
  %149 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 6
  store i64 0, ptr %149, align 8, !tbaa !18
  br label %153

150:                                              ; preds = %131
  %151 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_strip_alpha(ptr noundef %151)
  br label %153

152:                                              ; preds = %131
  call void @abort() #10
  unreachable

153:                                              ; preds = %150, %148, %147, %136, %134
  br label %181

154:                                              ; preds = %81
  %155 = load i8, ptr %13, align 1, !tbaa !26
  %156 = zext i8 %155 to i32
  switch i32 %156, label %177 [
    i32 0, label %157
    i32 4, label %160
    i32 3, label %163
    i32 2, label %173
    i32 6, label %175
  ]

157:                                              ; preds = %154
  %158 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_gray_to_rgb(ptr noundef %158)
  %159 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_filler(ptr noundef %159, i32 noundef 255, i32 noundef 1)
  br label %178

160:                                              ; preds = %154
  %161 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_gray_to_rgb(ptr noundef %161)
  %162 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_filler(ptr noundef %162, i32 noundef 255, i32 noundef 1)
  br label %178

163:                                              ; preds = %154
  %164 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_expand(ptr noundef %164)
  %165 = load ptr, ptr %9, align 8, !tbaa !5
  %166 = load ptr, ptr %11, align 8, !tbaa !5
  %167 = call i32 @png_get_valid(ptr noundef %165, ptr noundef %166, i32 noundef 16)
  %168 = icmp ne i32 %167, 0
  br i1 %168, label %169, label %171

169:                                              ; preds = %163
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_tRNS_to_alpha(ptr noundef %170)
  br label %171

171:                                              ; preds = %169, %163
  %172 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_filler(ptr noundef %172, i32 noundef 255, i32 noundef 1)
  br label %178

173:                                              ; preds = %154
  %174 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_set_filler(ptr noundef %174, i32 noundef 255, i32 noundef 1)
  br label %178

175:                                              ; preds = %154
  %176 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 6
  store i64 0, ptr %176, align 8, !tbaa !18
  br label %178

177:                                              ; preds = %154
  call void @abort() #10
  unreachable

178:                                              ; preds = %175, %173, %171, %160, %157
  br label %181

179:                                              ; preds = %81
  %180 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 6
  store i64 0, ptr %180, align 8, !tbaa !18
  br label %181

181:                                              ; preds = %179, %178, %153, %130, %105, %81
  %182 = load ptr, ptr %9, align 8, !tbaa !5
  %183 = load ptr, ptr %11, align 8, !tbaa !5
  call void @png_read_update_info(ptr noundef %182, ptr noundef %183)
  %184 = load ptr, ptr %9, align 8, !tbaa !5
  %185 = load ptr, ptr %11, align 8, !tbaa !5
  %186 = call zeroext i8 @png_get_bit_depth(ptr noundef %184, ptr noundef %185)
  %187 = zext i8 %186 to i32
  store i32 %187, ptr %12, align 4, !tbaa !11
  %188 = load i32, ptr %12, align 4, !tbaa !11
  %189 = icmp sgt i32 %188, 8
  %190 = zext i1 %189 to i64
  %191 = select i1 %189, i32 2, i32 1
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 5
  store i64 %192, ptr %193, align 8, !tbaa !27
  %194 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 5
  %195 = load i64, ptr %194, align 8, !tbaa !27
  %196 = icmp eq i64 %195, 1
  %197 = zext i1 %196 to i64
  %198 = select i1 %196, i32 0, i32 1
  %199 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 4
  store i32 %198, ptr %199, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %200 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 1
  %201 = load ptr, ptr %200, align 8, !tbaa !16
  store ptr %201, ptr %14, align 8, !tbaa !5
  %202 = load ptr, ptr %9, align 8, !tbaa !5
  %203 = load ptr, ptr %11, align 8, !tbaa !5
  %204 = call i32 @png_get_image_height(ptr noundef %202, ptr noundef %203)
  %205 = zext i32 %204 to i64
  %206 = load ptr, ptr %14, align 8, !tbaa !5
  %207 = getelementptr inbounds i64, ptr %206, i64 0
  store i64 %205, ptr %207, align 8, !tbaa !9
  %208 = load ptr, ptr %9, align 8, !tbaa !5
  %209 = load ptr, ptr %11, align 8, !tbaa !5
  %210 = call i32 @png_get_image_width(ptr noundef %208, ptr noundef %209)
  %211 = zext i32 %210 to i64
  %212 = load ptr, ptr %14, align 8, !tbaa !5
  %213 = getelementptr inbounds i64, ptr %212, i64 1
  store i64 %211, ptr %213, align 8, !tbaa !9
  %214 = load ptr, ptr %9, align 8, !tbaa !5
  %215 = load ptr, ptr %11, align 8, !tbaa !5
  %216 = call zeroext i8 @png_get_channels(ptr noundef %214, ptr noundef %215)
  %217 = zext i8 %216 to i64
  %218 = load ptr, ptr %14, align 8, !tbaa !5
  %219 = getelementptr inbounds i64, ptr %218, i64 2
  store i64 %217, ptr %219, align 8, !tbaa !9
  %220 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 1
  %221 = load ptr, ptr %220, align 8, !tbaa !16
  %222 = getelementptr inbounds i64, ptr %221, i64 0
  %223 = load i64, ptr %222, align 8, !tbaa !9
  %224 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 1
  %225 = load ptr, ptr %224, align 8, !tbaa !16
  %226 = getelementptr inbounds i64, ptr %225, i64 1
  %227 = load i64, ptr %226, align 8, !tbaa !9
  %228 = mul i64 %223, %227
  %229 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 1
  %230 = load ptr, ptr %229, align 8, !tbaa !16
  %231 = getelementptr inbounds i64, ptr %230, i64 2
  %232 = load i64, ptr %231, align 8, !tbaa !9
  %233 = mul i64 %228, %232
  %234 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 5
  %235 = load i64, ptr %234, align 8, !tbaa !27
  %236 = mul i64 %233, %235
  %237 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 3
  store i64 %236, ptr %237, align 8, !tbaa !29
  %238 = load ptr, ptr %9, align 8, !tbaa !5
  %239 = load ptr, ptr %11, align 8, !tbaa !5
  %240 = call i64 @png_get_rowbytes(ptr noundef %238, ptr noundef %239)
  %241 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 1
  %242 = load ptr, ptr %241, align 8, !tbaa !16
  %243 = getelementptr inbounds i64, ptr %242, i64 0
  %244 = load i64, ptr %243, align 8, !tbaa !9
  %245 = mul i64 %240, %244
  %246 = getelementptr inbounds %struct.CDecoderInfo, ptr %0, i32 0, i32 3
  %247 = load i64, ptr %246, align 8, !tbaa !29
  %248 = icmp eq i64 %245, %247
  br i1 %248, label %249, label %250

249:                                              ; preds = %181
  br label %251

250:                                              ; preds = %181
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 426, ptr noundef @__PRETTY_FUNCTION__.pngDecodeInfo) #10
  unreachable

251:                                              ; preds = %249
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %252

252:                                              ; preds = %251, %62, %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %253

253:                                              ; preds = %252, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  ret void
}

declare noalias ptr @png_create_read_struct(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

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

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

declare zeroext i8 @png_get_bit_depth(ptr noundef, ptr noundef) #1

declare zeroext i8 @png_get_color_type(ptr noundef, ptr noundef) #1

declare void @png_set_expand_gray_1_2_4_to_8(ptr noundef) #1

declare void @png_set_strip_alpha(ptr noundef) #1

declare void @png_set_expand(ptr noundef) #1

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

declare void @png_set_tRNS_to_alpha(ptr noundef) #1

declare void @png_set_rgb_to_gray(ptr noundef, i32 noundef, double noundef, double noundef) #1

; Function Attrs: noreturn nounwind
declare void @abort() #2

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

declare void @png_set_gray_to_rgb(ptr noundef) #1

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

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

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

declare zeroext i8 @png_get_channels(ptr noundef, ptr noundef) #1

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 = { noreturn nounwind "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 #3 = { nounwind allocsize(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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind returns_twice "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 #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { nounwind returns_twice }
attributes #10 = { noreturn 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, !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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 24, !12, i64 32, !10, i64 40, !10, i64 48, !12, i64 56}
!15 = !{!14, !10, i64 16}
!16 = !{!14, !6, i64 8}
!17 = !{!14, !12, i64 56}
!18 = !{!14, !10, i64 48}
!19 = !{!20, !6, i64 16}
!20 = !{!"", !6, i64 0, !6, i64 8, !21, i64 16}
!21 = !{!"", !6, i64 0, !10, i64 8, !10, i64 16}
!22 = !{!20, !10, i64 24}
!23 = !{!20, !10, i64 32}
!24 = !{!20, !6, i64 0}
!25 = !{!20, !6, i64 8}
!26 = !{!7, !7, i64 0}
!27 = !{!14, !10, i64 40}
!28 = !{!14, !12, i64 32}
!29 = !{!14, !10, i64 24}


; 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"

%struct.CDecoderInfo = type { ptr, ptr, i64, i64, i32, i64, i64, i32 }

@.str.1 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [71 x i8], align 1
@__PRETTY_FUNCTION__.pngDecodeInfo = external hidden unnamed_addr constant [70 x i8], align 1

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

declare void @png_destroy_read_struct(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

declare noalias ptr @png_create_info_struct(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind returns_twice
declare i32 @_setjmp(ptr noundef) local_unnamed_addr #5

declare ptr @png_set_longjmp_fn(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @longjmp(ptr noundef, i32 noundef) #2

declare i64 @png_get_rowbytes(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @readFn(ptr noundef, ptr noundef, i64 noundef) #6

; Function Attrs: nounwind uwtable
define dso_local void @pngDecodeInfo(ptr dead_on_unwind noalias nocapture writable writeonly sret(%struct.CDecoderInfo) align 8 %0, ptr noundef %1, i64 noundef %2, i32 noundef %3) local_unnamed_addr #6 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = getelementptr inbounds i8, ptr %0, i64 24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %7, i8 0, i64 40, i1 false)
  %calloc = call dereferenceable_or_null(40) ptr @calloc(i64 1, i64 40)
  store ptr %calloc, ptr %0, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 16
  store i64 3, ptr %8, align 8, !tbaa !12
  %9 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #8
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %9, ptr %10, align 8, !tbaa !13
  %11 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 0, ptr %11, align 8, !tbaa !14
  %12 = getelementptr inbounds i8, ptr %0, i64 48
  store i64 1, ptr %12, align 8, !tbaa !15
  %13 = getelementptr inbounds i8, ptr %calloc, i64 16
  store ptr %1, ptr %13, align 8, !tbaa !16
  %14 = getelementptr inbounds i8, ptr %calloc, i64 24
  store i64 %2, ptr %14, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  %15 = call noalias ptr @png_create_read_struct(ptr noundef nonnull @.str.2, ptr noundef null, ptr noundef null, ptr noundef null) #9
  store ptr %15, ptr %5, align 8, !tbaa !20
  store ptr %15, ptr %calloc, align 8, !tbaa !21
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %18

17:                                               ; preds = %4
  store i32 1, ptr %11, align 8, !tbaa !14
  br label %144

18:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %19 = call noalias ptr @png_create_info_struct(ptr noundef nonnull %15) #9
  store ptr %19, ptr %6, align 8, !tbaa !20
  %20 = getelementptr inbounds i8, ptr %calloc, i64 8
  store ptr %19, ptr %20, align 8, !tbaa !22
  %21 = icmp eq ptr %19, null
  br i1 %21, label %22, label %23

22:                                               ; preds = %18
  call void @png_destroy_read_struct(ptr noundef nonnull %5, ptr noundef null, ptr noundef null) #9
  br label %.sink.split

23:                                               ; preds = %18
  %24 = load ptr, ptr %5, align 8, !tbaa !20
  %25 = call ptr @png_set_longjmp_fn(ptr noundef %24, ptr noundef nonnull @longjmp, i64 noundef 200) #9
  %26 = call i32 @_setjmp(ptr noundef %25) #10
  %.not = icmp eq i32 %26, 0
  br i1 %.not, label %28, label %27

27:                                               ; preds = %23
  call void @png_destroy_read_struct(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef null) #9
  br label %.sink.split

28:                                               ; preds = %23
  %29 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_read_fn(ptr noundef %29, ptr noundef nonnull %13, ptr noundef nonnull @readFn) #9
  %30 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_read_info(ptr noundef %30, ptr noundef nonnull %19) #9
  %31 = load ptr, ptr %5, align 8, !tbaa !20
  %32 = call zeroext i8 @png_get_bit_depth(ptr noundef %31, ptr noundef nonnull %19) #9
  %33 = load ptr, ptr %5, align 8, !tbaa !20
  %34 = call zeroext i8 @png_get_color_type(ptr noundef %33, ptr noundef nonnull %19) #9
  %35 = icmp ult i8 %32, 8
  br i1 %35, label %36, label %38

36:                                               ; preds = %28
  %37 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_expand_gray_1_2_4_to_8(ptr noundef %37) #9
  br label %38

38:                                               ; preds = %36, %28
  switch i32 %3, label %110 [
    i32 1, label %39
    i32 2, label %55
    i32 3, label %74
    i32 4, label %90
    i32 0, label %109
  ]

39:                                               ; preds = %38
  switch i8 %34, label %54 [
    i8 0, label %40
    i8 4, label %41
    i8 3, label %43
    i8 2, label %49
    i8 6, label %51
  ]

40:                                               ; preds = %39
  store i64 0, ptr %12, align 8, !tbaa !15
  br label %110

41:                                               ; preds = %39
  %42 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_strip_alpha(ptr noundef %42) #9
  br label %110

43:                                               ; preds = %39
  %44 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_expand(ptr noundef %44) #9
  %45 = load ptr, ptr %5, align 8, !tbaa !20
  %46 = call i32 @png_get_valid(ptr noundef %45, ptr noundef nonnull %19, i32 noundef 16) #9
  %.not22 = icmp eq i32 %46, 0
  br i1 %.not22, label %110, label %47

47:                                               ; preds = %43
  %48 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_tRNS_to_alpha(ptr noundef %48) #9
  br label %110

49:                                               ; preds = %39
  %50 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_rgb_to_gray(ptr noundef %50, i32 noundef 1, double noundef -1.000000e+00, double noundef -1.000000e+00) #9
  br label %110

51:                                               ; preds = %39
  %52 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_rgb_to_gray(ptr noundef %52, i32 noundef 1, double noundef -1.000000e+00, double noundef -1.000000e+00) #9
  %53 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_strip_alpha(ptr noundef %53) #9
  br label %110

54:                                               ; preds = %39
  call void @abort() #11
  unreachable

55:                                               ; preds = %38
  switch i8 %34, label %73 [
    i8 0, label %56
    i8 4, label %58
    i8 3, label %59
    i8 2, label %68
    i8 6, label %71
  ]

56:                                               ; preds = %55
  %57 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_filler(ptr noundef %57, i32 noundef 255, i32 noundef 1) #9
  br label %110

58:                                               ; preds = %55
  store i64 0, ptr %12, align 8, !tbaa !15
  br label %110

59:                                               ; preds = %55
  %60 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_expand(ptr noundef %60) #9
  %61 = load ptr, ptr %5, align 8, !tbaa !20
  %62 = call i32 @png_get_valid(ptr noundef %61, ptr noundef nonnull %19, i32 noundef 16) #9
  %.not21 = icmp eq i32 %62, 0
  br i1 %.not21, label %65, label %63

63:                                               ; preds = %59
  %64 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_tRNS_to_alpha(ptr noundef %64) #9
  br label %65

65:                                               ; preds = %63, %59
  %66 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_rgb_to_gray(ptr noundef %66, i32 noundef 1, double noundef -1.000000e+00, double noundef -1.000000e+00) #9
  %67 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_filler(ptr noundef %67, i32 noundef 255, i32 noundef 1) #9
  br label %110

68:                                               ; preds = %55
  %69 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_rgb_to_gray(ptr noundef %69, i32 noundef 1, double noundef -1.000000e+00, double noundef -1.000000e+00) #9
  %70 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_filler(ptr noundef %70, i32 noundef 255, i32 noundef 1) #9
  br label %110

71:                                               ; preds = %55
  %72 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_rgb_to_gray(ptr noundef %72, i32 noundef 1, double noundef -1.000000e+00, double noundef -1.000000e+00) #9
  br label %110

73:                                               ; preds = %55
  call void @abort() #11
  unreachable

74:                                               ; preds = %38
  switch i8 %34, label %89 [
    i8 0, label %75
    i8 4, label %77
    i8 3, label %80
    i8 2, label %86
    i8 6, label %87
  ]

75:                                               ; preds = %74
  %76 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_gray_to_rgb(ptr noundef %76) #9
  br label %110

77:                                               ; preds = %74
  %78 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_gray_to_rgb(ptr noundef %78) #9
  %79 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_strip_alpha(ptr noundef %79) #9
  br label %110

80:                                               ; preds = %74
  %81 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_expand(ptr noundef %81) #9
  %82 = load ptr, ptr %5, align 8, !tbaa !20
  %83 = call i32 @png_get_valid(ptr noundef %82, ptr noundef nonnull %19, i32 noundef 16) #9
  %.not20 = icmp eq i32 %83, 0
  br i1 %.not20, label %110, label %84

84:                                               ; preds = %80
  %85 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_tRNS_to_alpha(ptr noundef %85) #9
  br label %110

86:                                               ; preds = %74
  store i64 0, ptr %12, align 8, !tbaa !15
  br label %110

87:                                               ; preds = %74
  %88 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_strip_alpha(ptr noundef %88) #9
  br label %110

89:                                               ; preds = %74
  call void @abort() #11
  unreachable

90:                                               ; preds = %38
  switch i8 %34, label %108 [
    i8 0, label %91
    i8 4, label %94
    i8 3, label %97
    i8 2, label %105
    i8 6, label %107
  ]

91:                                               ; preds = %90
  %92 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_gray_to_rgb(ptr noundef %92) #9
  %93 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_filler(ptr noundef %93, i32 noundef 255, i32 noundef 1) #9
  br label %110

94:                                               ; preds = %90
  %95 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_gray_to_rgb(ptr noundef %95) #9
  %96 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_filler(ptr noundef %96, i32 noundef 255, i32 noundef 1) #9
  br label %110

97:                                               ; preds = %90
  %98 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_expand(ptr noundef %98) #9
  %99 = load ptr, ptr %5, align 8, !tbaa !20
  %100 = call i32 @png_get_valid(ptr noundef %99, ptr noundef nonnull %19, i32 noundef 16) #9
  %.not19 = icmp eq i32 %100, 0
  br i1 %.not19, label %103, label %101

101:                                              ; preds = %97
  %102 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_tRNS_to_alpha(ptr noundef %102) #9
  br label %103

103:                                              ; preds = %101, %97
  %104 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_filler(ptr noundef %104, i32 noundef 255, i32 noundef 1) #9
  br label %110

105:                                              ; preds = %90
  %106 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_set_filler(ptr noundef %106, i32 noundef 255, i32 noundef 1) #9
  br label %110

107:                                              ; preds = %90
  store i64 0, ptr %12, align 8, !tbaa !15
  br label %110

108:                                              ; preds = %90
  call void @abort() #11
  unreachable

109:                                              ; preds = %38
  store i64 0, ptr %12, align 8, !tbaa !15
  br label %110

110:                                              ; preds = %91, %94, %103, %105, %107, %75, %77, %86, %87, %84, %80, %56, %58, %65, %68, %71, %40, %41, %49, %51, %47, %43, %109, %38
  %111 = load ptr, ptr %5, align 8, !tbaa !20
  call void @png_read_update_info(ptr noundef %111, ptr noundef nonnull %19) #9
  %112 = load ptr, ptr %5, align 8, !tbaa !20
  %113 = call zeroext i8 @png_get_bit_depth(ptr noundef %112, ptr noundef nonnull %19) #9
  %114 = icmp ugt i8 %113, 8
  %115 = select i1 %114, i64 2, i64 1
  %116 = getelementptr inbounds i8, ptr %0, i64 40
  store i64 %115, ptr %116, align 8, !tbaa !23
  %117 = zext i1 %114 to i32
  %118 = getelementptr inbounds i8, ptr %0, i64 32
  store i32 %117, ptr %118, align 8, !tbaa !24
  %119 = load ptr, ptr %5, align 8, !tbaa !20
  %120 = call i32 @png_get_image_height(ptr noundef %119, ptr noundef nonnull %19) #9
  %121 = zext i32 %120 to i64
  store i64 %121, ptr %9, align 8, !tbaa !25
  %122 = load ptr, ptr %5, align 8, !tbaa !20
  %123 = call i32 @png_get_image_width(ptr noundef %122, ptr noundef nonnull %19) #9
  %124 = zext i32 %123 to i64
  %125 = getelementptr inbounds i8, ptr %9, i64 8
  store i64 %124, ptr %125, align 8, !tbaa !25
  %126 = load ptr, ptr %5, align 8, !tbaa !20
  %127 = call zeroext i8 @png_get_channels(ptr noundef %126, ptr noundef nonnull %19) #9
  %128 = zext i8 %127 to i64
  %129 = getelementptr inbounds i8, ptr %9, i64 16
  store i64 %128, ptr %129, align 8, !tbaa !25
  %130 = load i64, ptr %9, align 8, !tbaa !25
  %131 = load i64, ptr %125, align 8, !tbaa !25
  %132 = mul i64 %130, %128
  %133 = mul i64 %132, %131
  %134 = zext i1 %114 to i64
  %135 = shl i64 %133, %134
  %136 = getelementptr inbounds i8, ptr %0, i64 24
  store i64 %135, ptr %136, align 8, !tbaa !26
  %137 = load ptr, ptr %5, align 8, !tbaa !20
  %138 = call i64 @png_get_rowbytes(ptr noundef %137, ptr noundef nonnull %19) #9
  %139 = load i64, ptr %9, align 8, !tbaa !25
  %140 = mul i64 %139, %138
  %141 = icmp eq i64 %140, %135
  br i1 %141, label %143, label %142

142:                                              ; preds = %110
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 426, ptr noundef nonnull @__PRETTY_FUNCTION__.pngDecodeInfo) #11
  unreachable

.sink.split:                                      ; preds = %22, %27
  store i32 1, ptr %11, align 8, !tbaa !14
  br label %143

143:                                              ; preds = %.sink.split, %110
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  br label %144

144:                                              ; preds = %143, %17
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  ret void
}

declare noalias ptr @png_create_read_struct(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @png_set_read_fn(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @png_read_info(ptr noundef, ptr noundef) local_unnamed_addr #1

declare zeroext i8 @png_get_bit_depth(ptr noundef, ptr noundef) local_unnamed_addr #1

declare zeroext i8 @png_get_color_type(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @png_set_expand_gray_1_2_4_to_8(ptr noundef) local_unnamed_addr #1

declare void @png_set_strip_alpha(ptr noundef) local_unnamed_addr #1

declare void @png_set_expand(ptr noundef) local_unnamed_addr #1

declare i32 @png_get_valid(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @png_set_tRNS_to_alpha(ptr noundef) local_unnamed_addr #1

declare void @png_set_rgb_to_gray(ptr noundef, i32 noundef, double noundef, double noundef) local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #2

declare void @png_set_filler(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare void @png_set_gray_to_rgb(ptr noundef) local_unnamed_addr #1

declare void @png_read_update_info(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @png_get_image_height(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @png_get_image_width(ptr noundef, ptr noundef) local_unnamed_addr #1

declare zeroext i8 @png_get_channels(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #7

attributes #0 = { mustprogress 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 = { noreturn nounwind "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 #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind returns_twice "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 #6 = { 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 #7 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { nounwind }
attributes #10 = { nounwind returns_twice }
attributes #11 = { noreturn 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, !7, i64 0}
!6 = !{!"", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 24, !11, i64 32, !10, i64 40, !10, i64 48, !11, i64 56}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!6, !10, i64 16}
!13 = !{!6, !7, i64 8}
!14 = !{!6, !11, i64 56}
!15 = !{!6, !10, i64 48}
!16 = !{!17, !7, i64 16}
!17 = !{!"", !7, i64 0, !7, i64 8, !18, i64 16}
!18 = !{!"", !7, i64 0, !10, i64 8, !10, i64 16}
!19 = !{!17, !10, i64 24}
!20 = !{!7, !7, i64 0}
!21 = !{!17, !7, i64 0}
!22 = !{!17, !7, i64 8}
!23 = !{!6, !10, i64 40}
!24 = !{!6, !11, i64 32}
!25 = !{!10, !10, i64 0}
!26 = !{!6, !10, i64 24}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass