; LLVM IR from rdguez-mariano/fast_imas_IPOL :: io_png/libs/png (pngwutil)

; 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, i8, i8, i64, i64, i64, %struct.z_stream_s, ptr, i64, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, %struct.png_row_info_struct, i64, i64, 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, i64, i64, 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, i64, i64, i64, i64, i64, i64, i32, i32, i64, i64, ptr, ptr, ptr, ptr, ptr, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, i64, ptr, ptr, i32, ptr, i8, i16, i16, i16, i64, i64, i8, i8, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i64, i64, %struct.png_unknown_chunk_t, i64, i64, ptr }
%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 { i64, 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 [38 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [33 x i8], align 1
@png_IHDR = external global [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [37 x i8], align 1

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @png_write_IHDR(ptr noundef %0, i64 noundef %1, i64 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7) #0 {
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca [13 x i8], align 1
  store ptr %0, ptr %9, align 8, !tbaa !5
  store i64 %1, ptr %10, align 8, !tbaa !9
  store i64 %2, ptr %11, align 8, !tbaa !9
  store i32 %3, ptr %12, align 4, !tbaa !11
  store i32 %4, ptr %13, align 4, !tbaa !11
  store i32 %5, ptr %14, align 4, !tbaa !11
  store i32 %6, ptr %15, align 4, !tbaa !11
  store i32 %7, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 13, ptr %18) #3
  %19 = load i32, ptr %13, align 4, !tbaa !11
  switch i32 %19, label %69 [
    i32 0, label %20
    i32 2, label %28
    i32 3, label %39
    i32 4, label %47
    i32 6, label %58
  ]

20:                                               ; preds = %8
  %21 = load i32, ptr %12, align 4, !tbaa !11
  switch i32 %21, label %25 [
    i32 1, label %22
    i32 2, label %22
    i32 4, label %22
    i32 8, label %22
    i32 16, label %22
  ]

22:                                               ; preds = %20, %20, %20, %20, %20
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.png_struct_def, ptr %23, i32 0, i32 53
  store i8 1, ptr %24, align 2, !tbaa !13
  br label %27

25:                                               ; preds = %20
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_error(ptr noundef %26, ptr noundef @.str)
  br label %27

27:                                               ; preds = %25, %22
  br label %71

28:                                               ; preds = %8
  %29 = load i32, ptr %12, align 4, !tbaa !11
  %30 = icmp ne i32 %29, 8
  br i1 %30, label %31, label %36

31:                                               ; preds = %28
  %32 = load i32, ptr %12, align 4, !tbaa !11
  %33 = icmp ne i32 %32, 16
  br i1 %33, label %34, label %36

34:                                               ; preds = %31
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_error(ptr noundef %35, ptr noundef @.str.1)
  br label %36

36:                                               ; preds = %34, %31, %28
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.png_struct_def, ptr %37, i32 0, i32 53
  store i8 3, ptr %38, align 2, !tbaa !13
  br label %71

39:                                               ; preds = %8
  %40 = load i32, ptr %12, align 4, !tbaa !11
  switch i32 %40, label %44 [
    i32 1, label %41
    i32 2, label %41
    i32 4, label %41
    i32 8, label %41
  ]

41:                                               ; preds = %39, %39, %39, %39
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.png_struct_def, ptr %42, i32 0, i32 53
  store i8 1, ptr %43, align 2, !tbaa !13
  br label %46

44:                                               ; preds = %39
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_error(ptr noundef %45, ptr noundef @.str.2)
  br label %46

46:                                               ; preds = %44, %41
  br label %71

47:                                               ; preds = %8
  %48 = load i32, ptr %12, align 4, !tbaa !11
  %49 = icmp ne i32 %48, 8
  br i1 %49, label %50, label %55

50:                                               ; preds = %47
  %51 = load i32, ptr %12, align 4, !tbaa !11
  %52 = icmp ne i32 %51, 16
  br i1 %52, label %53, label %55

53:                                               ; preds = %50
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_error(ptr noundef %54, ptr noundef @.str.3)
  br label %55

55:                                               ; preds = %53, %50, %47
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.png_struct_def, ptr %56, i32 0, i32 53
  store i8 2, ptr %57, align 2, !tbaa !13
  br label %71

58:                                               ; preds = %8
  %59 = load i32, ptr %12, align 4, !tbaa !11
  %60 = icmp ne i32 %59, 8
  br i1 %60, label %61, label %66

61:                                               ; preds = %58
  %62 = load i32, ptr %12, align 4, !tbaa !11
  %63 = icmp ne i32 %62, 16
  br i1 %63, label %64, label %66

64:                                               ; preds = %61
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_error(ptr noundef %65, ptr noundef @.str.4)
  br label %66

66:                                               ; preds = %64, %61, %58
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.png_struct_def, ptr %67, i32 0, i32 53
  store i8 4, ptr %68, align 2, !tbaa !13
  br label %71

69:                                               ; preds = %8
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_error(ptr noundef %70, ptr noundef @.str.5)
  br label %71

71:                                               ; preds = %69, %66, %55, %46, %36, %27
  %72 = load i32, ptr %14, align 4, !tbaa !11
  %73 = icmp ne i32 %72, 0
  br i1 %73, label %74, label %76

74:                                               ; preds = %71
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_warning(ptr noundef %75, ptr noundef @.str.6)
  store i32 0, ptr %14, align 4, !tbaa !11
  br label %76

76:                                               ; preds = %74, %71
  %77 = load ptr, ptr %9, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.png_struct_def, ptr %77, i32 0, i32 118
  %79 = load i64, ptr %78, align 8, !tbaa !22
  %80 = and i64 %79, 4
  %81 = icmp ne i64 %80, 0
  br i1 %81, label %82, label %97

82:                                               ; preds = %76
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.png_struct_def, ptr %83, i32 0, i32 12
  %85 = load i64, ptr %84, align 8, !tbaa !23
  %86 = and i64 %85, 4096
  %87 = icmp eq i64 %86, 0
  br i1 %87, label %88, label %97

88:                                               ; preds = %82
  %89 = load i32, ptr %13, align 4, !tbaa !11
  %90 = icmp eq i32 %89, 2
  br i1 %90, label %94, label %91

91:                                               ; preds = %88
  %92 = load i32, ptr %13, align 4, !tbaa !11
  %93 = icmp eq i32 %92, 6
  br i1 %93, label %94, label %97

94:                                               ; preds = %91, %88
  %95 = load i32, ptr %15, align 4, !tbaa !11
  %96 = icmp eq i32 %95, 64
  br i1 %96, label %102, label %97

97:                                               ; preds = %94, %91, %82, %76
  %98 = load i32, ptr %15, align 4, !tbaa !11
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %100, label %102

100:                                              ; preds = %97
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_warning(ptr noundef %101, ptr noundef @.str.7)
  store i32 0, ptr %15, align 4, !tbaa !11
  br label %102

102:                                              ; preds = %100, %97, %94
  %103 = load i32, ptr %16, align 4, !tbaa !11
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %110

105:                                              ; preds = %102
  %106 = load i32, ptr %16, align 4, !tbaa !11
  %107 = icmp ne i32 %106, 1
  br i1 %107, label %108, label %110

108:                                              ; preds = %105
  %109 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_warning(ptr noundef %109, ptr noundef @.str.8)
  store i32 1, ptr %16, align 4, !tbaa !11
  br label %110

110:                                              ; preds = %108, %105, %102
  %111 = load i32, ptr %12, align 4, !tbaa !11
  %112 = trunc i32 %111 to i8
  %113 = load ptr, ptr %9, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.png_struct_def, ptr %113, i32 0, i32 50
  store i8 %112, ptr %114, align 1, !tbaa !24
  %115 = load i32, ptr %13, align 4, !tbaa !11
  %116 = trunc i32 %115 to i8
  %117 = load ptr, ptr %9, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.png_struct_def, ptr %117, i32 0, i32 49
  store i8 %116, ptr %118, align 2, !tbaa !25
  %119 = load i32, ptr %16, align 4, !tbaa !11
  %120 = trunc i32 %119 to i8
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.png_struct_def, ptr %121, i32 0, i32 46
  store i8 %120, ptr %122, align 1, !tbaa !26
  %123 = load i32, ptr %15, align 4, !tbaa !11
  %124 = trunc i32 %123 to i8
  %125 = load ptr, ptr %9, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.png_struct_def, ptr %125, i32 0, i32 120
  store i8 %124, ptr %126, align 8, !tbaa !27
  %127 = load i32, ptr %14, align 4, !tbaa !11
  %128 = trunc i32 %127 to i8
  %129 = load ptr, ptr %9, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.png_struct_def, ptr %129, i32 0, i32 131
  store i8 %128, ptr %130, align 8, !tbaa !28
  %131 = load i64, ptr %10, align 8, !tbaa !9
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.png_struct_def, ptr %132, i32 0, i32 23
  store i64 %131, ptr %133, align 8, !tbaa !29
  %134 = load i64, ptr %11, align 8, !tbaa !9
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.png_struct_def, ptr %135, i32 0, i32 24
  store i64 %134, ptr %136, align 8, !tbaa !30
  %137 = load i32, ptr %12, align 4, !tbaa !11
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.png_struct_def, ptr %138, i32 0, i32 53
  %140 = load i8, ptr %139, align 2, !tbaa !13
  %141 = zext i8 %140 to i32
  %142 = mul nsw i32 %137, %141
  %143 = trunc i32 %142 to i8
  %144 = load ptr, ptr %9, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.png_struct_def, ptr %144, i32 0, i32 52
  store i8 %143, ptr %145, align 1, !tbaa !31
  %146 = load ptr, ptr %9, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.png_struct_def, ptr %146, i32 0, i32 52
  %148 = load i8, ptr %147, align 1, !tbaa !31
  %149 = zext i8 %148 to i32
  %150 = icmp sge i32 %149, 8
  br i1 %150, label %151, label %159

151:                                              ; preds = %110
  %152 = load i64, ptr %10, align 8, !tbaa !9
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.png_struct_def, ptr %153, i32 0, i32 52
  %155 = load i8, ptr %154, align 1, !tbaa !31
  %156 = zext i8 %155 to i64
  %157 = lshr i64 %156, 3
  %158 = mul i64 %152, %157
  br label %168

159:                                              ; preds = %110
  %160 = load i64, ptr %10, align 8, !tbaa !9
  %161 = load ptr, ptr %9, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.png_struct_def, ptr %161, i32 0, i32 52
  %163 = load i8, ptr %162, align 1, !tbaa !31
  %164 = zext i8 %163 to i64
  %165 = mul i64 %160, %164
  %166 = add i64 %165, 7
  %167 = lshr i64 %166, 3
  br label %168

168:                                              ; preds = %159, %151
  %169 = phi i64 [ %158, %151 ], [ %167, %159 ]
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.png_struct_def, ptr %170, i32 0, i32 27
  store i64 %169, ptr %171, align 8, !tbaa !32
  %172 = load ptr, ptr %9, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.png_struct_def, ptr %172, i32 0, i32 23
  %174 = load i64, ptr %173, align 8, !tbaa !29
  %175 = load ptr, ptr %9, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.png_struct_def, ptr %175, i32 0, i32 26
  store i64 %174, ptr %176, align 8, !tbaa !33
  %177 = load ptr, ptr %9, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.png_struct_def, ptr %177, i32 0, i32 50
  %179 = load i8, ptr %178, align 1, !tbaa !24
  %180 = load ptr, ptr %9, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.png_struct_def, ptr %180, i32 0, i32 51
  store i8 %179, ptr %181, align 8, !tbaa !34
  %182 = load ptr, ptr %9, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.png_struct_def, ptr %182, i32 0, i32 53
  %184 = load i8, ptr %183, align 2, !tbaa !13
  %185 = load ptr, ptr %9, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.png_struct_def, ptr %185, i32 0, i32 54
  store i8 %184, ptr %186, align 1, !tbaa !35
  %187 = getelementptr inbounds [13 x i8], ptr %18, i64 0, i64 0
  %188 = load i64, ptr %10, align 8, !tbaa !9
  call void @png_save_uint_32(ptr noundef %187, i64 noundef %188)
  %189 = getelementptr inbounds [13 x i8], ptr %18, i64 0, i64 0
  %190 = getelementptr inbounds i8, ptr %189, i64 4
  %191 = load i64, ptr %11, align 8, !tbaa !9
  call void @png_save_uint_32(ptr noundef %190, i64 noundef %191)
  %192 = load i32, ptr %12, align 4, !tbaa !11
  %193 = trunc i32 %192 to i8
  %194 = getelementptr inbounds [13 x i8], ptr %18, i64 0, i64 8
  store i8 %193, ptr %194, align 1, !tbaa !36
  %195 = load i32, ptr %13, align 4, !tbaa !11
  %196 = trunc i32 %195 to i8
  %197 = getelementptr inbounds [13 x i8], ptr %18, i64 0, i64 9
  store i8 %196, ptr %197, align 1, !tbaa !36
  %198 = load i32, ptr %14, align 4, !tbaa !11
  %199 = trunc i32 %198 to i8
  %200 = getelementptr inbounds [13 x i8], ptr %18, i64 0, i64 10
  store i8 %199, ptr %200, align 1, !tbaa !36
  %201 = load i32, ptr %15, align 4, !tbaa !11
  %202 = trunc i32 %201 to i8
  %203 = getelementptr inbounds [13 x i8], ptr %18, i64 0, i64 11
  store i8 %202, ptr %203, align 1, !tbaa !36
  %204 = load i32, ptr %16, align 4, !tbaa !11
  %205 = trunc i32 %204 to i8
  %206 = getelementptr inbounds [13 x i8], ptr %18, i64 0, i64 12
  store i8 %205, ptr %206, align 1, !tbaa !36
  %207 = load ptr, ptr %9, align 8, !tbaa !5
  %208 = getelementptr inbounds [13 x i8], ptr %18, i64 0, i64 0
  call void @png_write_chunk(ptr noundef %207, ptr noundef @png_IHDR, ptr noundef %208, i64 noundef 13)
  %209 = load ptr, ptr %9, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.png_struct_def, ptr %209, i32 0, i32 15
  %211 = getelementptr inbounds %struct.z_stream_s, ptr %210, i32 0, i32 8
  store ptr @png_zalloc, ptr %211, align 8, !tbaa !37
  %212 = load ptr, ptr %9, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.png_struct_def, ptr %212, i32 0, i32 15
  %214 = getelementptr inbounds %struct.z_stream_s, ptr %213, i32 0, i32 9
  store ptr @png_zfree, ptr %214, align 8, !tbaa !38
  %215 = load ptr, ptr %9, align 8, !tbaa !5
  %216 = load ptr, ptr %9, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.png_struct_def, ptr %216, i32 0, i32 15
  %218 = getelementptr inbounds %struct.z_stream_s, ptr %217, i32 0, i32 10
  store ptr %215, ptr %218, align 8, !tbaa !39
  %219 = load ptr, ptr %9, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.png_struct_def, ptr %219, i32 0, i32 48
  %221 = load i8, ptr %220, align 1, !tbaa !40
  %222 = icmp ne i8 %221, 0
  br i1 %222, label %242, label %223

223:                                              ; preds = %168
  %224 = load ptr, ptr %9, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.png_struct_def, ptr %224, i32 0, i32 49
  %226 = load i8, ptr %225, align 2, !tbaa !25
  %227 = zext i8 %226 to i32
  %228 = icmp eq i32 %227, 3
  br i1 %228, label %235, label %229

229:                                              ; preds = %223
  %230 = load ptr, ptr %9, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.png_struct_def, ptr %230, i32 0, i32 50
  %232 = load i8, ptr %231, align 1, !tbaa !24
  %233 = zext i8 %232 to i32
  %234 = icmp slt i32 %233, 8
  br i1 %234, label %235, label %238

235:                                              ; preds = %229, %223
  %236 = load ptr, ptr %9, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.png_struct_def, ptr %236, i32 0, i32 48
  store i8 8, ptr %237, align 1, !tbaa !40
  br label %241

238:                                              ; preds = %229
  %239 = load ptr, ptr %9, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.png_struct_def, ptr %239, i32 0, i32 48
  store i8 -8, ptr %240, align 1, !tbaa !40
  br label %241

241:                                              ; preds = %238, %235
  br label %242

242:                                              ; preds = %241, %168
  %243 = load ptr, ptr %9, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.png_struct_def, ptr %243, i32 0, i32 13
  %245 = load i64, ptr %244, align 8, !tbaa !41
  %246 = and i64 %245, 1
  %247 = icmp ne i64 %246, 0
  br i1 %247, label %261, label %248

248:                                              ; preds = %242
  %249 = load ptr, ptr %9, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.png_struct_def, ptr %249, i32 0, i32 48
  %251 = load i8, ptr %250, align 1, !tbaa !40
  %252 = zext i8 %251 to i32
  %253 = icmp ne i32 %252, 8
  br i1 %253, label %254, label %257

254:                                              ; preds = %248
  %255 = load ptr, ptr %9, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.png_struct_def, ptr %255, i32 0, i32 22
  store i32 1, ptr %256, align 8, !tbaa !42
  br label %260

257:                                              ; preds = %248
  %258 = load ptr, ptr %9, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.png_struct_def, ptr %258, i32 0, i32 22
  store i32 0, ptr %259, align 8, !tbaa !42
  br label %260

260:                                              ; preds = %257, %254
  br label %261

261:                                              ; preds = %260, %242
  %262 = load ptr, ptr %9, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.png_struct_def, ptr %262, i32 0, i32 13
  %264 = load i64, ptr %263, align 8, !tbaa !41
  %265 = and i64 %264, 2
  %266 = icmp ne i64 %265, 0
  br i1 %266, label %270, label %267

267:                                              ; preds = %261
  %268 = load ptr, ptr %9, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.png_struct_def, ptr %268, i32 0, i32 18
  store i32 -1, ptr %269, align 8, !tbaa !43
  br label %270

270:                                              ; preds = %267, %261
  %271 = load ptr, ptr %9, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.png_struct_def, ptr %271, i32 0, i32 13
  %273 = load i64, ptr %272, align 8, !tbaa !41
  %274 = and i64 %273, 4
  %275 = icmp ne i64 %274, 0
  br i1 %275, label %279, label %276

276:                                              ; preds = %270
  %277 = load ptr, ptr %9, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.png_struct_def, ptr %277, i32 0, i32 21
  store i32 8, ptr %278, align 4, !tbaa !44
  br label %279

279:                                              ; preds = %276, %270
  %280 = load ptr, ptr %9, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.png_struct_def, ptr %280, i32 0, i32 13
  %282 = load i64, ptr %281, align 8, !tbaa !41
  %283 = and i64 %282, 8
  %284 = icmp ne i64 %283, 0
  br i1 %284, label %288, label %285

285:                                              ; preds = %279
  %286 = load ptr, ptr %9, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.png_struct_def, ptr %286, i32 0, i32 20
  store i32 15, ptr %287, align 8, !tbaa !45
  br label %288

288:                                              ; preds = %285, %279
  %289 = load ptr, ptr %9, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.png_struct_def, ptr %289, i32 0, i32 13
  %291 = load i64, ptr %290, align 8, !tbaa !41
  %292 = and i64 %291, 16
  %293 = icmp ne i64 %292, 0
  br i1 %293, label %297, label %294

294:                                              ; preds = %288
  %295 = load ptr, ptr %9, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.png_struct_def, ptr %295, i32 0, i32 19
  store i32 8, ptr %296, align 4, !tbaa !46
  br label %297

297:                                              ; preds = %294, %288
  %298 = load ptr, ptr %9, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct.png_struct_def, ptr %298, i32 0, i32 15
  %300 = load ptr, ptr %9, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.png_struct_def, ptr %300, i32 0, i32 18
  %302 = load i32, ptr %301, align 8, !tbaa !43
  %303 = load ptr, ptr %9, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.png_struct_def, ptr %303, i32 0, i32 19
  %305 = load i32, ptr %304, align 4, !tbaa !46
  %306 = load ptr, ptr %9, align 8, !tbaa !5
  %307 = getelementptr inbounds %struct.png_struct_def, ptr %306, i32 0, i32 20
  %308 = load i32, ptr %307, align 8, !tbaa !45
  %309 = load ptr, ptr %9, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct.png_struct_def, ptr %309, i32 0, i32 21
  %311 = load i32, ptr %310, align 4, !tbaa !44
  %312 = load ptr, ptr %9, align 8, !tbaa !5
  %313 = getelementptr inbounds %struct.png_struct_def, ptr %312, i32 0, i32 22
  %314 = load i32, ptr %313, align 8, !tbaa !42
  %315 = call i32 @deflateInit2_(ptr noundef %299, i32 noundef %302, i32 noundef %305, i32 noundef %308, i32 noundef %311, i32 noundef %314, ptr noundef @.str.9, i32 noundef 112)
  store i32 %315, ptr %17, align 4, !tbaa !11
  %316 = load i32, ptr %17, align 4, !tbaa !11
  %317 = icmp ne i32 %316, 0
  br i1 %317, label %318, label %335

318:                                              ; preds = %297
  %319 = load i32, ptr %17, align 4, !tbaa !11
  %320 = icmp eq i32 %319, -6
  br i1 %320, label %321, label %323

321:                                              ; preds = %318
  %322 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_error(ptr noundef %322, ptr noundef @.str.10)
  br label %323

323:                                              ; preds = %321, %318
  %324 = load i32, ptr %17, align 4, !tbaa !11
  %325 = icmp eq i32 %324, -2
  br i1 %325, label %326, label %328

326:                                              ; preds = %323
  %327 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_error(ptr noundef %327, ptr noundef @.str.11)
  br label %328

328:                                              ; preds = %326, %323
  %329 = load i32, ptr %17, align 4, !tbaa !11
  %330 = icmp eq i32 %329, -4
  br i1 %330, label %331, label %333

331:                                              ; preds = %328
  %332 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_error(ptr noundef %332, ptr noundef @.str.12)
  br label %333

333:                                              ; preds = %331, %328
  %334 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_error(ptr noundef %334, ptr noundef @.str.13)
  br label %335

335:                                              ; preds = %333, %297
  %336 = load ptr, ptr %9, align 8, !tbaa !5
  %337 = getelementptr inbounds %struct.png_struct_def, ptr %336, i32 0, i32 16
  %338 = load ptr, ptr %337, align 8, !tbaa !47
  %339 = load ptr, ptr %9, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct.png_struct_def, ptr %339, i32 0, i32 15
  %341 = getelementptr inbounds %struct.z_stream_s, ptr %340, i32 0, i32 3
  store ptr %338, ptr %341, align 8, !tbaa !48
  %342 = load ptr, ptr %9, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct.png_struct_def, ptr %342, i32 0, i32 17
  %344 = load i64, ptr %343, align 8, !tbaa !49
  %345 = trunc i64 %344 to i32
  %346 = load ptr, ptr %9, align 8, !tbaa !5
  %347 = getelementptr inbounds %struct.png_struct_def, ptr %346, i32 0, i32 15
  %348 = getelementptr inbounds %struct.z_stream_s, ptr %347, i32 0, i32 4
  store i32 %345, ptr %348, align 8, !tbaa !50
  %349 = load ptr, ptr %9, align 8, !tbaa !5
  %350 = getelementptr inbounds %struct.png_struct_def, ptr %349, i32 0, i32 15
  %351 = getelementptr inbounds %struct.z_stream_s, ptr %350, i32 0, i32 11
  store i32 0, ptr %351, align 8, !tbaa !51
  %352 = load ptr, ptr %9, align 8, !tbaa !5
  %353 = getelementptr inbounds %struct.png_struct_def, ptr %352, i32 0, i32 12
  store i64 1, ptr %353, align 8, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 13, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  ret void
}

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

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

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

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

declare i32 @deflateInit2_(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 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 }

!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, !7, i64 634}
!14 = !{!"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, !7, i64 272, !7, i64 273, !10, i64 280, !10, i64 288, !10, i64 296, !15, i64 304, !6, i64 416, !10, i64 424, !12, i64 432, !12, i64 436, !12, i64 440, !12, i64 444, !12, i64 448, !10, i64 456, !10, i64 464, !10, i64 472, !10, i64 480, !10, i64 488, !10, i64 496, !10, i64 504, !10, i64 512, !6, i64 520, !6, i64 528, !6, i64 536, !6, i64 544, !6, i64 552, !6, i64 560, !16, i64 568, !10, i64 592, !10, i64 600, !6, i64 608, !17, i64 616, !17, i64 618, !7, i64 620, !7, i64 625, !7, i64 626, !7, i64 627, !7, i64 628, !7, i64 629, !7, i64 630, !7, i64 631, !7, i64 632, !7, i64 633, !7, i64 634, !7, i64 635, !7, i64 636, !17, i64 638, !7, i64 640, !18, i64 644, !19, i64 648, !19, i64 658, !6, i64 672, !10, i64 680, !10, i64 688, !12, i64 696, !18, i64 700, !18, i64 704, !6, i64 712, !6, i64 720, !6, i64 728, !6, i64 736, !6, i64 744, !6, i64 752, !20, i64 760, !20, i64 765, !6, i64 776, !19, i64 784, !6, i64 800, !6, i64 808, !6, i64 816, !6, i64 824, !6, i64 832, !6, i64 840, !6, i64 848, !6, i64 856, !6, i64 864, !10, i64 872, !10, i64 880, !10, i64 888, !10, i64 896, !10, i64 904, !10, i64 912, !12, i64 920, !12, i64 924, !10, i64 928, !10, i64 936, !6, i64 944, !6, i64 952, !6, i64 960, !6, i64 968, !6, i64 976, !7, i64 984, !7, i64 985, !6, i64 992, !6, i64 1000, !6, i64 1008, !6, i64 1016, !6, i64 1024, !6, i64 1032, !10, i64 1040, !6, i64 1048, !6, i64 1056, !12, i64 1064, !6, i64 1072, !7, i64 1080, !17, i64 1082, !17, i64 1084, !17, i64 1086, !10, i64 1088, !10, i64 1096, !7, i64 1104, !7, i64 1105, !10, i64 1112, !10, i64 1120, !6, i64 1128, !6, i64 1136, !6, i64 1144, !6, i64 1152, !6, i64 1160, !6, i64 1168, !6, i64 1176, !7, i64 1184, !10, i64 1192, !10, i64 1200, !21, i64 1208, !10, i64 1240, !10, i64 1248, !6, i64 1256}
!15 = !{!"z_stream_s", !6, i64 0, !12, i64 8, !10, i64 16, !6, i64 24, !12, i64 32, !10, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !12, i64 88, !10, i64 96, !10, i64 104}
!16 = !{!"png_row_info_struct", !10, i64 0, !10, i64 8, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19}
!17 = !{!"short", !7, i64 0}
!18 = !{!"float", !7, i64 0}
!19 = !{!"png_color_16_struct", !7, i64 0, !17, i64 2, !17, i64 4, !17, i64 6, !17, i64 8}
!20 = !{!"png_color_8_struct", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4}
!21 = !{!"png_unknown_chunk_t", !7, i64 0, !6, i64 8, !10, i64 16, !7, i64 24}
!22 = !{!14, !10, i64 1088}
!23 = !{!14, !10, i64 280}
!24 = !{!14, !7, i64 631}
!25 = !{!14, !7, i64 630}
!26 = !{!14, !7, i64 627}
!27 = !{!14, !7, i64 1104}
!28 = !{!14, !7, i64 1184}
!29 = !{!14, !10, i64 456}
!30 = !{!14, !10, i64 464}
!31 = !{!14, !7, i64 633}
!32 = !{!14, !10, i64 488}
!33 = !{!14, !10, i64 480}
!34 = !{!14, !7, i64 632}
!35 = !{!14, !7, i64 635}
!36 = !{!7, !7, i64 0}
!37 = !{!14, !6, i64 368}
!38 = !{!14, !6, i64 376}
!39 = !{!14, !6, i64 384}
!40 = !{!14, !7, i64 629}
!41 = !{!14, !10, i64 288}
!42 = !{!14, !12, i64 448}
!43 = !{!14, !12, i64 432}
!44 = !{!14, !12, i64 444}
!45 = !{!14, !12, i64 440}
!46 = !{!14, !12, i64 436}
!47 = !{!14, !6, i64 416}
!48 = !{!14, !6, i64 328}
!49 = !{!14, !10, i64 424}
!50 = !{!14, !12, i64 336}
!51 = !{!14, !12, i64 392}


; 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 [38 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [33 x i8], align 1
@png_IHDR = external global [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [37 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @png_save_uint_32(ptr noundef, i64 noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @png_write_chunk(ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @png_write_IHDR(ptr noundef %0, i64 noundef %1, i64 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7) local_unnamed_addr #0 {
  %9 = alloca [13 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 13, ptr nonnull %9) #3
  switch i32 %4, label %30 [
    i32 0, label %10
    i32 2, label %14
    i32 3, label %18
    i32 4, label %22
    i32 6, label %26
  ]

10:                                               ; preds = %8
  switch i32 %3, label %13 [
    i32 1, label %11
    i32 2, label %11
    i32 4, label %11
    i32 8, label %11
    i32 16, label %11
  ]

11:                                               ; preds = %10, %10, %10, %10, %10
  %12 = getelementptr inbounds i8, ptr %0, i64 634
  store i8 1, ptr %12, align 2, !tbaa !5
  br label %31

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

14:                                               ; preds = %8
  switch i32 %3, label %15 [
    i32 16, label %16
    i32 8, label %16
  ]

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

16:                                               ; preds = %14, %14, %15
  %17 = getelementptr inbounds i8, ptr %0, i64 634
  store i8 3, ptr %17, align 2, !tbaa !5
  br label %31

18:                                               ; preds = %8
  switch i32 %3, label %21 [
    i32 1, label %19
    i32 2, label %19
    i32 4, label %19
    i32 8, label %19
  ]

19:                                               ; preds = %18, %18, %18, %18
  %20 = getelementptr inbounds i8, ptr %0, i64 634
  store i8 1, ptr %20, align 2, !tbaa !5
  br label %31

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

22:                                               ; preds = %8
  switch i32 %3, label %23 [
    i32 16, label %24
    i32 8, label %24
  ]

23:                                               ; preds = %22
  tail call void @png_error(ptr noundef %0, ptr noundef nonnull @.str.3) #3
  br label %24

24:                                               ; preds = %22, %22, %23
  %25 = getelementptr inbounds i8, ptr %0, i64 634
  store i8 2, ptr %25, align 2, !tbaa !5
  br label %31

26:                                               ; preds = %8
  switch i32 %3, label %27 [
    i32 16, label %28
    i32 8, label %28
  ]

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

28:                                               ; preds = %26, %26, %27
  %29 = getelementptr inbounds i8, ptr %0, i64 634
  store i8 4, ptr %29, align 2, !tbaa !5
  br label %31

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

31:                                               ; preds = %19, %21, %11, %13, %30, %28, %24, %16
  %.not = icmp eq i32 %5, 0
  br i1 %.not, label %33, label %32

32:                                               ; preds = %31
  tail call void @png_warning(ptr noundef %0, ptr noundef nonnull @.str.6) #3
  br label %33

33:                                               ; preds = %32, %31
  %34 = getelementptr inbounds i8, ptr %0, i64 1088
  %35 = load i64, ptr %34, align 8, !tbaa !19
  %36 = and i64 %35, 4
  %.not129 = icmp eq i64 %36, 0
  br i1 %.not129, label %46, label %37

37:                                               ; preds = %33
  %38 = getelementptr inbounds i8, ptr %0, i64 280
  %39 = load i64, ptr %38, align 8, !tbaa !20
  %40 = and i64 %39, 4096
  %41 = icmp eq i64 %40, 0
  br i1 %41, label %42, label %46

42:                                               ; preds = %37
  %43 = and i32 %4, -5
  %or.cond7 = icmp ne i32 %43, 2
  %44 = icmp ne i32 %6, 64
  %or.cond9.not131 = or i1 %or.cond7, %44
  %45 = icmp ne i32 %6, 0
  %or.cond11 = and i1 %45, %or.cond9.not131
  br i1 %or.cond11, label %47, label %48

46:                                               ; preds = %37, %33
  %.old10.not = icmp eq i32 %6, 0
  br i1 %.old10.not, label %48, label %47

47:                                               ; preds = %42, %46
  tail call void @png_warning(ptr noundef nonnull %0, ptr noundef nonnull @.str.7) #3
  br label %48

48:                                               ; preds = %42, %47, %46
  %.0125 = phi i32 [ 0, %47 ], [ %6, %42 ], [ 0, %46 ]
  %or.cond14 = icmp ugt i32 %7, 1
  br i1 %or.cond14, label %49, label %50

49:                                               ; preds = %48
  tail call void @png_warning(ptr noundef nonnull %0, ptr noundef nonnull @.str.8) #3
  br label %50

50:                                               ; preds = %49, %48
  %.0124 = phi i32 [ 1, %49 ], [ %7, %48 ]
  %51 = trunc i32 %3 to i8
  %52 = getelementptr inbounds i8, ptr %0, i64 631
  store i8 %51, ptr %52, align 1, !tbaa !21
  %53 = trunc i32 %4 to i8
  %54 = getelementptr inbounds i8, ptr %0, i64 630
  store i8 %53, ptr %54, align 2, !tbaa !22
  %55 = trunc nuw i32 %.0124 to i8
  %56 = getelementptr inbounds i8, ptr %0, i64 627
  store i8 %55, ptr %56, align 1, !tbaa !23
  %57 = trunc i32 %.0125 to i8
  %58 = getelementptr inbounds i8, ptr %0, i64 1104
  store i8 %57, ptr %58, align 8, !tbaa !24
  %59 = getelementptr inbounds i8, ptr %0, i64 1184
  store i8 0, ptr %59, align 8, !tbaa !25
  %60 = getelementptr inbounds i8, ptr %0, i64 456
  store i64 %1, ptr %60, align 8, !tbaa !26
  %61 = getelementptr inbounds i8, ptr %0, i64 464
  store i64 %2, ptr %61, align 8, !tbaa !27
  %62 = getelementptr inbounds i8, ptr %0, i64 634
  %63 = load i8, ptr %62, align 2, !tbaa !5
  %64 = mul i8 %63, %51
  %65 = getelementptr inbounds i8, ptr %0, i64 633
  store i8 %64, ptr %65, align 1, !tbaa !28
  %66 = icmp ugt i8 %64, 7
  br i1 %66, label %67, label %71

67:                                               ; preds = %50
  %68 = lshr i8 %64, 3
  %69 = zext nneg i8 %68 to i64
  %70 = mul i64 %69, %1
  br label %76

71:                                               ; preds = %50
  %72 = zext nneg i8 %64 to i64
  %73 = mul i64 %72, %1
  %74 = add i64 %73, 7
  %75 = lshr i64 %74, 3
  br label %76

76:                                               ; preds = %71, %67
  %77 = phi i64 [ %70, %67 ], [ %75, %71 ]
  %78 = getelementptr inbounds i8, ptr %0, i64 488
  store i64 %77, ptr %78, align 8, !tbaa !29
  %79 = getelementptr inbounds i8, ptr %0, i64 480
  store i64 %1, ptr %79, align 8, !tbaa !30
  %80 = getelementptr inbounds i8, ptr %0, i64 632
  store i8 %51, ptr %80, align 8, !tbaa !31
  %81 = getelementptr inbounds i8, ptr %0, i64 635
  store i8 %63, ptr %81, align 1, !tbaa !32
  call void @png_save_uint_32(ptr noundef nonnull %9, i64 noundef %1)
  %82 = getelementptr inbounds i8, ptr %9, i64 4
  call void @png_save_uint_32(ptr noundef nonnull %82, i64 noundef %2)
  %83 = getelementptr inbounds i8, ptr %9, i64 8
  store i8 %51, ptr %83, align 1, !tbaa !33
  %84 = getelementptr inbounds i8, ptr %9, i64 9
  store i8 %53, ptr %84, align 1, !tbaa !33
  %85 = getelementptr inbounds i8, ptr %9, i64 10
  store i8 0, ptr %85, align 1, !tbaa !33
  %86 = getelementptr inbounds i8, ptr %9, i64 11
  store i8 %57, ptr %86, align 1, !tbaa !33
  %87 = getelementptr inbounds i8, ptr %9, i64 12
  store i8 %55, ptr %87, align 1, !tbaa !33
  call void @png_write_chunk(ptr noundef nonnull %0, ptr noundef nonnull @png_IHDR, ptr noundef nonnull %9, i64 noundef 13)
  %88 = getelementptr inbounds i8, ptr %0, i64 304
  %89 = getelementptr inbounds i8, ptr %0, i64 368
  store ptr @png_zalloc, ptr %89, align 8, !tbaa !34
  %90 = getelementptr inbounds i8, ptr %0, i64 376
  store ptr @png_zfree, ptr %90, align 8, !tbaa !35
  %91 = getelementptr inbounds i8, ptr %0, i64 384
  store ptr %0, ptr %91, align 8, !tbaa !36
  %92 = getelementptr inbounds i8, ptr %0, i64 629
  %93 = load i8, ptr %92, align 1, !tbaa !37
  %.not132 = icmp eq i8 %93, 0
  br i1 %.not132, label %94, label %101

94:                                               ; preds = %76
  %95 = load i8, ptr %54, align 2, !tbaa !22
  %96 = icmp eq i8 %95, 3
  br i1 %96, label %100, label %97

97:                                               ; preds = %94
  %98 = load i8, ptr %52, align 1, !tbaa !21
  %99 = icmp ult i8 %98, 8
  br i1 %99, label %100, label %.thread

100:                                              ; preds = %97, %94
  store i8 8, ptr %92, align 1, !tbaa !37
  br label %101

101:                                              ; preds = %100, %76
  %102 = phi i8 [ 8, %100 ], [ %93, %76 ]
  %103 = getelementptr inbounds i8, ptr %0, i64 288
  %104 = load i64, ptr %103, align 8, !tbaa !38
  %105 = and i64 %104, 1
  %.not133 = icmp eq i64 %105, 0
  br i1 %.not133, label %109, label %111

.thread:                                          ; preds = %97
  store i8 -8, ptr %92, align 1, !tbaa !37
  %106 = getelementptr inbounds i8, ptr %0, i64 288
  %107 = load i64, ptr %106, align 8, !tbaa !38
  %108 = and i64 %107, 1
  %.not133140 = icmp eq i64 %108, 0
  br i1 %.not133140, label %.sink.split, label %111

109:                                              ; preds = %101
  %.not134 = icmp ne i8 %102, 8
  %spec.select = zext i1 %.not134 to i32
  br label %.sink.split

.sink.split:                                      ; preds = %109, %.thread
  %.sink = phi i32 [ 1, %.thread ], [ %spec.select, %109 ]
  %.ph = phi i64 [ %107, %.thread ], [ %104, %109 ]
  %110 = getelementptr inbounds i8, ptr %0, i64 448
  store i32 %.sink, ptr %110, align 8, !tbaa !39
  br label %111

111:                                              ; preds = %.sink.split, %.thread, %101
  %112 = phi i64 [ %107, %.thread ], [ %104, %101 ], [ %.ph, %.sink.split ]
  %113 = and i64 %112, 2
  %.not135 = icmp eq i64 %113, 0
  br i1 %.not135, label %114, label %116

114:                                              ; preds = %111
  %115 = getelementptr inbounds i8, ptr %0, i64 432
  store i32 -1, ptr %115, align 8, !tbaa !40
  br label %116

116:                                              ; preds = %114, %111
  %117 = and i64 %112, 4
  %.not136 = icmp eq i64 %117, 0
  br i1 %.not136, label %118, label %120

118:                                              ; preds = %116
  %119 = getelementptr inbounds i8, ptr %0, i64 444
  store i32 8, ptr %119, align 4, !tbaa !41
  br label %120

120:                                              ; preds = %118, %116
  %121 = and i64 %112, 8
  %.not137 = icmp eq i64 %121, 0
  br i1 %.not137, label %122, label %124

122:                                              ; preds = %120
  %123 = getelementptr inbounds i8, ptr %0, i64 440
  store i32 15, ptr %123, align 8, !tbaa !42
  br label %124

124:                                              ; preds = %122, %120
  %125 = and i64 %112, 16
  %.not138 = icmp eq i64 %125, 0
  %126 = getelementptr inbounds i8, ptr %0, i64 436
  br i1 %.not138, label %127, label %._crit_edge

._crit_edge:                                      ; preds = %124
  %.pre = load i32, ptr %126, align 4, !tbaa !43
  br label %128

127:                                              ; preds = %124
  store i32 8, ptr %126, align 4, !tbaa !43
  br label %128

128:                                              ; preds = %._crit_edge, %127
  %129 = phi i32 [ %.pre, %._crit_edge ], [ 8, %127 ]
  %130 = getelementptr inbounds i8, ptr %0, i64 432
  %131 = load i32, ptr %130, align 8, !tbaa !40
  %132 = getelementptr inbounds i8, ptr %0, i64 440
  %133 = load i32, ptr %132, align 8, !tbaa !42
  %134 = getelementptr inbounds i8, ptr %0, i64 444
  %135 = load i32, ptr %134, align 4, !tbaa !41
  %136 = getelementptr inbounds i8, ptr %0, i64 448
  %137 = load i32, ptr %136, align 8, !tbaa !39
  %138 = call i32 @deflateInit2_(ptr noundef nonnull %88, i32 noundef %131, i32 noundef %129, i32 noundef %133, i32 noundef %135, i32 noundef %137, ptr noundef nonnull @.str.9, i32 noundef 112) #3
  switch i32 %138, label %141 [
    i32 0, label %142
    i32 -6, label %.sink.split144
    i32 -2, label %139
    i32 -4, label %140
  ]

139:                                              ; preds = %128
  br label %.sink.split144

140:                                              ; preds = %128
  br label %.sink.split144

.sink.split144:                                   ; preds = %128, %140, %139
  %.str.11.sink = phi ptr [ @.str.11, %139 ], [ @.str.12, %140 ], [ @.str.10, %128 ]
  call void @png_error(ptr noundef nonnull %0, ptr noundef nonnull %.str.11.sink) #3
  br label %141

141:                                              ; preds = %.sink.split144, %128
  call void @png_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.13) #3
  br label %142

142:                                              ; preds = %128, %141
  %143 = getelementptr inbounds i8, ptr %0, i64 416
  %144 = load ptr, ptr %143, align 8, !tbaa !44
  %145 = getelementptr inbounds i8, ptr %0, i64 328
  store ptr %144, ptr %145, align 8, !tbaa !45
  %146 = getelementptr inbounds i8, ptr %0, i64 424
  %147 = load i64, ptr %146, align 8, !tbaa !46
  %148 = trunc i64 %147 to i32
  %149 = getelementptr inbounds i8, ptr %0, i64 336
  store i32 %148, ptr %149, align 8, !tbaa !47
  %150 = getelementptr inbounds i8, ptr %0, i64 392
  store i32 0, ptr %150, align 8, !tbaa !48
  %151 = getelementptr inbounds i8, ptr %0, i64 280
  store i64 1, ptr %151, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 13, ptr nonnull %9) #3
  ret void
}

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

declare void @png_warning(ptr noundef, ptr 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 @deflateInit2_(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 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 }

!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 634}
!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, !7, i64 272, !7, i64 273, !10, i64 280, !10, i64 288, !10, i64 296, !11, i64 304, !9, i64 416, !10, i64 424, !12, i64 432, !12, i64 436, !12, i64 440, !12, i64 444, !12, i64 448, !10, i64 456, !10, i64 464, !10, i64 472, !10, i64 480, !10, i64 488, !10, i64 496, !10, i64 504, !10, i64 512, !9, i64 520, !9, i64 528, !9, i64 536, !9, i64 544, !9, i64 552, !9, i64 560, !13, i64 568, !10, i64 592, !10, i64 600, !9, i64 608, !14, i64 616, !14, i64 618, !7, i64 620, !7, i64 625, !7, i64 626, !7, i64 627, !7, i64 628, !7, i64 629, !7, i64 630, !7, i64 631, !7, i64 632, !7, i64 633, !7, i64 634, !7, i64 635, !7, i64 636, !14, i64 638, !7, i64 640, !15, i64 644, !16, i64 648, !16, i64 658, !9, i64 672, !10, i64 680, !10, i64 688, !12, i64 696, !15, i64 700, !15, i64 704, !9, i64 712, !9, i64 720, !9, i64 728, !9, i64 736, !9, i64 744, !9, i64 752, !17, i64 760, !17, i64 765, !9, i64 776, !16, i64 784, !9, i64 800, !9, i64 808, !9, i64 816, !9, i64 824, !9, i64 832, !9, i64 840, !9, i64 848, !9, i64 856, !9, i64 864, !10, i64 872, !10, i64 880, !10, i64 888, !10, i64 896, !10, i64 904, !10, i64 912, !12, i64 920, !12, i64 924, !10, i64 928, !10, i64 936, !9, i64 944, !9, i64 952, !9, i64 960, !9, i64 968, !9, i64 976, !7, i64 984, !7, i64 985, !9, i64 992, !9, i64 1000, !9, i64 1008, !9, i64 1016, !9, i64 1024, !9, i64 1032, !10, i64 1040, !9, i64 1048, !9, i64 1056, !12, i64 1064, !9, i64 1072, !7, i64 1080, !14, i64 1082, !14, i64 1084, !14, i64 1086, !10, i64 1088, !10, i64 1096, !7, i64 1104, !7, i64 1105, !10, i64 1112, !10, i64 1120, !9, i64 1128, !9, i64 1136, !9, i64 1144, !9, i64 1152, !9, i64 1160, !9, i64 1168, !9, i64 1176, !7, i64 1184, !10, i64 1192, !10, i64 1200, !18, i64 1208, !10, i64 1240, !10, i64 1248, !9, i64 1256}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"any pointer", !7, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!"z_stream_s", !9, i64 0, !12, i64 8, !10, i64 16, !9, i64 24, !12, i64 32, !10, i64 40, !9, i64 48, !9, i64 56, !9, i64 64, !9, i64 72, !9, i64 80, !12, i64 88, !10, i64 96, !10, i64 104}
!12 = !{!"int", !7, i64 0}
!13 = !{!"png_row_info_struct", !10, i64 0, !10, 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, !10, i64 16, !7, i64 24}
!19 = !{!6, !10, i64 1088}
!20 = !{!6, !10, i64 280}
!21 = !{!6, !7, i64 631}
!22 = !{!6, !7, i64 630}
!23 = !{!6, !7, i64 627}
!24 = !{!6, !7, i64 1104}
!25 = !{!6, !7, i64 1184}
!26 = !{!6, !10, i64 456}
!27 = !{!6, !10, i64 464}
!28 = !{!6, !7, i64 633}
!29 = !{!6, !10, i64 488}
!30 = !{!6, !10, i64 480}
!31 = !{!6, !7, i64 632}
!32 = !{!6, !7, i64 635}
!33 = !{!7, !7, i64 0}
!34 = !{!6, !9, i64 368}
!35 = !{!6, !9, i64 376}
!36 = !{!6, !9, i64 384}
!37 = !{!6, !7, i64 629}
!38 = !{!6, !10, i64 288}
!39 = !{!6, !12, i64 448}
!40 = !{!6, !12, i64 432}
!41 = !{!6, !12, i64 444}
!42 = !{!6, !12, i64 440}
!43 = !{!6, !12, i64 436}
!44 = !{!6, !9, i64 416}
!45 = !{!6, !9, i64 328}
!46 = !{!6, !10, i64 424}
!47 = !{!6, !12, i64 336}
!48 = !{!6, !12, i64 392}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass