; LLVM IR from GitZHCODE/zspace_core :: cpp/depends/tooJPEG/toojpeg.ll (ZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKc)

; 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.(anonymous namespace)::BitWriter" = type { ptr, %"struct.(anonymous namespace)::BitWriter::BitBuffer" }
%"struct.(anonymous namespace)::BitWriter::BitBuffer" = type <{ i32, i8, [3 x i8] }>
%"struct.(anonymous namespace)::BitCode" = type <{ i16, i8, i8 }>

@__const._ZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKc.HeaderJfif = external hidden unnamed_addr constant [20 x i8], align 16
@_ZN12_GLOBAL__N_121DefaultQuantLuminanceE = external hidden constant [64 x i8], align 16
@_ZN12_GLOBAL__N_19ZigZagInvE = external hidden constant [64 x i8], align 16
@_ZN12_GLOBAL__N_123DefaultQuantChrominanceE = external hidden constant [64 x i8], align 16
@_ZN12_GLOBAL__N_126DcLuminanceCodesPerBitsizeE = external hidden constant [16 x i8], align 16
@_ZN12_GLOBAL__N_117DcLuminanceValuesE = external hidden constant [12 x i8], align 1
@_ZN12_GLOBAL__N_126AcLuminanceCodesPerBitsizeE = external hidden constant [16 x i8], align 16
@_ZN12_GLOBAL__N_117AcLuminanceValuesE = external hidden constant [162 x i8], align 16
@_ZN12_GLOBAL__N_128DcChrominanceCodesPerBitsizeE = external hidden constant [16 x i8], align 16
@_ZN12_GLOBAL__N_119DcChrominanceValuesE = external hidden constant [12 x i8], align 1
@_ZN12_GLOBAL__N_128AcChrominanceCodesPerBitsizeE = external hidden constant [16 x i8], align 16
@_ZN12_GLOBAL__N_119AcChrominanceValuesE = external hidden constant [162 x i8], align 16
@_ZZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKcE8Spectral = external hidden constant [3 x i8], align 1
@_ZZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKcE15AanScaleFactors = external hidden constant [8 x float], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKc(ptr noundef %0, ptr noundef %1, i16 noundef zeroext %2, i16 noundef zeroext %3, i1 noundef zeroext %4, i8 noundef zeroext %5, i1 noundef zeroext %6, ptr noundef %7) #0 {
  %9 = alloca i1, align 1
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i16, align 2
  %13 = alloca i16, align 2
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = alloca i8, align 1
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca %"struct.(anonymous namespace)::BitWriter", align 8
  %20 = alloca [20 x i8], align 16
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i16, align 2
  %24 = alloca [64 x i8], align 16
  %25 = alloca [64 x i8], align 16
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca [256 x %"struct.(anonymous namespace)::BitCode"], align 16
  %31 = alloca [256 x %"struct.(anonymous namespace)::BitCode"], align 16
  %32 = alloca [256 x %"struct.(anonymous namespace)::BitCode"], align 16
  %33 = alloca [256 x %"struct.(anonymous namespace)::BitCode"], align 16
  %34 = alloca i32, align 4
  %35 = alloca [64 x float], align 16
  %36 = alloca [64 x float], align 16
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca float, align 4
  %41 = alloca [4096 x %"struct.(anonymous namespace)::BitCode"], align 16
  %42 = alloca ptr, align 8
  %43 = alloca i8, align 1
  %44 = alloca i32, align 4
  %45 = alloca i16, align 2
  %46 = alloca %"struct.(anonymous namespace)::BitCode", align 2
  %47 = alloca %"struct.(anonymous namespace)::BitCode", align 2
  %48 = alloca ptr, align 8
  %49 = alloca i32, align 4
  %50 = alloca i32, align 4
  %51 = alloca i32, align 4
  %52 = alloca i32, align 4
  %53 = alloca i16, align 2
  %54 = alloca i16, align 2
  %55 = alloca i16, align 2
  %56 = alloca [8 x [8 x float]], align 16
  %57 = alloca [8 x [8 x float]], align 16
  %58 = alloca [8 x [8 x float]], align 16
  %59 = alloca i32, align 4
  %60 = alloca i32, align 4
  %61 = alloca i32, align 4
  %62 = alloca i32, align 4
  %63 = alloca i32, align 4
  %64 = alloca i32, align 4
  %65 = alloca i32, align 4
  %66 = alloca i32, align 4
  %67 = alloca i32, align 4
  %68 = alloca i32, align 4
  %69 = alloca i8, align 1
  %70 = alloca i8, align 1
  %71 = alloca i8, align 1
  %72 = alloca i16, align 2
  %73 = alloca i32, align 4
  %74 = alloca i32, align 4
  %75 = alloca i32, align 4
  %76 = alloca i32, align 4
  %77 = alloca i32, align 4
  %78 = alloca i16, align 2
  %79 = alloca i32, align 4
  %80 = alloca i32, align 4
  %81 = alloca i32, align 4
  %82 = alloca i32, align 4
  %83 = alloca i32, align 4
  %84 = alloca i32, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store i16 %2, ptr %12, align 2, !tbaa !9
  store i16 %3, ptr %13, align 2, !tbaa !9
  %85 = zext i1 %4 to i8
  store i8 %85, ptr %14, align 1, !tbaa !11
  store i8 %5, ptr %15, align 1, !tbaa !13
  %86 = zext i1 %6 to i8
  store i8 %86, ptr %16, align 1, !tbaa !11
  store ptr %7, ptr %17, align 8, !tbaa !5
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = icmp eq ptr %87, null
  br i1 %88, label %92, label %89

89:                                               ; preds = %8
  %90 = load ptr, ptr %11, align 8, !tbaa !5
  %91 = icmp eq ptr %90, null
  br i1 %91, label %92, label %93

92:                                               ; preds = %89, %8
  store i1 false, ptr %9, align 1
  br label %858

93:                                               ; preds = %89
  %94 = load i16, ptr %12, align 2, !tbaa !9
  %95 = zext i16 %94 to i32
  %96 = icmp eq i32 %95, 0
  br i1 %96, label %101, label %97

97:                                               ; preds = %93
  %98 = load i16, ptr %13, align 2, !tbaa !9
  %99 = zext i16 %98 to i32
  %100 = icmp eq i32 %99, 0
  br i1 %100, label %101, label %102

101:                                              ; preds = %97, %93
  store i1 false, ptr %9, align 1
  br label %858

102:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %103 = load i8, ptr %14, align 1, !tbaa !11, !range !14, !noundef !15
  %104 = trunc i8 %103 to i1
  %105 = zext i1 %104 to i64
  %106 = select i1 %104, i32 3, i32 1
  store i32 %106, ptr %18, align 4, !tbaa !16
  %107 = load i8, ptr %14, align 1, !tbaa !11, !range !14, !noundef !15
  %108 = trunc i8 %107 to i1
  br i1 %108, label %110, label %109

109:                                              ; preds = %102
  store i8 0, ptr %16, align 1, !tbaa !11
  br label %110

110:                                              ; preds = %109, %102
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #4
  %111 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_19BitWriterC2EPFvhE(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef %111)
  call void @llvm.lifetime.start.p0(i64 20, ptr %20) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %20, ptr align 16 @__const._ZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKc.HeaderJfif, i64 20, i1 false)
  %112 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi20EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 1 dereferenceable(20) %20)
  %113 = load ptr, ptr %17, align 8, !tbaa !5
  %114 = icmp ne ptr %113, null
  br i1 %114, label %115, label %147

115:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  store i32 0, ptr %21, align 4, !tbaa !16
  br label %116

116:                                              ; preds = %124, %115
  %117 = load ptr, ptr %17, align 8, !tbaa !5
  %118 = load i32, ptr %21, align 4, !tbaa !16
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds i8, ptr %117, i64 %119
  %121 = load i8, ptr %120, align 1, !tbaa !13
  %122 = sext i8 %121 to i32
  %123 = icmp ne i32 %122, 0
  br i1 %123, label %124, label %127

124:                                              ; preds = %116
  %125 = load i32, ptr %21, align 4, !tbaa !16
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %21, align 4, !tbaa !16
  br label %116, !llvm.loop !18

127:                                              ; preds = %116
  %128 = load i32, ptr %21, align 4, !tbaa !16
  %129 = add nsw i32 2, %128
  %130 = trunc i32 %129 to i16
  call void @_ZN12_GLOBAL__N_19BitWriter9addMarkerEht(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 noundef zeroext -2, i16 noundef zeroext %130)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  store i32 0, ptr %22, align 4, !tbaa !16
  br label %131

131:                                              ; preds = %143, %127
  %132 = load i32, ptr %22, align 4, !tbaa !16
  %133 = load i32, ptr %21, align 4, !tbaa !16
  %134 = icmp slt i32 %132, %133
  br i1 %134, label %136, label %135

135:                                              ; preds = %131
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  br label %146

136:                                              ; preds = %131
  %137 = load ptr, ptr %17, align 8, !tbaa !5
  %138 = load i32, ptr %22, align 4, !tbaa !16
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds i8, ptr %137, i64 %139
  %141 = load i8, ptr %140, align 1, !tbaa !13
  %142 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 noundef zeroext %141)
  br label %143

143:                                              ; preds = %136
  %144 = load i32, ptr %22, align 4, !tbaa !16
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %22, align 4, !tbaa !16
  br label %131, !llvm.loop !20

146:                                              ; preds = %135
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  br label %147

147:                                              ; preds = %146, %110
  call void @llvm.lifetime.start.p0(i64 2, ptr %23) #4
  %148 = load i8, ptr %15, align 1, !tbaa !13
  %149 = zext i8 %148 to i16
  %150 = call noundef zeroext i16 @_ZN12_GLOBAL__N_15clampItiEET_S1_T0_S2_(i16 noundef zeroext %149, i32 noundef 1, i32 noundef 100)
  store i16 %150, ptr %23, align 2, !tbaa !9
  %151 = load i16, ptr %23, align 2, !tbaa !9
  %152 = zext i16 %151 to i32
  %153 = icmp slt i32 %152, 50
  br i1 %153, label %154, label %158

154:                                              ; preds = %147
  %155 = load i16, ptr %23, align 2, !tbaa !9
  %156 = zext i16 %155 to i32
  %157 = sdiv i32 5000, %156
  br label %163

158:                                              ; preds = %147
  %159 = load i16, ptr %23, align 2, !tbaa !9
  %160 = zext i16 %159 to i32
  %161 = mul nsw i32 %160, 2
  %162 = sub nsw i32 200, %161
  br label %163

163:                                              ; preds = %158, %154
  %164 = phi i32 [ %157, %154 ], [ %162, %158 ]
  %165 = trunc i32 %164 to i16
  store i16 %165, ptr %23, align 2, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 64, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  store i32 0, ptr %26, align 4, !tbaa !16
  br label %166

166:                                              ; preds = %209, %163
  %167 = load i32, ptr %26, align 4, !tbaa !16
  %168 = icmp slt i32 %167, 64
  br i1 %168, label %170, label %169

169:                                              ; preds = %166
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  br label %212

170:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  %171 = load i32, ptr %26, align 4, !tbaa !16
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [64 x i8], ptr @_ZN12_GLOBAL__N_19ZigZagInvE, i64 0, i64 %172
  %174 = load i8, ptr %173, align 1, !tbaa !13
  %175 = zext i8 %174 to i64
  %176 = getelementptr inbounds [64 x i8], ptr @_ZN12_GLOBAL__N_121DefaultQuantLuminanceE, i64 0, i64 %175
  %177 = load i8, ptr %176, align 1, !tbaa !13
  %178 = zext i8 %177 to i32
  %179 = load i16, ptr %23, align 2, !tbaa !9
  %180 = zext i16 %179 to i32
  %181 = mul nsw i32 %178, %180
  %182 = add nsw i32 %181, 50
  %183 = sdiv i32 %182, 100
  store i32 %183, ptr %27, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #4
  %184 = load i32, ptr %26, align 4, !tbaa !16
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [64 x i8], ptr @_ZN12_GLOBAL__N_19ZigZagInvE, i64 0, i64 %185
  %187 = load i8, ptr %186, align 1, !tbaa !13
  %188 = zext i8 %187 to i64
  %189 = getelementptr inbounds [64 x i8], ptr @_ZN12_GLOBAL__N_123DefaultQuantChrominanceE, i64 0, i64 %188
  %190 = load i8, ptr %189, align 1, !tbaa !13
  %191 = zext i8 %190 to i32
  %192 = load i16, ptr %23, align 2, !tbaa !9
  %193 = zext i16 %192 to i32
  %194 = mul nsw i32 %191, %193
  %195 = add nsw i32 %194, 50
  %196 = sdiv i32 %195, 100
  store i32 %196, ptr %28, align 4, !tbaa !16
  %197 = load i32, ptr %27, align 4, !tbaa !16
  %198 = call noundef i32 @_ZN12_GLOBAL__N_15clampIiiEET_S1_T0_S2_(i32 noundef %197, i32 noundef 1, i32 noundef 255)
  %199 = trunc i32 %198 to i8
  %200 = load i32, ptr %26, align 4, !tbaa !16
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [64 x i8], ptr %24, i64 0, i64 %201
  store i8 %199, ptr %202, align 1, !tbaa !13
  %203 = load i32, ptr %28, align 4, !tbaa !16
  %204 = call noundef i32 @_ZN12_GLOBAL__N_15clampIiiEET_S1_T0_S2_(i32 noundef %203, i32 noundef 1, i32 noundef 255)
  %205 = trunc i32 %204 to i8
  %206 = load i32, ptr %26, align 4, !tbaa !16
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [64 x i8], ptr %25, i64 0, i64 %207
  store i8 %205, ptr %208, align 1, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  br label %209

209:                                              ; preds = %170
  %210 = load i32, ptr %26, align 4, !tbaa !16
  %211 = add nsw i32 %210, 1
  store i32 %211, ptr %26, align 4, !tbaa !16
  br label %166, !llvm.loop !21

212:                                              ; preds = %169
  %213 = load i8, ptr %14, align 1, !tbaa !11, !range !14, !noundef !15
  %214 = trunc i8 %213 to i1
  %215 = zext i1 %214 to i64
  %216 = select i1 %214, i32 2, i32 1
  %217 = mul nsw i32 %216, 65
  %218 = add nsw i32 2, %217
  %219 = trunc i32 %218 to i16
  call void @_ZN12_GLOBAL__N_19BitWriter9addMarkerEht(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 noundef zeroext -37, i16 noundef zeroext %219)
  %220 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 noundef zeroext 0)
  %221 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIhLi64EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %220, ptr noundef nonnull align 1 dereferenceable(64) %24)
  %222 = load i8, ptr %14, align 1, !tbaa !11, !range !14, !noundef !15
  %223 = trunc i8 %222 to i1
  br i1 %223, label %224, label %227

224:                                              ; preds = %212
  %225 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 noundef zeroext 1)
  %226 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIhLi64EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %225, ptr noundef nonnull align 1 dereferenceable(64) %25)
  br label %227

227:                                              ; preds = %224, %212
  %228 = load i32, ptr %18, align 4, !tbaa !16
  %229 = mul nsw i32 3, %228
  %230 = add nsw i32 8, %229
  %231 = trunc i32 %230 to i16
  call void @_ZN12_GLOBAL__N_19BitWriter9addMarkerEht(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 noundef zeroext -64, i16 noundef zeroext %231)
  %232 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 noundef zeroext 8)
  %233 = load i16, ptr %13, align 2, !tbaa !9
  %234 = zext i16 %233 to i32
  %235 = ashr i32 %234, 8
  %236 = trunc i32 %235 to i8
  %237 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %232, i8 noundef zeroext %236)
  %238 = load i16, ptr %13, align 2, !tbaa !9
  %239 = zext i16 %238 to i32
  %240 = and i32 %239, 255
  %241 = trunc i32 %240 to i8
  %242 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %237, i8 noundef zeroext %241)
  %243 = load i16, ptr %12, align 2, !tbaa !9
  %244 = zext i16 %243 to i32
  %245 = ashr i32 %244, 8
  %246 = trunc i32 %245 to i8
  %247 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %242, i8 noundef zeroext %246)
  %248 = load i16, ptr %12, align 2, !tbaa !9
  %249 = zext i16 %248 to i32
  %250 = and i32 %249, 255
  %251 = trunc i32 %250 to i8
  %252 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %247, i8 noundef zeroext %251)
  %253 = load i32, ptr %18, align 4, !tbaa !16
  %254 = trunc i32 %253 to i8
  %255 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 noundef zeroext %254)
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  store i32 1, ptr %29, align 4, !tbaa !16
  br label %256

256:                                              ; preds = %282, %227
  %257 = load i32, ptr %29, align 4, !tbaa !16
  %258 = load i32, ptr %18, align 4, !tbaa !16
  %259 = icmp sle i32 %257, %258
  br i1 %259, label %261, label %260

260:                                              ; preds = %256
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  br label %285

261:                                              ; preds = %256
  %262 = load i32, ptr %29, align 4, !tbaa !16
  %263 = trunc i32 %262 to i8
  %264 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 noundef zeroext %263)
  %265 = load i32, ptr %29, align 4, !tbaa !16
  %266 = icmp eq i32 %265, 1
  br i1 %266, label %267, label %270

267:                                              ; preds = %261
  %268 = load i8, ptr %16, align 1, !tbaa !11, !range !14, !noundef !15
  %269 = trunc i8 %268 to i1
  br label %270

270:                                              ; preds = %267, %261
  %271 = phi i1 [ false, %261 ], [ %269, %267 ]
  %272 = zext i1 %271 to i64
  %273 = select i1 %271, i32 34, i32 17
  %274 = trunc i32 %273 to i8
  %275 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %264, i8 noundef zeroext %274)
  %276 = load i32, ptr %29, align 4, !tbaa !16
  %277 = icmp eq i32 %276, 1
  %278 = zext i1 %277 to i64
  %279 = select i1 %277, i32 0, i32 1
  %280 = trunc i32 %279 to i8
  %281 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %275, i8 noundef zeroext %280)
  br label %282

282:                                              ; preds = %270
  %283 = load i32, ptr %29, align 4, !tbaa !16
  %284 = add nsw i32 %283, 1
  store i32 %284, ptr %29, align 4, !tbaa !16
  br label %256, !llvm.loop !22

285:                                              ; preds = %260
  %286 = load i8, ptr %14, align 1, !tbaa !11, !range !14, !noundef !15
  %287 = trunc i8 %286 to i1
  %288 = zext i1 %287 to i64
  %289 = select i1 %287, i32 418, i32 210
  %290 = trunc i32 %289 to i16
  call void @_ZN12_GLOBAL__N_19BitWriter9addMarkerEht(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 noundef zeroext -60, i16 noundef zeroext %290)
  %291 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 noundef zeroext 0)
  %292 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi16EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %291, ptr noundef nonnull align 1 dereferenceable(16) @_ZN12_GLOBAL__N_126DcLuminanceCodesPerBitsizeE)
  %293 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi12EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %292, ptr noundef nonnull align 1 dereferenceable(12) @_ZN12_GLOBAL__N_117DcLuminanceValuesE)
  %294 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 noundef zeroext 16)
  %295 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi16EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %294, ptr noundef nonnull align 1 dereferenceable(16) @_ZN12_GLOBAL__N_126AcLuminanceCodesPerBitsizeE)
  %296 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi162EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %295, ptr noundef nonnull align 1 dereferenceable(162) @_ZN12_GLOBAL__N_117AcLuminanceValuesE)
  call void @llvm.lifetime.start.p0(i64 1024, ptr %30) #4
  call void @llvm.lifetime.start.p0(i64 1024, ptr %31) #4
  %297 = getelementptr inbounds [256 x %"struct.(anonymous namespace)::BitCode"], ptr %30, i64 0, i64 0
  call void @_ZN12_GLOBAL__N_120generateHuffmanTableEPKhS1_PNS_7BitCodeE(ptr noundef @_ZN12_GLOBAL__N_126DcLuminanceCodesPerBitsizeE, ptr noundef @_ZN12_GLOBAL__N_117DcLuminanceValuesE, ptr noundef %297)
  %298 = getelementptr inbounds [256 x %"struct.(anonymous namespace)::BitCode"], ptr %31, i64 0, i64 0
  call void @_ZN12_GLOBAL__N_120generateHuffmanTableEPKhS1_PNS_7BitCodeE(ptr noundef @_ZN12_GLOBAL__N_126AcLuminanceCodesPerBitsizeE, ptr noundef @_ZN12_GLOBAL__N_117AcLuminanceValuesE, ptr noundef %298)
  call void @llvm.lifetime.start.p0(i64 1024, ptr %32) #4
  call void @llvm.lifetime.start.p0(i64 1024, ptr %33) #4
  %299 = load i8, ptr %14, align 1, !tbaa !11, !range !14, !noundef !15
  %300 = trunc i8 %299 to i1
  br i1 %300, label %301, label %310

301:                                              ; preds = %285
  %302 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 noundef zeroext 1)
  %303 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi16EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %302, ptr noundef nonnull align 1 dereferenceable(16) @_ZN12_GLOBAL__N_128DcChrominanceCodesPerBitsizeE)
  %304 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi12EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %303, ptr noundef nonnull align 1 dereferenceable(12) @_ZN12_GLOBAL__N_119DcChrominanceValuesE)
  %305 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 noundef zeroext 17)
  %306 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi16EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %305, ptr noundef nonnull align 1 dereferenceable(16) @_ZN12_GLOBAL__N_128AcChrominanceCodesPerBitsizeE)
  %307 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi162EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %306, ptr noundef nonnull align 1 dereferenceable(162) @_ZN12_GLOBAL__N_119AcChrominanceValuesE)
  %308 = getelementptr inbounds [256 x %"struct.(anonymous namespace)::BitCode"], ptr %32, i64 0, i64 0
  call void @_ZN12_GLOBAL__N_120generateHuffmanTableEPKhS1_PNS_7BitCodeE(ptr noundef @_ZN12_GLOBAL__N_128DcChrominanceCodesPerBitsizeE, ptr noundef @_ZN12_GLOBAL__N_119DcChrominanceValuesE, ptr noundef %308)
  %309 = getelementptr inbounds [256 x %"struct.(anonymous namespace)::BitCode"], ptr %33, i64 0, i64 0
  call void @_ZN12_GLOBAL__N_120generateHuffmanTableEPKhS1_PNS_7BitCodeE(ptr noundef @_ZN12_GLOBAL__N_128AcChrominanceCodesPerBitsizeE, ptr noundef @_ZN12_GLOBAL__N_119AcChrominanceValuesE, ptr noundef %309)
  br label %310

310:                                              ; preds = %301, %285
  %311 = load i32, ptr %18, align 4, !tbaa !16
  %312 = mul nsw i32 2, %311
  %313 = add nsw i32 3, %312
  %314 = add nsw i32 %313, 3
  %315 = trunc i32 %314 to i16
  call void @_ZN12_GLOBAL__N_19BitWriter9addMarkerEht(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 noundef zeroext -38, i16 noundef zeroext %315)
  %316 = load i32, ptr %18, align 4, !tbaa !16
  %317 = trunc i32 %316 to i8
  %318 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 noundef zeroext %317)
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #4
  store i32 1, ptr %34, align 4, !tbaa !16
  br label %319

319:                                              ; preds = %334, %310
  %320 = load i32, ptr %34, align 4, !tbaa !16
  %321 = load i32, ptr %18, align 4, !tbaa !16
  %322 = icmp sle i32 %320, %321
  br i1 %322, label %324, label %323

323:                                              ; preds = %319
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #4
  br label %337

324:                                              ; preds = %319
  %325 = load i32, ptr %34, align 4, !tbaa !16
  %326 = trunc i32 %325 to i8
  %327 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 noundef zeroext %326)
  %328 = load i32, ptr %34, align 4, !tbaa !16
  %329 = icmp eq i32 %328, 1
  %330 = zext i1 %329 to i64
  %331 = select i1 %329, i32 0, i32 17
  %332 = trunc i32 %331 to i8
  %333 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %327, i8 noundef zeroext %332)
  br label %334

334:                                              ; preds = %324
  %335 = load i32, ptr %34, align 4, !tbaa !16
  %336 = add nsw i32 %335, 1
  store i32 %336, ptr %34, align 4, !tbaa !16
  br label %319, !llvm.loop !23

337:                                              ; preds = %323
  %338 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi3EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 1 dereferenceable(3) @_ZZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKcE8Spectral)
  call void @llvm.lifetime.start.p0(i64 256, ptr %35) #4
  call void @llvm.lifetime.start.p0(i64 256, ptr %36) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #4
  store i32 0, ptr %37, align 4, !tbaa !16
  br label %339

339:                                              ; preds = %395, %337
  %340 = load i32, ptr %37, align 4, !tbaa !16
  %341 = icmp slt i32 %340, 64
  br i1 %341, label %343, label %342

342:                                              ; preds = %339
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #4
  br label %398

343:                                              ; preds = %339
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #4
  %344 = load i32, ptr %37, align 4, !tbaa !16
  %345 = sext i32 %344 to i64
  %346 = getelementptr inbounds [64 x i8], ptr @_ZN12_GLOBAL__N_19ZigZagInvE, i64 0, i64 %345
  %347 = load i8, ptr %346, align 1, !tbaa !13
  %348 = zext i8 %347 to i32
  %349 = sdiv i32 %348, 8
  store i32 %349, ptr %38, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #4
  %350 = load i32, ptr %37, align 4, !tbaa !16
  %351 = sext i32 %350 to i64
  %352 = getelementptr inbounds [64 x i8], ptr @_ZN12_GLOBAL__N_19ZigZagInvE, i64 0, i64 %351
  %353 = load i8, ptr %352, align 1, !tbaa !13
  %354 = zext i8 %353 to i32
  %355 = srem i32 %354, 8
  store i32 %355, ptr %39, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #4
  %356 = load i32, ptr %38, align 4, !tbaa !16
  %357 = sext i32 %356 to i64
  %358 = getelementptr inbounds [8 x float], ptr @_ZZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKcE15AanScaleFactors, i64 0, i64 %357
  %359 = load float, ptr %358, align 4, !tbaa !24
  %360 = load i32, ptr %39, align 4, !tbaa !16
  %361 = sext i32 %360 to i64
  %362 = getelementptr inbounds [8 x float], ptr @_ZZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKcE15AanScaleFactors, i64 0, i64 %361
  %363 = load float, ptr %362, align 4, !tbaa !24
  %364 = fmul float %359, %363
  %365 = fmul float %364, 8.000000e+00
  %366 = fdiv float 1.000000e+00, %365
  store float %366, ptr %40, align 4, !tbaa !24
  %367 = load float, ptr %40, align 4, !tbaa !24
  %368 = load i32, ptr %37, align 4, !tbaa !16
  %369 = sext i32 %368 to i64
  %370 = getelementptr inbounds [64 x i8], ptr %24, i64 0, i64 %369
  %371 = load i8, ptr %370, align 1, !tbaa !13
  %372 = zext i8 %371 to i32
  %373 = sitofp i32 %372 to float
  %374 = fdiv float %367, %373
  %375 = load i32, ptr %37, align 4, !tbaa !16
  %376 = sext i32 %375 to i64
  %377 = getelementptr inbounds [64 x i8], ptr @_ZN12_GLOBAL__N_19ZigZagInvE, i64 0, i64 %376
  %378 = load i8, ptr %377, align 1, !tbaa !13
  %379 = zext i8 %378 to i64
  %380 = getelementptr inbounds [64 x float], ptr %35, i64 0, i64 %379
  store float %374, ptr %380, align 4, !tbaa !24
  %381 = load float, ptr %40, align 4, !tbaa !24
  %382 = load i32, ptr %37, align 4, !tbaa !16
  %383 = sext i32 %382 to i64
  %384 = getelementptr inbounds [64 x i8], ptr %25, i64 0, i64 %383
  %385 = load i8, ptr %384, align 1, !tbaa !13
  %386 = zext i8 %385 to i32
  %387 = sitofp i32 %386 to float
  %388 = fdiv float %381, %387
  %389 = load i32, ptr %37, align 4, !tbaa !16
  %390 = sext i32 %389 to i64
  %391 = getelementptr inbounds [64 x i8], ptr @_ZN12_GLOBAL__N_19ZigZagInvE, i64 0, i64 %390
  %392 = load i8, ptr %391, align 1, !tbaa !13
  %393 = zext i8 %392 to i64
  %394 = getelementptr inbounds [64 x float], ptr %36, i64 0, i64 %393
  store float %388, ptr %394, align 4, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #4
  br label %395

395:                                              ; preds = %343
  %396 = load i32, ptr %37, align 4, !tbaa !16
  %397 = add nsw i32 %396, 1
  store i32 %397, ptr %37, align 4, !tbaa !16
  br label %339, !llvm.loop !26

398:                                              ; preds = %342
  call void @llvm.lifetime.start.p0(i64 16384, ptr %41) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #4
  %399 = getelementptr inbounds [4096 x %"struct.(anonymous namespace)::BitCode"], ptr %41, i64 0, i64 2048
  store ptr %399, ptr %42, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %43) #4
  store i8 1, ptr %43, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #4
  store i32 1, ptr %44, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 2, ptr %45) #4
  store i16 1, ptr %45, align 2, !tbaa !9
  br label %400

400:                                              ; preds = %436, %398
  %401 = load i16, ptr %45, align 2, !tbaa !9
  %402 = sext i16 %401 to i32
  %403 = icmp slt i32 %402, 2048
  br i1 %403, label %405, label %404

404:                                              ; preds = %400
  call void @llvm.lifetime.end.p0(i64 2, ptr %45) #4
  br label %439

405:                                              ; preds = %400
  %406 = load i16, ptr %45, align 2, !tbaa !9
  %407 = sext i16 %406 to i32
  %408 = load i32, ptr %44, align 4, !tbaa !16
  %409 = icmp sgt i32 %407, %408
  br i1 %409, label %410, label %416

410:                                              ; preds = %405
  %411 = load i8, ptr %43, align 1, !tbaa !13
  %412 = add i8 %411, 1
  store i8 %412, ptr %43, align 1, !tbaa !13
  %413 = load i32, ptr %44, align 4, !tbaa !16
  %414 = shl i32 %413, 1
  %415 = or i32 %414, 1
  store i32 %415, ptr %44, align 4, !tbaa !16
  br label %416

416:                                              ; preds = %410, %405
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #4
  %417 = load i32, ptr %44, align 4, !tbaa !16
  %418 = load i16, ptr %45, align 2, !tbaa !9
  %419 = sext i16 %418 to i32
  %420 = sub nsw i32 %417, %419
  %421 = trunc i32 %420 to i16
  %422 = load i8, ptr %43, align 1, !tbaa !13
  call void @_ZN12_GLOBAL__N_17BitCodeC2Eth(ptr noundef nonnull align 2 dereferenceable(3) %46, i16 noundef zeroext %421, i8 noundef zeroext %422)
  %423 = load ptr, ptr %42, align 8, !tbaa !5
  %424 = load i16, ptr %45, align 2, !tbaa !9
  %425 = sext i16 %424 to i32
  %426 = sub nsw i32 0, %425
  %427 = sext i32 %426 to i64
  %428 = getelementptr inbounds %"struct.(anonymous namespace)::BitCode", ptr %423, i64 %427
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %428, ptr align 2 %46, i64 3, i1 false), !tbaa.struct !27
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #4
  %429 = load i16, ptr %45, align 2, !tbaa !9
  %430 = load i8, ptr %43, align 1, !tbaa !13
  call void @_ZN12_GLOBAL__N_17BitCodeC2Eth(ptr noundef nonnull align 2 dereferenceable(3) %47, i16 noundef zeroext %429, i8 noundef zeroext %430)
  %431 = load ptr, ptr %42, align 8, !tbaa !5
  %432 = load i16, ptr %45, align 2, !tbaa !9
  %433 = sext i16 %432 to i32
  %434 = sext i32 %433 to i64
  %435 = getelementptr inbounds %"struct.(anonymous namespace)::BitCode", ptr %431, i64 %434
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %435, ptr align 2 %47, i64 3, i1 false), !tbaa.struct !27
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #4
  br label %436

436:                                              ; preds = %416
  %437 = load i16, ptr %45, align 2, !tbaa !9
  %438 = add i16 %437, 1
  store i16 %438, ptr %45, align 2, !tbaa !9
  br label %400, !llvm.loop !28

439:                                              ; preds = %404
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #4
  %440 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %440, ptr %48, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #4
  %441 = load i16, ptr %12, align 2, !tbaa !9
  %442 = zext i16 %441 to i32
  %443 = sub nsw i32 %442, 1
  store i32 %443, ptr %49, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #4
  %444 = load i16, ptr %13, align 2, !tbaa !9
  %445 = zext i16 %444 to i32
  %446 = sub nsw i32 %445, 1
  store i32 %446, ptr %50, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #4
  %447 = load i8, ptr %16, align 1, !tbaa !11, !range !14, !noundef !15
  %448 = trunc i8 %447 to i1
  %449 = zext i1 %448 to i64
  %450 = select i1 %448, i32 2, i32 1
  store i32 %450, ptr %51, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #4
  %451 = load i32, ptr %51, align 4, !tbaa !16
  %452 = mul nsw i32 8, %451
  store i32 %452, ptr %52, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 2, ptr %53) #4
  store i16 0, ptr %53, align 2, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2, ptr %54) #4
  store i16 0, ptr %54, align 2, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2, ptr %55) #4
  store i16 0, ptr %55, align 2, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 256, ptr %56) #4
  call void @llvm.lifetime.start.p0(i64 256, ptr %57) #4
  call void @llvm.lifetime.start.p0(i64 256, ptr %58) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #4
  store i32 0, ptr %59, align 4, !tbaa !16
  br label %453

453:                                              ; preds = %851, %439
  %454 = load i32, ptr %59, align 4, !tbaa !16
  %455 = load i16, ptr %13, align 2, !tbaa !9
  %456 = zext i16 %455 to i32
  %457 = icmp slt i32 %454, %456
  br i1 %457, label %459, label %458

458:                                              ; preds = %453
  store i32 22, ptr %60, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #4
  br label %855

459:                                              ; preds = %453
  call void @llvm.lifetime.start.p0(i64 4, ptr %61) #4
  store i32 0, ptr %61, align 4, !tbaa !16
  br label %460

460:                                              ; preds = %846, %459
  %461 = load i32, ptr %61, align 4, !tbaa !16
  %462 = load i16, ptr %12, align 2, !tbaa !9
  %463 = zext i16 %462 to i32
  %464 = icmp slt i32 %461, %463
  br i1 %464, label %466, label %465

465:                                              ; preds = %460
  store i32 25, ptr %60, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %61) #4
  br label %850

466:                                              ; preds = %460
  call void @llvm.lifetime.start.p0(i64 4, ptr %62) #4
  store i32 0, ptr %62, align 4, !tbaa !16
  br label %467

467:                                              ; preds = %618, %466
  %468 = load i32, ptr %62, align 4, !tbaa !16
  %469 = load i32, ptr %52, align 4, !tbaa !16
  %470 = icmp slt i32 %468, %469
  br i1 %470, label %472, label %471

471:                                              ; preds = %467
  store i32 28, ptr %60, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %62) #4
  br label %621

472:                                              ; preds = %467
  call void @llvm.lifetime.start.p0(i64 4, ptr %63) #4
  store i32 0, ptr %63, align 4, !tbaa !16
  br label %473

473:                                              ; preds = %614, %472
  %474 = load i32, ptr %63, align 4, !tbaa !16
  %475 = load i32, ptr %52, align 4, !tbaa !16
  %476 = icmp slt i32 %474, %475
  br i1 %476, label %478, label %477

477:                                              ; preds = %473
  store i32 31, ptr %60, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %63) #4
  br label %617

478:                                              ; preds = %473
  call void @llvm.lifetime.start.p0(i64 4, ptr %64) #4
  store i32 0, ptr %64, align 4, !tbaa !16
  br label %479

479:                                              ; preds = %603, %478
  %480 = load i32, ptr %64, align 4, !tbaa !16
  %481 = icmp slt i32 %480, 8
  br i1 %481, label %483, label %482

482:                                              ; preds = %479
  store i32 34, ptr %60, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %64) #4
  br label %606

483:                                              ; preds = %479
  call void @llvm.lifetime.start.p0(i64 4, ptr %65) #4
  %484 = load i32, ptr %61, align 4, !tbaa !16
  %485 = load i32, ptr %63, align 4, !tbaa !16
  %486 = add nsw i32 %484, %485
  %487 = load i32, ptr %49, align 4, !tbaa !16
  %488 = call noundef i32 @_ZN12_GLOBAL__N_17minimumIiEET_S1_S1_(i32 noundef %486, i32 noundef %487)
  store i32 %488, ptr %65, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %66) #4
  %489 = load i32, ptr %59, align 4, !tbaa !16
  %490 = load i32, ptr %62, align 4, !tbaa !16
  %491 = add nsw i32 %489, %490
  %492 = load i32, ptr %64, align 4, !tbaa !16
  %493 = add nsw i32 %491, %492
  %494 = load i32, ptr %50, align 4, !tbaa !16
  %495 = call noundef i32 @_ZN12_GLOBAL__N_17minimumIiEET_S1_S1_(i32 noundef %493, i32 noundef %494)
  store i32 %495, ptr %66, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %67) #4
  store i32 0, ptr %67, align 4, !tbaa !16
  br label %496

496:                                              ; preds = %599, %483
  %497 = load i32, ptr %67, align 4, !tbaa !16
  %498 = icmp slt i32 %497, 8
  br i1 %498, label %500, label %499

499:                                              ; preds = %496
  store i32 37, ptr %60, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %67) #4
  br label %602

500:                                              ; preds = %496
  call void @llvm.lifetime.start.p0(i64 4, ptr %68) #4
  %501 = load i32, ptr %66, align 4, !tbaa !16
  %502 = load i16, ptr %12, align 2, !tbaa !9
  %503 = zext i16 %502 to i32
  %504 = mul nsw i32 %501, %503
  %505 = load i32, ptr %65, align 4, !tbaa !16
  %506 = add nsw i32 %504, %505
  store i32 %506, ptr %68, align 4, !tbaa !16
  %507 = load i32, ptr %65, align 4, !tbaa !16
  %508 = load i32, ptr %49, align 4, !tbaa !16
  %509 = icmp slt i32 %507, %508
  br i1 %509, label %510, label %513

510:                                              ; preds = %500
  %511 = load i32, ptr %65, align 4, !tbaa !16
  %512 = add nsw i32 %511, 1
  store i32 %512, ptr %65, align 4, !tbaa !16
  br label %513

513:                                              ; preds = %510, %500
  %514 = load i8, ptr %14, align 1, !tbaa !11, !range !14, !noundef !15
  %515 = trunc i8 %514 to i1
  br i1 %515, label %531, label %516

516:                                              ; preds = %513
  %517 = load ptr, ptr %48, align 8, !tbaa !5
  %518 = load i32, ptr %68, align 4, !tbaa !16
  %519 = sext i32 %518 to i64
  %520 = getelementptr inbounds i8, ptr %517, i64 %519
  %521 = load i8, ptr %520, align 1, !tbaa !13
  %522 = zext i8 %521 to i32
  %523 = sitofp i32 %522 to float
  %524 = fsub float %523, 1.280000e+02
  %525 = load i32, ptr %64, align 4, !tbaa !16
  %526 = sext i32 %525 to i64
  %527 = getelementptr inbounds [8 x [8 x float]], ptr %56, i64 0, i64 %526
  %528 = load i32, ptr %67, align 4, !tbaa !16
  %529 = sext i32 %528 to i64
  %530 = getelementptr inbounds [8 x float], ptr %527, i64 0, i64 %529
  store float %524, ptr %530, align 4, !tbaa !24
  store i32 39, ptr %60, align 4
  br label %596

531:                                              ; preds = %513
  call void @llvm.lifetime.start.p0(i64 1, ptr %69) #4
  %532 = load ptr, ptr %48, align 8, !tbaa !5
  %533 = load i32, ptr %68, align 4, !tbaa !16
  %534 = mul nsw i32 3, %533
  %535 = sext i32 %534 to i64
  %536 = getelementptr inbounds i8, ptr %532, i64 %535
  %537 = load i8, ptr %536, align 1, !tbaa !13
  store i8 %537, ptr %69, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %70) #4
  %538 = load ptr, ptr %48, align 8, !tbaa !5
  %539 = load i32, ptr %68, align 4, !tbaa !16
  %540 = mul nsw i32 3, %539
  %541 = add nsw i32 %540, 1
  %542 = sext i32 %541 to i64
  %543 = getelementptr inbounds i8, ptr %538, i64 %542
  %544 = load i8, ptr %543, align 1, !tbaa !13
  store i8 %544, ptr %70, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %71) #4
  %545 = load ptr, ptr %48, align 8, !tbaa !5
  %546 = load i32, ptr %68, align 4, !tbaa !16
  %547 = mul nsw i32 3, %546
  %548 = add nsw i32 %547, 2
  %549 = sext i32 %548 to i64
  %550 = getelementptr inbounds i8, ptr %545, i64 %549
  %551 = load i8, ptr %550, align 1, !tbaa !13
  store i8 %551, ptr %71, align 1, !tbaa !13
  %552 = load i8, ptr %69, align 1, !tbaa !13
  %553 = uitofp i8 %552 to float
  %554 = load i8, ptr %70, align 1, !tbaa !13
  %555 = uitofp i8 %554 to float
  %556 = load i8, ptr %71, align 1, !tbaa !13
  %557 = uitofp i8 %556 to float
  %558 = call noundef float @_ZN12_GLOBAL__N_15rgb2yEfff(float noundef %553, float noundef %555, float noundef %557)
  %559 = fsub float %558, 1.280000e+02
  %560 = load i32, ptr %64, align 4, !tbaa !16
  %561 = sext i32 %560 to i64
  %562 = getelementptr inbounds [8 x [8 x float]], ptr %56, i64 0, i64 %561
  %563 = load i32, ptr %67, align 4, !tbaa !16
  %564 = sext i32 %563 to i64
  %565 = getelementptr inbounds [8 x float], ptr %562, i64 0, i64 %564
  store float %559, ptr %565, align 4, !tbaa !24
  %566 = load i8, ptr %16, align 1, !tbaa !11, !range !14, !noundef !15
  %567 = trunc i8 %566 to i1
  br i1 %567, label %595, label %568

568:                                              ; preds = %531
  %569 = load i8, ptr %69, align 1, !tbaa !13
  %570 = uitofp i8 %569 to float
  %571 = load i8, ptr %70, align 1, !tbaa !13
  %572 = uitofp i8 %571 to float
  %573 = load i8, ptr %71, align 1, !tbaa !13
  %574 = uitofp i8 %573 to float
  %575 = call noundef float @_ZN12_GLOBAL__N_16rgb2cbEfff(float noundef %570, float noundef %572, float noundef %574)
  %576 = load i32, ptr %64, align 4, !tbaa !16
  %577 = sext i32 %576 to i64
  %578 = getelementptr inbounds [8 x [8 x float]], ptr %57, i64 0, i64 %577
  %579 = load i32, ptr %67, align 4, !tbaa !16
  %580 = sext i32 %579 to i64
  %581 = getelementptr inbounds [8 x float], ptr %578, i64 0, i64 %580
  store float %575, ptr %581, align 4, !tbaa !24
  %582 = load i8, ptr %69, align 1, !tbaa !13
  %583 = uitofp i8 %582 to float
  %584 = load i8, ptr %70, align 1, !tbaa !13
  %585 = uitofp i8 %584 to float
  %586 = load i8, ptr %71, align 1, !tbaa !13
  %587 = uitofp i8 %586 to float
  %588 = call noundef float @_ZN12_GLOBAL__N_16rgb2crEfff(float noundef %583, float noundef %585, float noundef %587)
  %589 = load i32, ptr %64, align 4, !tbaa !16
  %590 = sext i32 %589 to i64
  %591 = getelementptr inbounds [8 x [8 x float]], ptr %58, i64 0, i64 %590
  %592 = load i32, ptr %67, align 4, !tbaa !16
  %593 = sext i32 %592 to i64
  %594 = getelementptr inbounds [8 x float], ptr %591, i64 0, i64 %593
  store float %588, ptr %594, align 4, !tbaa !24
  br label %595

595:                                              ; preds = %568, %531
  call void @llvm.lifetime.end.p0(i64 1, ptr %71) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %70) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %69) #4
  store i32 0, ptr %60, align 4
  br label %596

596:                                              ; preds = %595, %516
  call void @llvm.lifetime.end.p0(i64 4, ptr %68) #4
  %597 = load i32, ptr %60, align 4
  switch i32 %597, label %860 [
    i32 0, label %598
    i32 39, label %599
  ]

598:                                              ; preds = %596
  br label %599

599:                                              ; preds = %598, %596
  %600 = load i32, ptr %67, align 4, !tbaa !16
  %601 = add nsw i32 %600, 1
  store i32 %601, ptr %67, align 4, !tbaa !16
  br label %496, !llvm.loop !29

602:                                              ; preds = %499
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %65) #4
  br label %603

603:                                              ; preds = %602
  %604 = load i32, ptr %64, align 4, !tbaa !16
  %605 = add nsw i32 %604, 1
  store i32 %605, ptr %64, align 4, !tbaa !16
  br label %479, !llvm.loop !30

606:                                              ; preds = %482
  %607 = getelementptr inbounds [8 x [8 x float]], ptr %56, i64 0, i64 0
  %608 = getelementptr inbounds [64 x float], ptr %35, i64 0, i64 0
  %609 = load i16, ptr %53, align 2, !tbaa !9
  %610 = getelementptr inbounds [256 x %"struct.(anonymous namespace)::BitCode"], ptr %30, i64 0, i64 0
  %611 = getelementptr inbounds [256 x %"struct.(anonymous namespace)::BitCode"], ptr %31, i64 0, i64 0
  %612 = load ptr, ptr %42, align 8, !tbaa !5
  %613 = call noundef signext i16 @_ZN12_GLOBAL__N_111encodeBlockERNS_9BitWriterEPA8_fPKfsPKNS_7BitCodeES8_S8_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef %607, ptr noundef %608, i16 noundef signext %609, ptr noundef %610, ptr noundef %611, ptr noundef %612)
  store i16 %613, ptr %53, align 2, !tbaa !9
  br label %614

614:                                              ; preds = %606
  %615 = load i32, ptr %63, align 4, !tbaa !16
  %616 = add nsw i32 %615, 8
  store i32 %616, ptr %63, align 4, !tbaa !16
  br label %473, !llvm.loop !31

617:                                              ; preds = %477
  br label %618

618:                                              ; preds = %617
  %619 = load i32, ptr %62, align 4, !tbaa !16
  %620 = add nsw i32 %619, 8
  store i32 %620, ptr %62, align 4, !tbaa !16
  br label %467, !llvm.loop !32

621:                                              ; preds = %471
  %622 = load i8, ptr %14, align 1, !tbaa !11, !range !14, !noundef !15
  %623 = trunc i8 %622 to i1
  br i1 %623, label %625, label %624

624:                                              ; preds = %621
  br label %846

625:                                              ; preds = %621
  %626 = load i8, ptr %16, align 1, !tbaa !11, !range !14, !noundef !15
  %627 = trunc i8 %626 to i1
  br i1 %627, label %628, label %831

628:                                              ; preds = %625
  call void @llvm.lifetime.start.p0(i64 2, ptr %72) #4
  store i16 7, ptr %72, align 2, !tbaa !9
  br label %629

629:                                              ; preds = %827, %628
  %630 = load i8, ptr %16, align 1, !tbaa !11, !range !14, !noundef !15
  %631 = trunc i8 %630 to i1
  br i1 %631, label %632, label %636

632:                                              ; preds = %629
  %633 = load i16, ptr %72, align 2, !tbaa !9
  %634 = sext i16 %633 to i32
  %635 = icmp sge i32 %634, 0
  br label %636

636:                                              ; preds = %632, %629
  %637 = phi i1 [ false, %629 ], [ %635, %632 ]
  br i1 %637, label %639, label %638

638:                                              ; preds = %636
  store i32 40, ptr %60, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %72) #4
  br label %830

639:                                              ; preds = %636
  call void @llvm.lifetime.start.p0(i64 4, ptr %73) #4
  %640 = load i32, ptr %59, align 4, !tbaa !16
  %641 = load i16, ptr %72, align 2, !tbaa !9
  %642 = sext i16 %641 to i32
  %643 = mul nsw i32 2, %642
  %644 = add nsw i32 %640, %643
  %645 = load i32, ptr %50, align 4, !tbaa !16
  %646 = call noundef i32 @_ZN12_GLOBAL__N_17minimumIiEET_S1_S1_(i32 noundef %644, i32 noundef %645)
  store i32 %646, ptr %73, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %74) #4
  %647 = load i32, ptr %61, align 4, !tbaa !16
  store i32 %647, ptr %74, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %75) #4
  %648 = load i32, ptr %73, align 4, !tbaa !16
  %649 = load i16, ptr %12, align 2, !tbaa !9
  %650 = zext i16 %649 to i32
  %651 = mul nsw i32 %648, %650
  %652 = load i32, ptr %74, align 4, !tbaa !16
  %653 = add nsw i32 %651, %652
  %654 = mul nsw i32 %653, 3
  store i32 %654, ptr %75, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %76) #4
  %655 = load i32, ptr %73, align 4, !tbaa !16
  %656 = load i32, ptr %50, align 4, !tbaa !16
  %657 = icmp slt i32 %655, %656
  br i1 %657, label %658, label %662

658:                                              ; preds = %639
  %659 = load i16, ptr %12, align 2, !tbaa !9
  %660 = zext i16 %659 to i32
  %661 = mul nsw i32 3, %660
  br label %663

662:                                              ; preds = %639
  br label %663

663:                                              ; preds = %662, %658
  %664 = phi i32 [ %661, %658 ], [ 0, %662 ]
  store i32 %664, ptr %76, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %77) #4
  %665 = load i32, ptr %74, align 4, !tbaa !16
  %666 = load i32, ptr %49, align 4, !tbaa !16
  %667 = icmp slt i32 %665, %666
  %668 = zext i1 %667 to i64
  %669 = select i1 %667, i32 3, i32 0
  store i32 %669, ptr %77, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 2, ptr %78) #4
  store i16 0, ptr %78, align 2, !tbaa !9
  br label %670

670:                                              ; preds = %823, %663
  %671 = load i16, ptr %78, align 2, !tbaa !9
  %672 = sext i16 %671 to i32
  %673 = icmp slt i32 %672, 8
  br i1 %673, label %675, label %674

674:                                              ; preds = %670
  store i32 43, ptr %60, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %78) #4
  br label %826

675:                                              ; preds = %670
  call void @llvm.lifetime.start.p0(i64 4, ptr %79) #4
  %676 = load i32, ptr %75, align 4, !tbaa !16
  %677 = load i32, ptr %77, align 4, !tbaa !16
  %678 = add nsw i32 %676, %677
  store i32 %678, ptr %79, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %80) #4
  %679 = load i32, ptr %75, align 4, !tbaa !16
  %680 = load i32, ptr %76, align 4, !tbaa !16
  %681 = add nsw i32 %679, %680
  store i32 %681, ptr %80, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %81) #4
  %682 = load i32, ptr %75, align 4, !tbaa !16
  %683 = load i32, ptr %77, align 4, !tbaa !16
  %684 = add nsw i32 %682, %683
  %685 = load i32, ptr %76, align 4, !tbaa !16
  %686 = add nsw i32 %684, %685
  store i32 %686, ptr %81, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %82) #4
  %687 = load ptr, ptr %48, align 8, !tbaa !5
  %688 = load i32, ptr %75, align 4, !tbaa !16
  %689 = sext i32 %688 to i64
  %690 = getelementptr inbounds i8, ptr %687, i64 %689
  %691 = load i8, ptr %690, align 1, !tbaa !13
  %692 = zext i8 %691 to i16
  %693 = sext i16 %692 to i32
  %694 = load ptr, ptr %48, align 8, !tbaa !5
  %695 = load i32, ptr %79, align 4, !tbaa !16
  %696 = sext i32 %695 to i64
  %697 = getelementptr inbounds i8, ptr %694, i64 %696
  %698 = load i8, ptr %697, align 1, !tbaa !13
  %699 = zext i8 %698 to i32
  %700 = add nsw i32 %693, %699
  %701 = load ptr, ptr %48, align 8, !tbaa !5
  %702 = load i32, ptr %80, align 4, !tbaa !16
  %703 = sext i32 %702 to i64
  %704 = getelementptr inbounds i8, ptr %701, i64 %703
  %705 = load i8, ptr %704, align 1, !tbaa !13
  %706 = zext i8 %705 to i32
  %707 = add nsw i32 %700, %706
  %708 = load ptr, ptr %48, align 8, !tbaa !5
  %709 = load i32, ptr %81, align 4, !tbaa !16
  %710 = sext i32 %709 to i64
  %711 = getelementptr inbounds i8, ptr %708, i64 %710
  %712 = load i8, ptr %711, align 1, !tbaa !13
  %713 = zext i8 %712 to i32
  %714 = add nsw i32 %707, %713
  store i32 %714, ptr %82, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %83) #4
  %715 = load ptr, ptr %48, align 8, !tbaa !5
  %716 = load i32, ptr %75, align 4, !tbaa !16
  %717 = add nsw i32 %716, 1
  %718 = sext i32 %717 to i64
  %719 = getelementptr inbounds i8, ptr %715, i64 %718
  %720 = load i8, ptr %719, align 1, !tbaa !13
  %721 = zext i8 %720 to i16
  %722 = sext i16 %721 to i32
  %723 = load ptr, ptr %48, align 8, !tbaa !5
  %724 = load i32, ptr %79, align 4, !tbaa !16
  %725 = add nsw i32 %724, 1
  %726 = sext i32 %725 to i64
  %727 = getelementptr inbounds i8, ptr %723, i64 %726
  %728 = load i8, ptr %727, align 1, !tbaa !13
  %729 = zext i8 %728 to i32
  %730 = add nsw i32 %722, %729
  %731 = load ptr, ptr %48, align 8, !tbaa !5
  %732 = load i32, ptr %80, align 4, !tbaa !16
  %733 = add nsw i32 %732, 1
  %734 = sext i32 %733 to i64
  %735 = getelementptr inbounds i8, ptr %731, i64 %734
  %736 = load i8, ptr %735, align 1, !tbaa !13
  %737 = zext i8 %736 to i32
  %738 = add nsw i32 %730, %737
  %739 = load ptr, ptr %48, align 8, !tbaa !5
  %740 = load i32, ptr %81, align 4, !tbaa !16
  %741 = add nsw i32 %740, 1
  %742 = sext i32 %741 to i64
  %743 = getelementptr inbounds i8, ptr %739, i64 %742
  %744 = load i8, ptr %743, align 1, !tbaa !13
  %745 = zext i8 %744 to i32
  %746 = add nsw i32 %738, %745
  store i32 %746, ptr %83, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %84) #4
  %747 = load ptr, ptr %48, align 8, !tbaa !5
  %748 = load i32, ptr %75, align 4, !tbaa !16
  %749 = add nsw i32 %748, 2
  %750 = sext i32 %749 to i64
  %751 = getelementptr inbounds i8, ptr %747, i64 %750
  %752 = load i8, ptr %751, align 1, !tbaa !13
  %753 = zext i8 %752 to i16
  %754 = sext i16 %753 to i32
  %755 = load ptr, ptr %48, align 8, !tbaa !5
  %756 = load i32, ptr %79, align 4, !tbaa !16
  %757 = add nsw i32 %756, 2
  %758 = sext i32 %757 to i64
  %759 = getelementptr inbounds i8, ptr %755, i64 %758
  %760 = load i8, ptr %759, align 1, !tbaa !13
  %761 = zext i8 %760 to i32
  %762 = add nsw i32 %754, %761
  %763 = load ptr, ptr %48, align 8, !tbaa !5
  %764 = load i32, ptr %80, align 4, !tbaa !16
  %765 = add nsw i32 %764, 2
  %766 = sext i32 %765 to i64
  %767 = getelementptr inbounds i8, ptr %763, i64 %766
  %768 = load i8, ptr %767, align 1, !tbaa !13
  %769 = zext i8 %768 to i32
  %770 = add nsw i32 %762, %769
  %771 = load ptr, ptr %48, align 8, !tbaa !5
  %772 = load i32, ptr %81, align 4, !tbaa !16
  %773 = add nsw i32 %772, 2
  %774 = sext i32 %773 to i64
  %775 = getelementptr inbounds i8, ptr %771, i64 %774
  %776 = load i8, ptr %775, align 1, !tbaa !13
  %777 = zext i8 %776 to i32
  %778 = add nsw i32 %770, %777
  store i32 %778, ptr %84, align 4, !tbaa !16
  %779 = load i32, ptr %82, align 4, !tbaa !16
  %780 = sitofp i32 %779 to float
  %781 = load i32, ptr %83, align 4, !tbaa !16
  %782 = sitofp i32 %781 to float
  %783 = load i32, ptr %84, align 4, !tbaa !16
  %784 = sitofp i32 %783 to float
  %785 = call noundef float @_ZN12_GLOBAL__N_16rgb2cbEfff(float noundef %780, float noundef %782, float noundef %784)
  %786 = fdiv float %785, 4.000000e+00
  %787 = load i16, ptr %72, align 2, !tbaa !9
  %788 = sext i16 %787 to i64
  %789 = getelementptr inbounds [8 x [8 x float]], ptr %57, i64 0, i64 %788
  %790 = load i16, ptr %78, align 2, !tbaa !9
  %791 = sext i16 %790 to i64
  %792 = getelementptr inbounds [8 x float], ptr %789, i64 0, i64 %791
  store float %786, ptr %792, align 4, !tbaa !24
  %793 = load i32, ptr %82, align 4, !tbaa !16
  %794 = sitofp i32 %793 to float
  %795 = load i32, ptr %83, align 4, !tbaa !16
  %796 = sitofp i32 %795 to float
  %797 = load i32, ptr %84, align 4, !tbaa !16
  %798 = sitofp i32 %797 to float
  %799 = call noundef float @_ZN12_GLOBAL__N_16rgb2crEfff(float noundef %794, float noundef %796, float noundef %798)
  %800 = fdiv float %799, 4.000000e+00
  %801 = load i16, ptr %72, align 2, !tbaa !9
  %802 = sext i16 %801 to i64
  %803 = getelementptr inbounds [8 x [8 x float]], ptr %58, i64 0, i64 %802
  %804 = load i16, ptr %78, align 2, !tbaa !9
  %805 = sext i16 %804 to i64
  %806 = getelementptr inbounds [8 x float], ptr %803, i64 0, i64 %805
  store float %800, ptr %806, align 4, !tbaa !24
  %807 = load i32, ptr %75, align 4, !tbaa !16
  %808 = add nsw i32 %807, 6
  store i32 %808, ptr %75, align 4, !tbaa !16
  %809 = load i32, ptr %74, align 4, !tbaa !16
  %810 = add nsw i32 %809, 2
  store i32 %810, ptr %74, align 4, !tbaa !16
  %811 = load i32, ptr %74, align 4, !tbaa !16
  %812 = load i32, ptr %49, align 4, !tbaa !16
  %813 = icmp sge i32 %811, %812
  br i1 %813, label %814, label %822

814:                                              ; preds = %675
  store i32 0, ptr %77, align 4, !tbaa !16
  %815 = load i32, ptr %73, align 4, !tbaa !16
  %816 = add nsw i32 %815, 1
  %817 = load i16, ptr %12, align 2, !tbaa !9
  %818 = zext i16 %817 to i32
  %819 = mul nsw i32 %816, %818
  %820 = sub nsw i32 %819, 1
  %821 = mul nsw i32 %820, 3
  store i32 %821, ptr %75, align 4, !tbaa !16
  br label %822

822:                                              ; preds = %814, %675
  call void @llvm.lifetime.end.p0(i64 4, ptr %84) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %83) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %82) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %81) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %80) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %79) #4
  br label %823

823:                                              ; preds = %822
  %824 = load i16, ptr %78, align 2, !tbaa !9
  %825 = add i16 %824, 1
  store i16 %825, ptr %78, align 2, !tbaa !9
  br label %670, !llvm.loop !33

826:                                              ; preds = %674
  call void @llvm.lifetime.end.p0(i64 4, ptr %77) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %76) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %75) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %74) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %73) #4
  br label %827

827:                                              ; preds = %826
  %828 = load i16, ptr %72, align 2, !tbaa !9
  %829 = add i16 %828, -1
  store i16 %829, ptr %72, align 2, !tbaa !9
  br label %629, !llvm.loop !34

830:                                              ; preds = %638
  br label %831

831:                                              ; preds = %830, %625
  %832 = getelementptr inbounds [8 x [8 x float]], ptr %57, i64 0, i64 0
  %833 = getelementptr inbounds [64 x float], ptr %36, i64 0, i64 0
  %834 = load i16, ptr %54, align 2, !tbaa !9
  %835 = getelementptr inbounds [256 x %"struct.(anonymous namespace)::BitCode"], ptr %32, i64 0, i64 0
  %836 = getelementptr inbounds [256 x %"struct.(anonymous namespace)::BitCode"], ptr %33, i64 0, i64 0
  %837 = load ptr, ptr %42, align 8, !tbaa !5
  %838 = call noundef signext i16 @_ZN12_GLOBAL__N_111encodeBlockERNS_9BitWriterEPA8_fPKfsPKNS_7BitCodeES8_S8_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef %832, ptr noundef %833, i16 noundef signext %834, ptr noundef %835, ptr noundef %836, ptr noundef %837)
  store i16 %838, ptr %54, align 2, !tbaa !9
  %839 = getelementptr inbounds [8 x [8 x float]], ptr %58, i64 0, i64 0
  %840 = getelementptr inbounds [64 x float], ptr %36, i64 0, i64 0
  %841 = load i16, ptr %55, align 2, !tbaa !9
  %842 = getelementptr inbounds [256 x %"struct.(anonymous namespace)::BitCode"], ptr %32, i64 0, i64 0
  %843 = getelementptr inbounds [256 x %"struct.(anonymous namespace)::BitCode"], ptr %33, i64 0, i64 0
  %844 = load ptr, ptr %42, align 8, !tbaa !5
  %845 = call noundef signext i16 @_ZN12_GLOBAL__N_111encodeBlockERNS_9BitWriterEPA8_fPKfsPKNS_7BitCodeES8_S8_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef %839, ptr noundef %840, i16 noundef signext %841, ptr noundef %842, ptr noundef %843, ptr noundef %844)
  store i16 %845, ptr %55, align 2, !tbaa !9
  br label %846

846:                                              ; preds = %831, %624
  %847 = load i32, ptr %52, align 4, !tbaa !16
  %848 = load i32, ptr %61, align 4, !tbaa !16
  %849 = add nsw i32 %848, %847
  store i32 %849, ptr %61, align 4, !tbaa !16
  br label %460, !llvm.loop !35

850:                                              ; preds = %465
  br label %851

851:                                              ; preds = %850
  %852 = load i32, ptr %52, align 4, !tbaa !16
  %853 = load i32, ptr %59, align 4, !tbaa !16
  %854 = add nsw i32 %853, %852
  store i32 %854, ptr %59, align 4, !tbaa !16
  br label %453, !llvm.loop !36

855:                                              ; preds = %458
  call void @_ZN12_GLOBAL__N_19BitWriter5flushEv(ptr noundef nonnull align 8 dereferenceable(16) %19)
  %856 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 noundef zeroext -1)
  %857 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %856, i8 noundef zeroext -39)
  store i1 true, ptr %9, align 1
  store i32 1, ptr %60, align 4
  call void @llvm.lifetime.end.p0(i64 256, ptr %58) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr %57) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr %56) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %55) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %54) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %53) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %43) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #4
  call void @llvm.lifetime.end.p0(i64 16384, ptr %41) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr %36) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 20, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %858

858:                                              ; preds = %855, %101, %92
  %859 = load i1, ptr %9, align 1
  ret i1 %859

860:                                              ; preds = %596
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN12_GLOBAL__N_19BitWriterC2EPFvhE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #2 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi20EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(20)) #0 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_19BitWriter9addMarkerEht(ptr noundef nonnull align 8 dereferenceable(16), i8 noundef zeroext, i16 noundef zeroext) #0 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16), i8 noundef zeroext) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i16 @_ZN12_GLOBAL__N_15clampItiEET_S1_T0_S2_(i16 noundef zeroext, i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN12_GLOBAL__N_15clampIiiEET_S1_T0_S2_(i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIhLi64EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(64)) #0 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi16EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(16)) #0 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi12EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(12)) #0 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi162EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(162)) #0 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_120generateHuffmanTableEPKhS1_PNS_7BitCodeE(ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi3EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(3)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN12_GLOBAL__N_17BitCodeC2Eth(ptr noundef nonnull align 2 dereferenceable(3), i16 noundef zeroext, i8 noundef zeroext) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN12_GLOBAL__N_17minimumIiEET_S1_S1_(i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef float @_ZN12_GLOBAL__N_15rgb2yEfff(float noundef, float noundef, float noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef float @_ZN12_GLOBAL__N_16rgb2cbEfff(float noundef, float noundef, float noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef float @_ZN12_GLOBAL__N_16rgb2crEfff(float noundef, float noundef, float noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef signext i16 @_ZN12_GLOBAL__N_111encodeBlockERNS_9BitWriterEPA8_fPKfsPKNS_7BitCodeES8_S8_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef, i16 noundef signext, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_19BitWriter5flushEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.(anonymous namespace)::BitWriter" = type { ptr, %"struct.(anonymous namespace)::BitWriter::BitBuffer" }
%"struct.(anonymous namespace)::BitWriter::BitBuffer" = type <{ i32, i8, [3 x i8] }>
%"struct.(anonymous namespace)::BitCode" = type <{ i16, i8, i8 }>

@__const._ZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKc.HeaderJfif = external hidden unnamed_addr constant [20 x i8], align 16
@_ZN12_GLOBAL__N_121DefaultQuantLuminanceE = external hidden local_unnamed_addr constant [64 x i8], align 16
@_ZN12_GLOBAL__N_19ZigZagInvE = external hidden local_unnamed_addr constant [64 x i8], align 16
@_ZN12_GLOBAL__N_123DefaultQuantChrominanceE = external hidden local_unnamed_addr constant [64 x i8], align 16
@_ZN12_GLOBAL__N_126DcLuminanceCodesPerBitsizeE = external hidden constant [16 x i8], align 16
@_ZN12_GLOBAL__N_117DcLuminanceValuesE = external hidden constant [12 x i8], align 1
@_ZN12_GLOBAL__N_126AcLuminanceCodesPerBitsizeE = external hidden constant [16 x i8], align 16
@_ZN12_GLOBAL__N_117AcLuminanceValuesE = external hidden constant [162 x i8], align 16
@_ZN12_GLOBAL__N_128DcChrominanceCodesPerBitsizeE = external hidden constant [16 x i8], align 16
@_ZN12_GLOBAL__N_119DcChrominanceValuesE = external hidden constant [12 x i8], align 1
@_ZN12_GLOBAL__N_128AcChrominanceCodesPerBitsizeE = external hidden constant [16 x i8], align 16
@_ZN12_GLOBAL__N_119AcChrominanceValuesE = external hidden constant [162 x i8], align 16
@_ZZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKcE8Spectral = external hidden constant [3 x i8], align 1
@_ZZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKcE15AanScaleFactors = external hidden local_unnamed_addr constant [8 x float], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKc(ptr noundef %0, ptr noundef readonly %1, i16 noundef zeroext %2, i16 noundef zeroext %3, i1 noundef zeroext %4, i8 noundef zeroext %5, i1 noundef zeroext %6, ptr noundef readonly %7) local_unnamed_addr #0 {
  %9 = alloca %"struct.(anonymous namespace)::BitWriter", align 8
  %10 = alloca [20 x i8], align 16
  %11 = alloca [64 x i8], align 16
  %12 = alloca [64 x i8], align 16
  %13 = alloca [256 x %"struct.(anonymous namespace)::BitCode"], align 16
  %14 = alloca [256 x %"struct.(anonymous namespace)::BitCode"], align 16
  %15 = alloca [256 x %"struct.(anonymous namespace)::BitCode"], align 16
  %16 = alloca [256 x %"struct.(anonymous namespace)::BitCode"], align 16
  %17 = alloca [64 x float], align 16
  %18 = alloca [64 x float], align 16
  %19 = alloca [4096 x %"struct.(anonymous namespace)::BitCode"], align 16
  %20 = alloca %"struct.(anonymous namespace)::BitCode", align 2
  %21 = alloca %"struct.(anonymous namespace)::BitCode", align 2
  %22 = alloca [8 x [8 x float]], align 16
  %23 = alloca [8 x [8 x float]], align 16
  %24 = alloca [8 x [8 x float]], align 16
  %25 = icmp eq ptr %0, null
  %26 = icmp eq ptr %1, null
  %or.cond = or i1 %25, %26
  br i1 %or.cond, label %722, label %27

27:                                               ; preds = %8
  %28 = zext i16 %2 to i32
  %29 = icmp eq i16 %2, 0
  %30 = zext i16 %3 to i32
  %31 = icmp eq i16 %3, 0
  %or.cond4 = or i1 %29, %31
  br i1 %or.cond4, label %722, label %32

32:                                               ; preds = %27
  %33 = select i1 %4, i32 3, i32 1
  %spec.select = and i1 %4, %6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #4
  call void @_ZN12_GLOBAL__N_19BitWriterC2EPFvhE(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull %0)
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %10) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(20) %10, ptr noundef nonnull align 16 dereferenceable(20) @__const._ZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKc.HeaderJfif, i64 20, i1 false)
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi20EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 1 dereferenceable(20) %10)
  %.not = icmp eq ptr %7, null
  br i1 %.not, label %.loopexit276, label %.preheader277

.preheader277:                                    ; preds = %32, %.preheader277
  %indvars.iv359 = phi i32 [ %indvars.iv.next360, %.preheader277 ], [ 0, %32 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %.preheader277 ], [ 0, %32 ]
  %35 = getelementptr inbounds i8, ptr %7, i64 %indvars.iv
  %36 = load i8, ptr %35, align 1, !tbaa !5
  %.not267 = icmp eq i8 %36, 0
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %indvars.iv.next360 = add nuw i32 %indvars.iv359, 1
  br i1 %.not267, label %37, label %.preheader277, !llvm.loop !8

37:                                               ; preds = %.preheader277
  %38 = trunc i64 %indvars.iv to i16
  %39 = add i16 %38, 2
  call void @_ZN12_GLOBAL__N_19BitWriter9addMarkerEht(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext -2, i16 noundef zeroext %39)
  %.not347 = icmp eq i64 %indvars.iv, 0
  br i1 %.not347, label %.loopexit276, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %37
  %wide.trip.count = zext i32 %indvars.iv359 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv356 = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next357, %.lr.ph ]
  %40 = getelementptr inbounds i8, ptr %7, i64 %indvars.iv356
  %41 = load i8, ptr %40, align 1, !tbaa !5
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext %41)
  %indvars.iv.next357 = add nuw nsw i64 %indvars.iv356, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next357, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit276, label %.lr.ph, !llvm.loop !10

.loopexit276:                                     ; preds = %.lr.ph, %37, %32
  %43 = zext i8 %5 to i16
  %44 = call noundef zeroext i16 @_ZN12_GLOBAL__N_15clampItiEET_S1_T0_S2_(i16 noundef zeroext %43, i32 noundef 1, i32 noundef 100)
  %45 = icmp ult i16 %44, 50
  br i1 %45, label %46, label %48

46:                                               ; preds = %.loopexit276
  %47 = udiv i16 5000, %44
  br label %51

48:                                               ; preds = %.loopexit276
  %49 = shl i16 %44, 1
  %50 = sub i16 200, %49
  br label %51

51:                                               ; preds = %48, %46
  %52 = phi i16 [ %47, %46 ], [ %50, %48 ]
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #4
  %53 = zext i16 %52 to i32
  br label %58

54:                                               ; preds = %58
  %55 = select i1 %4, i16 132, i16 67
  call void @_ZN12_GLOBAL__N_19BitWriter9addMarkerEht(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext -37, i16 noundef zeroext %55)
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext 0)
  %57 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIhLi64EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %56, ptr noundef nonnull align 1 dereferenceable(64) %11)
  br i1 %4, label %80, label %.peel.begin

58:                                               ; preds = %51, %58
  %indvars.iv361 = phi i64 [ 0, %51 ], [ %indvars.iv.next362, %58 ]
  %59 = getelementptr inbounds [64 x i8], ptr @_ZN12_GLOBAL__N_19ZigZagInvE, i64 0, i64 %indvars.iv361
  %60 = load i8, ptr %59, align 1, !tbaa !5
  %61 = zext i8 %60 to i64
  %62 = getelementptr inbounds [64 x i8], ptr @_ZN12_GLOBAL__N_121DefaultQuantLuminanceE, i64 0, i64 %61
  %63 = load i8, ptr %62, align 1, !tbaa !5
  %64 = zext i8 %63 to i32
  %65 = mul nuw nsw i32 %64, %53
  %66 = add nuw nsw i32 %65, 50
  %67 = udiv i32 %66, 100
  %68 = getelementptr inbounds [64 x i8], ptr @_ZN12_GLOBAL__N_123DefaultQuantChrominanceE, i64 0, i64 %61
  %69 = load i8, ptr %68, align 1, !tbaa !5
  %70 = zext i8 %69 to i32
  %71 = mul nuw nsw i32 %70, %53
  %72 = add nuw nsw i32 %71, 50
  %73 = udiv i32 %72, 100
  %74 = call noundef i32 @_ZN12_GLOBAL__N_15clampIiiEET_S1_T0_S2_(i32 noundef %67, i32 noundef 1, i32 noundef 255)
  %75 = trunc i32 %74 to i8
  %76 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 %indvars.iv361
  store i8 %75, ptr %76, align 1, !tbaa !5
  %77 = call noundef i32 @_ZN12_GLOBAL__N_15clampIiiEET_S1_T0_S2_(i32 noundef %73, i32 noundef 1, i32 noundef 255)
  %78 = trunc i32 %77 to i8
  %79 = getelementptr inbounds [64 x i8], ptr %12, i64 0, i64 %indvars.iv361
  store i8 %78, ptr %79, align 1, !tbaa !5
  %indvars.iv.next362 = add nuw nsw i64 %indvars.iv361, 1
  %exitcond364.not = icmp eq i64 %indvars.iv.next362, 64
  br i1 %exitcond364.not, label %54, label %58, !llvm.loop !11

80:                                               ; preds = %54
  %81 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext 1)
  %82 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIhLi64EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %81, ptr noundef nonnull align 1 dereferenceable(64) %12)
  br label %.peel.begin

.peel.begin:                                      ; preds = %80, %54
  %83 = trunc nuw nsw i32 %33 to i16
  %84 = mul nuw nsw i16 %83, 3
  %85 = add nuw nsw i16 %84, 8
  call void @_ZN12_GLOBAL__N_19BitWriter9addMarkerEht(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext -64, i16 noundef zeroext %85)
  %86 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext 8)
  %87 = lshr i16 %3, 8
  %88 = trunc nuw i16 %87 to i8
  %89 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %86, i8 noundef zeroext %88)
  %90 = trunc i16 %3 to i8
  %91 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %89, i8 noundef zeroext %90)
  %92 = lshr i16 %2, 8
  %93 = trunc nuw i16 %92 to i8
  %94 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %91, i8 noundef zeroext %93)
  %95 = trunc i16 %2 to i8
  %96 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %94, i8 noundef zeroext %95)
  %97 = trunc nuw nsw i32 %33 to i8
  %98 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext %97)
  %99 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext 1)
  %100 = select i1 %spec.select, i8 34, i8 17
  %101 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %99, i8 noundef zeroext %100)
  %102 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %101, i8 noundef zeroext 0)
  br i1 %4, label %.peel.next, label %.loopexit

.loopexit:                                        ; preds = %.peel.next, %.peel.begin
  %103 = phi i16 [ 210, %.peel.begin ], [ 418, %.peel.next ]
  call void @_ZN12_GLOBAL__N_19BitWriter9addMarkerEht(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext -60, i16 noundef zeroext %103)
  %104 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext 0)
  %105 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi16EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %104, ptr noundef nonnull align 1 dereferenceable(16) @_ZN12_GLOBAL__N_126DcLuminanceCodesPerBitsizeE)
  %106 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi12EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %105, ptr noundef nonnull align 1 dereferenceable(12) @_ZN12_GLOBAL__N_117DcLuminanceValuesE)
  %107 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext 16)
  %108 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi16EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %107, ptr noundef nonnull align 1 dereferenceable(16) @_ZN12_GLOBAL__N_126AcLuminanceCodesPerBitsizeE)
  %109 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi162EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %108, ptr noundef nonnull align 1 dereferenceable(162) @_ZN12_GLOBAL__N_117AcLuminanceValuesE)
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %14) #4
  call void @_ZN12_GLOBAL__N_120generateHuffmanTableEPKhS1_PNS_7BitCodeE(ptr noundef nonnull @_ZN12_GLOBAL__N_126DcLuminanceCodesPerBitsizeE, ptr noundef nonnull @_ZN12_GLOBAL__N_117DcLuminanceValuesE, ptr noundef nonnull %13)
  call void @_ZN12_GLOBAL__N_120generateHuffmanTableEPKhS1_PNS_7BitCodeE(ptr noundef nonnull @_ZN12_GLOBAL__N_126AcLuminanceCodesPerBitsizeE, ptr noundef nonnull @_ZN12_GLOBAL__N_117AcLuminanceValuesE, ptr noundef nonnull %14)
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %16) #4
  br i1 %4, label %.peel.begin368, label %.loopexit372.critedge

.peel.next:                                       ; preds = %.peel.begin, %.peel.next
  %.0227280 = phi i32 [ %114, %.peel.next ], [ 2, %.peel.begin ]
  %110 = trunc i32 %.0227280 to i8
  %111 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext %110)
  %112 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %111, i8 noundef zeroext 17)
  %113 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %112, i8 noundef zeroext 1)
  %114 = add nuw nsw i32 %.0227280, 1
  %exitcond365.not = icmp eq i32 %.0227280, %33
  br i1 %exitcond365.not, label %.loopexit, label %.peel.next, !llvm.loop !12

.peel.begin368:                                   ; preds = %.loopexit
  %115 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext 1)
  %116 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi16EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %115, ptr noundef nonnull align 1 dereferenceable(16) @_ZN12_GLOBAL__N_128DcChrominanceCodesPerBitsizeE)
  %117 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi12EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %116, ptr noundef nonnull align 1 dereferenceable(12) @_ZN12_GLOBAL__N_119DcChrominanceValuesE)
  %118 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext 17)
  %119 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi16EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %118, ptr noundef nonnull align 1 dereferenceable(16) @_ZN12_GLOBAL__N_128AcChrominanceCodesPerBitsizeE)
  %120 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi162EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %119, ptr noundef nonnull align 1 dereferenceable(162) @_ZN12_GLOBAL__N_119AcChrominanceValuesE)
  call void @_ZN12_GLOBAL__N_120generateHuffmanTableEPKhS1_PNS_7BitCodeE(ptr noundef nonnull @_ZN12_GLOBAL__N_128DcChrominanceCodesPerBitsizeE, ptr noundef nonnull @_ZN12_GLOBAL__N_119DcChrominanceValuesE, ptr noundef nonnull %15)
  call void @_ZN12_GLOBAL__N_120generateHuffmanTableEPKhS1_PNS_7BitCodeE(ptr noundef nonnull @_ZN12_GLOBAL__N_128AcChrominanceCodesPerBitsizeE, ptr noundef nonnull @_ZN12_GLOBAL__N_119AcChrominanceValuesE, ptr noundef nonnull %16)
  %121 = shl nuw nsw i16 %83, 1
  %122 = add nuw nsw i16 %121, 6
  call void @_ZN12_GLOBAL__N_19BitWriter9addMarkerEht(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext -38, i16 noundef zeroext %122)
  %123 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext %97)
  %124 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext 1)
  %125 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %124, i8 noundef zeroext 0)
  br label %.peel.next369

.loopexit372.critedge:                            ; preds = %.loopexit
  %126 = shl nuw nsw i16 %83, 1
  %127 = add nuw nsw i16 %126, 6
  call void @_ZN12_GLOBAL__N_19BitWriter9addMarkerEht(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext -38, i16 noundef zeroext %127)
  %128 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext %97)
  %129 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext 1)
  %130 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %129, i8 noundef zeroext 0)
  br label %.loopexit372

.loopexit372:                                     ; preds = %.peel.next369, %.loopexit372.critedge
  %131 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi3EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 1 dereferenceable(3) @_ZZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKcE8Spectral)
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %17) #4
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %18) #4
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %.loopexit372
  %index = phi i64 [ 0, %.loopexit372 ], [ %index.next, %vector.body ]
  %132 = or disjoint i64 %index, 1
  %133 = or disjoint i64 %index, 2
  %134 = or disjoint i64 %index, 3
  %135 = getelementptr inbounds [64 x i8], ptr @_ZN12_GLOBAL__N_19ZigZagInvE, i64 0, i64 %index
  %136 = getelementptr inbounds [64 x i8], ptr @_ZN12_GLOBAL__N_19ZigZagInvE, i64 0, i64 %132
  %137 = getelementptr inbounds [64 x i8], ptr @_ZN12_GLOBAL__N_19ZigZagInvE, i64 0, i64 %133
  %138 = getelementptr inbounds [64 x i8], ptr @_ZN12_GLOBAL__N_19ZigZagInvE, i64 0, i64 %134
  %139 = load i8, ptr %135, align 4, !tbaa !5
  %140 = load i8, ptr %136, align 1, !tbaa !5
  %141 = load i8, ptr %137, align 2, !tbaa !5
  %142 = load i8, ptr %138, align 1, !tbaa !5
  %143 = zext i8 %139 to i32
  %144 = zext i8 %140 to i32
  %145 = zext i8 %141 to i32
  %146 = zext i8 %142 to i32
  %147 = lshr i32 %143, 3
  %148 = lshr i32 %144, 3
  %149 = lshr i32 %145, 3
  %150 = lshr i32 %146, 3
  %151 = and i32 %143, 7
  %152 = and i32 %144, 7
  %153 = and i32 %145, 7
  %154 = and i32 %146, 7
  %155 = zext nneg i32 %147 to i64
  %156 = zext nneg i32 %148 to i64
  %157 = zext nneg i32 %149 to i64
  %158 = zext nneg i32 %150 to i64
  %159 = getelementptr inbounds [8 x float], ptr @_ZZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKcE15AanScaleFactors, i64 0, i64 %155
  %160 = getelementptr inbounds [8 x float], ptr @_ZZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKcE15AanScaleFactors, i64 0, i64 %156
  %161 = getelementptr inbounds [8 x float], ptr @_ZZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKcE15AanScaleFactors, i64 0, i64 %157
  %162 = getelementptr inbounds [8 x float], ptr @_ZZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKcE15AanScaleFactors, i64 0, i64 %158
  %163 = load float, ptr %159, align 4, !tbaa !14
  %164 = load float, ptr %160, align 4, !tbaa !14
  %165 = load float, ptr %161, align 4, !tbaa !14
  %166 = load float, ptr %162, align 4, !tbaa !14
  %167 = insertelement <4 x float> poison, float %163, i64 0
  %168 = insertelement <4 x float> %167, float %164, i64 1
  %169 = insertelement <4 x float> %168, float %165, i64 2
  %170 = insertelement <4 x float> %169, float %166, i64 3
  %171 = zext nneg i32 %151 to i64
  %172 = zext nneg i32 %152 to i64
  %173 = zext nneg i32 %153 to i64
  %174 = zext nneg i32 %154 to i64
  %175 = getelementptr inbounds [8 x float], ptr @_ZZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKcE15AanScaleFactors, i64 0, i64 %171
  %176 = getelementptr inbounds [8 x float], ptr @_ZZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKcE15AanScaleFactors, i64 0, i64 %172
  %177 = getelementptr inbounds [8 x float], ptr @_ZZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKcE15AanScaleFactors, i64 0, i64 %173
  %178 = getelementptr inbounds [8 x float], ptr @_ZZN7TooJpeg9writeJpegEPFvhEPKvttbhbPKcE15AanScaleFactors, i64 0, i64 %174
  %179 = load float, ptr %175, align 4, !tbaa !14
  %180 = load float, ptr %176, align 4, !tbaa !14
  %181 = load float, ptr %177, align 4, !tbaa !14
  %182 = load float, ptr %178, align 4, !tbaa !14
  %183 = insertelement <4 x float> poison, float %179, i64 0
  %184 = insertelement <4 x float> %183, float %180, i64 1
  %185 = insertelement <4 x float> %184, float %181, i64 2
  %186 = insertelement <4 x float> %185, float %182, i64 3
  %187 = fmul <4 x float> %170, %186
  %188 = fmul <4 x float> %187, <float 8.000000e+00, float 8.000000e+00, float 8.000000e+00, float 8.000000e+00>
  %189 = fdiv <4 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>, %188
  %190 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 %index
  %wide.load = load <4 x i8>, ptr %190, align 4, !tbaa !5
  %191 = uitofp <4 x i8> %wide.load to <4 x float>
  %192 = fdiv <4 x float> %189, %191
  %193 = zext i8 %139 to i64
  %194 = zext i8 %140 to i64
  %195 = zext i8 %141 to i64
  %196 = zext i8 %142 to i64
  %197 = getelementptr inbounds [64 x float], ptr %17, i64 0, i64 %193
  %198 = getelementptr inbounds [64 x float], ptr %17, i64 0, i64 %194
  %199 = getelementptr inbounds [64 x float], ptr %17, i64 0, i64 %195
  %200 = getelementptr inbounds [64 x float], ptr %17, i64 0, i64 %196
  %201 = extractelement <4 x float> %192, i64 0
  store float %201, ptr %197, align 4, !tbaa !14
  %202 = extractelement <4 x float> %192, i64 1
  store float %202, ptr %198, align 4, !tbaa !14
  %203 = extractelement <4 x float> %192, i64 2
  store float %203, ptr %199, align 4, !tbaa !14
  %204 = extractelement <4 x float> %192, i64 3
  store float %204, ptr %200, align 4, !tbaa !14
  %205 = getelementptr inbounds [64 x i8], ptr %12, i64 0, i64 %index
  %wide.load428 = load <4 x i8>, ptr %205, align 4, !tbaa !5
  %206 = uitofp <4 x i8> %wide.load428 to <4 x float>
  %207 = fdiv <4 x float> %189, %206
  %208 = getelementptr inbounds [64 x float], ptr %18, i64 0, i64 %193
  %209 = getelementptr inbounds [64 x float], ptr %18, i64 0, i64 %194
  %210 = getelementptr inbounds [64 x float], ptr %18, i64 0, i64 %195
  %211 = getelementptr inbounds [64 x float], ptr %18, i64 0, i64 %196
  %212 = extractelement <4 x float> %207, i64 0
  store float %212, ptr %208, align 4, !tbaa !14
  %213 = extractelement <4 x float> %207, i64 1
  store float %213, ptr %209, align 4, !tbaa !14
  %214 = extractelement <4 x float> %207, i64 2
  store float %214, ptr %210, align 4, !tbaa !14
  %215 = extractelement <4 x float> %207, i64 3
  store float %215, ptr %211, align 4, !tbaa !14
  %index.next = add nuw i64 %index, 4
  %216 = icmp eq i64 %index.next, 64
  br i1 %216, label %middle.block, label %vector.body, !llvm.loop !16

.peel.next369:                                    ; preds = %.peel.begin368, %.peel.next369
  %.0231281 = phi i32 [ %220, %.peel.next369 ], [ 2, %.peel.begin368 ]
  %217 = trunc i32 %.0231281 to i8
  %218 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext %217)
  %219 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %218, i8 noundef zeroext 17)
  %220 = add nuw nsw i32 %.0231281, 1
  %exitcond367.not = icmp eq i32 %.0231281, %33
  br i1 %exitcond367.not, label %.loopexit372, label %.peel.next369, !llvm.loop !19

middle.block:                                     ; preds = %vector.body
  call void @llvm.lifetime.start.p0(i64 16384, ptr nonnull %19) #4
  %221 = getelementptr inbounds i8, ptr %19, i64 8192
  br label %708

.preheader275.us.preheader:                       ; preds = %708
  %222 = add nsw i32 %28, -1
  %223 = add nsw i32 %30, -1
  %224 = select i1 %spec.select, i32 16, i32 8
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %22) #4
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %23) #4
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %24) #4
  %225 = mul nuw nsw i32 %28, 3
  %226 = zext nneg i32 %224 to i64
  %227 = zext i16 %3 to i64
  br label %.preheader275.us

.preheader275.us:                                 ; preds = %.preheader275.us.preheader, %._crit_edge.us
  %indvars.iv417 = phi i64 [ 0, %.preheader275.us.preheader ], [ %indvars.iv.next418, %._crit_edge.us ]
  %.0240333.us = phi i16 [ 0, %.preheader275.us.preheader ], [ %.us-phi317.us, %._crit_edge.us ]
  %.0249331.us = phi i16 [ 0, %.preheader275.us.preheader ], [ %.2251.us, %._crit_edge.us ]
  %.0252330.us = phi i16 [ 0, %.preheader275.us.preheader ], [ %.2254.us, %._crit_edge.us ]
  %228 = trunc nuw nsw i64 %indvars.iv417 to i32
  br label %.preheader274.us

229:                                              ; preds = %.split316.us335
  br i1 %6, label %.preheader273.us, label %.loopexit.us

.loopexit.us:                                     ; preds = %247, %229
  %230 = call noundef signext i16 @_ZN12_GLOBAL__N_111encodeBlockERNS_9BitWriterEPA8_fPKfsPKNS_7BitCodeES8_S8_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull %23, ptr noundef nonnull %18, i16 noundef signext %.1253323.us, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %221)
  %231 = call noundef signext i16 @_ZN12_GLOBAL__N_111encodeBlockERNS_9BitWriterEPA8_fPKfsPKNS_7BitCodeES8_S8_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull %24, ptr noundef nonnull %18, i16 noundef signext %.1250324.us, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %221)
  br label %232

232:                                              ; preds = %.split316.us335, %.loopexit.us
  %.2254.us = phi i16 [ %230, %.loopexit.us ], [ %.1253323.us, %.split316.us335 ]
  %.2251.us = phi i16 [ %231, %.loopexit.us ], [ %.1250324.us, %.split316.us335 ]
  %233 = add nuw nsw i32 %.0247325.us, %224
  %234 = icmp ult i32 %233, %28
  br i1 %234, label %.preheader274.us, label %._crit_edge.us, !llvm.loop !20

235:                                              ; preds = %.preheader273.us, %247
  %indvars.iv414 = phi i64 [ 7, %.preheader273.us ], [ %indvars.iv.next415, %247 ]
  %indvars.iv414.tr = trunc i64 %indvars.iv414 to i32
  %236 = shl i32 %indvars.iv414.tr, 1
  %237 = add nuw nsw i32 %236, %228
  %238 = call noundef i32 @_ZN12_GLOBAL__N_17minimumIiEET_S1_S1_(i32 noundef %237, i32 noundef %223)
  %239 = mul nsw i32 %238, %28
  %240 = add nsw i32 %239, %.0247325.us
  %241 = mul nsw i32 %240, 3
  %242 = icmp slt i32 %238, %223
  %243 = select i1 %242, i32 %225, i32 0
  %244 = add nsw i32 %238, 1
  %245 = mul i32 %225, %244
  %246 = add i32 %245, -3
  br label %248

247:                                              ; preds = %248
  %indvars.iv.next415 = add nsw i64 %indvars.iv414, -1
  %.not419 = icmp eq i64 %indvars.iv414, 0
  br i1 %.not419, label %.loopexit.us, label %235, !llvm.loop !21

248:                                              ; preds = %248, %235
  %indvars.iv410 = phi i64 [ %indvars.iv.next411, %248 ], [ 0, %235 ]
  %.0226320.us = phi i32 [ %.1.us, %248 ], [ %384, %235 ]
  %.0228319.us = phi i32 [ %.1229.us, %248 ], [ %241, %235 ]
  %.0230318.us = phi i32 [ %311, %248 ], [ %.0247325.us, %235 ]
  %249 = add nsw i32 %.0226320.us, %.0228319.us
  %250 = add nsw i32 %.0228319.us, %243
  %251 = add nsw i32 %249, %243
  %252 = sext i32 %.0228319.us to i64
  %253 = getelementptr inbounds i8, ptr %1, i64 %252
  %254 = load i8, ptr %253, align 1, !tbaa !5
  %255 = zext i8 %254 to i32
  %256 = sext i32 %249 to i64
  %257 = getelementptr inbounds i8, ptr %1, i64 %256
  %258 = load i8, ptr %257, align 1, !tbaa !5
  %259 = zext i8 %258 to i32
  %260 = add nuw nsw i32 %259, %255
  %261 = sext i32 %250 to i64
  %262 = getelementptr inbounds i8, ptr %1, i64 %261
  %263 = load i8, ptr %262, align 1, !tbaa !5
  %264 = zext i8 %263 to i32
  %265 = add nuw nsw i32 %260, %264
  %266 = sext i32 %251 to i64
  %267 = getelementptr inbounds i8, ptr %1, i64 %266
  %268 = load i8, ptr %267, align 1, !tbaa !5
  %269 = zext i8 %268 to i32
  %270 = add nuw nsw i32 %265, %269
  %271 = getelementptr i8, ptr %253, i64 1
  %272 = load i8, ptr %271, align 1, !tbaa !5
  %273 = zext i8 %272 to i32
  %274 = getelementptr i8, ptr %257, i64 1
  %275 = load i8, ptr %274, align 1, !tbaa !5
  %276 = zext i8 %275 to i32
  %277 = add nuw nsw i32 %276, %273
  %278 = getelementptr i8, ptr %262, i64 1
  %279 = load i8, ptr %278, align 1, !tbaa !5
  %280 = zext i8 %279 to i32
  %281 = add nuw nsw i32 %277, %280
  %282 = getelementptr i8, ptr %267, i64 1
  %283 = load i8, ptr %282, align 1, !tbaa !5
  %284 = zext i8 %283 to i32
  %285 = add nuw nsw i32 %281, %284
  %286 = getelementptr i8, ptr %253, i64 2
  %287 = load i8, ptr %286, align 1, !tbaa !5
  %288 = zext i8 %287 to i32
  %289 = getelementptr i8, ptr %257, i64 2
  %290 = load i8, ptr %289, align 1, !tbaa !5
  %291 = zext i8 %290 to i32
  %292 = add nuw nsw i32 %291, %288
  %293 = getelementptr i8, ptr %262, i64 2
  %294 = load i8, ptr %293, align 1, !tbaa !5
  %295 = zext i8 %294 to i32
  %296 = add nuw nsw i32 %292, %295
  %297 = getelementptr i8, ptr %267, i64 2
  %298 = load i8, ptr %297, align 1, !tbaa !5
  %299 = zext i8 %298 to i32
  %300 = add nuw nsw i32 %296, %299
  %301 = uitofp nneg i32 %270 to float
  %302 = uitofp nneg i32 %285 to float
  %303 = uitofp nneg i32 %300 to float
  %304 = call noundef float @_ZN12_GLOBAL__N_16rgb2cbEfff(float noundef %301, float noundef %302, float noundef %303)
  %305 = fmul float %304, 2.500000e-01
  %306 = getelementptr inbounds [8 x [8 x float]], ptr %23, i64 0, i64 %indvars.iv414, i64 %indvars.iv410
  store float %305, ptr %306, align 4, !tbaa !14
  %307 = call noundef float @_ZN12_GLOBAL__N_16rgb2crEfff(float noundef %301, float noundef %302, float noundef %303)
  %308 = fmul float %307, 2.500000e-01
  %309 = getelementptr inbounds [8 x [8 x float]], ptr %24, i64 0, i64 %indvars.iv414, i64 %indvars.iv410
  store float %308, ptr %309, align 4, !tbaa !14
  %310 = add nsw i32 %.0228319.us, 6
  %311 = add nuw nsw i32 %.0230318.us, 2
  %.not270.us = icmp slt i32 %311, %222
  %.1229.us = select i1 %.not270.us, i32 %310, i32 %246
  %.1.us = select i1 %.not270.us, i32 %.0226320.us, i32 0
  %indvars.iv.next411 = add nuw nsw i64 %indvars.iv410, 1
  %exitcond413.not = icmp eq i64 %indvars.iv.next411, 8
  br i1 %exitcond413.not, label %247, label %248, !llvm.loop !22

.split305.us:                                     ; preds = %.split297.us
  %indvars.iv.next389 = add nuw nsw i64 %indvars.iv388, 8
  %312 = icmp ult i64 %indvars.iv.next389, %226
  br i1 %312, label %.preheader272.us337, label %.split316.us335, !llvm.loop !23

.split297.us:                                     ; preds = %.split.us
  %313 = call noundef signext i16 @_ZN12_GLOBAL__N_111encodeBlockERNS_9BitWriterEPA8_fPKfsPKNS_7BitCodeES8_S8_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull %22, ptr noundef nonnull %17, i16 noundef signext %.3299.us, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %221)
  %314 = add nuw nsw i32 %.0245298.us, 8
  %315 = icmp ult i32 %314, %224
  br i1 %315, label %.preheader.us, label %.split305.us, !llvm.loop !24

.split.us:                                        ; preds = %.preheader.us, %.split.us
  %indvars.iv384 = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next385, %.split.us ]
  %316 = call noundef i32 @_ZN12_GLOBAL__N_17minimumIiEET_S1_S1_(i32 noundef %381, i32 noundef %222)
  %317 = add nuw nsw i64 %indvars.iv384, %382
  %318 = trunc nuw i64 %317 to i32
  %319 = call noundef i32 @_ZN12_GLOBAL__N_17minimumIiEET_S1_S1_(i32 noundef %318, i32 noundef %223)
  %320 = mul nsw i32 %319, %28
  %321 = add nsw i32 %316, %320
  %322 = icmp slt i32 %316, %222
  %323 = zext i1 %322 to i32
  %spec.select271.us = add nsw i32 %316, %323
  %324 = sext i32 %321 to i64
  %325 = getelementptr inbounds i8, ptr %1, i64 %324
  %326 = load i8, ptr %325, align 1, !tbaa !5
  %327 = getelementptr inbounds [8 x [8 x float]], ptr %22, i64 0, i64 %indvars.iv384, i64 0
  %328 = add nsw i32 %spec.select271.us, %320
  %329 = icmp slt i32 %spec.select271.us, %222
  %330 = zext i1 %329 to i32
  %spec.select271.us.1 = add nsw i32 %spec.select271.us, %330
  %331 = sext i32 %328 to i64
  %332 = getelementptr inbounds i8, ptr %1, i64 %331
  %333 = load i8, ptr %332, align 1, !tbaa !5
  %334 = add nsw i32 %spec.select271.us.1, %320
  %335 = icmp slt i32 %spec.select271.us.1, %222
  %336 = zext i1 %335 to i32
  %spec.select271.us.2 = add nsw i32 %spec.select271.us.1, %336
  %337 = sext i32 %334 to i64
  %338 = getelementptr inbounds i8, ptr %1, i64 %337
  %339 = load i8, ptr %338, align 1, !tbaa !5
  %340 = add nsw i32 %spec.select271.us.2, %320
  %341 = icmp slt i32 %spec.select271.us.2, %222
  %342 = zext i1 %341 to i32
  %spec.select271.us.3 = add nsw i32 %spec.select271.us.2, %342
  %343 = sext i32 %340 to i64
  %344 = getelementptr inbounds i8, ptr %1, i64 %343
  %345 = load i8, ptr %344, align 1, !tbaa !5
  %346 = insertelement <4 x i8> poison, i8 %326, i64 0
  %347 = insertelement <4 x i8> %346, i8 %333, i64 1
  %348 = insertelement <4 x i8> %347, i8 %339, i64 2
  %349 = insertelement <4 x i8> %348, i8 %345, i64 3
  %350 = uitofp <4 x i8> %349 to <4 x float>
  %351 = fadd <4 x float> %350, <float -1.280000e+02, float -1.280000e+02, float -1.280000e+02, float -1.280000e+02>
  store <4 x float> %351, ptr %327, align 16, !tbaa !14
  %352 = add nsw i32 %spec.select271.us.3, %320
  %353 = icmp slt i32 %spec.select271.us.3, %222
  %354 = zext i1 %353 to i32
  %spec.select271.us.4 = add nsw i32 %spec.select271.us.3, %354
  %355 = sext i32 %352 to i64
  %356 = getelementptr inbounds i8, ptr %1, i64 %355
  %357 = load i8, ptr %356, align 1, !tbaa !5
  %358 = getelementptr inbounds [8 x [8 x float]], ptr %22, i64 0, i64 %indvars.iv384, i64 4
  %359 = add nsw i32 %spec.select271.us.4, %320
  %360 = icmp slt i32 %spec.select271.us.4, %222
  %361 = zext i1 %360 to i32
  %spec.select271.us.5 = add nsw i32 %spec.select271.us.4, %361
  %362 = sext i32 %359 to i64
  %363 = getelementptr inbounds i8, ptr %1, i64 %362
  %364 = load i8, ptr %363, align 1, !tbaa !5
  %365 = add nsw i32 %spec.select271.us.5, %320
  %366 = icmp slt i32 %spec.select271.us.5, %222
  %367 = zext i1 %366 to i32
  %spec.select271.us.6 = add nsw i32 %spec.select271.us.5, %367
  %368 = sext i32 %365 to i64
  %369 = getelementptr inbounds i8, ptr %1, i64 %368
  %370 = load i8, ptr %369, align 1, !tbaa !5
  %371 = add nsw i32 %spec.select271.us.6, %320
  %372 = sext i32 %371 to i64
  %373 = getelementptr inbounds i8, ptr %1, i64 %372
  %374 = load i8, ptr %373, align 1, !tbaa !5
  %375 = insertelement <4 x i8> poison, i8 %357, i64 0
  %376 = insertelement <4 x i8> %375, i8 %364, i64 1
  %377 = insertelement <4 x i8> %376, i8 %370, i64 2
  %378 = insertelement <4 x i8> %377, i8 %374, i64 3
  %379 = uitofp <4 x i8> %378 to <4 x float>
  %380 = fadd <4 x float> %379, <float -1.280000e+02, float -1.280000e+02, float -1.280000e+02, float -1.280000e+02>
  store <4 x float> %380, ptr %358, align 16, !tbaa !14
  %indvars.iv.next385 = add nuw nsw i64 %indvars.iv384, 1
  %exitcond387.not = icmp eq i64 %indvars.iv.next385, 8
  br i1 %exitcond387.not, label %.split297.us, label %.split.us, !llvm.loop !25

.preheader.us:                                    ; preds = %.preheader272.us337, %.split297.us
  %.3299.us = phi i16 [ %.2308.us338, %.preheader272.us337 ], [ %313, %.split297.us ]
  %.0245298.us = phi i32 [ 0, %.preheader272.us337 ], [ %314, %.split297.us ]
  %381 = add nuw nsw i32 %.0245298.us, %.0247325.us
  br label %.split.us

.preheader272.us337:                              ; preds = %.preheader274.us, %.split305.us
  %indvars.iv388 = phi i64 [ %indvars.iv.next389, %.split305.us ], [ 0, %.preheader274.us ]
  %.2308.us338 = phi i16 [ %313, %.split305.us ], [ %.1241327.us, %.preheader274.us ]
  %382 = add nuw nsw i64 %indvars.iv388, %indvars.iv417
  br label %.preheader.us

.preheader273.us:                                 ; preds = %229
  %383 = icmp slt i32 %.0247325.us, %222
  %384 = select i1 %383, i32 3, i32 0
  br label %235

.preheader274.us:                                 ; preds = %.preheader275.us, %232
  %.1241327.us = phi i16 [ %.0240333.us, %.preheader275.us ], [ %.us-phi317.us, %232 ]
  %.0247325.us = phi i32 [ 0, %.preheader275.us ], [ %233, %232 ]
  %.1250324.us = phi i16 [ %.0249331.us, %.preheader275.us ], [ %.2251.us, %232 ]
  %.1253323.us = phi i16 [ %.0252330.us, %.preheader275.us ], [ %.2254.us, %232 ]
  br i1 %4, label %.preheader274.split.us.us, label %.preheader272.us337

.split316.us335:                                  ; preds = %.split305.us, %.split305.us.split.us312.us, %.split305.us.split.us.us.us.us
  %.us-phi317.us = phi i16 [ %703, %.split305.us.split.us.us.us.us ], [ %558, %.split305.us.split.us312.us ], [ %313, %.split305.us ]
  br i1 %4, label %229, label %232

.preheader274.split.us.us:                        ; preds = %.preheader274.us
  br i1 %6, label %.preheader272.us.us.us, label %.preheader272.us.us341

.preheader272.us.us341:                           ; preds = %.preheader274.split.us.us, %.split305.us.split.us312.us
  %indvars.iv398 = phi i64 [ %indvars.iv.next399, %.split305.us.split.us312.us ], [ 0, %.preheader274.split.us.us ]
  %.2308.us.us342 = phi i16 [ %558, %.split305.us.split.us312.us ], [ %.1241327.us, %.preheader274.split.us.us ]
  %385 = add nuw nsw i64 %indvars.iv398, %indvars.iv417
  br label %.preheader.us.us309.us

.preheader.us.us309.us:                           ; preds = %.split297.us.split.us302.us.us, %.preheader272.us.us341
  %.3299.us.us310.us = phi i16 [ %.2308.us.us342, %.preheader272.us.us341 ], [ %558, %.split297.us.split.us302.us.us ]
  %.0245298.us.us311.us = phi i32 [ 0, %.preheader272.us.us341 ], [ %559, %.split297.us.split.us302.us.us ]
  %386 = add nuw nsw i32 %.0245298.us.us311.us, %.0247325.us
  br label %.split.us.us.us300.us.us

.split.us.us.us300.us.us:                         ; preds = %.split.us.us.us300.us.us, %.preheader.us.us309.us
  %indvars.iv394 = phi i64 [ %indvars.iv.next395, %.split.us.us.us300.us.us ], [ 0, %.preheader.us.us309.us ]
  %387 = call noundef i32 @_ZN12_GLOBAL__N_17minimumIiEET_S1_S1_(i32 noundef %386, i32 noundef %222)
  %388 = add nuw nsw i64 %indvars.iv394, %385
  %389 = trunc nuw i64 %388 to i32
  %390 = call noundef i32 @_ZN12_GLOBAL__N_17minimumIiEET_S1_S1_(i32 noundef %389, i32 noundef %223)
  %391 = mul nsw i32 %390, %28
  %392 = add nsw i32 %387, %391
  %393 = icmp slt i32 %387, %222
  %394 = zext i1 %393 to i32
  %spec.select271.us.us293.us.us.us = add nsw i32 %387, %394
  %395 = mul nsw i32 %392, 3
  %396 = sext i32 %395 to i64
  %397 = getelementptr inbounds i8, ptr %1, i64 %396
  %398 = load i8, ptr %397, align 1, !tbaa !5
  %399 = getelementptr i8, ptr %397, i64 1
  %400 = load i8, ptr %399, align 1, !tbaa !5
  %401 = getelementptr i8, ptr %397, i64 2
  %402 = load i8, ptr %401, align 1, !tbaa !5
  %403 = uitofp i8 %398 to float
  %404 = uitofp i8 %400 to float
  %405 = uitofp i8 %402 to float
  %406 = call noundef float @_ZN12_GLOBAL__N_15rgb2yEfff(float noundef %403, float noundef %404, float noundef %405)
  %407 = fadd float %406, -1.280000e+02
  %408 = getelementptr inbounds [8 x [8 x float]], ptr %22, i64 0, i64 %indvars.iv394, i64 0
  store float %407, ptr %408, align 16, !tbaa !14
  %409 = call noundef float @_ZN12_GLOBAL__N_16rgb2cbEfff(float noundef %403, float noundef %404, float noundef %405)
  %410 = getelementptr inbounds [8 x [8 x float]], ptr %23, i64 0, i64 %indvars.iv394, i64 0
  store float %409, ptr %410, align 16, !tbaa !14
  %411 = call noundef float @_ZN12_GLOBAL__N_16rgb2crEfff(float noundef %403, float noundef %404, float noundef %405)
  %412 = getelementptr inbounds [8 x [8 x float]], ptr %24, i64 0, i64 %indvars.iv394, i64 0
  store float %411, ptr %412, align 16, !tbaa !14
  %413 = add nsw i32 %spec.select271.us.us293.us.us.us, %391
  %414 = icmp slt i32 %spec.select271.us.us293.us.us.us, %222
  %415 = zext i1 %414 to i32
  %spec.select271.us.us293.us.us.us.1 = add nsw i32 %spec.select271.us.us293.us.us.us, %415
  %416 = mul nsw i32 %413, 3
  %417 = sext i32 %416 to i64
  %418 = getelementptr inbounds i8, ptr %1, i64 %417
  %419 = load i8, ptr %418, align 1, !tbaa !5
  %420 = getelementptr i8, ptr %418, i64 1
  %421 = load i8, ptr %420, align 1, !tbaa !5
  %422 = getelementptr i8, ptr %418, i64 2
  %423 = load i8, ptr %422, align 1, !tbaa !5
  %424 = uitofp i8 %419 to float
  %425 = uitofp i8 %421 to float
  %426 = uitofp i8 %423 to float
  %427 = call noundef float @_ZN12_GLOBAL__N_15rgb2yEfff(float noundef %424, float noundef %425, float noundef %426)
  %428 = fadd float %427, -1.280000e+02
  %429 = getelementptr inbounds [8 x [8 x float]], ptr %22, i64 0, i64 %indvars.iv394, i64 1
  store float %428, ptr %429, align 4, !tbaa !14
  %430 = call noundef float @_ZN12_GLOBAL__N_16rgb2cbEfff(float noundef %424, float noundef %425, float noundef %426)
  %431 = getelementptr inbounds [8 x [8 x float]], ptr %23, i64 0, i64 %indvars.iv394, i64 1
  store float %430, ptr %431, align 4, !tbaa !14
  %432 = call noundef float @_ZN12_GLOBAL__N_16rgb2crEfff(float noundef %424, float noundef %425, float noundef %426)
  %433 = getelementptr inbounds [8 x [8 x float]], ptr %24, i64 0, i64 %indvars.iv394, i64 1
  store float %432, ptr %433, align 4, !tbaa !14
  %434 = add nsw i32 %spec.select271.us.us293.us.us.us.1, %391
  %435 = icmp slt i32 %spec.select271.us.us293.us.us.us.1, %222
  %436 = zext i1 %435 to i32
  %spec.select271.us.us293.us.us.us.2 = add nsw i32 %spec.select271.us.us293.us.us.us.1, %436
  %437 = mul nsw i32 %434, 3
  %438 = sext i32 %437 to i64
  %439 = getelementptr inbounds i8, ptr %1, i64 %438
  %440 = load i8, ptr %439, align 1, !tbaa !5
  %441 = getelementptr i8, ptr %439, i64 1
  %442 = load i8, ptr %441, align 1, !tbaa !5
  %443 = getelementptr i8, ptr %439, i64 2
  %444 = load i8, ptr %443, align 1, !tbaa !5
  %445 = uitofp i8 %440 to float
  %446 = uitofp i8 %442 to float
  %447 = uitofp i8 %444 to float
  %448 = call noundef float @_ZN12_GLOBAL__N_15rgb2yEfff(float noundef %445, float noundef %446, float noundef %447)
  %449 = fadd float %448, -1.280000e+02
  %450 = getelementptr inbounds [8 x [8 x float]], ptr %22, i64 0, i64 %indvars.iv394, i64 2
  store float %449, ptr %450, align 8, !tbaa !14
  %451 = call noundef float @_ZN12_GLOBAL__N_16rgb2cbEfff(float noundef %445, float noundef %446, float noundef %447)
  %452 = getelementptr inbounds [8 x [8 x float]], ptr %23, i64 0, i64 %indvars.iv394, i64 2
  store float %451, ptr %452, align 8, !tbaa !14
  %453 = call noundef float @_ZN12_GLOBAL__N_16rgb2crEfff(float noundef %445, float noundef %446, float noundef %447)
  %454 = getelementptr inbounds [8 x [8 x float]], ptr %24, i64 0, i64 %indvars.iv394, i64 2
  store float %453, ptr %454, align 8, !tbaa !14
  %455 = add nsw i32 %spec.select271.us.us293.us.us.us.2, %391
  %456 = icmp slt i32 %spec.select271.us.us293.us.us.us.2, %222
  %457 = zext i1 %456 to i32
  %spec.select271.us.us293.us.us.us.3 = add nsw i32 %spec.select271.us.us293.us.us.us.2, %457
  %458 = mul nsw i32 %455, 3
  %459 = sext i32 %458 to i64
  %460 = getelementptr inbounds i8, ptr %1, i64 %459
  %461 = load i8, ptr %460, align 1, !tbaa !5
  %462 = getelementptr i8, ptr %460, i64 1
  %463 = load i8, ptr %462, align 1, !tbaa !5
  %464 = getelementptr i8, ptr %460, i64 2
  %465 = load i8, ptr %464, align 1, !tbaa !5
  %466 = uitofp i8 %461 to float
  %467 = uitofp i8 %463 to float
  %468 = uitofp i8 %465 to float
  %469 = call noundef float @_ZN12_GLOBAL__N_15rgb2yEfff(float noundef %466, float noundef %467, float noundef %468)
  %470 = fadd float %469, -1.280000e+02
  %471 = getelementptr inbounds [8 x [8 x float]], ptr %22, i64 0, i64 %indvars.iv394, i64 3
  store float %470, ptr %471, align 4, !tbaa !14
  %472 = call noundef float @_ZN12_GLOBAL__N_16rgb2cbEfff(float noundef %466, float noundef %467, float noundef %468)
  %473 = getelementptr inbounds [8 x [8 x float]], ptr %23, i64 0, i64 %indvars.iv394, i64 3
  store float %472, ptr %473, align 4, !tbaa !14
  %474 = call noundef float @_ZN12_GLOBAL__N_16rgb2crEfff(float noundef %466, float noundef %467, float noundef %468)
  %475 = getelementptr inbounds [8 x [8 x float]], ptr %24, i64 0, i64 %indvars.iv394, i64 3
  store float %474, ptr %475, align 4, !tbaa !14
  %476 = add nsw i32 %spec.select271.us.us293.us.us.us.3, %391
  %477 = icmp slt i32 %spec.select271.us.us293.us.us.us.3, %222
  %478 = zext i1 %477 to i32
  %spec.select271.us.us293.us.us.us.4 = add nsw i32 %spec.select271.us.us293.us.us.us.3, %478
  %479 = mul nsw i32 %476, 3
  %480 = sext i32 %479 to i64
  %481 = getelementptr inbounds i8, ptr %1, i64 %480
  %482 = load i8, ptr %481, align 1, !tbaa !5
  %483 = getelementptr i8, ptr %481, i64 1
  %484 = load i8, ptr %483, align 1, !tbaa !5
  %485 = getelementptr i8, ptr %481, i64 2
  %486 = load i8, ptr %485, align 1, !tbaa !5
  %487 = uitofp i8 %482 to float
  %488 = uitofp i8 %484 to float
  %489 = uitofp i8 %486 to float
  %490 = call noundef float @_ZN12_GLOBAL__N_15rgb2yEfff(float noundef %487, float noundef %488, float noundef %489)
  %491 = fadd float %490, -1.280000e+02
  %492 = getelementptr inbounds [8 x [8 x float]], ptr %22, i64 0, i64 %indvars.iv394, i64 4
  store float %491, ptr %492, align 16, !tbaa !14
  %493 = call noundef float @_ZN12_GLOBAL__N_16rgb2cbEfff(float noundef %487, float noundef %488, float noundef %489)
  %494 = getelementptr inbounds [8 x [8 x float]], ptr %23, i64 0, i64 %indvars.iv394, i64 4
  store float %493, ptr %494, align 16, !tbaa !14
  %495 = call noundef float @_ZN12_GLOBAL__N_16rgb2crEfff(float noundef %487, float noundef %488, float noundef %489)
  %496 = getelementptr inbounds [8 x [8 x float]], ptr %24, i64 0, i64 %indvars.iv394, i64 4
  store float %495, ptr %496, align 16, !tbaa !14
  %497 = add nsw i32 %spec.select271.us.us293.us.us.us.4, %391
  %498 = icmp slt i32 %spec.select271.us.us293.us.us.us.4, %222
  %499 = zext i1 %498 to i32
  %spec.select271.us.us293.us.us.us.5 = add nsw i32 %spec.select271.us.us293.us.us.us.4, %499
  %500 = mul nsw i32 %497, 3
  %501 = sext i32 %500 to i64
  %502 = getelementptr inbounds i8, ptr %1, i64 %501
  %503 = load i8, ptr %502, align 1, !tbaa !5
  %504 = getelementptr i8, ptr %502, i64 1
  %505 = load i8, ptr %504, align 1, !tbaa !5
  %506 = getelementptr i8, ptr %502, i64 2
  %507 = load i8, ptr %506, align 1, !tbaa !5
  %508 = uitofp i8 %503 to float
  %509 = uitofp i8 %505 to float
  %510 = uitofp i8 %507 to float
  %511 = call noundef float @_ZN12_GLOBAL__N_15rgb2yEfff(float noundef %508, float noundef %509, float noundef %510)
  %512 = fadd float %511, -1.280000e+02
  %513 = getelementptr inbounds [8 x [8 x float]], ptr %22, i64 0, i64 %indvars.iv394, i64 5
  store float %512, ptr %513, align 4, !tbaa !14
  %514 = call noundef float @_ZN12_GLOBAL__N_16rgb2cbEfff(float noundef %508, float noundef %509, float noundef %510)
  %515 = getelementptr inbounds [8 x [8 x float]], ptr %23, i64 0, i64 %indvars.iv394, i64 5
  store float %514, ptr %515, align 4, !tbaa !14
  %516 = call noundef float @_ZN12_GLOBAL__N_16rgb2crEfff(float noundef %508, float noundef %509, float noundef %510)
  %517 = getelementptr inbounds [8 x [8 x float]], ptr %24, i64 0, i64 %indvars.iv394, i64 5
  store float %516, ptr %517, align 4, !tbaa !14
  %518 = add nsw i32 %spec.select271.us.us293.us.us.us.5, %391
  %519 = icmp slt i32 %spec.select271.us.us293.us.us.us.5, %222
  %520 = zext i1 %519 to i32
  %spec.select271.us.us293.us.us.us.6 = add nsw i32 %spec.select271.us.us293.us.us.us.5, %520
  %521 = mul nsw i32 %518, 3
  %522 = sext i32 %521 to i64
  %523 = getelementptr inbounds i8, ptr %1, i64 %522
  %524 = load i8, ptr %523, align 1, !tbaa !5
  %525 = getelementptr i8, ptr %523, i64 1
  %526 = load i8, ptr %525, align 1, !tbaa !5
  %527 = getelementptr i8, ptr %523, i64 2
  %528 = load i8, ptr %527, align 1, !tbaa !5
  %529 = uitofp i8 %524 to float
  %530 = uitofp i8 %526 to float
  %531 = uitofp i8 %528 to float
  %532 = call noundef float @_ZN12_GLOBAL__N_15rgb2yEfff(float noundef %529, float noundef %530, float noundef %531)
  %533 = fadd float %532, -1.280000e+02
  %534 = getelementptr inbounds [8 x [8 x float]], ptr %22, i64 0, i64 %indvars.iv394, i64 6
  store float %533, ptr %534, align 8, !tbaa !14
  %535 = call noundef float @_ZN12_GLOBAL__N_16rgb2cbEfff(float noundef %529, float noundef %530, float noundef %531)
  %536 = getelementptr inbounds [8 x [8 x float]], ptr %23, i64 0, i64 %indvars.iv394, i64 6
  store float %535, ptr %536, align 8, !tbaa !14
  %537 = call noundef float @_ZN12_GLOBAL__N_16rgb2crEfff(float noundef %529, float noundef %530, float noundef %531)
  %538 = getelementptr inbounds [8 x [8 x float]], ptr %24, i64 0, i64 %indvars.iv394, i64 6
  store float %537, ptr %538, align 8, !tbaa !14
  %539 = add nsw i32 %spec.select271.us.us293.us.us.us.6, %391
  %540 = mul nsw i32 %539, 3
  %541 = sext i32 %540 to i64
  %542 = getelementptr inbounds i8, ptr %1, i64 %541
  %543 = load i8, ptr %542, align 1, !tbaa !5
  %544 = getelementptr i8, ptr %542, i64 1
  %545 = load i8, ptr %544, align 1, !tbaa !5
  %546 = getelementptr i8, ptr %542, i64 2
  %547 = load i8, ptr %546, align 1, !tbaa !5
  %548 = uitofp i8 %543 to float
  %549 = uitofp i8 %545 to float
  %550 = uitofp i8 %547 to float
  %551 = call noundef float @_ZN12_GLOBAL__N_15rgb2yEfff(float noundef %548, float noundef %549, float noundef %550)
  %552 = fadd float %551, -1.280000e+02
  %553 = getelementptr inbounds [8 x [8 x float]], ptr %22, i64 0, i64 %indvars.iv394, i64 7
  store float %552, ptr %553, align 4, !tbaa !14
  %554 = call noundef float @_ZN12_GLOBAL__N_16rgb2cbEfff(float noundef %548, float noundef %549, float noundef %550)
  %555 = getelementptr inbounds [8 x [8 x float]], ptr %23, i64 0, i64 %indvars.iv394, i64 7
  store float %554, ptr %555, align 4, !tbaa !14
  %556 = call noundef float @_ZN12_GLOBAL__N_16rgb2crEfff(float noundef %548, float noundef %549, float noundef %550)
  %557 = getelementptr inbounds [8 x [8 x float]], ptr %24, i64 0, i64 %indvars.iv394, i64 7
  store float %556, ptr %557, align 4, !tbaa !14
  %indvars.iv.next395 = add nuw nsw i64 %indvars.iv394, 1
  %exitcond397.not = icmp eq i64 %indvars.iv.next395, 8
  br i1 %exitcond397.not, label %.split297.us.split.us302.us.us, label %.split.us.us.us300.us.us, !llvm.loop !25

.split297.us.split.us302.us.us:                   ; preds = %.split.us.us.us300.us.us
  %558 = call noundef signext i16 @_ZN12_GLOBAL__N_111encodeBlockERNS_9BitWriterEPA8_fPKfsPKNS_7BitCodeES8_S8_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull %22, ptr noundef nonnull %17, i16 noundef signext %.3299.us.us310.us, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %221)
  %559 = add nuw nsw i32 %.0245298.us.us311.us, 8
  %560 = icmp ult i32 %559, %224
  br i1 %560, label %.preheader.us.us309.us, label %.split305.us.split.us312.us, !llvm.loop !24

.split305.us.split.us312.us:                      ; preds = %.split297.us.split.us302.us.us
  %indvars.iv.next399 = add nuw nsw i64 %indvars.iv398, 8
  %561 = icmp ult i64 %indvars.iv.next399, %226
  br i1 %561, label %.preheader272.us.us341, label %.split316.us335, !llvm.loop !23

.preheader272.us.us.us:                           ; preds = %.preheader274.split.us.us, %.split305.us.split.us.us.us.us
  %indvars.iv408 = phi i64 [ %indvars.iv.next409, %.split305.us.split.us.us.us.us ], [ 0, %.preheader274.split.us.us ]
  %.2308.us.us.us = phi i16 [ %703, %.split305.us.split.us.us.us.us ], [ %.1241327.us, %.preheader274.split.us.us ]
  %562 = add nuw nsw i64 %indvars.iv408, %indvars.iv417
  br label %.preheader.us.us.us.us.us

.preheader.us.us.us.us.us:                        ; preds = %.split297.us.split.us.us.us.us.us.us, %.preheader272.us.us.us
  %.3299.us.us.us.us.us = phi i16 [ %.2308.us.us.us, %.preheader272.us.us.us ], [ %703, %.split297.us.split.us.us.us.us.us.us ]
  %.0245298.us.us.us.us.us = phi i32 [ 0, %.preheader272.us.us.us ], [ %704, %.split297.us.split.us.us.us.us.us.us ]
  %563 = add nuw nsw i32 %.0245298.us.us.us.us.us, %.0247325.us
  br label %.split.us.us.us.us.us.us.us.us

.split.us.us.us.us.us.us.us.us:                   ; preds = %.split.us.us.us.us.us.us.us.us, %.preheader.us.us.us.us.us
  %indvars.iv404 = phi i64 [ %indvars.iv.next405, %.split.us.us.us.us.us.us.us.us ], [ 0, %.preheader.us.us.us.us.us ]
  %564 = call noundef i32 @_ZN12_GLOBAL__N_17minimumIiEET_S1_S1_(i32 noundef %563, i32 noundef %222)
  %565 = add nuw nsw i64 %indvars.iv404, %562
  %566 = trunc nuw i64 %565 to i32
  %567 = call noundef i32 @_ZN12_GLOBAL__N_17minimumIiEET_S1_S1_(i32 noundef %566, i32 noundef %223)
  %568 = mul nsw i32 %567, %28
  %569 = add nsw i32 %564, %568
  %570 = icmp slt i32 %564, %222
  %571 = zext i1 %570 to i32
  %spec.select271.us.us.us.us.us.us.us.us.us = add nsw i32 %564, %571
  %572 = mul nsw i32 %569, 3
  %573 = sext i32 %572 to i64
  %574 = getelementptr inbounds i8, ptr %1, i64 %573
  %575 = load i8, ptr %574, align 1, !tbaa !5
  %576 = getelementptr i8, ptr %574, i64 1
  %577 = load i8, ptr %576, align 1, !tbaa !5
  %578 = getelementptr i8, ptr %574, i64 2
  %579 = load i8, ptr %578, align 1, !tbaa !5
  %580 = uitofp i8 %575 to float
  %581 = uitofp i8 %577 to float
  %582 = uitofp i8 %579 to float
  %583 = call noundef float @_ZN12_GLOBAL__N_15rgb2yEfff(float noundef %580, float noundef %581, float noundef %582)
  %584 = fadd float %583, -1.280000e+02
  %585 = getelementptr inbounds [8 x [8 x float]], ptr %22, i64 0, i64 %indvars.iv404, i64 0
  store float %584, ptr %585, align 16, !tbaa !14
  %586 = add nsw i32 %spec.select271.us.us.us.us.us.us.us.us.us, %568
  %587 = icmp slt i32 %spec.select271.us.us.us.us.us.us.us.us.us, %222
  %588 = zext i1 %587 to i32
  %spec.select271.us.us.us.us.us.us.us.us.us.1 = add nsw i32 %spec.select271.us.us.us.us.us.us.us.us.us, %588
  %589 = mul nsw i32 %586, 3
  %590 = sext i32 %589 to i64
  %591 = getelementptr inbounds i8, ptr %1, i64 %590
  %592 = load i8, ptr %591, align 1, !tbaa !5
  %593 = getelementptr i8, ptr %591, i64 1
  %594 = load i8, ptr %593, align 1, !tbaa !5
  %595 = getelementptr i8, ptr %591, i64 2
  %596 = load i8, ptr %595, align 1, !tbaa !5
  %597 = uitofp i8 %592 to float
  %598 = uitofp i8 %594 to float
  %599 = uitofp i8 %596 to float
  %600 = call noundef float @_ZN12_GLOBAL__N_15rgb2yEfff(float noundef %597, float noundef %598, float noundef %599)
  %601 = fadd float %600, -1.280000e+02
  %602 = getelementptr inbounds [8 x [8 x float]], ptr %22, i64 0, i64 %indvars.iv404, i64 1
  store float %601, ptr %602, align 4, !tbaa !14
  %603 = add nsw i32 %spec.select271.us.us.us.us.us.us.us.us.us.1, %568
  %604 = icmp slt i32 %spec.select271.us.us.us.us.us.us.us.us.us.1, %222
  %605 = zext i1 %604 to i32
  %spec.select271.us.us.us.us.us.us.us.us.us.2 = add nsw i32 %spec.select271.us.us.us.us.us.us.us.us.us.1, %605
  %606 = mul nsw i32 %603, 3
  %607 = sext i32 %606 to i64
  %608 = getelementptr inbounds i8, ptr %1, i64 %607
  %609 = load i8, ptr %608, align 1, !tbaa !5
  %610 = getelementptr i8, ptr %608, i64 1
  %611 = load i8, ptr %610, align 1, !tbaa !5
  %612 = getelementptr i8, ptr %608, i64 2
  %613 = load i8, ptr %612, align 1, !tbaa !5
  %614 = uitofp i8 %609 to float
  %615 = uitofp i8 %611 to float
  %616 = uitofp i8 %613 to float
  %617 = call noundef float @_ZN12_GLOBAL__N_15rgb2yEfff(float noundef %614, float noundef %615, float noundef %616)
  %618 = fadd float %617, -1.280000e+02
  %619 = getelementptr inbounds [8 x [8 x float]], ptr %22, i64 0, i64 %indvars.iv404, i64 2
  store float %618, ptr %619, align 8, !tbaa !14
  %620 = add nsw i32 %spec.select271.us.us.us.us.us.us.us.us.us.2, %568
  %621 = icmp slt i32 %spec.select271.us.us.us.us.us.us.us.us.us.2, %222
  %622 = zext i1 %621 to i32
  %spec.select271.us.us.us.us.us.us.us.us.us.3 = add nsw i32 %spec.select271.us.us.us.us.us.us.us.us.us.2, %622
  %623 = mul nsw i32 %620, 3
  %624 = sext i32 %623 to i64
  %625 = getelementptr inbounds i8, ptr %1, i64 %624
  %626 = load i8, ptr %625, align 1, !tbaa !5
  %627 = getelementptr i8, ptr %625, i64 1
  %628 = load i8, ptr %627, align 1, !tbaa !5
  %629 = getelementptr i8, ptr %625, i64 2
  %630 = load i8, ptr %629, align 1, !tbaa !5
  %631 = uitofp i8 %626 to float
  %632 = uitofp i8 %628 to float
  %633 = uitofp i8 %630 to float
  %634 = call noundef float @_ZN12_GLOBAL__N_15rgb2yEfff(float noundef %631, float noundef %632, float noundef %633)
  %635 = fadd float %634, -1.280000e+02
  %636 = getelementptr inbounds [8 x [8 x float]], ptr %22, i64 0, i64 %indvars.iv404, i64 3
  store float %635, ptr %636, align 4, !tbaa !14
  %637 = add nsw i32 %spec.select271.us.us.us.us.us.us.us.us.us.3, %568
  %638 = icmp slt i32 %spec.select271.us.us.us.us.us.us.us.us.us.3, %222
  %639 = zext i1 %638 to i32
  %spec.select271.us.us.us.us.us.us.us.us.us.4 = add nsw i32 %spec.select271.us.us.us.us.us.us.us.us.us.3, %639
  %640 = mul nsw i32 %637, 3
  %641 = sext i32 %640 to i64
  %642 = getelementptr inbounds i8, ptr %1, i64 %641
  %643 = load i8, ptr %642, align 1, !tbaa !5
  %644 = getelementptr i8, ptr %642, i64 1
  %645 = load i8, ptr %644, align 1, !tbaa !5
  %646 = getelementptr i8, ptr %642, i64 2
  %647 = load i8, ptr %646, align 1, !tbaa !5
  %648 = uitofp i8 %643 to float
  %649 = uitofp i8 %645 to float
  %650 = uitofp i8 %647 to float
  %651 = call noundef float @_ZN12_GLOBAL__N_15rgb2yEfff(float noundef %648, float noundef %649, float noundef %650)
  %652 = fadd float %651, -1.280000e+02
  %653 = getelementptr inbounds [8 x [8 x float]], ptr %22, i64 0, i64 %indvars.iv404, i64 4
  store float %652, ptr %653, align 16, !tbaa !14
  %654 = add nsw i32 %spec.select271.us.us.us.us.us.us.us.us.us.4, %568
  %655 = icmp slt i32 %spec.select271.us.us.us.us.us.us.us.us.us.4, %222
  %656 = zext i1 %655 to i32
  %spec.select271.us.us.us.us.us.us.us.us.us.5 = add nsw i32 %spec.select271.us.us.us.us.us.us.us.us.us.4, %656
  %657 = mul nsw i32 %654, 3
  %658 = sext i32 %657 to i64
  %659 = getelementptr inbounds i8, ptr %1, i64 %658
  %660 = load i8, ptr %659, align 1, !tbaa !5
  %661 = getelementptr i8, ptr %659, i64 1
  %662 = load i8, ptr %661, align 1, !tbaa !5
  %663 = getelementptr i8, ptr %659, i64 2
  %664 = load i8, ptr %663, align 1, !tbaa !5
  %665 = uitofp i8 %660 to float
  %666 = uitofp i8 %662 to float
  %667 = uitofp i8 %664 to float
  %668 = call noundef float @_ZN12_GLOBAL__N_15rgb2yEfff(float noundef %665, float noundef %666, float noundef %667)
  %669 = fadd float %668, -1.280000e+02
  %670 = getelementptr inbounds [8 x [8 x float]], ptr %22, i64 0, i64 %indvars.iv404, i64 5
  store float %669, ptr %670, align 4, !tbaa !14
  %671 = add nsw i32 %spec.select271.us.us.us.us.us.us.us.us.us.5, %568
  %672 = icmp slt i32 %spec.select271.us.us.us.us.us.us.us.us.us.5, %222
  %673 = zext i1 %672 to i32
  %spec.select271.us.us.us.us.us.us.us.us.us.6 = add nsw i32 %spec.select271.us.us.us.us.us.us.us.us.us.5, %673
  %674 = mul nsw i32 %671, 3
  %675 = sext i32 %674 to i64
  %676 = getelementptr inbounds i8, ptr %1, i64 %675
  %677 = load i8, ptr %676, align 1, !tbaa !5
  %678 = getelementptr i8, ptr %676, i64 1
  %679 = load i8, ptr %678, align 1, !tbaa !5
  %680 = getelementptr i8, ptr %676, i64 2
  %681 = load i8, ptr %680, align 1, !tbaa !5
  %682 = uitofp i8 %677 to float
  %683 = uitofp i8 %679 to float
  %684 = uitofp i8 %681 to float
  %685 = call noundef float @_ZN12_GLOBAL__N_15rgb2yEfff(float noundef %682, float noundef %683, float noundef %684)
  %686 = fadd float %685, -1.280000e+02
  %687 = getelementptr inbounds [8 x [8 x float]], ptr %22, i64 0, i64 %indvars.iv404, i64 6
  store float %686, ptr %687, align 8, !tbaa !14
  %688 = add nsw i32 %spec.select271.us.us.us.us.us.us.us.us.us.6, %568
  %689 = mul nsw i32 %688, 3
  %690 = sext i32 %689 to i64
  %691 = getelementptr inbounds i8, ptr %1, i64 %690
  %692 = load i8, ptr %691, align 1, !tbaa !5
  %693 = getelementptr i8, ptr %691, i64 1
  %694 = load i8, ptr %693, align 1, !tbaa !5
  %695 = getelementptr i8, ptr %691, i64 2
  %696 = load i8, ptr %695, align 1, !tbaa !5
  %697 = uitofp i8 %692 to float
  %698 = uitofp i8 %694 to float
  %699 = uitofp i8 %696 to float
  %700 = call noundef float @_ZN12_GLOBAL__N_15rgb2yEfff(float noundef %697, float noundef %698, float noundef %699)
  %701 = fadd float %700, -1.280000e+02
  %702 = getelementptr inbounds [8 x [8 x float]], ptr %22, i64 0, i64 %indvars.iv404, i64 7
  store float %701, ptr %702, align 4, !tbaa !14
  %indvars.iv.next405 = add nuw nsw i64 %indvars.iv404, 1
  %exitcond407.not = icmp eq i64 %indvars.iv.next405, 8
  br i1 %exitcond407.not, label %.split297.us.split.us.us.us.us.us.us, label %.split.us.us.us.us.us.us.us.us, !llvm.loop !25

.split297.us.split.us.us.us.us.us.us:             ; preds = %.split.us.us.us.us.us.us.us.us
  %703 = call noundef signext i16 @_ZN12_GLOBAL__N_111encodeBlockERNS_9BitWriterEPA8_fPKfsPKNS_7BitCodeES8_S8_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull %22, ptr noundef nonnull %17, i16 noundef signext %.3299.us.us.us.us.us, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %221)
  %704 = add nuw nsw i32 %.0245298.us.us.us.us.us, 8
  %705 = icmp ult i32 %704, %224
  br i1 %705, label %.preheader.us.us.us.us.us, label %.split305.us.split.us.us.us.us, !llvm.loop !24

.split305.us.split.us.us.us.us:                   ; preds = %.split297.us.split.us.us.us.us.us.us
  %indvars.iv.next409 = add nuw nsw i64 %indvars.iv408, 8
  %706 = icmp ult i64 %indvars.iv.next409, %226
  br i1 %706, label %.preheader272.us.us.us, label %.split316.us335, !llvm.loop !23

._crit_edge.us:                                   ; preds = %232
  %indvars.iv.next418 = add nuw nsw i64 %indvars.iv417, %226
  %707 = icmp ult i64 %indvars.iv.next418, %227
  br i1 %707, label %.preheader275.us, label %._crit_edge334, !llvm.loop !26

708:                                              ; preds = %middle.block, %708
  %indvars.iv377 = phi i64 [ 1, %middle.block ], [ %indvars.iv.next378, %708 ]
  %.0234285 = phi i8 [ 1, %middle.block ], [ %.1235, %708 ]
  %.0236284 = phi i32 [ 1, %middle.block ], [ %.1237, %708 ]
  %709 = trunc nuw nsw i64 %indvars.iv377 to i32
  %710 = icmp slt i32 %.0236284, %709
  %711 = shl i32 %.0236284, 1
  %712 = or disjoint i32 %711, 1
  %.1237 = select i1 %710, i32 %712, i32 %.0236284
  %713 = zext i1 %710 to i8
  %.1235 = add i8 %.0234285, %713
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #4
  %714 = trunc i32 %.1237 to i16
  %715 = trunc nuw nsw i64 %indvars.iv377 to i16
  %716 = sub i16 %714, %715
  call void @_ZN12_GLOBAL__N_17BitCodeC2Eth(ptr noundef nonnull align 2 dereferenceable(3) %20, i16 noundef zeroext %716, i8 noundef zeroext %.1235)
  %.neg = mul i64 %indvars.iv377, -4294967296
  %717 = ashr exact i64 %.neg, 30
  %718 = getelementptr inbounds i8, ptr %221, i64 %717
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(3) %718, ptr noundef nonnull align 2 dereferenceable(3) %20, i64 3, i1 false), !tbaa.struct !27
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #4
  call void @_ZN12_GLOBAL__N_17BitCodeC2Eth(ptr noundef nonnull align 2 dereferenceable(3) %21, i16 noundef zeroext %715, i8 noundef zeroext %.1235)
  %719 = getelementptr inbounds %"struct.(anonymous namespace)::BitCode", ptr %221, i64 %indvars.iv377
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(3) %719, ptr noundef nonnull align 2 dereferenceable(3) %21, i64 3, i1 false), !tbaa.struct !27
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #4
  %indvars.iv.next378 = add nuw nsw i64 %indvars.iv377, 1
  %exitcond379.not = icmp eq i64 %indvars.iv.next378, 2048
  br i1 %exitcond379.not, label %.preheader275.us.preheader, label %708, !llvm.loop !30

._crit_edge334:                                   ; preds = %._crit_edge.us
  call void @_ZN12_GLOBAL__N_19BitWriter5flushEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
  %720 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 noundef zeroext -1)
  %721 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16) %720, i8 noundef zeroext -39)
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %24) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %23) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %22) #4
  call void @llvm.lifetime.end.p0(i64 16384, ptr nonnull %19) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #4
  br label %722

722:                                              ; preds = %27, %8, %._crit_edge334
  %.0 = phi i1 [ true, %._crit_edge334 ], [ false, %8 ], [ false, %27 ]
  ret i1 %.0
}

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN12_GLOBAL__N_19BitWriterC2EPFvhE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi20EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(20)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_19BitWriter9addMarkerEht(ptr noundef nonnull align 8 dereferenceable(16), i8 noundef zeroext, i16 noundef zeroext) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsEh(ptr noundef nonnull align 8 dereferenceable(16), i8 noundef zeroext) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i16 @_ZN12_GLOBAL__N_15clampItiEET_S1_T0_S2_(i16 noundef zeroext, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN12_GLOBAL__N_15clampIiiEET_S1_T0_S2_(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIhLi64EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(64)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi16EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi12EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(12)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi162EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(162)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_120generateHuffmanTableEPKhS1_PNS_7BitCodeE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(16) ptr @_ZN12_GLOBAL__N_19BitWriterlsIKhLi3EEERS0_RAT0__T_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(3)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN12_GLOBAL__N_17BitCodeC2Eth(ptr noundef nonnull align 2 dereferenceable(3), i16 noundef zeroext, i8 noundef zeroext) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN12_GLOBAL__N_17minimumIiEET_S1_S1_(i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef float @_ZN12_GLOBAL__N_15rgb2yEfff(float noundef, float noundef, float noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef float @_ZN12_GLOBAL__N_16rgb2cbEfff(float noundef, float noundef, float noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef float @_ZN12_GLOBAL__N_16rgb2crEfff(float noundef, float noundef, float noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef signext i16 @_ZN12_GLOBAL__N_111encodeBlockERNS_9BitWriterEPA8_fPKfsPKNS_7BitCodeES8_S8_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef, i16 noundef signext, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_19BitWriter5flushEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}
!11 = distinct !{!11, !9}
!12 = distinct !{!12, !9, !13}
!13 = !{!"llvm.loop.peeled.count", i32 1}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !6, i64 0}
!16 = distinct !{!16, !9, !17, !18}
!17 = !{!"llvm.loop.isvectorized", i32 1}
!18 = !{!"llvm.loop.unroll.runtime.disable"}
!19 = distinct !{!19, !9, !13}
!20 = distinct !{!20, !9}
!21 = distinct !{!21, !9}
!22 = distinct !{!22, !9}
!23 = distinct !{!23, !9}
!24 = distinct !{!24, !9}
!25 = distinct !{!25, !9}
!26 = distinct !{!26, !9}
!27 = !{i64 0, i64 2, !28, i64 2, i64 1, !5}
!28 = !{!29, !29, i64 0}
!29 = !{!"short", !6, i64 0}
!30 = distinct !{!30, !9}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass