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

@.str = external hidden unnamed_addr constant [54 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @png_create_read_struct_2(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca [80 x i8], align 16
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store volatile i32 0, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %21 = load ptr, ptr %14, align 8, !tbaa !5
  %22 = load ptr, ptr %13, align 8, !tbaa !5
  %23 = call ptr @png_create_struct_2(i32 noundef 1, ptr noundef %21, ptr noundef %22)
  store volatile ptr %23, ptr %16, align 8, !tbaa !5
  %24 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %27

26:                                               ; preds = %7
  store ptr null, ptr %8, align 8
  store i32 1, ptr %19, align 4
  br label %227

27:                                               ; preds = %7
  %28 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.png_struct_def, ptr %28, i32 0, i32 130
  store i32 1000000, ptr %29, align 4, !tbaa !11
  %30 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.png_struct_def, ptr %30, i32 0, i32 131
  store i32 1000000, ptr %31, align 8, !tbaa !21
  %32 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.png_struct_def, ptr %32, i32 0, i32 132
  store i32 0, ptr %33, align 4, !tbaa !22
  %34 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %35 = call ptr @png_set_longjmp_fn(ptr noundef %34, ptr noundef @longjmp, i64 noundef 200)
  %36 = getelementptr inbounds [1 x %struct.__jmp_buf_tag], ptr %35, i64 0, i64 0
  %37 = call i32 @_setjmp(ptr noundef %36) #7
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %39, label %40

39:                                               ; preds = %27
  call void @abort() #8
  unreachable

40:                                               ; preds = %27
  %41 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %42 = load ptr, ptr %13, align 8, !tbaa !5
  %43 = load ptr, ptr %14, align 8, !tbaa !5
  %44 = load ptr, ptr %15, align 8, !tbaa !5
  call void @png_set_mem_fn(ptr noundef %41, ptr noundef %42, ptr noundef %43, ptr noundef %44)
  %45 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = load ptr, ptr %12, align 8, !tbaa !5
  call void @png_set_error_fn(ptr noundef %45, ptr noundef %46, ptr noundef %47, ptr noundef %48)
  %49 = load ptr, ptr %9, align 8, !tbaa !5
  %50 = icmp ne ptr %49, null
  br i1 %50, label %51, label %83

51:                                               ; preds = %40
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %74, %51
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  %54 = load i32, ptr %18, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds i8, ptr %53, i64 %55
  %57 = load i8, ptr %56, align 1, !tbaa !23
  %58 = sext i8 %57 to i32
  %59 = call ptr @png_get_header_ver(ptr noundef null)
  %60 = load i32, ptr %18, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds i8, ptr %59, i64 %61
  %63 = load i8, ptr %62, align 1, !tbaa !23
  %64 = sext i8 %63 to i32
  %65 = icmp ne i32 %58, %64
  br i1 %65, label %66, label %73

66:                                               ; preds = %52
  %67 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.png_struct_def, ptr %67, i32 0, i32 14
  %69 = load i32, ptr %68, align 8, !tbaa !24
  %70 = zext i32 %69 to i64
  %71 = or i64 %70, 131072
  %72 = trunc i64 %71 to i32
  store i32 %72, ptr %68, align 8, !tbaa !24
  br label %73

73:                                               ; preds = %66, %52
  br label %74

74:                                               ; preds = %73
  %75 = call ptr @png_get_header_ver(ptr noundef null)
  %76 = load i32, ptr %18, align 4, !tbaa !9
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %18, align 4, !tbaa !9
  %78 = sext i32 %76 to i64
  %79 = getelementptr inbounds i8, ptr %75, i64 %78
  %80 = load i8, ptr %79, align 1, !tbaa !23
  %81 = icmp ne i8 %80, 0
  br i1 %81, label %52, label %82, !llvm.loop !25

82:                                               ; preds = %74
  br label %90

83:                                               ; preds = %40
  %84 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.png_struct_def, ptr %84, i32 0, i32 14
  %86 = load i32, ptr %85, align 8, !tbaa !24
  %87 = zext i32 %86 to i64
  %88 = or i64 %87, 131072
  %89 = trunc i64 %88 to i32
  store i32 %89, ptr %85, align 8, !tbaa !24
  br label %90

90:                                               ; preds = %83, %82
  %91 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.png_struct_def, ptr %91, i32 0, i32 14
  %93 = load i32, ptr %92, align 8, !tbaa !24
  %94 = zext i32 %93 to i64
  %95 = and i64 %94, 131072
  %96 = icmp ne i64 %95, 0
  br i1 %96, label %97, label %155

97:                                               ; preds = %90
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = icmp eq ptr %98, null
  br i1 %99, label %138, label %100

100:                                              ; preds = %97
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = getelementptr inbounds i8, ptr %101, i64 0
  %103 = load i8, ptr %102, align 1, !tbaa !23
  %104 = sext i8 %103 to i32
  %105 = call ptr @png_get_header_ver(ptr noundef null)
  %106 = getelementptr inbounds i8, ptr %105, i64 0
  %107 = load i8, ptr %106, align 1, !tbaa !23
  %108 = sext i8 %107 to i32
  %109 = icmp ne i32 %104, %108
  br i1 %109, label %138, label %110

110:                                              ; preds = %100
  %111 = load ptr, ptr %9, align 8, !tbaa !5
  %112 = getelementptr inbounds i8, ptr %111, i64 0
  %113 = load i8, ptr %112, align 1, !tbaa !23
  %114 = sext i8 %113 to i32
  %115 = icmp eq i32 %114, 49
  br i1 %115, label %116, label %126

116:                                              ; preds = %110
  %117 = load ptr, ptr %9, align 8, !tbaa !5
  %118 = getelementptr inbounds i8, ptr %117, i64 2
  %119 = load i8, ptr %118, align 1, !tbaa !23
  %120 = sext i8 %119 to i32
  %121 = call ptr @png_get_header_ver(ptr noundef null)
  %122 = getelementptr inbounds i8, ptr %121, i64 2
  %123 = load i8, ptr %122, align 1, !tbaa !23
  %124 = sext i8 %123 to i32
  %125 = icmp ne i32 %120, %124
  br i1 %125, label %138, label %126

126:                                              ; preds = %116, %110
  %127 = load ptr, ptr %9, align 8, !tbaa !5
  %128 = getelementptr inbounds i8, ptr %127, i64 0
  %129 = load i8, ptr %128, align 1, !tbaa !23
  %130 = sext i8 %129 to i32
  %131 = icmp eq i32 %130, 48
  br i1 %131, label %132, label %154

132:                                              ; preds = %126
  %133 = load ptr, ptr %9, align 8, !tbaa !5
  %134 = getelementptr inbounds i8, ptr %133, i64 2
  %135 = load i8, ptr %134, align 1, !tbaa !23
  %136 = sext i8 %135 to i32
  %137 = icmp slt i32 %136, 57
  br i1 %137, label %138, label %154

138:                                              ; preds = %132, %116, %100, %97
  call void @llvm.lifetime.start.p0(i64 80, ptr %20) #6
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  %140 = icmp ne ptr %139, null
  br i1 %140, label %141, label %147

141:                                              ; preds = %138
  %142 = getelementptr inbounds [80 x i8], ptr %20, i64 0, i64 0
  %143 = load ptr, ptr %9, align 8, !tbaa !5
  %144 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %142, i64 noundef 80, ptr noundef @.str, ptr noundef %143) #6
  %145 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %146 = getelementptr inbounds [80 x i8], ptr %20, i64 0, i64 0
  call void @png_warning(ptr noundef %145, ptr noundef %146)
  br label %147

147:                                              ; preds = %141, %138
  %148 = getelementptr inbounds [80 x i8], ptr %20, i64 0, i64 0
  %149 = call ptr @png_get_header_ver(ptr noundef null)
  %150 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %148, i64 noundef 80, ptr noundef @.str.1, ptr noundef %149) #6
  %151 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %152 = getelementptr inbounds [80 x i8], ptr %20, i64 0, i64 0
  call void @png_warning(ptr noundef %151, ptr noundef %152)
  %153 = load volatile ptr, ptr %16, align 8, !tbaa !5
  call void @png_warning(ptr noundef %153, ptr noundef @.str.2)
  store volatile i32 1, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 80, ptr %20) #6
  br label %154

154:                                              ; preds = %147, %132, %126
  br label %155

155:                                              ; preds = %154, %90
  %156 = load volatile i32, ptr %17, align 4, !tbaa !9
  %157 = icmp ne i32 %156, 0
  br i1 %157, label %174, label %158

158:                                              ; preds = %155
  %159 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.png_struct_def, ptr %159, i32 0, i32 18
  store i64 8192, ptr %160, align 8, !tbaa !27
  %161 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %162 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.png_struct_def, ptr %162, i32 0, i32 18
  %164 = load i64, ptr %163, align 8, !tbaa !27
  %165 = call ptr @png_malloc_warn(ptr noundef %161, i64 noundef %164)
  %166 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.png_struct_def, ptr %166, i32 0, i32 17
  store ptr %165, ptr %167, align 8, !tbaa !28
  %168 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.png_struct_def, ptr %168, i32 0, i32 17
  %170 = load ptr, ptr %169, align 8, !tbaa !28
  %171 = icmp eq ptr %170, null
  br i1 %171, label %172, label %173

172:                                              ; preds = %158
  store volatile i32 1, ptr %17, align 4, !tbaa !9
  br label %173

173:                                              ; preds = %172, %158
  br label %174

174:                                              ; preds = %173, %155
  %175 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.png_struct_def, ptr %175, i32 0, i32 16
  %177 = getelementptr inbounds %struct.z_stream_s, ptr %176, i32 0, i32 8
  store ptr @png_zalloc, ptr %177, align 8, !tbaa !29
  %178 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.png_struct_def, ptr %178, i32 0, i32 16
  %180 = getelementptr inbounds %struct.z_stream_s, ptr %179, i32 0, i32 9
  store ptr @png_zfree, ptr %180, align 8, !tbaa !30
  %181 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %182 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.png_struct_def, ptr %182, i32 0, i32 16
  %184 = getelementptr inbounds %struct.z_stream_s, ptr %183, i32 0, i32 10
  store ptr %181, ptr %184, align 8, !tbaa !31
  %185 = load volatile i32, ptr %17, align 4, !tbaa !9
  %186 = icmp ne i32 %185, 0
  br i1 %186, label %198, label %187

187:                                              ; preds = %174
  %188 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.png_struct_def, ptr %188, i32 0, i32 16
  %190 = call i32 @inflateInit_(ptr noundef %189, ptr noundef @.str.3, i32 noundef 112)
  switch i32 %190, label %195 [
    i32 0, label %197
    i32 -4, label %191
    i32 -2, label %191
    i32 -6, label %193
  ]

191:                                              ; preds = %187, %187
  %192 = load volatile ptr, ptr %16, align 8, !tbaa !5
  call void @png_warning(ptr noundef %192, ptr noundef @.str.4)
  store volatile i32 1, ptr %17, align 4, !tbaa !9
  br label %197

193:                                              ; preds = %187
  %194 = load volatile ptr, ptr %16, align 8, !tbaa !5
  call void @png_warning(ptr noundef %194, ptr noundef @.str.5)
  store volatile i32 1, ptr %17, align 4, !tbaa !9
  br label %197

195:                                              ; preds = %187
  %196 = load volatile ptr, ptr %16, align 8, !tbaa !5
  call void @png_warning(ptr noundef %196, ptr noundef @.str.6)
  store volatile i32 1, ptr %17, align 4, !tbaa !9
  br label %197

197:                                              ; preds = %195, %193, %191, %187
  br label %198

198:                                              ; preds = %197, %174
  %199 = load volatile i32, ptr %17, align 4, !tbaa !9
  %200 = icmp ne i32 %199, 0
  br i1 %200, label %201, label %211

201:                                              ; preds = %198
  %202 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %203 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.png_struct_def, ptr %203, i32 0, i32 17
  %205 = load ptr, ptr %204, align 8, !tbaa !28
  call void @png_free(ptr noundef %202, ptr noundef %205)
  %206 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.png_struct_def, ptr %206, i32 0, i32 17
  store ptr null, ptr %207, align 8, !tbaa !28
  %208 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %209 = load ptr, ptr %15, align 8, !tbaa !5
  %210 = load ptr, ptr %13, align 8, !tbaa !5
  call void @png_destroy_struct_2(ptr noundef %208, ptr noundef %209, ptr noundef %210)
  store ptr null, ptr %8, align 8
  store i32 1, ptr %19, align 4
  br label %227

211:                                              ; preds = %198
  %212 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.png_struct_def, ptr %212, i32 0, i32 17
  %214 = load ptr, ptr %213, align 8, !tbaa !28
  %215 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.png_struct_def, ptr %215, i32 0, i32 16
  %217 = getelementptr inbounds %struct.z_stream_s, ptr %216, i32 0, i32 3
  store ptr %214, ptr %217, align 8, !tbaa !32
  %218 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.png_struct_def, ptr %218, i32 0, i32 18
  %220 = load i64, ptr %219, align 8, !tbaa !27
  %221 = trunc i64 %220 to i32
  %222 = load volatile ptr, ptr %16, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.png_struct_def, ptr %222, i32 0, i32 16
  %224 = getelementptr inbounds %struct.z_stream_s, ptr %223, i32 0, i32 4
  store i32 %221, ptr %224, align 8, !tbaa !33
  %225 = load volatile ptr, ptr %16, align 8, !tbaa !5
  call void @png_set_read_fn(ptr noundef %225, ptr noundef null, ptr noundef null)
  %226 = load volatile ptr, ptr %16, align 8, !tbaa !5
  store ptr %226, ptr %8, align 8
  store i32 1, ptr %19, align 4
  br label %227

227:                                              ; preds = %211, %201, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  %228 = load ptr, ptr %8, align 8
  ret ptr %228
}

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

declare ptr @png_create_struct_2(i32 noundef, ptr noundef, ptr noundef) #2

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

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

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

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

declare void @png_set_mem_fn(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare void @png_set_error_fn(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare ptr @png_get_header_ver(ptr noundef) #2

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #5

declare void @png_warning(ptr noundef, ptr noundef) #2

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

declare ptr @png_malloc_warn(ptr noundef, i64 noundef) #2

declare ptr @png_zalloc(ptr noundef, i32 noundef, i32 noundef) #2

declare void @png_zfree(ptr noundef, ptr noundef) #2

declare i32 @inflateInit_(ptr noundef, ptr noundef, i32 noundef) #2

declare void @png_free(ptr noundef, ptr noundef) #2

declare void @png_destroy_struct_2(ptr noundef, ptr noundef, ptr noundef) #2

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 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 #4 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { nounwind returns_twice }
attributes #8 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 1108}
!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 = !{!12, !10, i64 1112}
!22 = !{!12, !10, i64 1116}
!23 = !{!7, !7, i64 0}
!24 = !{!12, !10, i64 288}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!12, !14, i64 416}
!28 = !{!12, !6, i64 408}
!29 = !{!12, !6, i64 360}
!30 = !{!12, !6, i64 368}
!31 = !{!12, !6, i64 376}
!32 = !{!12, !6, i64 320}
!33 = !{!12, !10, i64 328}


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

@.str = external hidden unnamed_addr constant [54 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @png_create_read_struct_2(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #0 {
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca [80 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9)
  store volatile i32 0, ptr %9, align 4, !tbaa !5
  %11 = call ptr @png_create_struct_2(i32 noundef 1, ptr noundef %5, ptr noundef %4) #6
  store volatile ptr %11, ptr %8, align 8, !tbaa !9
  %.0..0..0..0.5 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %12 = icmp eq ptr %.0..0..0..0.5, null
  br i1 %12, label %103, label %13

13:                                               ; preds = %7
  %.0..0..0..0.6 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %14 = getelementptr inbounds i8, ptr %.0..0..0..0.6, i64 1108
  store i32 1000000, ptr %14, align 4, !tbaa !11
  %.0..0..0..0.7 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %15 = getelementptr inbounds i8, ptr %.0..0..0..0.7, i64 1112
  store i32 1000000, ptr %15, align 8, !tbaa !21
  %.0..0..0..0.8 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %16 = getelementptr inbounds i8, ptr %.0..0..0..0.8, i64 1116
  store i32 0, ptr %16, align 4, !tbaa !22
  %.0..0..0..0.9 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %17 = call ptr @png_set_longjmp_fn(ptr noundef %.0..0..0..0.9, ptr noundef nonnull @longjmp, i64 noundef 200) #6
  %18 = call i32 @_setjmp(ptr noundef %17) #7
  %.not = icmp eq i32 %18, 0
  br i1 %.not, label %20, label %19

19:                                               ; preds = %13
  call void @abort() #8
  unreachable

20:                                               ; preds = %13
  %.0..0..0..0.10 = load volatile ptr, ptr %8, align 8, !tbaa !9
  call void @png_set_mem_fn(ptr noundef %.0..0..0..0.10, ptr noundef %4, ptr noundef %5, ptr noundef %6) #6
  %.0..0..0..0.11 = load volatile ptr, ptr %8, align 8, !tbaa !9
  call void @png_set_error_fn(ptr noundef %.0..0..0..0.11, ptr noundef %1, ptr noundef %2, ptr noundef %3) #6
  %.not64 = icmp eq ptr %0, null
  br i1 %.not64, label %.thread, label %.preheader

.preheader:                                       ; preds = %20, %30
  %indvars.iv = phi i64 [ %indvars.iv.next, %30 ], [ 0, %20 ]
  %21 = getelementptr inbounds i8, ptr %0, i64 %indvars.iv
  %22 = load i8, ptr %21, align 1, !tbaa !23
  %23 = call ptr @png_get_header_ver(ptr noundef null) #6
  %24 = getelementptr inbounds i8, ptr %23, i64 %indvars.iv
  %25 = load i8, ptr %24, align 1, !tbaa !23
  %.not65 = icmp eq i8 %22, %25
  br i1 %.not65, label %30, label %26

26:                                               ; preds = %.preheader
  %.0..0..0..0.12 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %27 = getelementptr inbounds i8, ptr %.0..0..0..0.12, i64 288
  %28 = load i32, ptr %27, align 8, !tbaa !24
  %29 = or i32 %28, 131072
  store i32 %29, ptr %27, align 8, !tbaa !24
  br label %30

30:                                               ; preds = %.preheader, %26
  %31 = call ptr @png_get_header_ver(ptr noundef null) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %32 = getelementptr inbounds i8, ptr %31, i64 %indvars.iv
  %33 = load i8, ptr %32, align 1, !tbaa !23
  %.not66 = icmp eq i8 %33, 0
  br i1 %.not66, label %34, label %.preheader, !llvm.loop !25

34:                                               ; preds = %30
  %.0..0..0..0.14 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %35 = getelementptr inbounds i8, ptr %.0..0..0..0.14, i64 288
  %36 = load i32, ptr %35, align 8, !tbaa !24
  %37 = and i32 %36, 131072
  %.not67 = icmp eq i32 %37, 0
  br i1 %.not67, label %69, label %44

.thread:                                          ; preds = %20
  %.0..0..0..0.13 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %38 = getelementptr inbounds i8, ptr %.0..0..0..0.13, i64 288
  %39 = load i32, ptr %38, align 8, !tbaa !24
  %40 = or i32 %39, 131072
  store i32 %40, ptr %38, align 8, !tbaa !24
  %.0..0..0..0.1473 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %41 = getelementptr inbounds i8, ptr %.0..0..0..0.1473, i64 288
  %42 = load i32, ptr %41, align 8, !tbaa !24
  %43 = and i32 %42, 131072
  %.not6774 = icmp eq i32 %43, 0
  br i1 %.not6774, label %69, label %.thread75

44:                                               ; preds = %34
  %45 = load i8, ptr %0, align 1, !tbaa !23
  %46 = call ptr @png_get_header_ver(ptr noundef null) #6
  %47 = load i8, ptr %46, align 1, !tbaa !23
  %.not68 = icmp eq i8 %45, %47
  br i1 %.not68, label %48, label %64

48:                                               ; preds = %44
  %49 = load i8, ptr %0, align 1, !tbaa !23
  %50 = icmp eq i8 %49, 49
  br i1 %50, label %51, label %57

51:                                               ; preds = %48
  %52 = getelementptr inbounds i8, ptr %0, i64 2
  %53 = load i8, ptr %52, align 1, !tbaa !23
  %54 = call ptr @png_get_header_ver(ptr noundef null) #6
  %55 = getelementptr inbounds i8, ptr %54, i64 2
  %56 = load i8, ptr %55, align 1, !tbaa !23
  %.not69 = icmp eq i8 %53, %56
  br i1 %.not69, label %thread-pre-split, label %64

thread-pre-split:                                 ; preds = %51
  %.pr = load i8, ptr %0, align 1, !tbaa !23
  br label %57

57:                                               ; preds = %thread-pre-split, %48
  %58 = phi i8 [ %.pr, %thread-pre-split ], [ %49, %48 ]
  %59 = icmp eq i8 %58, 48
  br i1 %59, label %60, label %69

60:                                               ; preds = %57
  %61 = getelementptr inbounds i8, ptr %0, i64 2
  %62 = load i8, ptr %61, align 1, !tbaa !23
  %63 = icmp slt i8 %62, 57
  br i1 %63, label %64, label %69

.thread75:                                        ; preds = %.thread
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %10) #6
  br label %66

64:                                               ; preds = %60, %51, %44
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %10) #6
  %65 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %10, i64 noundef 80, ptr noundef nonnull @.str, ptr noundef nonnull %0) #6
  %.0..0..0..0.15 = load volatile ptr, ptr %8, align 8, !tbaa !9
  call void @png_warning(ptr noundef %.0..0..0..0.15, ptr noundef nonnull %10) #6
  br label %66

66:                                               ; preds = %.thread75, %64
  %67 = call ptr @png_get_header_ver(ptr noundef null) #6
  %68 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %10, i64 noundef 80, ptr noundef nonnull @.str.1, ptr noundef %67) #6
  %.0..0..0..0.16 = load volatile ptr, ptr %8, align 8, !tbaa !9
  call void @png_warning(ptr noundef %.0..0..0..0.16, ptr noundef nonnull %10) #6
  %.0..0..0..0.17 = load volatile ptr, ptr %8, align 8, !tbaa !9
  call void @png_warning(ptr noundef %.0..0..0..0.17, ptr noundef nonnull @.str.2) #6
  store volatile i32 1, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %10) #6
  br label %69

69:                                               ; preds = %.thread, %57, %60, %66, %34
  %.0..0..0..0. = load volatile i32, ptr %9, align 4, !tbaa !5
  %.not70 = icmp eq i32 %.0..0..0..0., 0
  br i1 %.not70, label %70, label %80

70:                                               ; preds = %69
  %.0..0..0..0.18 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %71 = getelementptr inbounds i8, ptr %.0..0..0..0.18, i64 416
  store i64 8192, ptr %71, align 8, !tbaa !27
  %.0..0..0..0.19 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %.0..0..0..0.20 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %72 = getelementptr inbounds i8, ptr %.0..0..0..0.20, i64 416
  %73 = load i64, ptr %72, align 8, !tbaa !27
  %74 = call ptr @png_malloc_warn(ptr noundef %.0..0..0..0.19, i64 noundef %73) #6
  %.0..0..0..0.21 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %75 = getelementptr inbounds i8, ptr %.0..0..0..0.21, i64 408
  store ptr %74, ptr %75, align 8, !tbaa !28
  %.0..0..0..0.22 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %76 = getelementptr inbounds i8, ptr %.0..0..0..0.22, i64 408
  %77 = load ptr, ptr %76, align 8, !tbaa !28
  %78 = icmp eq ptr %77, null
  br i1 %78, label %79, label %80

79:                                               ; preds = %70
  store volatile i32 1, ptr %9, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %70, %79, %69
  %.0..0..0..0.23 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %81 = getelementptr inbounds i8, ptr %.0..0..0..0.23, i64 360
  store ptr @png_zalloc, ptr %81, align 8, !tbaa !29
  %.0..0..0..0.24 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %82 = getelementptr inbounds i8, ptr %.0..0..0..0.24, i64 368
  store ptr @png_zfree, ptr %82, align 8, !tbaa !30
  %.0..0..0..0.25 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %.0..0..0..0.26 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %83 = getelementptr inbounds i8, ptr %.0..0..0..0.26, i64 376
  store ptr %.0..0..0..0.25, ptr %83, align 8, !tbaa !31
  %.0..0..0..0.3 = load volatile i32, ptr %9, align 4, !tbaa !5
  %.not71 = icmp eq i32 %.0..0..0..0.3, 0
  br i1 %.not71, label %84, label %90

84:                                               ; preds = %80
  %.0..0..0..0.27 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %85 = getelementptr inbounds i8, ptr %.0..0..0..0.27, i64 296
  %86 = call i32 @inflateInit_(ptr noundef nonnull %85, ptr noundef nonnull @.str.3, i32 noundef 112) #6
  switch i32 %86, label %89 [
    i32 0, label %90
    i32 -4, label %87
    i32 -2, label %87
    i32 -6, label %88
  ]

87:                                               ; preds = %84, %84
  %.0..0..0..0.28 = load volatile ptr, ptr %8, align 8, !tbaa !9
  call void @png_warning(ptr noundef %.0..0..0..0.28, ptr noundef nonnull @.str.4) #6
  store volatile i32 1, ptr %9, align 4, !tbaa !5
  br label %90

88:                                               ; preds = %84
  %.0..0..0..0.29 = load volatile ptr, ptr %8, align 8, !tbaa !9
  call void @png_warning(ptr noundef %.0..0..0..0.29, ptr noundef nonnull @.str.5) #6
  store volatile i32 1, ptr %9, align 4, !tbaa !5
  br label %90

89:                                               ; preds = %84
  %.0..0..0..0.30 = load volatile ptr, ptr %8, align 8, !tbaa !9
  call void @png_warning(ptr noundef %.0..0..0..0.30, ptr noundef nonnull @.str.6) #6
  store volatile i32 1, ptr %9, align 4, !tbaa !5
  br label %90

90:                                               ; preds = %84, %87, %88, %89, %80
  %.0..0..0..0.4 = load volatile i32, ptr %9, align 4, !tbaa !5
  %.not72 = icmp eq i32 %.0..0..0..0.4, 0
  %.0..0..0..0.35 = load volatile ptr, ptr %8, align 8, !tbaa !9
  br i1 %.not72, label %95, label %91

91:                                               ; preds = %90
  %.0..0..0..0.32 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %92 = getelementptr inbounds i8, ptr %.0..0..0..0.32, i64 408
  %93 = load ptr, ptr %92, align 8, !tbaa !28
  call void @png_free(ptr noundef %.0..0..0..0.35, ptr noundef %93) #6
  %.0..0..0..0.33 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %94 = getelementptr inbounds i8, ptr %.0..0..0..0.33, i64 408
  store ptr null, ptr %94, align 8, !tbaa !28
  %.0..0..0..0.34 = load volatile ptr, ptr %8, align 8, !tbaa !9
  call void @png_destroy_struct_2(ptr noundef %.0..0..0..0.34, ptr noundef %6, ptr noundef %4) #6
  br label %103

95:                                               ; preds = %90
  %96 = getelementptr inbounds i8, ptr %.0..0..0..0.35, i64 408
  %97 = load ptr, ptr %96, align 8, !tbaa !28
  %.0..0..0..0.36 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %98 = getelementptr inbounds i8, ptr %.0..0..0..0.36, i64 320
  store ptr %97, ptr %98, align 8, !tbaa !32
  %.0..0..0..0.37 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %99 = getelementptr inbounds i8, ptr %.0..0..0..0.37, i64 416
  %100 = load i64, ptr %99, align 8, !tbaa !27
  %101 = trunc i64 %100 to i32
  %.0..0..0..0.38 = load volatile ptr, ptr %8, align 8, !tbaa !9
  %102 = getelementptr inbounds i8, ptr %.0..0..0..0.38, i64 328
  store i32 %101, ptr %102, align 8, !tbaa !33
  %.0..0..0..0.39 = load volatile ptr, ptr %8, align 8, !tbaa !9
  call void @png_set_read_fn(ptr noundef %.0..0..0..0.39, ptr noundef null, ptr noundef null) #6
  %.0..0..0..0.40 = load volatile ptr, ptr %8, align 8, !tbaa !9
  br label %103

103:                                              ; preds = %7, %95, %91
  %.062 = phi ptr [ null, %91 ], [ %.0..0..0..0.40, %95 ], [ null, %7 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8)
  ret ptr %.062
}

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

declare ptr @png_create_struct_2(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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

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

declare void @png_set_mem_fn(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @png_set_error_fn(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @png_get_header_ver(ptr noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #5

declare void @png_warning(ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare ptr @png_malloc_warn(ptr noundef, i64 noundef) local_unnamed_addr #2

declare ptr @png_zalloc(ptr noundef, i32 noundef, i32 noundef) #2

declare void @png_zfree(ptr noundef, ptr noundef) #2

declare i32 @inflateInit_(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @png_free(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @png_destroy_struct_2(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 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 #4 = { 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 #5 = { nofree 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 #6 = { nounwind }
attributes #7 = { nounwind returns_twice }
attributes #8 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 1108}
!12 = !{!"png_struct_def", !7, i64 0, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !7, i64 280, !7, i64 281, !6, i64 284, !6, i64 288, !6, i64 292, !13, i64 296, !10, i64 408, !14, i64 416, !6, i64 424, !6, i64 428, !6, i64 432, !6, i64 436, !6, i64 440, !6, i64 444, !6, i64 448, !6, i64 452, !6, i64 456, !14, i64 464, !14, i64 472, !6, i64 480, !6, i64 484, !10, i64 488, !10, i64 496, !10, i64 504, !10, i64 512, !10, i64 520, !10, i64 528, !15, i64 536, !6, i64 560, !6, i64 564, !10, 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, !10, i64 632, !6, i64 640, !6, i64 644, !6, i64 648, !17, i64 652, !17, i64 656, !10, i64 664, !10, i64 672, !10, i64 680, !10, i64 688, !10, i64 696, !10, i64 704, !19, i64 712, !19, i64 717, !10, i64 728, !18, i64 736, !10, i64 752, !10, i64 760, !10, i64 768, !10, i64 776, !10, i64 784, !10, i64 792, !10, i64 800, !10, i64 808, !10, i64 816, !6, i64 824, !6, i64 828, !14, i64 832, !14, i64 840, !14, i64 848, !14, i64 856, !6, i64 864, !6, i64 868, !14, i64 872, !14, i64 880, !10, i64 888, !10, i64 896, !10, i64 904, !10, i64 912, !10, i64 920, !7, i64 928, !7, i64 929, !10, i64 936, !10, i64 944, !10, i64 952, !10, i64 960, !10, i64 968, !10, i64 976, !6, i64 984, !10, i64 992, !10, i64 1000, !6, i64 1008, !10, i64 1016, !7, i64 1024, !16, i64 1026, !16, i64 1028, !16, i64 1030, !6, i64 1032, !6, i64 1036, !7, i64 1040, !10, i64 1048, !10, i64 1056, !10, i64 1064, !10, i64 1072, !10, i64 1080, !10, i64 1088, !10, i64 1096, !7, i64 1104, !6, i64 1108, !6, i64 1112, !6, i64 1116, !20, i64 1120, !6, i64 1152, !6, i64 1156, !10, i64 1160, !6, i64 1168}
!13 = !{!"z_stream_s", !10, i64 0, !6, i64 8, !14, i64 16, !10, i64 24, !6, i64 32, !14, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !6, i64 88, !14, i64 96, !14, i64 104}
!14 = !{!"long", !7, i64 0}
!15 = !{!"png_row_info_struct", !6, 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, !10, i64 8, !14, i64 16, !7, i64 24}
!21 = !{!12, !6, i64 1112}
!22 = !{!12, !6, i64 1116}
!23 = !{!7, !7, i64 0}
!24 = !{!12, !6, i64 288}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!12, !14, i64 416}
!28 = !{!12, !10, i64 408}
!29 = !{!12, !10, i64 360}
!30 = !{!12, !10, i64 368}
!31 = !{!12, !10, i64 376}
!32 = !{!12, !10, i64 320}
!33 = !{!12, !6, i64 328}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass