; LLVM IR from ermig1979/Simd :: src/Simd (SimdBaseImageSaveJpeg)

; 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.Simd::Base::BitBuf" = type { i32, [2048 x [2 x i16]] }

@_ZN4Simd4Base10HuffmanYdcE = external dso_local constant <{ [12 x [2 x i16]], [244 x [2 x i16]] }>, align 16
@_ZN4Simd4Base11HuffmanUVdcE = external dso_local constant <{ [12 x [2 x i16]], [244 x [2 x i16]] }>, align 16
@_ZN4Simd4Base10HuffmanYacE = external dso_local constant [256 x [2 x i16]], align 16
@_ZN4Simd4Base11HuffmanUVacE = external dso_local constant [256 x [2 x i16]], align 16

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Simd4Base18JpegWriteBlockSubsERNS_18OutputMemoryStreamEiiPKhS4_S4_iPKfS6_Pi(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, i32 noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) #1 {
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca [256 x float], align 16
  %25 = alloca [256 x float], align 16
  %26 = alloca [256 x float], align 16
  %27 = alloca [64 x float], align 16
  %28 = alloca [64 x float], align 16
  %29 = alloca i8, align 1
  %30 = alloca %"struct.Simd::Base::BitBuf", align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  store ptr %0, ptr %11, align 8, !tbaa !5
  store i32 %1, ptr %12, align 4, !tbaa !9
  store i32 %2, ptr %13, align 4, !tbaa !9
  store ptr %3, ptr %14, align 8, !tbaa !5
  store ptr %4, ptr %15, align 8, !tbaa !5
  store ptr %5, ptr %16, align 8, !tbaa !5
  store i32 %6, ptr %17, align 4, !tbaa !9
  store ptr %7, ptr %18, align 8, !tbaa !5
  store ptr %8, ptr %19, align 8, !tbaa !5
  store ptr %9, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %38 = load ptr, ptr %20, align 8, !tbaa !5
  %39 = getelementptr inbounds i32, ptr %38, i64 0
  store ptr %39, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %40 = load ptr, ptr %20, align 8, !tbaa !5
  %41 = getelementptr inbounds i32, ptr %40, i64 1
  store ptr %41, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %42 = load ptr, ptr %20, align 8, !tbaa !5
  %43 = getelementptr inbounds i32, ptr %42, i64 2
  store ptr %43, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1024, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 1024, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 1024, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 256, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 256, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #4
  %44 = load ptr, ptr %14, align 8, !tbaa !5
  %45 = load ptr, ptr %15, align 8, !tbaa !5
  %46 = icmp eq ptr %44, %45
  br i1 %46, label %47, label %51

47:                                               ; preds = %10
  %48 = load ptr, ptr %14, align 8, !tbaa !5
  %49 = load ptr, ptr %16, align 8, !tbaa !5
  %50 = icmp eq ptr %48, %49
  br label %51

51:                                               ; preds = %47, %10
  %52 = phi i1 [ false, %10 ], [ %50, %47 ]
  %53 = zext i1 %52 to i8
  store i8 %53, ptr %29, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8196, ptr %30) #4
  call void @_ZN4Simd4Base6BitBufC2Ev(ptr noundef nonnull align 4 dereferenceable(8196) %30)
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #4
  store i32 0, ptr %31, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %242, %51
  %55 = load i32, ptr %31, align 4, !tbaa !9
  %56 = load i32, ptr %13, align 4, !tbaa !9
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  store i32 2, ptr %32, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #4
  br label %245

59:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #4
  store i32 0, ptr %33, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %238, %59
  %61 = load i32, ptr %33, align 4, !tbaa !9
  %62 = load i32, ptr %12, align 4, !tbaa !9
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %65, label %64

64:                                               ; preds = %60
  store i32 5, ptr %32, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #4
  br label %241

65:                                               ; preds = %60
  %66 = load i8, ptr %29, align 1, !tbaa !11, !range !13, !noundef !14
  %67 = trunc i8 %66 to i1
  br i1 %67, label %68, label %81

68:                                               ; preds = %65
  %69 = load ptr, ptr %14, align 8, !tbaa !5
  %70 = load i32, ptr %33, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i8, ptr %69, i64 %71
  %73 = load i32, ptr %17, align 4, !tbaa !9
  %74 = load i32, ptr %13, align 4, !tbaa !9
  %75 = load i32, ptr %31, align 4, !tbaa !9
  %76 = sub nsw i32 %74, %75
  %77 = load i32, ptr %12, align 4, !tbaa !9
  %78 = load i32, ptr %33, align 4, !tbaa !9
  %79 = sub nsw i32 %77, %78
  %80 = getelementptr inbounds [256 x float], ptr %24, i64 0, i64 0
  call void @_ZN4Simd4Base7GrayToYEPKhiiiPfi(ptr noundef %72, i32 noundef %73, i32 noundef %76, i32 noundef %79, ptr noundef %80, i32 noundef 16)
  br label %104

81:                                               ; preds = %65
  %82 = load ptr, ptr %14, align 8, !tbaa !5
  %83 = load i32, ptr %33, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds i8, ptr %82, i64 %84
  %86 = load ptr, ptr %15, align 8, !tbaa !5
  %87 = load i32, ptr %33, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i8, ptr %86, i64 %88
  %90 = load ptr, ptr %16, align 8, !tbaa !5
  %91 = load i32, ptr %33, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds i8, ptr %90, i64 %92
  %94 = load i32, ptr %17, align 4, !tbaa !9
  %95 = load i32, ptr %13, align 4, !tbaa !9
  %96 = load i32, ptr %31, align 4, !tbaa !9
  %97 = sub nsw i32 %95, %96
  %98 = load i32, ptr %12, align 4, !tbaa !9
  %99 = load i32, ptr %33, align 4, !tbaa !9
  %100 = sub nsw i32 %98, %99
  %101 = getelementptr inbounds [256 x float], ptr %24, i64 0, i64 0
  %102 = getelementptr inbounds [256 x float], ptr %25, i64 0, i64 0
  %103 = getelementptr inbounds [256 x float], ptr %26, i64 0, i64 0
  call void @_ZN4Simd4Base8RgbToYuvEPKhS2_S2_iiiPfS3_S3_i(ptr noundef %85, ptr noundef %89, ptr noundef %93, i32 noundef %94, i32 noundef %97, i32 noundef %100, ptr noundef %101, ptr noundef %102, ptr noundef %103, i32 noundef 16)
  br label %104

104:                                              ; preds = %81, %68
  %105 = getelementptr inbounds [256 x float], ptr %24, i64 0, i64 0
  %106 = getelementptr inbounds float, ptr %105, i64 0
  %107 = load ptr, ptr %18, align 8, !tbaa !5
  %108 = load ptr, ptr %21, align 8, !tbaa !5
  %109 = load i32, ptr %108, align 4, !tbaa !9
  %110 = call noundef i32 @_ZN4Simd4BaseL13JpegProcessDuERNS0_6BitBufEPfiPKfiPA2_KtS8_(ptr noundef nonnull align 4 dereferenceable(8196) %30, ptr noundef %106, i32 noundef 16, ptr noundef %107, i32 noundef %109, ptr noundef @_ZN4Simd4Base10HuffmanYdcE, ptr noundef @_ZN4Simd4Base10HuffmanYacE)
  %111 = load ptr, ptr %21, align 8, !tbaa !5
  store i32 %110, ptr %111, align 4, !tbaa !9
  %112 = getelementptr inbounds [256 x float], ptr %24, i64 0, i64 0
  %113 = getelementptr inbounds float, ptr %112, i64 8
  %114 = load ptr, ptr %18, align 8, !tbaa !5
  %115 = load ptr, ptr %21, align 8, !tbaa !5
  %116 = load i32, ptr %115, align 4, !tbaa !9
  %117 = call noundef i32 @_ZN4Simd4BaseL13JpegProcessDuERNS0_6BitBufEPfiPKfiPA2_KtS8_(ptr noundef nonnull align 4 dereferenceable(8196) %30, ptr noundef %113, i32 noundef 16, ptr noundef %114, i32 noundef %116, ptr noundef @_ZN4Simd4Base10HuffmanYdcE, ptr noundef @_ZN4Simd4Base10HuffmanYacE)
  %118 = load ptr, ptr %21, align 8, !tbaa !5
  store i32 %117, ptr %118, align 4, !tbaa !9
  %119 = getelementptr inbounds [256 x float], ptr %24, i64 0, i64 0
  %120 = getelementptr inbounds float, ptr %119, i64 128
  %121 = load ptr, ptr %18, align 8, !tbaa !5
  %122 = load ptr, ptr %21, align 8, !tbaa !5
  %123 = load i32, ptr %122, align 4, !tbaa !9
  %124 = call noundef i32 @_ZN4Simd4BaseL13JpegProcessDuERNS0_6BitBufEPfiPKfiPA2_KtS8_(ptr noundef nonnull align 4 dereferenceable(8196) %30, ptr noundef %120, i32 noundef 16, ptr noundef %121, i32 noundef %123, ptr noundef @_ZN4Simd4Base10HuffmanYdcE, ptr noundef @_ZN4Simd4Base10HuffmanYacE)
  %125 = load ptr, ptr %21, align 8, !tbaa !5
  store i32 %124, ptr %125, align 4, !tbaa !9
  %126 = getelementptr inbounds [256 x float], ptr %24, i64 0, i64 0
  %127 = getelementptr inbounds float, ptr %126, i64 136
  %128 = load ptr, ptr %18, align 8, !tbaa !5
  %129 = load ptr, ptr %21, align 8, !tbaa !5
  %130 = load i32, ptr %129, align 4, !tbaa !9
  %131 = call noundef i32 @_ZN4Simd4BaseL13JpegProcessDuERNS0_6BitBufEPfiPKfiPA2_KtS8_(ptr noundef nonnull align 4 dereferenceable(8196) %30, ptr noundef %127, i32 noundef 16, ptr noundef %128, i32 noundef %130, ptr noundef @_ZN4Simd4Base10HuffmanYdcE, ptr noundef @_ZN4Simd4Base10HuffmanYacE)
  %132 = load ptr, ptr %21, align 8, !tbaa !5
  store i32 %131, ptr %132, align 4, !tbaa !9
  %133 = load i8, ptr %29, align 1, !tbaa !11, !range !13, !noundef !14
  %134 = trunc i8 %133 to i1
  br i1 %134, label %135, label %136

135:                                              ; preds = %104
  call void @_ZN4Simd4Base19JpegProcessDuGrayUvERNS0_6BitBufE(ptr noundef nonnull align 4 dereferenceable(8196) %30)
  br label %228

136:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #4
  store i32 0, ptr %34, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #4
  store i32 0, ptr %35, align 4, !tbaa !9
  br label %137

137:                                              ; preds = %212, %136
  %138 = load i32, ptr %34, align 4, !tbaa !9
  %139 = icmp slt i32 %138, 8
  br i1 %139, label %141, label %140

140:                                              ; preds = %137
  store i32 8, ptr %32, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #4
  br label %215

141:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #4
  store i32 0, ptr %36, align 4, !tbaa !9
  br label %142

142:                                              ; preds = %206, %141
  %143 = load i32, ptr %36, align 4, !tbaa !9
  %144 = icmp slt i32 %143, 8
  br i1 %144, label %146, label %145

145:                                              ; preds = %142
  store i32 11, ptr %32, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #4
  br label %211

146:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #4
  %147 = load i32, ptr %34, align 4, !tbaa !9
  %148 = mul nsw i32 %147, 32
  %149 = load i32, ptr %36, align 4, !tbaa !9
  %150 = mul nsw i32 %149, 2
  %151 = add nsw i32 %148, %150
  store i32 %151, ptr %37, align 4, !tbaa !9
  %152 = load i32, ptr %37, align 4, !tbaa !9
  %153 = add nsw i32 %152, 0
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [256 x float], ptr %25, i64 0, i64 %154
  %156 = load float, ptr %155, align 4, !tbaa !15
  %157 = load i32, ptr %37, align 4, !tbaa !9
  %158 = add nsw i32 %157, 1
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [256 x float], ptr %25, i64 0, i64 %159
  %161 = load float, ptr %160, align 4, !tbaa !15
  %162 = fadd float %156, %161
  %163 = load i32, ptr %37, align 4, !tbaa !9
  %164 = add nsw i32 %163, 16
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [256 x float], ptr %25, i64 0, i64 %165
  %167 = load float, ptr %166, align 4, !tbaa !15
  %168 = fadd float %162, %167
  %169 = load i32, ptr %37, align 4, !tbaa !9
  %170 = add nsw i32 %169, 17
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [256 x float], ptr %25, i64 0, i64 %171
  %173 = load float, ptr %172, align 4, !tbaa !15
  %174 = fadd float %168, %173
  %175 = fmul float %174, 2.500000e-01
  %176 = load i32, ptr %35, align 4, !tbaa !9
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [64 x float], ptr %27, i64 0, i64 %177
  store float %175, ptr %178, align 4, !tbaa !15
  %179 = load i32, ptr %37, align 4, !tbaa !9
  %180 = add nsw i32 %179, 0
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [256 x float], ptr %26, i64 0, i64 %181
  %183 = load float, ptr %182, align 4, !tbaa !15
  %184 = load i32, ptr %37, align 4, !tbaa !9
  %185 = add nsw i32 %184, 1
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [256 x float], ptr %26, i64 0, i64 %186
  %188 = load float, ptr %187, align 4, !tbaa !15
  %189 = fadd float %183, %188
  %190 = load i32, ptr %37, align 4, !tbaa !9
  %191 = add nsw i32 %190, 16
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [256 x float], ptr %26, i64 0, i64 %192
  %194 = load float, ptr %193, align 4, !tbaa !15
  %195 = fadd float %189, %194
  %196 = load i32, ptr %37, align 4, !tbaa !9
  %197 = add nsw i32 %196, 17
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [256 x float], ptr %26, i64 0, i64 %198
  %200 = load float, ptr %199, align 4, !tbaa !15
  %201 = fadd float %195, %200
  %202 = fmul float %201, 2.500000e-01
  %203 = load i32, ptr %35, align 4, !tbaa !9
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [64 x float], ptr %28, i64 0, i64 %204
  store float %202, ptr %205, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #4
  br label %206

206:                                              ; preds = %146
  %207 = load i32, ptr %36, align 4, !tbaa !9
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %36, align 4, !tbaa !9
  %209 = load i32, ptr %35, align 4, !tbaa !9
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %35, align 4, !tbaa !9
  br label %142, !llvm.loop !17

211:                                              ; preds = %145
  br label %212

212:                                              ; preds = %211
  %213 = load i32, ptr %34, align 4, !tbaa !9
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %34, align 4, !tbaa !9
  br label %137, !llvm.loop !19

215:                                              ; preds = %140
  %216 = getelementptr inbounds [64 x float], ptr %27, i64 0, i64 0
  %217 = load ptr, ptr %19, align 8, !tbaa !5
  %218 = load ptr, ptr %22, align 8, !tbaa !5
  %219 = load i32, ptr %218, align 4, !tbaa !9
  %220 = call noundef i32 @_ZN4Simd4BaseL13JpegProcessDuERNS0_6BitBufEPfiPKfiPA2_KtS8_(ptr noundef nonnull align 4 dereferenceable(8196) %30, ptr noundef %216, i32 noundef 8, ptr noundef %217, i32 noundef %219, ptr noundef @_ZN4Simd4Base11HuffmanUVdcE, ptr noundef @_ZN4Simd4Base11HuffmanUVacE)
  %221 = load ptr, ptr %22, align 8, !tbaa !5
  store i32 %220, ptr %221, align 4, !tbaa !9
  %222 = getelementptr inbounds [64 x float], ptr %28, i64 0, i64 0
  %223 = load ptr, ptr %19, align 8, !tbaa !5
  %224 = load ptr, ptr %23, align 8, !tbaa !5
  %225 = load i32, ptr %224, align 4, !tbaa !9
  %226 = call noundef i32 @_ZN4Simd4BaseL13JpegProcessDuERNS0_6BitBufEPfiPKfiPA2_KtS8_(ptr noundef nonnull align 4 dereferenceable(8196) %30, ptr noundef %222, i32 noundef 8, ptr noundef %223, i32 noundef %225, ptr noundef @_ZN4Simd4Base11HuffmanUVdcE, ptr noundef @_ZN4Simd4Base11HuffmanUVacE)
  %227 = load ptr, ptr %23, align 8, !tbaa !5
  store i32 %226, ptr %227, align 4, !tbaa !9
  br label %228

228:                                              ; preds = %215, %135
  %229 = call noundef zeroext i1 @_ZNK4Simd4Base6BitBuf4FullEj(ptr noundef nonnull align 4 dereferenceable(8196) %30, i32 noundef 1024)
  br i1 %229, label %230, label %237

230:                                              ; preds = %228
  %231 = load ptr, ptr %11, align 8, !tbaa !5
  %232 = getelementptr inbounds %"struct.Simd::Base::BitBuf", ptr %30, i32 0, i32 1
  %233 = getelementptr inbounds [2048 x [2 x i16]], ptr %232, i64 0, i64 0
  %234 = getelementptr inbounds %"struct.Simd::Base::BitBuf", ptr %30, i32 0, i32 0
  %235 = load i32, ptr %234, align 4, !tbaa !20
  %236 = zext i32 %235 to i64
  call void @_ZN4Simd4Base9WriteBitsERNS_18OutputMemoryStreamEPA2_Ktm(ptr noundef nonnull align 8 dereferenceable(56) %231, ptr noundef %233, i64 noundef %236)
  call void @_ZN4Simd4Base6BitBuf5ClearEv(ptr noundef nonnull align 4 dereferenceable(8196) %30)
  br label %237

237:                                              ; preds = %230, %228
  br label %238

238:                                              ; preds = %237
  %239 = load i32, ptr %33, align 4, !tbaa !9
  %240 = add nsw i32 %239, 16
  store i32 %240, ptr %33, align 4, !tbaa !9
  br label %60, !llvm.loop !22

241:                                              ; preds = %64
  br label %242

242:                                              ; preds = %241
  %243 = load i32, ptr %31, align 4, !tbaa !9
  %244 = add nsw i32 %243, 16
  store i32 %244, ptr %31, align 4, !tbaa !9
  br label %54, !llvm.loop !23

245:                                              ; preds = %58
  %246 = load ptr, ptr %11, align 8, !tbaa !5
  %247 = getelementptr inbounds %"struct.Simd::Base::BitBuf", ptr %30, i32 0, i32 1
  %248 = getelementptr inbounds [2048 x [2 x i16]], ptr %247, i64 0, i64 0
  %249 = getelementptr inbounds %"struct.Simd::Base::BitBuf", ptr %30, i32 0, i32 0
  %250 = load i32, ptr %249, align 4, !tbaa !20
  %251 = zext i32 %250 to i64
  call void @_ZN4Simd4Base9WriteBitsERNS_18OutputMemoryStreamEPA2_Ktm(ptr noundef nonnull align 8 dereferenceable(56) %246, ptr noundef %248, i64 noundef %251)
  call void @_ZN4Simd4Base6BitBuf5ClearEv(ptr noundef nonnull align 4 dereferenceable(8196) %30)
  call void @llvm.lifetime.end.p0(i64 8196, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  ret void
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4Simd4Base6BitBufC2Ev(ptr noundef nonnull align 4 dereferenceable(8196)) unnamed_addr #2 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4Simd4Base7GrayToYEPKhiiiPfi(ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4Simd4Base8RgbToYuvEPKhS2_S2_iiiPfS3_S3_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZN4Simd4BaseL13JpegProcessDuERNS0_6BitBufEPfiPKfiPA2_KtS8_(ptr noundef nonnull align 4 dereferenceable(8196), ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4Simd4Base19JpegProcessDuGrayUvERNS0_6BitBufE(ptr noundef nonnull align 4 dereferenceable(8196)) #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4Simd4Base6BitBuf4FullEj(ptr noundef nonnull align 4 dereferenceable(8196), i32 noundef) #2 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd4Base9WriteBitsERNS_18OutputMemoryStreamEPA2_Ktm(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, i64 noundef) #3

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4Simd4Base6BitBuf5ClearEv(ptr noundef nonnull align 4 dereferenceable(8196)) #2 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { alwaysinline 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 = { alwaysinline 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 #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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = !{!21, !10, i64 0}
!21 = !{!"_ZTSN4Simd4Base6BitBufE", !10, i64 0, !7, i64 4}
!22 = distinct !{!22, !18}
!23 = distinct !{!23, !18}


; 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.Simd::Base::BitBuf" = type { i32, [2048 x [2 x i16]] }

@_ZN4Simd4Base10HuffmanYdcE = external dso_local constant <{ [12 x [2 x i16]], [244 x [2 x i16]] }>, align 16
@_ZN4Simd4Base11HuffmanUVdcE = external dso_local constant <{ [12 x [2 x i16]], [244 x [2 x i16]] }>, align 16
@_ZN4Simd4Base10HuffmanYacE = external dso_local constant [256 x [2 x i16]], align 16
@_ZN4Simd4Base11HuffmanUVacE = external dso_local constant [256 x [2 x i16]], align 16

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Simd4Base18JpegWriteBlockSubsERNS_18OutputMemoryStreamEiiPKhS4_S4_iPKfS6_Pi(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, i32 noundef %6, ptr noundef %7, ptr noundef %8, ptr nocapture noundef %9) local_unnamed_addr #1 {
  %11 = alloca [256 x float], align 16
  %12 = alloca [256 x float], align 16
  %13 = alloca [256 x float], align 16
  %14 = alloca [64 x float], align 16
  %15 = alloca [64 x float], align 16
  %16 = alloca %"struct.Simd::Base::BitBuf", align 4
  %17 = getelementptr inbounds i8, ptr %9, i64 4
  %18 = getelementptr inbounds i8, ptr %9, i64 8
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %15) #4
  %19 = icmp eq ptr %3, %4
  %20 = icmp eq ptr %3, %5
  %21 = and i1 %19, %20
  call void @llvm.lifetime.start.p0(i64 8196, ptr nonnull %16) #4
  call void @_ZN4Simd4Base6BitBufC2Ev(ptr noundef nonnull align 4 dereferenceable(8196) %16)
  %22 = icmp sgt i32 %2, 0
  br i1 %22, label %.preheader77.lr.ph, label %._crit_edge84

.preheader77.lr.ph:                               ; preds = %10
  %23 = icmp sgt i32 %1, 0
  %24 = getelementptr inbounds i8, ptr %11, i64 32
  %25 = getelementptr inbounds i8, ptr %11, i64 512
  %26 = getelementptr inbounds i8, ptr %11, i64 544
  %27 = getelementptr inbounds i8, ptr %16, i64 4
  br i1 %23, label %.preheader77.us, label %._crit_edge84

.preheader77.us:                                  ; preds = %.preheader77.lr.ph, %._crit_edge.us
  %.083.us = phi i32 [ %303, %._crit_edge.us ], [ 0, %.preheader77.lr.ph ]
  %28 = sub nsw i32 %2, %.083.us
  br label %29

29:                                               ; preds = %.preheader77.us, %56
  %indvars.iv96 = phi i64 [ 0, %.preheader77.us ], [ %indvars.iv.next97, %56 ]
  %30 = getelementptr inbounds i8, ptr %3, i64 %indvars.iv96
  br i1 %21, label %36, label %31

31:                                               ; preds = %29
  %32 = getelementptr inbounds i8, ptr %4, i64 %indvars.iv96
  %33 = getelementptr inbounds i8, ptr %5, i64 %indvars.iv96
  %34 = trunc i64 %indvars.iv96 to i32
  %35 = sub i32 %1, %34
  call void @_ZN4Simd4Base8RgbToYuvEPKhS2_S2_iiiPfS3_S3_i(ptr noundef %30, ptr noundef %32, ptr noundef %33, i32 noundef %6, i32 noundef %28, i32 noundef %35, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13, i32 noundef 16)
  br label %39

36:                                               ; preds = %29
  %37 = trunc i64 %indvars.iv96 to i32
  %38 = sub i32 %1, %37
  call void @_ZN4Simd4Base7GrayToYEPKhiiiPfi(ptr noundef %30, i32 noundef %6, i32 noundef %28, i32 noundef %38, ptr noundef nonnull %11, i32 noundef 16)
  br label %39

39:                                               ; preds = %36, %31
  %40 = load i32, ptr %9, align 4, !tbaa !5
  %41 = call noundef i32 @_ZN4Simd4BaseL13JpegProcessDuERNS0_6BitBufEPfiPKfiPA2_KtS8_(ptr noundef nonnull align 4 dereferenceable(8196) %16, ptr noundef nonnull %11, i32 noundef 16, ptr noundef %7, i32 noundef %40, ptr noundef nonnull @_ZN4Simd4Base10HuffmanYdcE, ptr noundef nonnull @_ZN4Simd4Base10HuffmanYacE)
  store i32 %41, ptr %9, align 4, !tbaa !5
  %42 = call noundef i32 @_ZN4Simd4BaseL13JpegProcessDuERNS0_6BitBufEPfiPKfiPA2_KtS8_(ptr noundef nonnull align 4 dereferenceable(8196) %16, ptr noundef nonnull %24, i32 noundef 16, ptr noundef %7, i32 noundef %41, ptr noundef nonnull @_ZN4Simd4Base10HuffmanYdcE, ptr noundef nonnull @_ZN4Simd4Base10HuffmanYacE)
  store i32 %42, ptr %9, align 4, !tbaa !5
  %43 = call noundef i32 @_ZN4Simd4BaseL13JpegProcessDuERNS0_6BitBufEPfiPKfiPA2_KtS8_(ptr noundef nonnull align 4 dereferenceable(8196) %16, ptr noundef nonnull %25, i32 noundef 16, ptr noundef %7, i32 noundef %42, ptr noundef nonnull @_ZN4Simd4Base10HuffmanYdcE, ptr noundef nonnull @_ZN4Simd4Base10HuffmanYacE)
  store i32 %43, ptr %9, align 4, !tbaa !5
  %44 = call noundef i32 @_ZN4Simd4BaseL13JpegProcessDuERNS0_6BitBufEPfiPKfiPA2_KtS8_(ptr noundef nonnull align 4 dereferenceable(8196) %16, ptr noundef nonnull %26, i32 noundef 16, ptr noundef %7, i32 noundef %43, ptr noundef nonnull @_ZN4Simd4Base10HuffmanYdcE, ptr noundef nonnull @_ZN4Simd4Base10HuffmanYacE)
  store i32 %44, ptr %9, align 4, !tbaa !5
  br i1 %21, label %50, label %.preheader.us

45:                                               ; preds = %.preheader.us
  %46 = load i32, ptr %17, align 4, !tbaa !5
  %47 = call noundef i32 @_ZN4Simd4BaseL13JpegProcessDuERNS0_6BitBufEPfiPKfiPA2_KtS8_(ptr noundef nonnull align 4 dereferenceable(8196) %16, ptr noundef nonnull %14, i32 noundef 8, ptr noundef %8, i32 noundef %46, ptr noundef nonnull @_ZN4Simd4Base11HuffmanUVdcE, ptr noundef nonnull @_ZN4Simd4Base11HuffmanUVacE)
  store i32 %47, ptr %17, align 4, !tbaa !5
  %48 = load i32, ptr %18, align 4, !tbaa !5
  %49 = call noundef i32 @_ZN4Simd4BaseL13JpegProcessDuERNS0_6BitBufEPfiPKfiPA2_KtS8_(ptr noundef nonnull align 4 dereferenceable(8196) %16, ptr noundef nonnull %15, i32 noundef 8, ptr noundef %8, i32 noundef %48, ptr noundef nonnull @_ZN4Simd4Base11HuffmanUVdcE, ptr noundef nonnull @_ZN4Simd4Base11HuffmanUVacE)
  store i32 %49, ptr %18, align 4, !tbaa !5
  br label %51

50:                                               ; preds = %39
  call void @_ZN4Simd4Base19JpegProcessDuGrayUvERNS0_6BitBufE(ptr noundef nonnull align 4 dereferenceable(8196) %16)
  br label %51

51:                                               ; preds = %50, %45
  %52 = call noundef zeroext i1 @_ZNK4Simd4Base6BitBuf4FullEj(ptr noundef nonnull align 4 dereferenceable(8196) %16, i32 noundef 1024)
  br i1 %52, label %53, label %56

53:                                               ; preds = %51
  %54 = load i32, ptr %16, align 4, !tbaa !9
  %55 = zext i32 %54 to i64
  call void @_ZN4Simd4Base9WriteBitsERNS_18OutputMemoryStreamEPA2_Ktm(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull %27, i64 noundef %55)
  call void @_ZN4Simd4Base6BitBuf5ClearEv(ptr noundef nonnull align 4 dereferenceable(8196) %16)
  br label %56

56:                                               ; preds = %53, %51
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 16
  %57 = trunc nuw i64 %indvars.iv.next97 to i32
  %58 = icmp slt i32 %57, %1
  br i1 %58, label %29, label %._crit_edge.us, !llvm.loop !11

.preheader.us:                                    ; preds = %39, %.preheader.us
  %indvars.iv91 = phi i64 [ %indvars.iv.next92, %.preheader.us ], [ 0, %39 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %.preheader.us ], [ 0, %39 ]
  %59 = shl nuw nsw i64 %indvars.iv91, 5
  %60 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %59
  %61 = load float, ptr %60, align 16, !tbaa !13
  %62 = or disjoint i64 %59, 1
  %63 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %62
  %64 = load float, ptr %63, align 4, !tbaa !13
  %65 = or disjoint i64 %59, 16
  %66 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %65
  %67 = load float, ptr %66, align 16, !tbaa !13
  %68 = or disjoint i64 %59, 17
  %69 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %68
  %70 = load float, ptr %69, align 4, !tbaa !13
  %71 = getelementptr inbounds [64 x float], ptr %14, i64 0, i64 %indvars.iv
  %72 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %59
  %73 = load float, ptr %72, align 16, !tbaa !13
  %74 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %62
  %75 = load float, ptr %74, align 4, !tbaa !13
  %76 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %65
  %77 = load float, ptr %76, align 16, !tbaa !13
  %78 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %68
  %79 = load float, ptr %78, align 4, !tbaa !13
  %80 = getelementptr inbounds [64 x float], ptr %15, i64 0, i64 %indvars.iv
  %81 = or disjoint i64 %59, 2
  %82 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %81
  %83 = load float, ptr %82, align 8, !tbaa !13
  %84 = or disjoint i64 %59, 3
  %85 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %84
  %86 = load float, ptr %85, align 4, !tbaa !13
  %87 = or disjoint i64 %59, 18
  %88 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %87
  %89 = load float, ptr %88, align 8, !tbaa !13
  %90 = or disjoint i64 %59, 19
  %91 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %90
  %92 = load float, ptr %91, align 4, !tbaa !13
  %93 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %81
  %94 = load float, ptr %93, align 8, !tbaa !13
  %95 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %84
  %96 = load float, ptr %95, align 4, !tbaa !13
  %97 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %87
  %98 = load float, ptr %97, align 8, !tbaa !13
  %99 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %90
  %100 = load float, ptr %99, align 4, !tbaa !13
  %101 = or disjoint i64 %59, 4
  %102 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %101
  %103 = load float, ptr %102, align 16, !tbaa !13
  %104 = or disjoint i64 %59, 5
  %105 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %104
  %106 = load float, ptr %105, align 4, !tbaa !13
  %107 = or disjoint i64 %59, 20
  %108 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %107
  %109 = load float, ptr %108, align 16, !tbaa !13
  %110 = or disjoint i64 %59, 21
  %111 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %110
  %112 = load float, ptr %111, align 4, !tbaa !13
  %113 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %101
  %114 = load float, ptr %113, align 16, !tbaa !13
  %115 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %104
  %116 = load float, ptr %115, align 4, !tbaa !13
  %117 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %107
  %118 = load float, ptr %117, align 16, !tbaa !13
  %119 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %110
  %120 = load float, ptr %119, align 4, !tbaa !13
  %121 = or disjoint i64 %59, 6
  %122 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %121
  %123 = load float, ptr %122, align 8, !tbaa !13
  %124 = or disjoint i64 %59, 7
  %125 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %124
  %126 = load float, ptr %125, align 4, !tbaa !13
  %127 = or disjoint i64 %59, 22
  %128 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %127
  %129 = load float, ptr %128, align 8, !tbaa !13
  %130 = or disjoint i64 %59, 23
  %131 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %130
  %132 = load float, ptr %131, align 4, !tbaa !13
  %133 = insertelement <4 x float> poison, float %61, i64 0
  %134 = insertelement <4 x float> %133, float %83, i64 1
  %135 = insertelement <4 x float> %134, float %103, i64 2
  %136 = insertelement <4 x float> %135, float %123, i64 3
  %137 = insertelement <4 x float> poison, float %64, i64 0
  %138 = insertelement <4 x float> %137, float %86, i64 1
  %139 = insertelement <4 x float> %138, float %106, i64 2
  %140 = insertelement <4 x float> %139, float %126, i64 3
  %141 = fadd <4 x float> %136, %140
  %142 = insertelement <4 x float> poison, float %67, i64 0
  %143 = insertelement <4 x float> %142, float %89, i64 1
  %144 = insertelement <4 x float> %143, float %109, i64 2
  %145 = insertelement <4 x float> %144, float %129, i64 3
  %146 = fadd <4 x float> %141, %145
  %147 = insertelement <4 x float> poison, float %70, i64 0
  %148 = insertelement <4 x float> %147, float %92, i64 1
  %149 = insertelement <4 x float> %148, float %112, i64 2
  %150 = insertelement <4 x float> %149, float %132, i64 3
  %151 = fadd <4 x float> %146, %150
  %152 = fmul <4 x float> %151, <float 2.500000e-01, float 2.500000e-01, float 2.500000e-01, float 2.500000e-01>
  store <4 x float> %152, ptr %71, align 16, !tbaa !13
  %153 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %121
  %154 = load float, ptr %153, align 8, !tbaa !13
  %155 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %124
  %156 = load float, ptr %155, align 4, !tbaa !13
  %157 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %127
  %158 = load float, ptr %157, align 8, !tbaa !13
  %159 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %130
  %160 = load float, ptr %159, align 4, !tbaa !13
  %161 = insertelement <4 x float> poison, float %73, i64 0
  %162 = insertelement <4 x float> %161, float %94, i64 1
  %163 = insertelement <4 x float> %162, float %114, i64 2
  %164 = insertelement <4 x float> %163, float %154, i64 3
  %165 = insertelement <4 x float> poison, float %75, i64 0
  %166 = insertelement <4 x float> %165, float %96, i64 1
  %167 = insertelement <4 x float> %166, float %116, i64 2
  %168 = insertelement <4 x float> %167, float %156, i64 3
  %169 = fadd <4 x float> %164, %168
  %170 = insertelement <4 x float> poison, float %77, i64 0
  %171 = insertelement <4 x float> %170, float %98, i64 1
  %172 = insertelement <4 x float> %171, float %118, i64 2
  %173 = insertelement <4 x float> %172, float %158, i64 3
  %174 = fadd <4 x float> %169, %173
  %175 = insertelement <4 x float> poison, float %79, i64 0
  %176 = insertelement <4 x float> %175, float %100, i64 1
  %177 = insertelement <4 x float> %176, float %120, i64 2
  %178 = insertelement <4 x float> %177, float %160, i64 3
  %179 = fadd <4 x float> %174, %178
  %180 = fmul <4 x float> %179, <float 2.500000e-01, float 2.500000e-01, float 2.500000e-01, float 2.500000e-01>
  store <4 x float> %180, ptr %80, align 16, !tbaa !13
  %indvars.iv.next87.3 = or disjoint i64 %indvars.iv, 4
  %181 = or disjoint i64 %59, 8
  %182 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %181
  %183 = load float, ptr %182, align 16, !tbaa !13
  %184 = or disjoint i64 %59, 9
  %185 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %184
  %186 = load float, ptr %185, align 4, !tbaa !13
  %187 = or disjoint i64 %59, 24
  %188 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %187
  %189 = load float, ptr %188, align 16, !tbaa !13
  %190 = or disjoint i64 %59, 25
  %191 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %190
  %192 = load float, ptr %191, align 4, !tbaa !13
  %193 = getelementptr inbounds [64 x float], ptr %14, i64 0, i64 %indvars.iv.next87.3
  %194 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %181
  %195 = load float, ptr %194, align 16, !tbaa !13
  %196 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %184
  %197 = load float, ptr %196, align 4, !tbaa !13
  %198 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %187
  %199 = load float, ptr %198, align 16, !tbaa !13
  %200 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %190
  %201 = load float, ptr %200, align 4, !tbaa !13
  %202 = getelementptr inbounds [64 x float], ptr %15, i64 0, i64 %indvars.iv.next87.3
  %203 = or disjoint i64 %59, 10
  %204 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %203
  %205 = load float, ptr %204, align 8, !tbaa !13
  %206 = or disjoint i64 %59, 11
  %207 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %206
  %208 = load float, ptr %207, align 4, !tbaa !13
  %209 = or disjoint i64 %59, 26
  %210 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %209
  %211 = load float, ptr %210, align 8, !tbaa !13
  %212 = or disjoint i64 %59, 27
  %213 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %212
  %214 = load float, ptr %213, align 4, !tbaa !13
  %215 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %203
  %216 = load float, ptr %215, align 8, !tbaa !13
  %217 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %206
  %218 = load float, ptr %217, align 4, !tbaa !13
  %219 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %209
  %220 = load float, ptr %219, align 8, !tbaa !13
  %221 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %212
  %222 = load float, ptr %221, align 4, !tbaa !13
  %223 = or disjoint i64 %59, 12
  %224 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %223
  %225 = load float, ptr %224, align 16, !tbaa !13
  %226 = or disjoint i64 %59, 13
  %227 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %226
  %228 = load float, ptr %227, align 4, !tbaa !13
  %229 = or disjoint i64 %59, 28
  %230 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %229
  %231 = load float, ptr %230, align 16, !tbaa !13
  %232 = or disjoint i64 %59, 29
  %233 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %232
  %234 = load float, ptr %233, align 4, !tbaa !13
  %235 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %223
  %236 = load float, ptr %235, align 16, !tbaa !13
  %237 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %226
  %238 = load float, ptr %237, align 4, !tbaa !13
  %239 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %229
  %240 = load float, ptr %239, align 16, !tbaa !13
  %241 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %232
  %242 = load float, ptr %241, align 4, !tbaa !13
  %243 = or disjoint i64 %59, 14
  %244 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %243
  %245 = load float, ptr %244, align 8, !tbaa !13
  %246 = or disjoint i64 %59, 15
  %247 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %246
  %248 = load float, ptr %247, align 4, !tbaa !13
  %249 = or disjoint i64 %59, 30
  %250 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %249
  %251 = load float, ptr %250, align 8, !tbaa !13
  %252 = or disjoint i64 %59, 31
  %253 = getelementptr inbounds [256 x float], ptr %12, i64 0, i64 %252
  %254 = load float, ptr %253, align 4, !tbaa !13
  %255 = insertelement <4 x float> poison, float %183, i64 0
  %256 = insertelement <4 x float> %255, float %205, i64 1
  %257 = insertelement <4 x float> %256, float %225, i64 2
  %258 = insertelement <4 x float> %257, float %245, i64 3
  %259 = insertelement <4 x float> poison, float %186, i64 0
  %260 = insertelement <4 x float> %259, float %208, i64 1
  %261 = insertelement <4 x float> %260, float %228, i64 2
  %262 = insertelement <4 x float> %261, float %248, i64 3
  %263 = fadd <4 x float> %258, %262
  %264 = insertelement <4 x float> poison, float %189, i64 0
  %265 = insertelement <4 x float> %264, float %211, i64 1
  %266 = insertelement <4 x float> %265, float %231, i64 2
  %267 = insertelement <4 x float> %266, float %251, i64 3
  %268 = fadd <4 x float> %263, %267
  %269 = insertelement <4 x float> poison, float %192, i64 0
  %270 = insertelement <4 x float> %269, float %214, i64 1
  %271 = insertelement <4 x float> %270, float %234, i64 2
  %272 = insertelement <4 x float> %271, float %254, i64 3
  %273 = fadd <4 x float> %268, %272
  %274 = fmul <4 x float> %273, <float 2.500000e-01, float 2.500000e-01, float 2.500000e-01, float 2.500000e-01>
  store <4 x float> %274, ptr %193, align 16, !tbaa !13
  %275 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %243
  %276 = load float, ptr %275, align 8, !tbaa !13
  %277 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %246
  %278 = load float, ptr %277, align 4, !tbaa !13
  %279 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %249
  %280 = load float, ptr %279, align 8, !tbaa !13
  %281 = getelementptr inbounds [256 x float], ptr %13, i64 0, i64 %252
  %282 = load float, ptr %281, align 4, !tbaa !13
  %283 = insertelement <4 x float> poison, float %195, i64 0
  %284 = insertelement <4 x float> %283, float %216, i64 1
  %285 = insertelement <4 x float> %284, float %236, i64 2
  %286 = insertelement <4 x float> %285, float %276, i64 3
  %287 = insertelement <4 x float> poison, float %197, i64 0
  %288 = insertelement <4 x float> %287, float %218, i64 1
  %289 = insertelement <4 x float> %288, float %238, i64 2
  %290 = insertelement <4 x float> %289, float %278, i64 3
  %291 = fadd <4 x float> %286, %290
  %292 = insertelement <4 x float> poison, float %199, i64 0
  %293 = insertelement <4 x float> %292, float %220, i64 1
  %294 = insertelement <4 x float> %293, float %240, i64 2
  %295 = insertelement <4 x float> %294, float %280, i64 3
  %296 = fadd <4 x float> %291, %295
  %297 = insertelement <4 x float> poison, float %201, i64 0
  %298 = insertelement <4 x float> %297, float %222, i64 1
  %299 = insertelement <4 x float> %298, float %242, i64 2
  %300 = insertelement <4 x float> %299, float %282, i64 3
  %301 = fadd <4 x float> %296, %300
  %302 = fmul <4 x float> %301, <float 2.500000e-01, float 2.500000e-01, float 2.500000e-01, float 2.500000e-01>
  store <4 x float> %302, ptr %202, align 16, !tbaa !13
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 8
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next92, 8
  br i1 %exitcond.not, label %45, label %.preheader.us, !llvm.loop !15

._crit_edge.us:                                   ; preds = %56
  %303 = add nuw nsw i32 %.083.us, 16
  %304 = icmp slt i32 %303, %2
  br i1 %304, label %.preheader77.us, label %._crit_edge84, !llvm.loop !16

._crit_edge84:                                    ; preds = %._crit_edge.us, %.preheader77.lr.ph, %10
  %305 = getelementptr inbounds i8, ptr %16, i64 4
  %306 = load i32, ptr %16, align 4, !tbaa !9
  %307 = zext i32 %306 to i64
  call void @_ZN4Simd4Base9WriteBitsERNS_18OutputMemoryStreamEPA2_Ktm(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull %305, i64 noundef %307)
  call void @_ZN4Simd4Base6BitBuf5ClearEv(ptr noundef nonnull align 4 dereferenceable(8196) %16)
  call void @llvm.lifetime.end.p0(i64 8196, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %11) #4
  ret void
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4Simd4Base6BitBufC2Ev(ptr noundef nonnull align 4 dereferenceable(8196)) unnamed_addr #2 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4Simd4Base7GrayToYEPKhiiiPfi(ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4Simd4Base8RgbToYuvEPKhS2_S2_iiiPfS3_S3_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZN4Simd4BaseL13JpegProcessDuERNS0_6BitBufEPfiPKfiPA2_KtS8_(ptr noundef nonnull align 4 dereferenceable(8196), ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4Simd4Base19JpegProcessDuGrayUvERNS0_6BitBufE(ptr noundef nonnull align 4 dereferenceable(8196)) local_unnamed_addr #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4Simd4Base6BitBuf4FullEj(ptr noundef nonnull align 4 dereferenceable(8196), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd4Base9WriteBitsERNS_18OutputMemoryStreamEPA2_Ktm(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4Simd4Base6BitBuf5ClearEv(ptr noundef nonnull align 4 dereferenceable(8196)) local_unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { alwaysinline 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 = { alwaysinline 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSN4Simd4Base6BitBufE", !6, i64 0, !7, i64 4}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass