; LLVM IR from venumb/ZSPACE :: cpp/depends/lodePNG (lodepng_unittest)

; 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.Image = type { %"class.std::vector", i32, i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z37generateTestImageRequiringColorType16R5Image16LodePNGColorTypejb(ptr noundef nonnull align 8 dereferenceable(40) %0, i32 noundef %1, i32 noundef %2, i1 noundef zeroext %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !11
  %21 = zext i1 %3 to i8
  store i8 %21, ptr %8, align 1, !tbaa !13
  %22 = load i32, ptr %6, align 4, !tbaa !9
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.Image, ptr %23, i32 0, i32 3
  store i32 %22, ptr %24, align 8, !tbaa !15
  %25 = load i32, ptr %7, align 4, !tbaa !11
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.Image, ptr %26, i32 0, i32 4
  store i32 %25, ptr %27, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 1, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 1, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #3
  %28 = load i32, ptr %6, align 4, !tbaa !9
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %33, label %30

30:                                               ; preds = %4
  %31 = load i32, ptr %6, align 4, !tbaa !9
  %32 = icmp eq i32 %31, 4
  br label %33

33:                                               ; preds = %30, %4
  %34 = phi i1 [ true, %4 ], [ %32, %30 ]
  %35 = zext i1 %34 to i8
  store i8 %35, ptr %11, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #3
  %36 = load i32, ptr %6, align 4, !tbaa !9
  %37 = icmp eq i32 %36, 6
  br i1 %37, label %41, label %38

38:                                               ; preds = %33
  %39 = load i32, ptr %6, align 4, !tbaa !9
  %40 = icmp eq i32 %39, 4
  br label %41

41:                                               ; preds = %38, %33
  %42 = phi i1 [ true, %33 ], [ %40, %38 ]
  %43 = zext i1 %42 to i8
  store i8 %43, ptr %12, align 1, !tbaa !13
  %44 = load i32, ptr %6, align 4, !tbaa !9
  %45 = icmp eq i32 %44, 3
  br i1 %45, label %46, label %138

46:                                               ; preds = %41
  %47 = load i32, ptr %7, align 4, !tbaa !11
  %48 = shl i32 1, %47
  store i32 %48, ptr %9, align 4, !tbaa !11
  store i32 256, ptr %10, align 4, !tbaa !11
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.Image, ptr %49, i32 0, i32 0
  %51 = load i32, ptr %9, align 4, !tbaa !11
  %52 = load i32, ptr %10, align 4, !tbaa !11
  %53 = mul i32 %51, %52
  %54 = mul i32 %53, 8
  %55 = zext i32 %54 to i64
  call void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %50, i64 noundef %55)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  store i64 0, ptr %13, align 8, !tbaa !22
  br label %56

56:                                               ; preds = %134, %46
  %57 = load i64, ptr %13, align 8, !tbaa !22
  %58 = load i32, ptr %10, align 4, !tbaa !11
  %59 = zext i32 %58 to i64
  %60 = icmp ult i64 %57, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %56
  store i32 2, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  br label %137

62:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  store i64 0, ptr %15, align 8, !tbaa !22
  br label %63

63:                                               ; preds = %130, %62
  %64 = load i64, ptr %15, align 8, !tbaa !22
  %65 = load i32, ptr %9, align 4, !tbaa !11
  %66 = zext i32 %65 to i64
  %67 = icmp ult i64 %64, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %63
  store i32 5, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  br label %133

69:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %70 = load i64, ptr %13, align 8, !tbaa !22
  %71 = load i32, ptr %9, align 4, !tbaa !11
  %72 = zext i32 %71 to i64
  %73 = mul i64 %70, %72
  %74 = mul i64 %73, 8
  %75 = load i64, ptr %15, align 8, !tbaa !22
  %76 = mul i64 %75, 8
  %77 = add i64 %74, %76
  store i64 %77, ptr %16, align 8, !tbaa !22
  %78 = load i64, ptr %13, align 8, !tbaa !22
  %79 = trunc i64 %78 to i8
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.Image, ptr %80, i32 0, i32 0
  %82 = load i64, ptr %16, align 8, !tbaa !22
  %83 = add i64 %82, 1
  %84 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %83) #3
  store i8 %79, ptr %84, align 1, !tbaa !24
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.Image, ptr %85, i32 0, i32 0
  %87 = load i64, ptr %16, align 8, !tbaa !22
  %88 = add i64 %87, 0
  %89 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %86, i64 noundef %88) #3
  store i8 %79, ptr %89, align 1, !tbaa !24
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.Image, ptr %90, i32 0, i32 0
  %92 = load i64, ptr %16, align 8, !tbaa !22
  %93 = add i64 %92, 3
  %94 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %91, i64 noundef %93) #3
  store i8 -1, ptr %94, align 1, !tbaa !24
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.Image, ptr %95, i32 0, i32 0
  %97 = load i64, ptr %16, align 8, !tbaa !22
  %98 = add i64 %97, 2
  %99 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %96, i64 noundef %98) #3
  store i8 -1, ptr %99, align 1, !tbaa !24
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.Image, ptr %100, i32 0, i32 0
  %102 = load i64, ptr %16, align 8, !tbaa !22
  %103 = add i64 %102, 5
  %104 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %101, i64 noundef %103) #3
  store i8 0, ptr %104, align 1, !tbaa !24
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.Image, ptr %105, i32 0, i32 0
  %107 = load i64, ptr %16, align 8, !tbaa !22
  %108 = add i64 %107, 4
  %109 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %106, i64 noundef %108) #3
  store i8 0, ptr %109, align 1, !tbaa !24
  %110 = load i8, ptr %8, align 1, !tbaa !13, !range !25, !noundef !26
  %111 = trunc i8 %110 to i1
  br i1 %111, label %112, label %115

112:                                              ; preds = %69
  %113 = load i64, ptr %13, align 8, !tbaa !22
  %114 = icmp eq i64 %113, 0
  br label %115

115:                                              ; preds = %112, %69
  %116 = phi i1 [ false, %69 ], [ %114, %112 ]
  %117 = zext i1 %116 to i64
  %118 = select i1 %116, i32 0, i32 255
  %119 = trunc i32 %118 to i8
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.Image, ptr %120, i32 0, i32 0
  %122 = load i64, ptr %16, align 8, !tbaa !22
  %123 = add i64 %122, 7
  %124 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %121, i64 noundef %123) #3
  store i8 %119, ptr %124, align 1, !tbaa !24
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.Image, ptr %125, i32 0, i32 0
  %127 = load i64, ptr %16, align 8, !tbaa !22
  %128 = add i64 %127, 6
  %129 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %126, i64 noundef %128) #3
  store i8 %119, ptr %129, align 1, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  br label %130

130:                                              ; preds = %115
  %131 = load i64, ptr %15, align 8, !tbaa !22
  %132 = add i64 %131, 1
  store i64 %132, ptr %15, align 8, !tbaa !22
  br label %63, !llvm.loop !27

133:                                              ; preds = %68
  br label %134

134:                                              ; preds = %133
  %135 = load i64, ptr %13, align 8, !tbaa !22
  %136 = add i64 %135, 1
  store i64 %136, ptr %13, align 8, !tbaa !22
  br label %56, !llvm.loop !29

137:                                              ; preds = %61
  br label %439

138:                                              ; preds = %41
  %139 = load i32, ptr %7, align 4, !tbaa !11
  %140 = icmp eq i32 %139, 16
  br i1 %140, label %141, label %237

141:                                              ; preds = %138
  store i32 2, ptr %9, align 4, !tbaa !11
  %142 = load ptr, ptr %5, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.Image, ptr %142, i32 0, i32 0
  %144 = load i32, ptr %9, align 4, !tbaa !11
  %145 = load i32, ptr %10, align 4, !tbaa !11
  %146 = mul i32 %144, %145
  %147 = mul i32 %146, 8
  %148 = zext i32 %147 to i64
  call void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %143, i64 noundef %148)
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.Image, ptr %149, i32 0, i32 0
  %151 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %150, i64 noundef 0) #3
  store i8 10, ptr %151, align 1, !tbaa !24
  %152 = load ptr, ptr %5, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.Image, ptr %152, i32 0, i32 0
  %154 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %153, i64 noundef 1) #3
  store i8 20, ptr %154, align 1, !tbaa !24
  %155 = load ptr, ptr %5, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.Image, ptr %155, i32 0, i32 0
  %157 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %156, i64 noundef 2) #3
  store i8 10, ptr %157, align 1, !tbaa !24
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.Image, ptr %158, i32 0, i32 0
  %160 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %159, i64 noundef 3) #3
  store i8 20, ptr %160, align 1, !tbaa !24
  %161 = load i8, ptr %11, align 1, !tbaa !13, !range !25, !noundef !26
  %162 = trunc i8 %161 to i1
  %163 = zext i1 %162 to i64
  %164 = select i1 %162, i32 10, i32 110
  %165 = trunc i32 %164 to i8
  %166 = load ptr, ptr %5, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.Image, ptr %166, i32 0, i32 0
  %168 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %167, i64 noundef 4) #3
  store i8 %165, ptr %168, align 1, !tbaa !24
  %169 = load i8, ptr %11, align 1, !tbaa !13, !range !25, !noundef !26
  %170 = trunc i8 %169 to i1
  %171 = zext i1 %170 to i64
  %172 = select i1 %170, i32 20, i32 120
  %173 = trunc i32 %172 to i8
  %174 = load ptr, ptr %5, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.Image, ptr %174, i32 0, i32 0
  %176 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %175, i64 noundef 5) #3
  store i8 %173, ptr %176, align 1, !tbaa !24
  %177 = load i8, ptr %12, align 1, !tbaa !13, !range !25, !noundef !26
  %178 = trunc i8 %177 to i1
  %179 = zext i1 %178 to i64
  %180 = select i1 %178, i32 128, i32 255
  %181 = trunc i32 %180 to i8
  %182 = load ptr, ptr %5, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.Image, ptr %182, i32 0, i32 0
  %184 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %183, i64 noundef 6) #3
  store i8 %181, ptr %184, align 1, !tbaa !24
  %185 = load i8, ptr %12, align 1, !tbaa !13, !range !25, !noundef !26
  %186 = trunc i8 %185 to i1
  %187 = zext i1 %186 to i64
  %188 = select i1 %186, i32 20, i32 255
  %189 = trunc i32 %188 to i8
  %190 = load ptr, ptr %5, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.Image, ptr %190, i32 0, i32 0
  %192 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %191, i64 noundef 7) #3
  store i8 %189, ptr %192, align 1, !tbaa !24
  %193 = load ptr, ptr %5, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.Image, ptr %193, i32 0, i32 0
  %195 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %194, i64 noundef 8) #3
  store i8 40, ptr %195, align 1, !tbaa !24
  %196 = load ptr, ptr %5, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.Image, ptr %196, i32 0, i32 0
  %198 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %197, i64 noundef 9) #3
  store i8 50, ptr %198, align 1, !tbaa !24
  %199 = load ptr, ptr %5, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.Image, ptr %199, i32 0, i32 0
  %201 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %200, i64 noundef 10) #3
  store i8 40, ptr %201, align 1, !tbaa !24
  %202 = load ptr, ptr %5, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.Image, ptr %202, i32 0, i32 0
  %204 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %203, i64 noundef 11) #3
  store i8 50, ptr %204, align 1, !tbaa !24
  %205 = load i8, ptr %11, align 1, !tbaa !13, !range !25, !noundef !26
  %206 = trunc i8 %205 to i1
  %207 = zext i1 %206 to i64
  %208 = select i1 %206, i32 40, i32 140
  %209 = trunc i32 %208 to i8
  %210 = load ptr, ptr %5, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.Image, ptr %210, i32 0, i32 0
  %212 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %211, i64 noundef 12) #3
  store i8 %209, ptr %212, align 1, !tbaa !24
  %213 = load i8, ptr %11, align 1, !tbaa !13, !range !25, !noundef !26
  %214 = trunc i8 %213 to i1
  %215 = zext i1 %214 to i64
  %216 = select i1 %214, i32 50, i32 150
  %217 = trunc i32 %216 to i8
  %218 = load ptr, ptr %5, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.Image, ptr %218, i32 0, i32 0
  %220 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %219, i64 noundef 13) #3
  store i8 %217, ptr %220, align 1, !tbaa !24
  %221 = load i8, ptr %8, align 1, !tbaa !13, !range !25, !noundef !26
  %222 = trunc i8 %221 to i1
  %223 = zext i1 %222 to i64
  %224 = select i1 %222, i32 0, i32 255
  %225 = trunc i32 %224 to i8
  %226 = load ptr, ptr %5, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.Image, ptr %226, i32 0, i32 0
  %228 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %227, i64 noundef 14) #3
  store i8 %225, ptr %228, align 1, !tbaa !24
  %229 = load i8, ptr %8, align 1, !tbaa !13, !range !25, !noundef !26
  %230 = trunc i8 %229 to i1
  %231 = zext i1 %230 to i64
  %232 = select i1 %230, i32 0, i32 255
  %233 = trunc i32 %232 to i8
  %234 = load ptr, ptr %5, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.Image, ptr %234, i32 0, i32 0
  %236 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %235, i64 noundef 15) #3
  store i8 %233, ptr %236, align 1, !tbaa !24
  br label %438

237:                                              ; preds = %138
  %238 = load i8, ptr %11, align 1, !tbaa !13, !range !25, !noundef !26
  %239 = trunc i8 %238 to i1
  br i1 %239, label %240, label %333

240:                                              ; preds = %237
  store i32 2, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  %241 = load i32, ptr %7, align 4, !tbaa !11
  %242 = shl i32 1, %241
  %243 = sub i32 %242, 1
  %244 = udiv i32 255, %243
  store i32 %244, ptr %17, align 4, !tbaa !11
  %245 = load ptr, ptr %5, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.Image, ptr %245, i32 0, i32 0
  %247 = load i32, ptr %9, align 4, !tbaa !11
  %248 = load i32, ptr %10, align 4, !tbaa !11
  %249 = mul i32 %247, %248
  %250 = mul i32 %249, 8
  %251 = zext i32 %250 to i64
  call void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %246, i64 noundef %251)
  %252 = load i32, ptr %17, align 4, !tbaa !11
  %253 = trunc i32 %252 to i8
  %254 = load ptr, ptr %5, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.Image, ptr %254, i32 0, i32 0
  %256 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %255, i64 noundef 0) #3
  store i8 %253, ptr %256, align 1, !tbaa !24
  %257 = load i32, ptr %17, align 4, !tbaa !11
  %258 = trunc i32 %257 to i8
  %259 = load ptr, ptr %5, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.Image, ptr %259, i32 0, i32 0
  %261 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %260, i64 noundef 1) #3
  store i8 %258, ptr %261, align 1, !tbaa !24
  %262 = load i32, ptr %17, align 4, !tbaa !11
  %263 = trunc i32 %262 to i8
  %264 = load ptr, ptr %5, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.Image, ptr %264, i32 0, i32 0
  %266 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %265, i64 noundef 2) #3
  store i8 %263, ptr %266, align 1, !tbaa !24
  %267 = load i32, ptr %17, align 4, !tbaa !11
  %268 = trunc i32 %267 to i8
  %269 = load ptr, ptr %5, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.Image, ptr %269, i32 0, i32 0
  %271 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %270, i64 noundef 3) #3
  store i8 %268, ptr %271, align 1, !tbaa !24
  %272 = load i32, ptr %17, align 4, !tbaa !11
  %273 = trunc i32 %272 to i8
  %274 = load ptr, ptr %5, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.Image, ptr %274, i32 0, i32 0
  %276 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %275, i64 noundef 4) #3
  store i8 %273, ptr %276, align 1, !tbaa !24
  %277 = load i32, ptr %17, align 4, !tbaa !11
  %278 = trunc i32 %277 to i8
  %279 = load ptr, ptr %5, align 8, !tbaa !5
  %280 = getelementptr inbounds %struct.Image, ptr %279, i32 0, i32 0
  %281 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %280, i64 noundef 5) #3
  store i8 %278, ptr %281, align 1, !tbaa !24
  %282 = load i8, ptr %12, align 1, !tbaa !13, !range !25, !noundef !26
  %283 = trunc i8 %282 to i1
  br i1 %283, label %284, label %286

284:                                              ; preds = %240
  %285 = load i32, ptr %17, align 4, !tbaa !11
  br label %287

286:                                              ; preds = %240
  br label %287

287:                                              ; preds = %286, %284
  %288 = phi i32 [ %285, %284 ], [ 255, %286 ]
  %289 = trunc i32 %288 to i8
  %290 = load ptr, ptr %5, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.Image, ptr %290, i32 0, i32 0
  %292 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %291, i64 noundef 6) #3
  store i8 %289, ptr %292, align 1, !tbaa !24
  %293 = load i8, ptr %12, align 1, !tbaa !13, !range !25, !noundef !26
  %294 = trunc i8 %293 to i1
  br i1 %294, label %295, label %297

295:                                              ; preds = %287
  %296 = load i32, ptr %17, align 4, !tbaa !11
  br label %298

297:                                              ; preds = %287
  br label %298

298:                                              ; preds = %297, %295
  %299 = phi i32 [ %296, %295 ], [ 255, %297 ]
  %300 = trunc i32 %299 to i8
  %301 = load ptr, ptr %5, align 8, !tbaa !5
  %302 = getelementptr inbounds %struct.Image, ptr %301, i32 0, i32 0
  %303 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %302, i64 noundef 7) #3
  store i8 %300, ptr %303, align 1, !tbaa !24
  %304 = load ptr, ptr %5, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.Image, ptr %304, i32 0, i32 0
  %306 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %305, i64 noundef 9) #3
  store i8 0, ptr %306, align 1, !tbaa !24
  %307 = load ptr, ptr %5, align 8, !tbaa !5
  %308 = getelementptr inbounds %struct.Image, ptr %307, i32 0, i32 0
  %309 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %308, i64 noundef 8) #3
  store i8 0, ptr %309, align 1, !tbaa !24
  %310 = load ptr, ptr %5, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.Image, ptr %310, i32 0, i32 0
  %312 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %311, i64 noundef 11) #3
  store i8 0, ptr %312, align 1, !tbaa !24
  %313 = load ptr, ptr %5, align 8, !tbaa !5
  %314 = getelementptr inbounds %struct.Image, ptr %313, i32 0, i32 0
  %315 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %314, i64 noundef 10) #3
  store i8 0, ptr %315, align 1, !tbaa !24
  %316 = load ptr, ptr %5, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.Image, ptr %316, i32 0, i32 0
  %318 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %317, i64 noundef 13) #3
  store i8 0, ptr %318, align 1, !tbaa !24
  %319 = load ptr, ptr %5, align 8, !tbaa !5
  %320 = getelementptr inbounds %struct.Image, ptr %319, i32 0, i32 0
  %321 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %320, i64 noundef 12) #3
  store i8 0, ptr %321, align 1, !tbaa !24
  %322 = load i8, ptr %8, align 1, !tbaa !13, !range !25, !noundef !26
  %323 = trunc i8 %322 to i1
  %324 = zext i1 %323 to i64
  %325 = select i1 %323, i32 0, i32 255
  %326 = trunc i32 %325 to i8
  %327 = load ptr, ptr %5, align 8, !tbaa !5
  %328 = getelementptr inbounds %struct.Image, ptr %327, i32 0, i32 0
  %329 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %328, i64 noundef 15) #3
  store i8 %326, ptr %329, align 1, !tbaa !24
  %330 = load ptr, ptr %5, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.Image, ptr %330, i32 0, i32 0
  %332 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %331, i64 noundef 14) #3
  store i8 %326, ptr %332, align 1, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  br label %437

333:                                              ; preds = %237
  store i32 257, ptr %9, align 4, !tbaa !11
  %334 = load ptr, ptr %5, align 8, !tbaa !5
  %335 = getelementptr inbounds %struct.Image, ptr %334, i32 0, i32 0
  %336 = load i32, ptr %9, align 4, !tbaa !11
  %337 = load i32, ptr %10, align 4, !tbaa !11
  %338 = mul i32 %336, %337
  %339 = mul i32 %338, 8
  %340 = zext i32 %339 to i64
  call void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %335, i64 noundef %340)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  store i64 0, ptr %18, align 8, !tbaa !22
  br label %341

341:                                              ; preds = %433, %333
  %342 = load i64, ptr %18, align 8, !tbaa !22
  %343 = load i32, ptr %10, align 4, !tbaa !11
  %344 = zext i32 %343 to i64
  %345 = icmp ult i64 %342, %344
  br i1 %345, label %347, label %346

346:                                              ; preds = %341
  store i32 8, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  br label %436

347:                                              ; preds = %341
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  store i64 0, ptr %19, align 8, !tbaa !22
  br label %348

348:                                              ; preds = %429, %347
  %349 = load i64, ptr %19, align 8, !tbaa !22
  %350 = load i32, ptr %9, align 4, !tbaa !11
  %351 = zext i32 %350 to i64
  %352 = icmp ult i64 %349, %351
  br i1 %352, label %354, label %353

353:                                              ; preds = %348
  store i32 11, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  br label %432

354:                                              ; preds = %348
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %355 = load i64, ptr %18, align 8, !tbaa !22
  %356 = load i32, ptr %9, align 4, !tbaa !11
  %357 = zext i32 %356 to i64
  %358 = mul i64 %355, %357
  %359 = mul i64 %358, 8
  %360 = load i64, ptr %19, align 8, !tbaa !22
  %361 = mul i64 %360, 8
  %362 = add i64 %359, %361
  store i64 %362, ptr %20, align 8, !tbaa !22
  %363 = load i64, ptr %20, align 8, !tbaa !22
  %364 = udiv i64 %363, 2
  %365 = trunc i64 %364 to i8
  %366 = load ptr, ptr %5, align 8, !tbaa !5
  %367 = getelementptr inbounds %struct.Image, ptr %366, i32 0, i32 0
  %368 = load i64, ptr %20, align 8, !tbaa !22
  %369 = add i64 %368, 1
  %370 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %367, i64 noundef %369) #3
  store i8 %365, ptr %370, align 1, !tbaa !24
  %371 = load ptr, ptr %5, align 8, !tbaa !5
  %372 = getelementptr inbounds %struct.Image, ptr %371, i32 0, i32 0
  %373 = load i64, ptr %20, align 8, !tbaa !22
  %374 = add i64 %373, 0
  %375 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %372, i64 noundef %374) #3
  store i8 %365, ptr %375, align 1, !tbaa !24
  %376 = load i64, ptr %20, align 8, !tbaa !22
  %377 = udiv i64 %376, 3
  %378 = trunc i64 %377 to i8
  %379 = load ptr, ptr %5, align 8, !tbaa !5
  %380 = getelementptr inbounds %struct.Image, ptr %379, i32 0, i32 0
  %381 = load i64, ptr %20, align 8, !tbaa !22
  %382 = add i64 %381, 3
  %383 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %380, i64 noundef %382) #3
  store i8 %378, ptr %383, align 1, !tbaa !24
  %384 = load ptr, ptr %5, align 8, !tbaa !5
  %385 = getelementptr inbounds %struct.Image, ptr %384, i32 0, i32 0
  %386 = load i64, ptr %20, align 8, !tbaa !22
  %387 = add i64 %386, 2
  %388 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %385, i64 noundef %387) #3
  store i8 %378, ptr %388, align 1, !tbaa !24
  %389 = load i64, ptr %20, align 8, !tbaa !22
  %390 = udiv i64 %389, 5
  %391 = trunc i64 %390 to i8
  %392 = load ptr, ptr %5, align 8, !tbaa !5
  %393 = getelementptr inbounds %struct.Image, ptr %392, i32 0, i32 0
  %394 = load i64, ptr %20, align 8, !tbaa !22
  %395 = add i64 %394, 5
  %396 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %393, i64 noundef %395) #3
  store i8 %391, ptr %396, align 1, !tbaa !24
  %397 = load ptr, ptr %5, align 8, !tbaa !5
  %398 = getelementptr inbounds %struct.Image, ptr %397, i32 0, i32 0
  %399 = load i64, ptr %20, align 8, !tbaa !22
  %400 = add i64 %399, 4
  %401 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %398, i64 noundef %400) #3
  store i8 %391, ptr %401, align 1, !tbaa !24
  %402 = load i8, ptr %8, align 1, !tbaa !13, !range !25, !noundef !26
  %403 = trunc i8 %402 to i1
  br i1 %403, label %404, label %408

404:                                              ; preds = %354
  %405 = load i64, ptr %18, align 8, !tbaa !22
  %406 = icmp eq i64 %405, 0
  br i1 %406, label %407, label %408

407:                                              ; preds = %404
  br label %416

408:                                              ; preds = %404, %354
  %409 = load i8, ptr %12, align 1, !tbaa !13, !range !25, !noundef !26
  %410 = trunc i8 %409 to i1
  br i1 %410, label %411, label %413

411:                                              ; preds = %408
  %412 = load i64, ptr %20, align 8, !tbaa !22
  br label %414

413:                                              ; preds = %408
  br label %414

414:                                              ; preds = %413, %411
  %415 = phi i64 [ %412, %411 ], [ 255, %413 ]
  br label %416

416:                                              ; preds = %414, %407
  %417 = phi i64 [ 0, %407 ], [ %415, %414 ]
  %418 = trunc i64 %417 to i8
  %419 = load ptr, ptr %5, align 8, !tbaa !5
  %420 = getelementptr inbounds %struct.Image, ptr %419, i32 0, i32 0
  %421 = load i64, ptr %20, align 8, !tbaa !22
  %422 = add i64 %421, 7
  %423 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %420, i64 noundef %422) #3
  store i8 %418, ptr %423, align 1, !tbaa !24
  %424 = load ptr, ptr %5, align 8, !tbaa !5
  %425 = getelementptr inbounds %struct.Image, ptr %424, i32 0, i32 0
  %426 = load i64, ptr %20, align 8, !tbaa !22
  %427 = add i64 %426, 6
  %428 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %425, i64 noundef %427) #3
  store i8 %418, ptr %428, align 1, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  br label %429

429:                                              ; preds = %416
  %430 = load i64, ptr %19, align 8, !tbaa !22
  %431 = add i64 %430, 1
  store i64 %431, ptr %19, align 8, !tbaa !22
  br label %348, !llvm.loop !30

432:                                              ; preds = %353
  br label %433

433:                                              ; preds = %432
  %434 = load i64, ptr %18, align 8, !tbaa !22
  %435 = add i64 %434, 1
  store i64 %435, ptr %18, align 8, !tbaa !22
  br label %341, !llvm.loop !31

436:                                              ; preds = %346
  br label %437

437:                                              ; preds = %436, %298
  br label %438

438:                                              ; preds = %437, %141
  br label %439

439:                                              ; preds = %438, %137
  %440 = load i32, ptr %9, align 4, !tbaa !11
  %441 = load ptr, ptr %5, align 8, !tbaa !5
  %442 = getelementptr inbounds %struct.Image, ptr %441, i32 0, i32 1
  store i32 %440, ptr %442, align 8, !tbaa !32
  %443 = load i32, ptr %10, align 4, !tbaa !11
  %444 = load ptr, ptr %5, align 8, !tbaa !5
  %445 = getelementptr inbounds %struct.Image, ptr %444, i32 0, i32 2
  store i32 %443, ptr %445, align 4, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 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 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTS16LodePNGColorType", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!16, !10, i64 32}
!16 = !{!"_ZTS5Image", !17, i64 0, !12, i64 24, !12, i64 28, !10, i64 32, !12, i64 36}
!17 = !{!"_ZTSSt6vectorIhSaIhEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!16, !12, i64 36}
!22 = !{!23, !23, i64 0}
!23 = !{!"long", !7, i64 0}
!24 = !{!7, !7, i64 0}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}
!30 = distinct !{!30, !28}
!31 = distinct !{!31, !28}
!32 = !{!16, !12, i64 24}
!33 = !{!16, !12, i64 28}


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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z37generateTestImageRequiringColorType16R5Image16LodePNGColorTypejb(ptr noundef nonnull align 8 dereferenceable(40) %0, i32 noundef %1, i32 noundef %2, i1 noundef zeroext %3) local_unnamed_addr #1 {
  %5 = getelementptr inbounds i8, ptr %0, i64 32
  store i32 %1, ptr %5, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 36
  store i32 %2, ptr %6, align 4, !tbaa !16
  %7 = icmp eq i32 %1, 0
  %8 = icmp eq i32 %1, 4
  %9 = or i1 %7, %8
  %10 = icmp eq i32 %1, 6
  %11 = or i1 %10, %8
  %12 = icmp eq i32 %1, 3
  br i1 %12, label %13, label %45

13:                                               ; preds = %4
  %14 = shl nuw i32 1, %2
  %15 = shl i32 2048, %2
  %16 = zext i32 %15 to i64
  tail call void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %16)
  %17 = zext i32 %14 to i64
  %18 = zext nneg i32 %2 to i64
  br label %.preheader

.preheader:                                       ; preds = %13, %24
  %.0143154 = phi i64 [ 0, %13 ], [ %25, %24 ]
  %19 = shl nuw i64 %.0143154, %18
  %20 = trunc nuw i64 %.0143154 to i8
  %21 = icmp eq i64 %.0143154, 0
  %22 = and i1 %21, %3
  %not.148 = xor i1 %22, true
  %23 = sext i1 %not.148 to i8
  br label %26

24:                                               ; preds = %26
  %25 = add nuw nsw i64 %.0143154, 1
  %exitcond157.not = icmp eq i64 %25, 256
  br i1 %exitcond157.not, label %.loopexit, label %.preheader, !llvm.loop !17

26:                                               ; preds = %.preheader, %26
  %.0144153 = phi i64 [ 0, %.preheader ], [ %44, %26 ]
  %27 = add i64 %.0144153, %19
  %28 = shl nuw i64 %27, 3
  %29 = or disjoint i64 %28, 1
  %30 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %29) #2
  store i8 %20, ptr %30, align 1, !tbaa !19
  %31 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %28) #2
  store i8 %20, ptr %31, align 1, !tbaa !19
  %32 = or disjoint i64 %28, 3
  %33 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %32) #2
  store i8 -1, ptr %33, align 1, !tbaa !19
  %34 = or disjoint i64 %28, 2
  %35 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %34) #2
  store i8 -1, ptr %35, align 1, !tbaa !19
  %36 = or disjoint i64 %28, 5
  %37 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %36) #2
  store i8 0, ptr %37, align 1, !tbaa !19
  %38 = or disjoint i64 %28, 4
  %39 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %38) #2
  store i8 0, ptr %39, align 1, !tbaa !19
  %40 = or disjoint i64 %28, 7
  %41 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %40) #2
  store i8 %23, ptr %41, align 1, !tbaa !19
  %42 = or disjoint i64 %28, 6
  %43 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %42) #2
  store i8 %23, ptr %43, align 1, !tbaa !19
  %44 = add nuw nsw i64 %.0144153, 1
  %exitcond156.not = icmp eq i64 %44, %17
  br i1 %exitcond156.not, label %24, label %26, !llvm.loop !20

45:                                               ; preds = %4
  %46 = icmp eq i32 %2, 16
  br i1 %46, label %47, label %67

47:                                               ; preds = %45
  tail call void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 16)
  %48 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #2
  store i8 10, ptr %48, align 1, !tbaa !19
  %49 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #2
  store i8 20, ptr %49, align 1, !tbaa !19
  %50 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 2) #2
  store i8 10, ptr %50, align 1, !tbaa !19
  %51 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 3) #2
  store i8 20, ptr %51, align 1, !tbaa !19
  %52 = select i1 %9, i8 10, i8 110
  %53 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 4) #2
  store i8 %52, ptr %53, align 1, !tbaa !19
  %54 = select i1 %9, i8 20, i8 120
  %55 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 5) #2
  store i8 %54, ptr %55, align 1, !tbaa !19
  %56 = select i1 %11, i8 -128, i8 -1
  %57 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 6) #2
  store i8 %56, ptr %57, align 1, !tbaa !19
  %58 = select i1 %11, i8 20, i8 -1
  %59 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 7) #2
  store i8 %58, ptr %59, align 1, !tbaa !19
  %60 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 8) #2
  store i8 40, ptr %60, align 1, !tbaa !19
  %61 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 9) #2
  store i8 50, ptr %61, align 1, !tbaa !19
  %62 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 10) #2
  store i8 40, ptr %62, align 1, !tbaa !19
  %63 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 11) #2
  store i8 50, ptr %63, align 1, !tbaa !19
  %64 = select i1 %9, i8 40, i8 -116
  %65 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 12) #2
  store i8 %64, ptr %65, align 1, !tbaa !19
  %66 = select i1 %9, i8 50, i8 -106
  br label %.loopexit.sink.split

67:                                               ; preds = %45
  switch i32 %1, label %.critedge [
    i32 4, label %68
    i32 0, label %68
  ]

68:                                               ; preds = %67, %67
  %notmask = shl nsw i32 -1, %2
  %69 = xor i32 %notmask, -1
  %70 = udiv i32 255, %69
  tail call void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 16)
  %71 = trunc nuw i32 %70 to i8
  %72 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #2
  store i8 %71, ptr %72, align 1, !tbaa !19
  %73 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #2
  store i8 %71, ptr %73, align 1, !tbaa !19
  %74 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 2) #2
  store i8 %71, ptr %74, align 1, !tbaa !19
  %75 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 3) #2
  store i8 %71, ptr %75, align 1, !tbaa !19
  %76 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 4) #2
  store i8 %71, ptr %76, align 1, !tbaa !19
  %77 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 5) #2
  store i8 %71, ptr %77, align 1, !tbaa !19
  %78 = select i1 %11, i8 %71, i8 -1
  %79 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 6) #2
  store i8 %78, ptr %79, align 1, !tbaa !19
  %80 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 7) #2
  store i8 %78, ptr %80, align 1, !tbaa !19
  %81 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 9) #2
  store i8 0, ptr %81, align 1, !tbaa !19
  %82 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 8) #2
  store i8 0, ptr %82, align 1, !tbaa !19
  %83 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 11) #2
  store i8 0, ptr %83, align 1, !tbaa !19
  %84 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 10) #2
  store i8 0, ptr %84, align 1, !tbaa !19
  %85 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 13) #2
  store i8 0, ptr %85, align 1, !tbaa !19
  br label %.loopexit.sink.split

.critedge:                                        ; preds = %67
  tail call void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 2056)
  br label %86

86:                                               ; preds = %.critedge, %86
  %.0140152 = phi i64 [ 0, %.critedge ], [ %111, %86 ]
  %87 = shl nuw nsw i64 %.0140152, 3
  %.0140.tr = trunc i64 %.0140152 to i8
  %88 = shl i8 %.0140.tr, 2
  %89 = or disjoint i64 %87, 1
  %90 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %89) #2
  store i8 %88, ptr %90, align 1, !tbaa !19
  %91 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %87) #2
  store i8 %88, ptr %91, align 1, !tbaa !19
  %.lhs.trunc = trunc nuw i64 %87 to i16
  %92 = udiv i16 %.lhs.trunc, 3
  %93 = trunc i16 %92 to i8
  %94 = or disjoint i64 %87, 3
  %95 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %94) #2
  store i8 %93, ptr %95, align 1, !tbaa !19
  %96 = or disjoint i64 %87, 2
  %97 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %96) #2
  store i8 %93, ptr %97, align 1, !tbaa !19
  %98 = udiv i16 %.lhs.trunc, 5
  %99 = trunc i16 %98 to i8
  %100 = or disjoint i64 %87, 5
  %101 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %100) #2
  store i8 %99, ptr %101, align 1, !tbaa !19
  %102 = or disjoint i64 %87, 4
  %103 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %102) #2
  store i8 %99, ptr %103, align 1, !tbaa !19
  %104 = trunc i64 %87 to i8
  %105 = select i1 %11, i8 %104, i8 -1
  %106 = select i1 %3, i8 0, i8 %105
  %107 = or disjoint i64 %87, 7
  %108 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %107) #2
  store i8 %106, ptr %108, align 1, !tbaa !19
  %109 = or disjoint i64 %87, 6
  %110 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %109) #2
  store i8 %106, ptr %110, align 1, !tbaa !19
  %111 = add nuw nsw i64 %.0140152, 1
  %exitcond.not = icmp eq i64 %111, 257
  br i1 %exitcond.not, label %.loopexit, label %86, !llvm.loop !21

.loopexit.sink.split:                             ; preds = %68, %47
  %.sink165 = phi i64 [ 13, %47 ], [ 12, %68 ]
  %.sink = phi i8 [ %66, %47 ], [ 0, %68 ]
  %.sink163 = phi i64 [ 14, %47 ], [ 15, %68 ]
  %.sink160 = phi i64 [ 15, %47 ], [ 14, %68 ]
  %112 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.sink165) #2
  store i8 %.sink, ptr %112, align 1, !tbaa !19
  %not.147 = xor i1 %3, true
  %113 = sext i1 %not.147 to i8
  %114 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.sink163) #2
  store i8 %113, ptr %114, align 1, !tbaa !19
  %115 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.sink160) #2
  store i8 %113, ptr %115, align 1, !tbaa !19
  br label %.loopexit

.loopexit:                                        ; preds = %86, %24, %.loopexit.sink.split
  %.0142 = phi i32 [ 1, %.loopexit.sink.split ], [ 256, %24 ], [ 1, %86 ]
  %.0 = phi i32 [ 2, %.loopexit.sink.split ], [ %14, %24 ], [ 257, %86 ]
  %116 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 %.0, ptr %116, align 8, !tbaa !22
  %117 = getelementptr inbounds i8, ptr %0, i64 28
  store i32 %.0142, ptr %117, align 4, !tbaa !23
  ret void
}

attributes #0 = { mustprogress 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 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 = { 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, !15, i64 32}
!6 = !{!"_ZTS5Image", !7, i64 0, !14, i64 24, !14, i64 28, !15, i64 32, !14, i64 36}
!7 = !{!"_ZTSSt6vectorIhSaIhEE", !8, i64 0}
!8 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !9, i64 0}
!9 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"int", !12, i64 0}
!15 = !{!"_ZTS16LodePNGColorType", !12, i64 0}
!16 = !{!6, !14, i64 36}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!12, !12, i64 0}
!20 = distinct !{!20, !18}
!21 = distinct !{!21, !18}
!22 = !{!6, !14, i64 24}
!23 = !{!6, !14, i64 28}


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