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

; 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.19 = external hidden unnamed_addr constant [32 x i8], align 1

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

declare ptr @png_malloc(ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
define dso_local void @png_set_filter_heuristics(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %13 = load ptr, ptr %6, align 8, !tbaa !5
  %14 = icmp eq ptr %13, null
  br i1 %14, label %15, label %16

15:                                               ; preds = %5
  store i32 1, ptr %12, align 4
  br label %275

16:                                               ; preds = %5
  %17 = load i32, ptr %7, align 4, !tbaa !9
  %18 = icmp sge i32 %17, 3
  br i1 %18, label %19, label %21

19:                                               ; preds = %16
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  call void @png_warning(ptr noundef %20, ptr noundef @.str.19)
  store i32 1, ptr %12, align 4
  br label %275

21:                                               ; preds = %16
  %22 = load i32, ptr %7, align 4, !tbaa !9
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %24, label %25

24:                                               ; preds = %21
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %24, %21
  %26 = load i32, ptr %8, align 4, !tbaa !9
  %27 = icmp slt i32 %26, 0
  br i1 %27, label %34, label %28

28:                                               ; preds = %25
  %29 = load ptr, ptr %9, align 8, !tbaa !5
  %30 = icmp eq ptr %29, null
  br i1 %30, label %34, label %31

31:                                               ; preds = %28
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = icmp eq i32 %32, 1
  br i1 %33, label %34, label %35

34:                                               ; preds = %31, %28, %25
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %34, %31
  %36 = load i32, ptr %8, align 4, !tbaa !9
  %37 = trunc i32 %36 to i8
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.png_struct_def, ptr %38, i32 0, i32 102
  store i8 %37, ptr %39, align 1, !tbaa !11
  %40 = load i32, ptr %7, align 4, !tbaa !9
  %41 = trunc i32 %40 to i8
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.png_struct_def, ptr %42, i32 0, i32 101
  store i8 %41, ptr %43, align 8, !tbaa !21
  %44 = load i32, ptr %8, align 4, !tbaa !9
  %45 = icmp sgt i32 %44, 0
  br i1 %45, label %46, label %173

46:                                               ; preds = %35
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.png_struct_def, ptr %47, i32 0, i32 103
  %49 = load ptr, ptr %48, align 8, !tbaa !22
  %50 = icmp eq ptr %49, null
  br i1 %50, label %51, label %74

51:                                               ; preds = %46
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = load i32, ptr %8, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = mul i64 1, %54
  %56 = call ptr @png_malloc(ptr noundef %52, i64 noundef %55)
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.png_struct_def, ptr %57, i32 0, i32 103
  store ptr %56, ptr %58, align 8, !tbaa !22
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %59

59:                                               ; preds = %70, %51
  %60 = load i32, ptr %11, align 4, !tbaa !9
  %61 = load i32, ptr %8, align 4, !tbaa !9
  %62 = icmp slt i32 %60, %61
  br i1 %62, label %63, label %73

63:                                               ; preds = %59
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.png_struct_def, ptr %64, i32 0, i32 103
  %66 = load ptr, ptr %65, align 8, !tbaa !22
  %67 = load i32, ptr %11, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds i8, ptr %66, i64 %68
  store i8 -1, ptr %69, align 1, !tbaa !23
  br label %70

70:                                               ; preds = %63
  %71 = load i32, ptr %11, align 4, !tbaa !9
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %11, align 4, !tbaa !9
  br label %59, !llvm.loop !24

73:                                               ; preds = %59
  br label %74

74:                                               ; preds = %73, %46
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.png_struct_def, ptr %75, i32 0, i32 104
  %77 = load ptr, ptr %76, align 8, !tbaa !26
  %78 = icmp eq ptr %77, null
  br i1 %78, label %79, label %115

79:                                               ; preds = %74
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = load i32, ptr %8, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = mul i64 2, %82
  %84 = call ptr @png_malloc(ptr noundef %80, i64 noundef %83)
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.png_struct_def, ptr %85, i32 0, i32 104
  store ptr %84, ptr %86, align 8, !tbaa !26
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = load i32, ptr %8, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = mul i64 2, %89
  %91 = call ptr @png_malloc(ptr noundef %87, i64 noundef %90)
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.png_struct_def, ptr %92, i32 0, i32 105
  store ptr %91, ptr %93, align 8, !tbaa !27
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %94

94:                                               ; preds = %111, %79
  %95 = load i32, ptr %11, align 4, !tbaa !9
  %96 = load i32, ptr %8, align 4, !tbaa !9
  %97 = icmp slt i32 %95, %96
  br i1 %97, label %98, label %114

98:                                               ; preds = %94
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.png_struct_def, ptr %99, i32 0, i32 104
  %101 = load ptr, ptr %100, align 8, !tbaa !26
  %102 = load i32, ptr %11, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds i16, ptr %101, i64 %103
  store i16 256, ptr %104, align 2, !tbaa !28
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.png_struct_def, ptr %105, i32 0, i32 105
  %107 = load ptr, ptr %106, align 8, !tbaa !27
  %108 = load i32, ptr %11, align 4, !tbaa !9
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds i16, ptr %107, i64 %109
  store i16 256, ptr %110, align 2, !tbaa !28
  br label %111

111:                                              ; preds = %98
  %112 = load i32, ptr %11, align 4, !tbaa !9
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %11, align 4, !tbaa !9
  br label %94, !llvm.loop !29

114:                                              ; preds = %94
  br label %115

115:                                              ; preds = %114, %74
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %116

116:                                              ; preds = %169, %115
  %117 = load i32, ptr %11, align 4, !tbaa !9
  %118 = load i32, ptr %8, align 4, !tbaa !9
  %119 = icmp slt i32 %117, %118
  br i1 %119, label %120, label %172

120:                                              ; preds = %116
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = load i32, ptr %11, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds double, ptr %121, i64 %123
  %125 = load double, ptr %124, align 8, !tbaa !30
  %126 = fcmp olt double %125, 0.000000e+00
  br i1 %126, label %127, label %140

127:                                              ; preds = %120
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.png_struct_def, ptr %128, i32 0, i32 104
  %130 = load ptr, ptr %129, align 8, !tbaa !26
  %131 = load i32, ptr %11, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds i16, ptr %130, i64 %132
  store i16 256, ptr %133, align 2, !tbaa !28
  %134 = load ptr, ptr %6, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.png_struct_def, ptr %134, i32 0, i32 105
  %136 = load ptr, ptr %135, align 8, !tbaa !27
  %137 = load i32, ptr %11, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds i16, ptr %136, i64 %138
  store i16 256, ptr %139, align 2, !tbaa !28
  br label %168

140:                                              ; preds = %120
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  %142 = load i32, ptr %11, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds double, ptr %141, i64 %143
  %145 = load double, ptr %144, align 8, !tbaa !30
  %146 = call double @llvm.fmuladd.f64(double 2.560000e+02, double %145, double 5.000000e-01)
  %147 = fptoui double %146 to i16
  %148 = load ptr, ptr %6, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.png_struct_def, ptr %148, i32 0, i32 105
  %150 = load ptr, ptr %149, align 8, !tbaa !27
  %151 = load i32, ptr %11, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds i16, ptr %150, i64 %152
  store i16 %147, ptr %153, align 2, !tbaa !28
  %154 = load ptr, ptr %9, align 8, !tbaa !5
  %155 = load i32, ptr %11, align 4, !tbaa !9
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds double, ptr %154, i64 %156
  %158 = load double, ptr %157, align 8, !tbaa !30
  %159 = fdiv double 2.560000e+02, %158
  %160 = fadd double %159, 5.000000e-01
  %161 = fptoui double %160 to i16
  %162 = load ptr, ptr %6, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.png_struct_def, ptr %162, i32 0, i32 104
  %164 = load ptr, ptr %163, align 8, !tbaa !26
  %165 = load i32, ptr %11, align 4, !tbaa !9
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds i16, ptr %164, i64 %166
  store i16 %161, ptr %167, align 2, !tbaa !28
  br label %168

168:                                              ; preds = %140, %127
  br label %169

169:                                              ; preds = %168
  %170 = load i32, ptr %11, align 4, !tbaa !9
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %11, align 4, !tbaa !9
  br label %116, !llvm.loop !32

172:                                              ; preds = %116
  br label %173

173:                                              ; preds = %172, %35
  %174 = load ptr, ptr %6, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.png_struct_def, ptr %174, i32 0, i32 106
  %176 = load ptr, ptr %175, align 8, !tbaa !33
  %177 = icmp eq ptr %176, null
  br i1 %177, label %178, label %207

178:                                              ; preds = %173
  %179 = load ptr, ptr %6, align 8, !tbaa !5
  %180 = call ptr @png_malloc(ptr noundef %179, i64 noundef 10)
  %181 = load ptr, ptr %6, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.png_struct_def, ptr %181, i32 0, i32 106
  store ptr %180, ptr %182, align 8, !tbaa !33
  %183 = load ptr, ptr %6, align 8, !tbaa !5
  %184 = call ptr @png_malloc(ptr noundef %183, i64 noundef 10)
  %185 = load ptr, ptr %6, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.png_struct_def, ptr %185, i32 0, i32 107
  store ptr %184, ptr %186, align 8, !tbaa !34
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %187

187:                                              ; preds = %203, %178
  %188 = load i32, ptr %11, align 4, !tbaa !9
  %189 = icmp slt i32 %188, 5
  br i1 %189, label %190, label %206

190:                                              ; preds = %187
  %191 = load ptr, ptr %6, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.png_struct_def, ptr %191, i32 0, i32 106
  %193 = load ptr, ptr %192, align 8, !tbaa !33
  %194 = load i32, ptr %11, align 4, !tbaa !9
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds i16, ptr %193, i64 %195
  store i16 8, ptr %196, align 2, !tbaa !28
  %197 = load ptr, ptr %6, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.png_struct_def, ptr %197, i32 0, i32 107
  %199 = load ptr, ptr %198, align 8, !tbaa !34
  %200 = load i32, ptr %11, align 4, !tbaa !9
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds i16, ptr %199, i64 %201
  store i16 8, ptr %202, align 2, !tbaa !28
  br label %203

203:                                              ; preds = %190
  %204 = load i32, ptr %11, align 4, !tbaa !9
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %11, align 4, !tbaa !9
  br label %187, !llvm.loop !35

206:                                              ; preds = %187
  br label %207

207:                                              ; preds = %206, %173
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %208

208:                                              ; preds = %271, %207
  %209 = load i32, ptr %11, align 4, !tbaa !9
  %210 = icmp slt i32 %209, 5
  br i1 %210, label %211, label %274

211:                                              ; preds = %208
  %212 = load ptr, ptr %10, align 8, !tbaa !5
  %213 = icmp eq ptr %212, null
  br i1 %213, label %221, label %214

214:                                              ; preds = %211
  %215 = load ptr, ptr %10, align 8, !tbaa !5
  %216 = load i32, ptr %11, align 4, !tbaa !9
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds double, ptr %215, i64 %217
  %219 = load double, ptr %218, align 8, !tbaa !30
  %220 = fcmp olt double %219, 0.000000e+00
  br i1 %220, label %221, label %234

221:                                              ; preds = %214, %211
  %222 = load ptr, ptr %6, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.png_struct_def, ptr %222, i32 0, i32 106
  %224 = load ptr, ptr %223, align 8, !tbaa !33
  %225 = load i32, ptr %11, align 4, !tbaa !9
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds i16, ptr %224, i64 %226
  store i16 8, ptr %227, align 2, !tbaa !28
  %228 = load ptr, ptr %6, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.png_struct_def, ptr %228, i32 0, i32 107
  %230 = load ptr, ptr %229, align 8, !tbaa !34
  %231 = load i32, ptr %11, align 4, !tbaa !9
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds i16, ptr %230, i64 %232
  store i16 8, ptr %233, align 2, !tbaa !28
  br label %270

234:                                              ; preds = %214
  %235 = load ptr, ptr %10, align 8, !tbaa !5
  %236 = load i32, ptr %11, align 4, !tbaa !9
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds double, ptr %235, i64 %237
  %239 = load double, ptr %238, align 8, !tbaa !30
  %240 = fcmp oge double %239, 1.000000e+00
  br i1 %240, label %241, label %269

241:                                              ; preds = %234
  %242 = load ptr, ptr %10, align 8, !tbaa !5
  %243 = load i32, ptr %11, align 4, !tbaa !9
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds double, ptr %242, i64 %244
  %246 = load double, ptr %245, align 8, !tbaa !30
  %247 = fdiv double 8.000000e+00, %246
  %248 = fadd double %247, 5.000000e-01
  %249 = fptoui double %248 to i16
  %250 = load ptr, ptr %6, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.png_struct_def, ptr %250, i32 0, i32 107
  %252 = load ptr, ptr %251, align 8, !tbaa !34
  %253 = load i32, ptr %11, align 4, !tbaa !9
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds i16, ptr %252, i64 %254
  store i16 %249, ptr %255, align 2, !tbaa !28
  %256 = load ptr, ptr %10, align 8, !tbaa !5
  %257 = load i32, ptr %11, align 4, !tbaa !9
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds double, ptr %256, i64 %258
  %260 = load double, ptr %259, align 8, !tbaa !30
  %261 = call double @llvm.fmuladd.f64(double 8.000000e+00, double %260, double 5.000000e-01)
  %262 = fptoui double %261 to i16
  %263 = load ptr, ptr %6, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.png_struct_def, ptr %263, i32 0, i32 106
  %265 = load ptr, ptr %264, align 8, !tbaa !33
  %266 = load i32, ptr %11, align 4, !tbaa !9
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds i16, ptr %265, i64 %267
  store i16 %262, ptr %268, align 2, !tbaa !28
  br label %269

269:                                              ; preds = %241, %234
  br label %270

270:                                              ; preds = %269, %221
  br label %271

271:                                              ; preds = %270
  %272 = load i32, ptr %11, align 4, !tbaa !9
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr %11, align 4, !tbaa !9
  br label %208, !llvm.loop !36

274:                                              ; preds = %208
  store i32 0, ptr %12, align 4
  br label %275

275:                                              ; preds = %274, %19, %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  %276 = load i32, ptr %12, align 4
  switch i32 %276, label %278 [
    i32 0, label %277
    i32 1, label %277
  ]

277:                                              ; preds = %275, %275
  ret void

278:                                              ; preds = %275
  unreachable
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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, !7, i64 985}
!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, !7, i64 272, !7, i64 273, !13, i64 280, !13, i64 288, !13, i64 296, !14, i64 304, !6, i64 416, !13, i64 424, !10, i64 432, !10, i64 436, !10, i64 440, !10, i64 444, !10, i64 448, !13, i64 456, !13, i64 464, !13, i64 472, !13, i64 480, !13, i64 488, !13, i64 496, !13, i64 504, !13, i64 512, !6, i64 520, !6, i64 528, !6, i64 536, !6, i64 544, !6, i64 552, !6, i64 560, !15, i64 568, !13, i64 592, !13, i64 600, !6, i64 608, !16, i64 616, !16, 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, !16, i64 638, !7, i64 640, !17, i64 644, !18, i64 648, !18, i64 658, !6, i64 672, !13, i64 680, !13, i64 688, !10, i64 696, !17, i64 700, !17, i64 704, !6, i64 712, !6, i64 720, !6, i64 728, !6, i64 736, !6, i64 744, !6, i64 752, !19, i64 760, !19, i64 765, !6, i64 776, !18, 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, !13, i64 872, !13, i64 880, !13, i64 888, !13, i64 896, !13, i64 904, !13, i64 912, !10, i64 920, !10, i64 924, !13, i64 928, !13, 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, !13, i64 1040, !6, i64 1048, !6, i64 1056, !10, i64 1064, !6, i64 1072, !7, i64 1080, !16, i64 1082, !16, i64 1084, !16, i64 1086, !13, i64 1088, !13, i64 1096, !7, i64 1104, !7, i64 1105, !13, i64 1112, !13, 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, !13, i64 1192, !13, i64 1200, !20, i64 1208, !13, i64 1240, !13, i64 1248, !6, i64 1256}
!13 = !{!"long", !7, i64 0}
!14 = !{!"z_stream_s", !6, i64 0, !10, i64 8, !13, i64 16, !6, i64 24, !10, i64 32, !13, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !13, i64 96, !13, i64 104}
!15 = !{!"png_row_info_struct", !13, i64 0, !13, 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, !13, i64 16, !7, i64 24}
!21 = !{!12, !7, i64 984}
!22 = !{!12, !6, i64 992}
!23 = !{!7, !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!12, !6, i64 1000}
!27 = !{!12, !6, i64 1008}
!28 = !{!16, !16, i64 0}
!29 = distinct !{!29, !25}
!30 = !{!31, !31, i64 0}
!31 = !{!"double", !7, i64 0}
!32 = distinct !{!32, !25}
!33 = !{!12, !6, i64 1016}
!34 = !{!12, !6, i64 1024}
!35 = distinct !{!35, !25}
!36 = distinct !{!36, !25}


; 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.19 = external hidden unnamed_addr constant [32 x i8], align 1

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

declare ptr @png_malloc(ptr noundef, i64 noundef) local_unnamed_addr #0

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

7:                                                ; preds = %5
  %8 = icmp sgt i32 %1, 2
  br i1 %8, label %9, label %10

9:                                                ; preds = %7
  tail call void @png_warning(ptr noundef nonnull %0, ptr noundef nonnull @.str.19) #4
  br label %.loopexit

10:                                               ; preds = %7
  %spec.store.select = tail call i32 @llvm.umax.i32(i32 %1, i32 1)
  %11 = icmp slt i32 %2, 0
  %12 = icmp eq ptr %3, null
  %or.cond = or i1 %11, %12
  %13 = icmp ult i32 %1, 2
  %or.cond3 = or i1 %13, %or.cond
  %spec.store.select4 = select i1 %or.cond3, i32 0, i32 %2
  %14 = trunc i32 %spec.store.select4 to i8
  %15 = getelementptr inbounds i8, ptr %0, i64 985
  store i8 %14, ptr %15, align 1, !tbaa !5
  %16 = trunc i32 %spec.store.select to i8
  %17 = getelementptr inbounds i8, ptr %0, i64 984
  store i8 %16, ptr %17, align 8, !tbaa !19
  %.not = icmp eq i32 %spec.store.select4, 0
  br i1 %.not, label %.loopexit91, label %18

18:                                               ; preds = %10
  %19 = getelementptr inbounds i8, ptr %0, i64 992
  %20 = load ptr, ptr %19, align 8, !tbaa !20
  %21 = icmp eq ptr %20, null
  br i1 %21, label %22, label %.loopexit93

22:                                               ; preds = %18
  %23 = zext nneg i32 %spec.store.select4 to i64
  %24 = tail call ptr @png_malloc(ptr noundef nonnull %0, i64 noundef %23) #4
  store ptr %24, ptr %19, align 8, !tbaa !20
  %xtraiter = and i64 %23, 3
  %25 = icmp ult i32 %spec.store.select4, 4
  br i1 %25, label %.loopexit93.loopexit.unr-lcssa, label %.new

.new:                                             ; preds = %22
  %unroll_iter = and i64 %23, 2147483644
  br label %26

26:                                               ; preds = %26, %.new
  %indvars.iv = phi i64 [ 0, %.new ], [ %indvars.iv.next.3, %26 ]
  %niter = phi i64 [ 0, %.new ], [ %niter.next.3, %26 ]
  %27 = load ptr, ptr %19, align 8, !tbaa !20
  %28 = getelementptr inbounds i8, ptr %27, i64 %indvars.iv
  store i8 -1, ptr %28, align 1, !tbaa !21
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %29 = load ptr, ptr %19, align 8, !tbaa !20
  %30 = getelementptr inbounds i8, ptr %29, i64 %indvars.iv.next
  store i8 -1, ptr %30, align 1, !tbaa !21
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %31 = load ptr, ptr %19, align 8, !tbaa !20
  %32 = getelementptr inbounds i8, ptr %31, i64 %indvars.iv.next.1
  store i8 -1, ptr %32, align 1, !tbaa !21
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %33 = load ptr, ptr %19, align 8, !tbaa !20
  %34 = getelementptr inbounds i8, ptr %33, i64 %indvars.iv.next.2
  store i8 -1, ptr %34, align 1, !tbaa !21
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.loopexit93.loopexit.unr-lcssa, label %26, !llvm.loop !22

.loopexit93.loopexit.unr-lcssa:                   ; preds = %26, %22
  %indvars.iv.unr = phi i64 [ 0, %22 ], [ %indvars.iv.next.3, %26 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit93, label %.epil.preheader

.epil.preheader:                                  ; preds = %.loopexit93.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %.loopexit93.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.loopexit93.loopexit.unr-lcssa ]
  %35 = load ptr, ptr %19, align 8, !tbaa !20
  %36 = getelementptr inbounds i8, ptr %35, i64 %indvars.iv.epil
  store i8 -1, ptr %36, align 1, !tbaa !21
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.loopexit93, label %.epil.preheader, !llvm.loop !24

.loopexit93:                                      ; preds = %.loopexit93.loopexit.unr-lcssa, %.epil.preheader, %18
  %37 = getelementptr inbounds i8, ptr %0, i64 1000
  %38 = load ptr, ptr %37, align 8, !tbaa !26
  %39 = icmp eq ptr %38, null
  br i1 %39, label %40, label %.loopexit93..loopexit92_crit_edge

.loopexit93..loopexit92_crit_edge:                ; preds = %.loopexit93
  %.pre = tail call i32 @llvm.umax.i32(i32 %spec.store.select4, i32 1)
  %.pre124 = zext nneg i32 %.pre to i64
  br label %.loopexit92

40:                                               ; preds = %.loopexit93
  %41 = shl nuw i32 %spec.store.select4, 1
  %42 = zext i32 %41 to i64
  %43 = tail call ptr @png_malloc(ptr noundef nonnull %0, i64 noundef %42) #4
  store ptr %43, ptr %37, align 8, !tbaa !26
  %44 = tail call ptr @png_malloc(ptr noundef nonnull %0, i64 noundef %42) #4
  %45 = getelementptr inbounds i8, ptr %0, i64 1008
  store ptr %44, ptr %45, align 8, !tbaa !27
  %46 = load ptr, ptr %37, align 8, !tbaa !26
  %umax = tail call i32 @llvm.umax.i32(i32 %spec.store.select4, i32 1)
  %wide.trip.count104 = zext nneg i32 %umax to i64
  %min.iters.check = icmp ult i32 %spec.store.select4, 16
  %47 = ptrtoint ptr %46 to i64
  %48 = ptrtoint ptr %44 to i64
  %49 = sub i64 %48, %47
  %diff.check = icmp ult i64 %49, 32
  %or.cond138 = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond138, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %40
  %n.vec = and i64 %wide.trip.count104, 2147483632
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %50 = getelementptr inbounds i16, ptr %46, i64 %index
  %51 = getelementptr inbounds i8, ptr %50, i64 16
  store <8 x i16> <i16 256, i16 256, i16 256, i16 256, i16 256, i16 256, i16 256, i16 256>, ptr %50, align 2, !tbaa !28
  store <8 x i16> <i16 256, i16 256, i16 256, i16 256, i16 256, i16 256, i16 256, i16 256>, ptr %51, align 2, !tbaa !28
  %52 = getelementptr inbounds i16, ptr %44, i64 %index
  %53 = getelementptr inbounds i8, ptr %52, i64 16
  store <8 x i16> <i16 256, i16 256, i16 256, i16 256, i16 256, i16 256, i16 256, i16 256>, ptr %52, align 2, !tbaa !28
  store <8 x i16> <i16 256, i16 256, i16 256, i16 256, i16 256, i16 256, i16 256, i16 256>, ptr %53, align 2, !tbaa !28
  %index.next = add nuw i64 %index, 16
  %54 = icmp eq i64 %index.next, %n.vec
  br i1 %54, label %middle.block, label %vector.body, !llvm.loop !29

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count104
  br i1 %cmp.n, label %.loopexit92, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %40
  %indvars.iv101.ph = phi i64 [ 0, %40 ], [ %n.vec, %middle.block ]
  %xtraiter139 = and i64 %wide.trip.count104, 3
  %lcmp.mod140.not = icmp eq i64 %xtraiter139, 0
  br i1 %lcmp.mod140.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv101.prol = phi i64 [ %indvars.iv.next102.prol, %scalar.ph.prol ], [ %indvars.iv101.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %55 = getelementptr inbounds i16, ptr %46, i64 %indvars.iv101.prol
  store i16 256, ptr %55, align 2, !tbaa !28
  %56 = getelementptr inbounds i16, ptr %44, i64 %indvars.iv101.prol
  store i16 256, ptr %56, align 2, !tbaa !28
  %indvars.iv.next102.prol = add nuw nsw i64 %indvars.iv101.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter139
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !32

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv101.unr = phi i64 [ %indvars.iv101.ph, %scalar.ph.preheader ], [ %indvars.iv.next102.prol, %scalar.ph.prol ]
  %57 = sub nsw i64 %indvars.iv101.ph, %wide.trip.count104
  %58 = icmp ugt i64 %57, -4
  br i1 %58, label %.loopexit92, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv101 = phi i64 [ %indvars.iv.next102.3, %scalar.ph ], [ %indvars.iv101.unr, %scalar.ph.prol.loopexit ]
  %59 = getelementptr inbounds i16, ptr %46, i64 %indvars.iv101
  store i16 256, ptr %59, align 2, !tbaa !28
  %60 = getelementptr inbounds i16, ptr %44, i64 %indvars.iv101
  store i16 256, ptr %60, align 2, !tbaa !28
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %61 = getelementptr inbounds i16, ptr %46, i64 %indvars.iv.next102
  store i16 256, ptr %61, align 2, !tbaa !28
  %62 = getelementptr inbounds i16, ptr %44, i64 %indvars.iv.next102
  store i16 256, ptr %62, align 2, !tbaa !28
  %indvars.iv.next102.1 = add nuw nsw i64 %indvars.iv101, 2
  %63 = getelementptr inbounds i16, ptr %46, i64 %indvars.iv.next102.1
  store i16 256, ptr %63, align 2, !tbaa !28
  %64 = getelementptr inbounds i16, ptr %44, i64 %indvars.iv.next102.1
  store i16 256, ptr %64, align 2, !tbaa !28
  %indvars.iv.next102.2 = add nuw nsw i64 %indvars.iv101, 3
  %65 = getelementptr inbounds i16, ptr %46, i64 %indvars.iv.next102.2
  store i16 256, ptr %65, align 2, !tbaa !28
  %66 = getelementptr inbounds i16, ptr %44, i64 %indvars.iv.next102.2
  store i16 256, ptr %66, align 2, !tbaa !28
  %indvars.iv.next102.3 = add nuw nsw i64 %indvars.iv101, 4
  %exitcond105.not.3 = icmp eq i64 %indvars.iv.next102.3, %wide.trip.count104
  br i1 %exitcond105.not.3, label %.loopexit92, label %scalar.ph, !llvm.loop !33

.loopexit92:                                      ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %.loopexit93..loopexit92_crit_edge
  %wide.trip.count110.pre-phi = phi i64 [ %.pre124, %.loopexit93..loopexit92_crit_edge ], [ %wide.trip.count104, %middle.block ], [ %wide.trip.count104, %scalar.ph ], [ %wide.trip.count104, %scalar.ph.prol.loopexit ]
  %67 = phi ptr [ %38, %.loopexit93..loopexit92_crit_edge ], [ %46, %middle.block ], [ %46, %scalar.ph ], [ %46, %scalar.ph.prol.loopexit ]
  %68 = getelementptr inbounds i8, ptr %0, i64 1008
  br label %69

69:                                               ; preds = %.loopexit92, %84
  %indvars.iv106 = phi i64 [ 0, %.loopexit92 ], [ %indvars.iv.next107, %84 ]
  %70 = getelementptr inbounds double, ptr %3, i64 %indvars.iv106
  %71 = load double, ptr %70, align 8, !tbaa !34
  %72 = fcmp olt double %71, 0.000000e+00
  br i1 %72, label %73, label %76

73:                                               ; preds = %69
  %74 = getelementptr inbounds i16, ptr %67, i64 %indvars.iv106
  store i16 256, ptr %74, align 2, !tbaa !28
  %75 = load ptr, ptr %68, align 8, !tbaa !27
  br label %84

76:                                               ; preds = %69
  %77 = tail call double @llvm.fmuladd.f64(double %71, double 2.560000e+02, double 5.000000e-01)
  %78 = fptoui double %77 to i16
  %79 = load ptr, ptr %68, align 8, !tbaa !27
  %80 = getelementptr inbounds i16, ptr %79, i64 %indvars.iv106
  store i16 %78, ptr %80, align 2, !tbaa !28
  %81 = fdiv double 2.560000e+02, %71
  %82 = fadd double %81, 5.000000e-01
  %83 = fptoui double %82 to i16
  br label %84

84:                                               ; preds = %73, %76
  %.sink126 = phi ptr [ %75, %73 ], [ %67, %76 ]
  %.sink = phi i16 [ 256, %73 ], [ %83, %76 ]
  %85 = getelementptr inbounds i16, ptr %.sink126, i64 %indvars.iv106
  store i16 %.sink, ptr %85, align 2, !tbaa !28
  %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1
  %exitcond111.not = icmp eq i64 %indvars.iv.next107, %wide.trip.count110.pre-phi
  br i1 %exitcond111.not, label %.loopexit91, label %69, !llvm.loop !36

.loopexit91:                                      ; preds = %84, %10
  %86 = getelementptr inbounds i8, ptr %0, i64 1016
  %87 = load ptr, ptr %86, align 8, !tbaa !37
  %88 = icmp eq ptr %87, null
  br i1 %88, label %.loopexit90.loopexit, label %.loopexit90

.loopexit90.loopexit:                             ; preds = %.loopexit91
  %89 = tail call ptr @png_malloc(ptr noundef nonnull %0, i64 noundef 10) #4
  store ptr %89, ptr %86, align 8, !tbaa !37
  %90 = tail call ptr @png_malloc(ptr noundef nonnull %0, i64 noundef 10) #4
  %91 = getelementptr inbounds i8, ptr %0, i64 1024
  store ptr %90, ptr %91, align 8, !tbaa !38
  %92 = load ptr, ptr %86, align 8, !tbaa !37
  store i16 8, ptr %92, align 2, !tbaa !28
  store i16 8, ptr %90, align 2, !tbaa !28
  %93 = getelementptr inbounds i8, ptr %92, i64 2
  store i16 8, ptr %93, align 2, !tbaa !28
  %94 = getelementptr inbounds i8, ptr %90, i64 2
  store i16 8, ptr %94, align 2, !tbaa !28
  %95 = getelementptr inbounds i8, ptr %92, i64 4
  store i16 8, ptr %95, align 2, !tbaa !28
  %96 = getelementptr inbounds i8, ptr %90, i64 4
  store i16 8, ptr %96, align 2, !tbaa !28
  %97 = getelementptr inbounds i8, ptr %92, i64 6
  store i16 8, ptr %97, align 2, !tbaa !28
  %98 = getelementptr inbounds i8, ptr %90, i64 6
  store i16 8, ptr %98, align 2, !tbaa !28
  %99 = getelementptr inbounds i8, ptr %92, i64 8
  store i16 8, ptr %99, align 2, !tbaa !28
  %100 = getelementptr inbounds i8, ptr %90, i64 8
  store i16 8, ptr %100, align 2, !tbaa !28
  br label %.loopexit90

.loopexit90:                                      ; preds = %.loopexit90.loopexit, %.loopexit91
  %101 = phi ptr [ %92, %.loopexit90.loopexit ], [ %87, %.loopexit91 ]
  %102 = icmp eq ptr %4, null
  %103 = getelementptr inbounds i8, ptr %0, i64 1024
  br i1 %102, label %.split.us, label %.split.preheader

.split.preheader:                                 ; preds = %.loopexit90
  %104 = load double, ptr %4, align 8, !tbaa !34
  %105 = fcmp olt double %104, 0.000000e+00
  br i1 %105, label %115, label %117

.split.us:                                        ; preds = %.loopexit90
  %106 = load ptr, ptr %103, align 8, !tbaa !38
  store i16 8, ptr %101, align 2, !tbaa !28
  store i16 8, ptr %106, align 2, !tbaa !28
  %107 = getelementptr inbounds i8, ptr %101, i64 2
  store i16 8, ptr %107, align 2, !tbaa !28
  %108 = getelementptr inbounds i8, ptr %106, i64 2
  store i16 8, ptr %108, align 2, !tbaa !28
  %109 = getelementptr inbounds i8, ptr %101, i64 4
  store i16 8, ptr %109, align 2, !tbaa !28
  %110 = getelementptr inbounds i8, ptr %106, i64 4
  store i16 8, ptr %110, align 2, !tbaa !28
  %111 = getelementptr inbounds i8, ptr %101, i64 6
  store i16 8, ptr %111, align 2, !tbaa !28
  %112 = getelementptr inbounds i8, ptr %106, i64 6
  store i16 8, ptr %112, align 2, !tbaa !28
  %113 = getelementptr inbounds i8, ptr %101, i64 8
  store i16 8, ptr %113, align 2, !tbaa !28
  %114 = getelementptr inbounds i8, ptr %106, i64 8
  store i16 8, ptr %114, align 2, !tbaa !28
  br label %.loopexit

115:                                              ; preds = %.split.preheader
  store i16 8, ptr %101, align 2, !tbaa !28
  %116 = load ptr, ptr %103, align 8, !tbaa !38
  store i16 8, ptr %116, align 2, !tbaa !28
  br label %.split.1

117:                                              ; preds = %.split.preheader
  %118 = fcmp ult double %104, 1.000000e+00
  br i1 %118, label %.split.1, label %119

119:                                              ; preds = %117
  %120 = fdiv double 8.000000e+00, %104
  %121 = fadd double %120, 5.000000e-01
  %122 = fptoui double %121 to i16
  %123 = load ptr, ptr %103, align 8, !tbaa !38
  store i16 %122, ptr %123, align 2, !tbaa !28
  %124 = tail call double @llvm.fmuladd.f64(double %104, double 8.000000e+00, double 5.000000e-01)
  %125 = fptoui double %124 to i16
  store i16 %125, ptr %101, align 2, !tbaa !28
  br label %.split.1

.split.1:                                         ; preds = %115, %119, %117
  %126 = getelementptr inbounds i8, ptr %4, i64 8
  %127 = load double, ptr %126, align 8, !tbaa !34
  %128 = fcmp olt double %127, 0.000000e+00
  br i1 %128, label %139, label %129

129:                                              ; preds = %.split.1
  %130 = fcmp ult double %127, 1.000000e+00
  br i1 %130, label %.split.2, label %131

131:                                              ; preds = %129
  %132 = fdiv double 8.000000e+00, %127
  %133 = fadd double %132, 5.000000e-01
  %134 = fptoui double %133 to i16
  %135 = load ptr, ptr %103, align 8, !tbaa !38
  %136 = getelementptr inbounds i8, ptr %135, i64 2
  store i16 %134, ptr %136, align 2, !tbaa !28
  %137 = tail call double @llvm.fmuladd.f64(double %127, double 8.000000e+00, double 5.000000e-01)
  %138 = fptoui double %137 to i16
  br label %.split.2.sink.split

139:                                              ; preds = %.split.1
  %140 = getelementptr inbounds i8, ptr %101, i64 2
  store i16 8, ptr %140, align 2, !tbaa !28
  %141 = load ptr, ptr %103, align 8, !tbaa !38
  br label %.split.2.sink.split

.split.2.sink.split:                              ; preds = %131, %139
  %.sink129 = phi ptr [ %141, %139 ], [ %101, %131 ]
  %.sink127 = phi i16 [ 8, %139 ], [ %138, %131 ]
  %142 = getelementptr inbounds i8, ptr %.sink129, i64 2
  store i16 %.sink127, ptr %142, align 2, !tbaa !28
  br label %.split.2

.split.2:                                         ; preds = %.split.2.sink.split, %129
  %143 = getelementptr inbounds i8, ptr %4, i64 16
  %144 = load double, ptr %143, align 8, !tbaa !34
  %145 = fcmp olt double %144, 0.000000e+00
  br i1 %145, label %156, label %146

146:                                              ; preds = %.split.2
  %147 = fcmp ult double %144, 1.000000e+00
  br i1 %147, label %.split.3, label %148

148:                                              ; preds = %146
  %149 = fdiv double 8.000000e+00, %144
  %150 = fadd double %149, 5.000000e-01
  %151 = fptoui double %150 to i16
  %152 = load ptr, ptr %103, align 8, !tbaa !38
  %153 = getelementptr inbounds i8, ptr %152, i64 4
  store i16 %151, ptr %153, align 2, !tbaa !28
  %154 = tail call double @llvm.fmuladd.f64(double %144, double 8.000000e+00, double 5.000000e-01)
  %155 = fptoui double %154 to i16
  br label %.split.3.sink.split

156:                                              ; preds = %.split.2
  %157 = getelementptr inbounds i8, ptr %101, i64 4
  store i16 8, ptr %157, align 2, !tbaa !28
  %158 = load ptr, ptr %103, align 8, !tbaa !38
  br label %.split.3.sink.split

.split.3.sink.split:                              ; preds = %148, %156
  %.sink132 = phi ptr [ %158, %156 ], [ %101, %148 ]
  %.sink130 = phi i16 [ 8, %156 ], [ %155, %148 ]
  %159 = getelementptr inbounds i8, ptr %.sink132, i64 4
  store i16 %.sink130, ptr %159, align 2, !tbaa !28
  br label %.split.3

.split.3:                                         ; preds = %.split.3.sink.split, %146
  %160 = getelementptr inbounds i8, ptr %4, i64 24
  %161 = load double, ptr %160, align 8, !tbaa !34
  %162 = fcmp olt double %161, 0.000000e+00
  br i1 %162, label %173, label %163

163:                                              ; preds = %.split.3
  %164 = fcmp ult double %161, 1.000000e+00
  br i1 %164, label %.split.4, label %165

165:                                              ; preds = %163
  %166 = fdiv double 8.000000e+00, %161
  %167 = fadd double %166, 5.000000e-01
  %168 = fptoui double %167 to i16
  %169 = load ptr, ptr %103, align 8, !tbaa !38
  %170 = getelementptr inbounds i8, ptr %169, i64 6
  store i16 %168, ptr %170, align 2, !tbaa !28
  %171 = tail call double @llvm.fmuladd.f64(double %161, double 8.000000e+00, double 5.000000e-01)
  %172 = fptoui double %171 to i16
  br label %.split.4.sink.split

173:                                              ; preds = %.split.3
  %174 = getelementptr inbounds i8, ptr %101, i64 6
  store i16 8, ptr %174, align 2, !tbaa !28
  %175 = load ptr, ptr %103, align 8, !tbaa !38
  br label %.split.4.sink.split

.split.4.sink.split:                              ; preds = %165, %173
  %.sink135 = phi ptr [ %175, %173 ], [ %101, %165 ]
  %.sink133 = phi i16 [ 8, %173 ], [ %172, %165 ]
  %176 = getelementptr inbounds i8, ptr %.sink135, i64 6
  store i16 %.sink133, ptr %176, align 2, !tbaa !28
  br label %.split.4

.split.4:                                         ; preds = %.split.4.sink.split, %163
  %177 = getelementptr inbounds i8, ptr %4, i64 32
  %178 = load double, ptr %177, align 8, !tbaa !34
  %179 = fcmp olt double %178, 0.000000e+00
  br i1 %179, label %191, label %180

180:                                              ; preds = %.split.4
  %181 = fcmp ult double %178, 1.000000e+00
  br i1 %181, label %.loopexit, label %182

182:                                              ; preds = %180
  %183 = fdiv double 8.000000e+00, %178
  %184 = fadd double %183, 5.000000e-01
  %185 = fptoui double %184 to i16
  %186 = load ptr, ptr %103, align 8, !tbaa !38
  %187 = getelementptr inbounds i8, ptr %186, i64 8
  store i16 %185, ptr %187, align 2, !tbaa !28
  %188 = tail call double @llvm.fmuladd.f64(double %178, double 8.000000e+00, double 5.000000e-01)
  %189 = fptoui double %188 to i16
  %190 = getelementptr inbounds i8, ptr %101, i64 8
  store i16 %189, ptr %190, align 2, !tbaa !28
  br label %.loopexit

191:                                              ; preds = %.split.4
  %192 = getelementptr inbounds i8, ptr %101, i64 8
  store i16 8, ptr %192, align 2, !tbaa !28
  %193 = load ptr, ptr %103, align 8, !tbaa !38
  %194 = getelementptr inbounds i8, ptr %193, i64 8
  store i16 8, ptr %194, align 2, !tbaa !28
  br label %.loopexit

.loopexit:                                        ; preds = %180, %182, %191, %.split.us, %5, %9
  ret void
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #3

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 985}
!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, !7, i64 984}
!20 = !{!6, !9, i64 992}
!21 = !{!7, !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.unroll.disable"}
!26 = !{!6, !9, i64 1000}
!27 = !{!6, !9, i64 1008}
!28 = !{!14, !14, i64 0}
!29 = distinct !{!29, !23, !30, !31}
!30 = !{!"llvm.loop.isvectorized", i32 1}
!31 = !{!"llvm.loop.unroll.runtime.disable"}
!32 = distinct !{!32, !25}
!33 = distinct !{!33, !23, !30}
!34 = !{!35, !35, i64 0}
!35 = !{!"double", !7, i64 0}
!36 = distinct !{!36, !23}
!37 = !{!6, !9, i64 1016}
!38 = !{!6, !9, i64 1024}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass