; LLVM IR from corentinartaud/graphics :: ThirdParty/FreeImage-3170/Source/LibJPEG (jctrans)

; 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.jpeg_compress_struct = type { ptr, ptr, ptr, ptr, i8, i32, ptr, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, ptr, [4 x ptr], [4 x i32], [4 x ptr], [4 x ptr], [16 x i8], [16 x i8], [16 x i8], i32, ptr, i8, i8, i8, i8, i8, i32, i32, i32, i32, i8, i8, i8, i8, i16, i16, i8, i32, i32, i8, i32, i32, i32, i32, i32, i32, [4 x ptr], i32, i32, i32, [10 x i32], i32, i32, i32, i32, i32, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32 }
%struct.jpeg_error_mgr = type { ptr, ptr, ptr, ptr, ptr, i32, %union.anon, i32, i64, ptr, i32, ptr, i32, i32 }
%union.anon = type { [8 x i32], [48 x i8] }
%struct.jpeg_decompress_struct = type { ptr, ptr, ptr, ptr, i8, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, i8, i8, i32, i8, i8, i8, i32, i8, i32, i8, i8, i8, i32, i32, i32, i32, i32, i32, ptr, i32, i32, i32, i32, i32, ptr, [4 x ptr], [4 x ptr], [4 x ptr], i32, ptr, i8, i8, i8, [16 x i8], [16 x i8], [16 x i8], i32, i8, i8, i8, i8, i16, i16, i8, i8, i32, i8, ptr, i32, i32, i32, i32, i32, ptr, i32, [4 x ptr], i32, i32, i32, [10 x i32], i32, i32, i32, i32, i32, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.JQUANT_TBL = type { [64 x i16], i8 }
%struct.jpeg_component_info = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8, i32, i32, i32, i32, i32, i32, ptr, ptr }

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

17:                                               ; preds = %2
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %18, i32 0, i32 0
  %20 = load ptr, ptr %19, align 8, !tbaa !14
  %21 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %20, i32 0, i32 5
  store i32 21, ptr %21, align 8, !tbaa !15
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %22, i32 0, i32 5
  %24 = load i32, ptr %23, align 4, !tbaa !9
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %25, i32 0, i32 0
  %27 = load ptr, ptr %26, align 8, !tbaa !14
  %28 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %27, i32 0, i32 6
  %29 = getelementptr inbounds [8 x i32], ptr %28, i64 0, i64 0
  store i32 %24, ptr %29, align 4, !tbaa !18
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %30, i32 0, i32 0
  %32 = load ptr, ptr %31, align 8, !tbaa !14
  %33 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %32, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !19
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  call void %34(ptr noundef %35)
  br label %36

36:                                               ; preds = %17, %2
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %37, i32 0, i32 7
  %39 = load i32, ptr %38, align 8, !tbaa !20
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %40, i32 0, i32 7
  store i32 %39, ptr %41, align 8, !tbaa !22
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %42, i32 0, i32 8
  %44 = load i32, ptr %43, align 4, !tbaa !23
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %45, i32 0, i32 8
  store i32 %44, ptr %46, align 4, !tbaa !24
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %47, i32 0, i32 9
  %49 = load i32, ptr %48, align 8, !tbaa !25
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %50, i32 0, i32 9
  store i32 %49, ptr %51, align 8, !tbaa !26
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %52, i32 0, i32 10
  %54 = load i32, ptr %53, align 4, !tbaa !27
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %55, i32 0, i32 10
  store i32 %54, ptr %56, align 4, !tbaa !28
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %57, i32 0, i32 27
  %59 = load i32, ptr %58, align 4, !tbaa !29
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %60, i32 0, i32 14
  store i32 %59, ptr %61, align 8, !tbaa !30
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %62, i32 0, i32 28
  %64 = load i32, ptr %63, align 8, !tbaa !31
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %65, i32 0, i32 15
  store i32 %64, ptr %66, align 4, !tbaa !32
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %67, i32 0, i32 65
  %69 = load i32, ptr %68, align 8, !tbaa !33
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %70, i32 0, i32 50
  store i32 %69, ptr %71, align 8, !tbaa !34
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %72, i32 0, i32 66
  %74 = load i32, ptr %73, align 4, !tbaa !35
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %75, i32 0, i32 51
  store i32 %74, ptr %76, align 4, !tbaa !36
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  call void @jpeg_set_defaults(ptr noundef %77)
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %78, i32 0, i32 60
  %80 = load i32, ptr %79, align 4, !tbaa !37
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %81, i32 0, i32 45
  store i32 %80, ptr %82, align 4, !tbaa !38
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %84, i32 0, i32 10
  %86 = load i32, ptr %85, align 4, !tbaa !27
  call void @jpeg_set_colorspace(ptr noundef %83, i32 noundef %86)
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %87, i32 0, i32 43
  %89 = load i32, ptr %88, align 8, !tbaa !39
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %90, i32 0, i32 16
  store i32 %89, ptr %91, align 8, !tbaa !40
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %92, i32 0, i32 61
  %94 = load i8, ptr %93, align 8, !tbaa !41
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %95, i32 0, i32 32
  store i8 %94, ptr %96, align 1, !tbaa !42
  store i32 0, ptr %10, align 4, !tbaa !43
  br label %97

97:                                               ; preds = %138, %36
  %98 = load i32, ptr %10, align 4, !tbaa !43
  %99 = icmp slt i32 %98, 4
  br i1 %99, label %100, label %141

100:                                              ; preds = %97
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %101, i32 0, i32 40
  %103 = load i32, ptr %10, align 4, !tbaa !43
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [4 x ptr], ptr %102, i64 0, i64 %104
  %106 = load ptr, ptr %105, align 8, !tbaa !5
  %107 = icmp ne ptr %106, null
  br i1 %107, label %108, label %137

108:                                              ; preds = %100
  %109 = load ptr, ptr %4, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %109, i32 0, i32 20
  %111 = load i32, ptr %10, align 4, !tbaa !43
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [4 x ptr], ptr %110, i64 0, i64 %112
  store ptr %113, ptr %5, align 8, !tbaa !5
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = load ptr, ptr %114, align 8, !tbaa !5
  %116 = icmp eq ptr %115, null
  br i1 %116, label %117, label %121

117:                                              ; preds = %108
  %118 = load ptr, ptr %4, align 8, !tbaa !5
  %119 = call ptr @jpeg_alloc_quant_table(ptr noundef %118)
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %119, ptr %120, align 8, !tbaa !5
  br label %121

121:                                              ; preds = %117, %108
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = load ptr, ptr %122, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.JQUANT_TBL, ptr %123, i32 0, i32 0
  %125 = getelementptr inbounds [64 x i16], ptr %124, i64 0, i64 0
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %126, i32 0, i32 40
  %128 = load i32, ptr %10, align 4, !tbaa !43
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [4 x ptr], ptr %127, i64 0, i64 %129
  %131 = load ptr, ptr %130, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.JQUANT_TBL, ptr %131, i32 0, i32 0
  %133 = getelementptr inbounds [64 x i16], ptr %132, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %125, ptr align 2 %133, i64 128, i1 false)
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = load ptr, ptr %134, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.JQUANT_TBL, ptr %135, i32 0, i32 1
  store i8 0, ptr %136, align 2, !tbaa !44
  br label %137

137:                                              ; preds = %121, %100
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %10, align 4, !tbaa !43
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %10, align 4, !tbaa !43
  br label %97, !llvm.loop !46

141:                                              ; preds = %97
  %142 = load ptr, ptr %3, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %142, i32 0, i32 9
  %144 = load i32, ptr %143, align 8, !tbaa !25
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %145, i32 0, i32 17
  store i32 %144, ptr %146, align 4, !tbaa !48
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %147, i32 0, i32 17
  %149 = load i32, ptr %148, align 4, !tbaa !48
  %150 = icmp slt i32 %149, 1
  br i1 %150, label %156, label %151

151:                                              ; preds = %141
  %152 = load ptr, ptr %4, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %152, i32 0, i32 17
  %154 = load i32, ptr %153, align 4, !tbaa !48
  %155 = icmp sgt i32 %154, 10
  br i1 %155, label %156, label %180

156:                                              ; preds = %151, %141
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %157, i32 0, i32 0
  %159 = load ptr, ptr %158, align 8, !tbaa !14
  %160 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %159, i32 0, i32 5
  store i32 27, ptr %160, align 8, !tbaa !15
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %161, i32 0, i32 17
  %163 = load i32, ptr %162, align 4, !tbaa !48
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %164, i32 0, i32 0
  %166 = load ptr, ptr %165, align 8, !tbaa !14
  %167 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %166, i32 0, i32 6
  %168 = getelementptr inbounds [8 x i32], ptr %167, i64 0, i64 0
  store i32 %163, ptr %168, align 4, !tbaa !18
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %169, i32 0, i32 0
  %171 = load ptr, ptr %170, align 8, !tbaa !14
  %172 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %171, i32 0, i32 6
  %173 = getelementptr inbounds [8 x i32], ptr %172, i64 0, i64 1
  store i32 10, ptr %173, align 4, !tbaa !18
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %174, i32 0, i32 0
  %176 = load ptr, ptr %175, align 8, !tbaa !14
  %177 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %176, i32 0, i32 0
  %178 = load ptr, ptr %177, align 8, !tbaa !19
  %179 = load ptr, ptr %4, align 8, !tbaa !5
  call void %178(ptr noundef %179)
  br label %180

180:                                              ; preds = %156, %151
  store i32 0, ptr %11, align 4, !tbaa !43
  %181 = load ptr, ptr %3, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %181, i32 0, i32 44
  %183 = load ptr, ptr %182, align 8, !tbaa !49
  store ptr %183, ptr %6, align 8, !tbaa !5
  %184 = load ptr, ptr %4, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %184, i32 0, i32 19
  %186 = load ptr, ptr %185, align 8, !tbaa !50
  store ptr %186, ptr %7, align 8, !tbaa !5
  br label %187

187:                                              ; preds = %302, %180
  %188 = load i32, ptr %11, align 4, !tbaa !43
  %189 = load ptr, ptr %4, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %189, i32 0, i32 17
  %191 = load i32, ptr %190, align 4, !tbaa !48
  %192 = icmp slt i32 %188, %191
  br i1 %192, label %193, label %309

193:                                              ; preds = %187
  %194 = load ptr, ptr %6, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.jpeg_component_info, ptr %194, i32 0, i32 0
  %196 = load i32, ptr %195, align 8, !tbaa !51
  %197 = load ptr, ptr %7, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.jpeg_component_info, ptr %197, i32 0, i32 0
  store i32 %196, ptr %198, align 8, !tbaa !51
  %199 = load ptr, ptr %6, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.jpeg_component_info, ptr %199, i32 0, i32 2
  %201 = load i32, ptr %200, align 8, !tbaa !53
  %202 = load ptr, ptr %7, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.jpeg_component_info, ptr %202, i32 0, i32 2
  store i32 %201, ptr %203, align 8, !tbaa !53
  %204 = load ptr, ptr %6, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.jpeg_component_info, ptr %204, i32 0, i32 3
  %206 = load i32, ptr %205, align 4, !tbaa !54
  %207 = load ptr, ptr %7, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.jpeg_component_info, ptr %207, i32 0, i32 3
  store i32 %206, ptr %208, align 4, !tbaa !54
  %209 = load ptr, ptr %6, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.jpeg_component_info, ptr %209, i32 0, i32 4
  %211 = load i32, ptr %210, align 8, !tbaa !55
  %212 = load ptr, ptr %7, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.jpeg_component_info, ptr %212, i32 0, i32 4
  store i32 %211, ptr %213, align 8, !tbaa !55
  %214 = load ptr, ptr %7, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.jpeg_component_info, ptr %214, i32 0, i32 4
  %216 = load i32, ptr %215, align 8, !tbaa !55
  store i32 %216, ptr %10, align 4, !tbaa !43
  %217 = load i32, ptr %10, align 4, !tbaa !43
  %218 = icmp slt i32 %217, 0
  br i1 %218, label %230, label %219

219:                                              ; preds = %193
  %220 = load i32, ptr %10, align 4, !tbaa !43
  %221 = icmp sge i32 %220, 4
  br i1 %221, label %230, label %222

222:                                              ; preds = %219
  %223 = load ptr, ptr %3, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %223, i32 0, i32 40
  %225 = load i32, ptr %10, align 4, !tbaa !43
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [4 x ptr], ptr %224, i64 0, i64 %226
  %228 = load ptr, ptr %227, align 8, !tbaa !5
  %229 = icmp eq ptr %228, null
  br i1 %229, label %230, label %247

230:                                              ; preds = %222, %219, %193
  %231 = load ptr, ptr %4, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %231, i32 0, i32 0
  %233 = load ptr, ptr %232, align 8, !tbaa !14
  %234 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %233, i32 0, i32 5
  store i32 54, ptr %234, align 8, !tbaa !15
  %235 = load i32, ptr %10, align 4, !tbaa !43
  %236 = load ptr, ptr %4, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %236, i32 0, i32 0
  %238 = load ptr, ptr %237, align 8, !tbaa !14
  %239 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %238, i32 0, i32 6
  %240 = getelementptr inbounds [8 x i32], ptr %239, i64 0, i64 0
  store i32 %235, ptr %240, align 4, !tbaa !18
  %241 = load ptr, ptr %4, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %241, i32 0, i32 0
  %243 = load ptr, ptr %242, align 8, !tbaa !14
  %244 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %243, i32 0, i32 0
  %245 = load ptr, ptr %244, align 8, !tbaa !19
  %246 = load ptr, ptr %4, align 8, !tbaa !5
  call void %245(ptr noundef %246)
  br label %247

247:                                              ; preds = %230, %222
  %248 = load ptr, ptr %3, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %248, i32 0, i32 40
  %250 = load i32, ptr %10, align 4, !tbaa !43
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [4 x ptr], ptr %249, i64 0, i64 %251
  %253 = load ptr, ptr %252, align 8, !tbaa !5
  store ptr %253, ptr %9, align 8, !tbaa !5
  %254 = load ptr, ptr %6, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.jpeg_component_info, ptr %254, i32 0, i32 20
  %256 = load ptr, ptr %255, align 8, !tbaa !56
  store ptr %256, ptr %8, align 8, !tbaa !5
  %257 = load ptr, ptr %8, align 8, !tbaa !5
  %258 = icmp ne ptr %257, null
  br i1 %258, label %259, label %301

259:                                              ; preds = %247
  store i32 0, ptr %12, align 4, !tbaa !43
  br label %260

260:                                              ; preds = %297, %259
  %261 = load i32, ptr %12, align 4, !tbaa !43
  %262 = icmp slt i32 %261, 64
  br i1 %262, label %263, label %300

263:                                              ; preds = %260
  %264 = load ptr, ptr %8, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.JQUANT_TBL, ptr %264, i32 0, i32 0
  %266 = load i32, ptr %12, align 4, !tbaa !43
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [64 x i16], ptr %265, i64 0, i64 %267
  %269 = load i16, ptr %268, align 2, !tbaa !57
  %270 = zext i16 %269 to i32
  %271 = load ptr, ptr %9, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.JQUANT_TBL, ptr %271, i32 0, i32 0
  %273 = load i32, ptr %12, align 4, !tbaa !43
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [64 x i16], ptr %272, i64 0, i64 %274
  %276 = load i16, ptr %275, align 2, !tbaa !57
  %277 = zext i16 %276 to i32
  %278 = icmp ne i32 %270, %277
  br i1 %278, label %279, label %296

279:                                              ; preds = %263
  %280 = load ptr, ptr %4, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %280, i32 0, i32 0
  %282 = load ptr, ptr %281, align 8, !tbaa !14
  %283 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %282, i32 0, i32 5
  store i32 45, ptr %283, align 8, !tbaa !15
  %284 = load i32, ptr %10, align 4, !tbaa !43
  %285 = load ptr, ptr %4, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %285, i32 0, i32 0
  %287 = load ptr, ptr %286, align 8, !tbaa !14
  %288 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %287, i32 0, i32 6
  %289 = getelementptr inbounds [8 x i32], ptr %288, i64 0, i64 0
  store i32 %284, ptr %289, align 4, !tbaa !18
  %290 = load ptr, ptr %4, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %290, i32 0, i32 0
  %292 = load ptr, ptr %291, align 8, !tbaa !14
  %293 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %292, i32 0, i32 0
  %294 = load ptr, ptr %293, align 8, !tbaa !19
  %295 = load ptr, ptr %4, align 8, !tbaa !5
  call void %294(ptr noundef %295)
  br label %296

296:                                              ; preds = %279, %263
  br label %297

297:                                              ; preds = %296
  %298 = load i32, ptr %12, align 4, !tbaa !43
  %299 = add nsw i32 %298, 1
  store i32 %299, ptr %12, align 4, !tbaa !43
  br label %260, !llvm.loop !58

300:                                              ; preds = %260
  br label %301

301:                                              ; preds = %300, %247
  br label %302

302:                                              ; preds = %301
  %303 = load i32, ptr %11, align 4, !tbaa !43
  %304 = add nsw i32 %303, 1
  store i32 %304, ptr %11, align 4, !tbaa !43
  %305 = load ptr, ptr %6, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.jpeg_component_info, ptr %305, i32 1
  store ptr %306, ptr %6, align 8, !tbaa !5
  %307 = load ptr, ptr %7, align 8, !tbaa !5
  %308 = getelementptr inbounds %struct.jpeg_component_info, ptr %307, i32 1
  store ptr %308, ptr %7, align 8, !tbaa !5
  br label %187, !llvm.loop !59

309:                                              ; preds = %187
  %310 = load ptr, ptr %3, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %310, i32 0, i32 52
  %312 = load i8, ptr %311, align 8, !tbaa !60
  %313 = icmp ne i8 %312, 0
  br i1 %313, label %314, label %353

314:                                              ; preds = %309
  %315 = load ptr, ptr %3, align 8, !tbaa !5
  %316 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %315, i32 0, i32 53
  %317 = load i8, ptr %316, align 1, !tbaa !61
  %318 = zext i8 %317 to i32
  %319 = icmp eq i32 %318, 1
  br i1 %319, label %326, label %320

320:                                              ; preds = %314
  %321 = load ptr, ptr %3, align 8, !tbaa !5
  %322 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %321, i32 0, i32 53
  %323 = load i8, ptr %322, align 1, !tbaa !61
  %324 = zext i8 %323 to i32
  %325 = icmp eq i32 %324, 2
  br i1 %325, label %326, label %337

326:                                              ; preds = %320, %314
  %327 = load ptr, ptr %3, align 8, !tbaa !5
  %328 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %327, i32 0, i32 53
  %329 = load i8, ptr %328, align 1, !tbaa !61
  %330 = load ptr, ptr %4, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %330, i32 0, i32 39
  store i8 %329, ptr %331, align 1, !tbaa !62
  %332 = load ptr, ptr %3, align 8, !tbaa !5
  %333 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %332, i32 0, i32 54
  %334 = load i8, ptr %333, align 2, !tbaa !63
  %335 = load ptr, ptr %4, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %335, i32 0, i32 40
  store i8 %334, ptr %336, align 2, !tbaa !64
  br label %337

337:                                              ; preds = %326, %320
  %338 = load ptr, ptr %3, align 8, !tbaa !5
  %339 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %338, i32 0, i32 55
  %340 = load i8, ptr %339, align 1, !tbaa !65
  %341 = load ptr, ptr %4, align 8, !tbaa !5
  %342 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %341, i32 0, i32 41
  store i8 %340, ptr %342, align 1, !tbaa !66
  %343 = load ptr, ptr %3, align 8, !tbaa !5
  %344 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %343, i32 0, i32 56
  %345 = load i16, ptr %344, align 4, !tbaa !67
  %346 = load ptr, ptr %4, align 8, !tbaa !5
  %347 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %346, i32 0, i32 42
  store i16 %345, ptr %347, align 4, !tbaa !68
  %348 = load ptr, ptr %3, align 8, !tbaa !5
  %349 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %348, i32 0, i32 57
  %350 = load i16, ptr %349, align 2, !tbaa !69
  %351 = load ptr, ptr %4, align 8, !tbaa !5
  %352 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %351, i32 0, i32 43
  store i16 %350, ptr %352, align 2, !tbaa !70
  br label %353

353:                                              ; preds = %337, %309
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  ret void
}

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

declare void @jpeg_set_defaults(ptr noundef) #2

declare void @jpeg_set_colorspace(ptr noundef, i32 noundef) #2

declare ptr @jpeg_alloc_quant_table(ptr noundef) #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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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/C++ TBAA"}
!9 = !{!10, !11, i64 36}
!10 = !{!"jpeg_compress_struct", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !7, i64 32, !11, i64 36, !6, i64 40, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !12, i64 64, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !6, i64 104, !7, i64 112, !7, i64 144, !7, i64 160, !7, i64 192, !7, i64 224, !7, i64 240, !7, i64 256, !11, i64 272, !6, i64 280, !7, i64 288, !7, i64 289, !7, i64 290, !7, i64 291, !7, i64 292, !11, i64 296, !11, i64 300, !11, i64 304, !11, i64 308, !7, i64 312, !7, i64 313, !7, i64 314, !7, i64 315, !13, i64 316, !13, i64 318, !7, i64 320, !11, i64 324, !11, i64 328, !7, i64 332, !11, i64 336, !11, i64 340, !11, i64 344, !11, i64 348, !11, i64 352, !11, i64 356, !7, i64 360, !11, i64 392, !11, i64 396, !11, i64 400, !7, i64 404, !11, i64 444, !11, i64 448, !11, i64 452, !11, i64 456, !11, i64 460, !6, i64 464, !11, i64 472, !6, i64 480, !6, i64 488, !6, i64 496, !6, i64 504, !6, i64 512, !6, i64 520, !6, i64 528, !6, i64 536, !6, i64 544, !6, i64 552, !11, i64 560}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!10, !6, i64 0}
!15 = !{!16, !11, i64 40}
!16 = !{!"jpeg_error_mgr", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !11, i64 40, !7, i64 44, !11, i64 124, !17, i64 128, !6, i64 136, !11, i64 144, !6, i64 152, !11, i64 160, !11, i64 164}
!17 = !{!"long", !7, i64 0}
!18 = !{!7, !7, i64 0}
!19 = !{!16, !6, i64 0}
!20 = !{!21, !11, i64 48}
!21 = !{!"jpeg_decompress_struct", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !7, i64 32, !11, i64 36, !6, i64 40, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !12, i64 80, !7, i64 88, !7, i64 89, !11, i64 92, !7, i64 96, !7, i64 97, !7, i64 98, !11, i64 100, !7, i64 104, !11, i64 108, !7, i64 112, !7, i64 113, !7, i64 114, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132, !11, i64 136, !6, i64 144, !11, i64 152, !11, i64 156, !11, i64 160, !11, i64 164, !11, i64 168, !6, i64 176, !7, i64 184, !7, i64 216, !7, i64 248, !11, i64 280, !6, i64 288, !7, i64 296, !7, i64 297, !7, i64 298, !7, i64 299, !7, i64 315, !7, i64 331, !11, i64 348, !7, i64 352, !7, i64 353, !7, i64 354, !7, i64 355, !13, i64 356, !13, i64 358, !7, i64 360, !7, i64 361, !11, i64 364, !7, i64 368, !6, i64 376, !11, i64 384, !11, i64 388, !11, i64 392, !11, i64 396, !11, i64 400, !6, i64 408, !11, i64 416, !7, i64 424, !11, i64 456, !11, i64 460, !11, i64 464, !7, i64 468, !11, i64 508, !11, i64 512, !11, i64 516, !11, i64 520, !11, i64 524, !6, i64 528, !11, i64 536, !11, i64 540, !6, i64 544, !6, i64 552, !6, i64 560, !6, i64 568, !6, i64 576, !6, i64 584, !6, i64 592, !6, i64 600, !6, i64 608, !6, i64 616, !6, i64 624}
!22 = !{!10, !11, i64 48}
!23 = !{!21, !11, i64 52}
!24 = !{!10, !11, i64 52}
!25 = !{!21, !11, i64 56}
!26 = !{!10, !11, i64 56}
!27 = !{!21, !11, i64 60}
!28 = !{!10, !11, i64 60}
!29 = !{!21, !11, i64 116}
!30 = !{!10, !11, i64 80}
!31 = !{!21, !11, i64 120}
!32 = !{!10, !11, i64 84}
!33 = !{!21, !11, i64 392}
!34 = !{!10, !11, i64 344}
!35 = !{!21, !11, i64 396}
!36 = !{!10, !11, i64 348}
!37 = !{!21, !11, i64 364}
!38 = !{!10, !11, i64 324}
!39 = !{!21, !11, i64 280}
!40 = !{!10, !11, i64 88}
!41 = !{!21, !7, i64 368}
!42 = !{!10, !7, i64 291}
!43 = !{!11, !11, i64 0}
!44 = !{!45, !7, i64 128}
!45 = !{!"", !7, i64 0, !7, i64 128}
!46 = distinct !{!46, !47}
!47 = !{!"llvm.loop.mustprogress"}
!48 = !{!10, !11, i64 92}
!49 = !{!21, !6, i64 288}
!50 = !{!10, !6, i64 104}
!51 = !{!52, !11, i64 0}
!52 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !7, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !6, i64 80, !6, i64 88}
!53 = !{!52, !11, i64 8}
!54 = !{!52, !11, i64 12}
!55 = !{!52, !11, i64 16}
!56 = !{!52, !6, i64 80}
!57 = !{!13, !13, i64 0}
!58 = distinct !{!58, !47}
!59 = distinct !{!59, !47}
!60 = !{!21, !7, i64 352}
!61 = !{!21, !7, i64 353}
!62 = !{!10, !7, i64 313}
!63 = !{!21, !7, i64 354}
!64 = !{!10, !7, i64 314}
!65 = !{!21, !7, i64 355}
!66 = !{!10, !7, i64 315}
!67 = !{!21, !13, i64 356}
!68 = !{!10, !13, i64 316}
!69 = !{!21, !13, i64 358}
!70 = !{!10, !13, i64 318}


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

; Function Attrs: nounwind uwtable
define dso_local void @jpeg_copy_critical_parameters(ptr nocapture noundef readonly %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %1, i64 36
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %.not = icmp eq i32 %4, 100
  br i1 %.not, label %11, label %5

5:                                                ; preds = %2
  %6 = load ptr, ptr %1, align 8, !tbaa !13
  %7 = getelementptr inbounds i8, ptr %6, i64 40
  store i32 21, ptr %7, align 8, !tbaa !14
  %8 = getelementptr inbounds i8, ptr %6, i64 44
  store i32 %4, ptr %8, align 4, !tbaa !17
  %9 = load ptr, ptr %1, align 8, !tbaa !13
  %10 = load ptr, ptr %9, align 8, !tbaa !18
  tail call void %10(ptr noundef nonnull %1) #3
  br label %11

11:                                               ; preds = %5, %2
  %12 = getelementptr inbounds i8, ptr %0, i64 48
  %13 = getelementptr inbounds i8, ptr %1, i64 48
  %14 = getelementptr inbounds i8, ptr %0, i64 56
  %15 = getelementptr inbounds i8, ptr %0, i64 60
  %16 = load <4 x i32>, ptr %12, align 8, !tbaa !19
  store <4 x i32> %16, ptr %13, align 8, !tbaa !19
  %17 = getelementptr inbounds i8, ptr %0, i64 116
  %18 = getelementptr inbounds i8, ptr %1, i64 80
  %19 = load <2 x i32>, ptr %17, align 4, !tbaa !19
  store <2 x i32> %19, ptr %18, align 8, !tbaa !19
  %20 = getelementptr inbounds i8, ptr %0, i64 392
  %21 = getelementptr inbounds i8, ptr %1, i64 344
  %22 = load <2 x i32>, ptr %20, align 8, !tbaa !19
  store <2 x i32> %22, ptr %21, align 8, !tbaa !19
  tail call void @jpeg_set_defaults(ptr noundef nonnull %1) #3
  %23 = getelementptr inbounds i8, ptr %0, i64 364
  %24 = load i32, ptr %23, align 4, !tbaa !20
  %25 = getelementptr inbounds i8, ptr %1, i64 324
  store i32 %24, ptr %25, align 4, !tbaa !22
  %26 = load i32, ptr %15, align 4, !tbaa !23
  tail call void @jpeg_set_colorspace(ptr noundef nonnull %1, i32 noundef %26) #3
  %27 = getelementptr inbounds i8, ptr %0, i64 280
  %28 = load i32, ptr %27, align 8, !tbaa !24
  %29 = getelementptr inbounds i8, ptr %1, i64 88
  store i32 %28, ptr %29, align 8, !tbaa !25
  %30 = getelementptr inbounds i8, ptr %0, i64 368
  %31 = load i8, ptr %30, align 8, !tbaa !26
  %32 = getelementptr inbounds i8, ptr %1, i64 291
  store i8 %31, ptr %32, align 1, !tbaa !27
  %33 = getelementptr inbounds i8, ptr %0, i64 184
  %34 = getelementptr inbounds i8, ptr %1, i64 112
  %35 = load ptr, ptr %33, align 8, !tbaa !28
  %.not118 = icmp eq ptr %35, null
  br i1 %.not118, label %46, label %36

36:                                               ; preds = %11
  %37 = load ptr, ptr %34, align 8, !tbaa !28
  %38 = icmp eq ptr %37, null
  br i1 %38, label %39, label %41

39:                                               ; preds = %36
  %40 = tail call ptr @jpeg_alloc_quant_table(ptr noundef nonnull %1) #3
  store ptr %40, ptr %34, align 8, !tbaa !28
  %.pre = load ptr, ptr %33, align 8, !tbaa !28
  br label %41

41:                                               ; preds = %39, %36
  %42 = phi ptr [ %.pre, %39 ], [ %35, %36 ]
  %43 = phi ptr [ %40, %39 ], [ %37, %36 ]
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 2 dereferenceable(128) %43, ptr noundef nonnull align 2 dereferenceable(128) %42, i64 128, i1 false)
  %44 = load ptr, ptr %34, align 8, !tbaa !28
  %45 = getelementptr inbounds i8, ptr %44, i64 128
  store i8 0, ptr %45, align 2, !tbaa !29
  br label %46

46:                                               ; preds = %11, %41
  %47 = getelementptr inbounds i8, ptr %0, i64 192
  %48 = load ptr, ptr %47, align 8, !tbaa !28
  %.not118.1 = icmp eq ptr %48, null
  br i1 %.not118.1, label %60, label %49

49:                                               ; preds = %46
  %50 = getelementptr inbounds i8, ptr %1, i64 120
  %51 = load ptr, ptr %50, align 8, !tbaa !28
  %52 = icmp eq ptr %51, null
  br i1 %52, label %53, label %55

53:                                               ; preds = %49
  %54 = tail call ptr @jpeg_alloc_quant_table(ptr noundef nonnull %1) #3
  store ptr %54, ptr %50, align 8, !tbaa !28
  %.pre127 = load ptr, ptr %47, align 8, !tbaa !28
  br label %55

55:                                               ; preds = %53, %49
  %56 = phi ptr [ %.pre127, %53 ], [ %48, %49 ]
  %57 = phi ptr [ %54, %53 ], [ %51, %49 ]
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 2 dereferenceable(128) %57, ptr noundef nonnull align 2 dereferenceable(128) %56, i64 128, i1 false)
  %58 = load ptr, ptr %50, align 8, !tbaa !28
  %59 = getelementptr inbounds i8, ptr %58, i64 128
  store i8 0, ptr %59, align 2, !tbaa !29
  br label %60

60:                                               ; preds = %55, %46
  %61 = getelementptr inbounds i8, ptr %0, i64 200
  %62 = load ptr, ptr %61, align 8, !tbaa !28
  %.not118.2 = icmp eq ptr %62, null
  br i1 %.not118.2, label %74, label %63

63:                                               ; preds = %60
  %64 = getelementptr inbounds i8, ptr %1, i64 128
  %65 = load ptr, ptr %64, align 8, !tbaa !28
  %66 = icmp eq ptr %65, null
  br i1 %66, label %67, label %69

67:                                               ; preds = %63
  %68 = tail call ptr @jpeg_alloc_quant_table(ptr noundef nonnull %1) #3
  store ptr %68, ptr %64, align 8, !tbaa !28
  %.pre128 = load ptr, ptr %61, align 8, !tbaa !28
  br label %69

69:                                               ; preds = %67, %63
  %70 = phi ptr [ %.pre128, %67 ], [ %62, %63 ]
  %71 = phi ptr [ %68, %67 ], [ %65, %63 ]
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 2 dereferenceable(128) %71, ptr noundef nonnull align 2 dereferenceable(128) %70, i64 128, i1 false)
  %72 = load ptr, ptr %64, align 8, !tbaa !28
  %73 = getelementptr inbounds i8, ptr %72, i64 128
  store i8 0, ptr %73, align 2, !tbaa !29
  br label %74

74:                                               ; preds = %69, %60
  %75 = getelementptr inbounds i8, ptr %0, i64 208
  %76 = load ptr, ptr %75, align 8, !tbaa !28
  %.not118.3 = icmp eq ptr %76, null
  br i1 %.not118.3, label %88, label %77

77:                                               ; preds = %74
  %78 = getelementptr inbounds i8, ptr %1, i64 136
  %79 = load ptr, ptr %78, align 8, !tbaa !28
  %80 = icmp eq ptr %79, null
  br i1 %80, label %81, label %83

81:                                               ; preds = %77
  %82 = tail call ptr @jpeg_alloc_quant_table(ptr noundef nonnull %1) #3
  store ptr %82, ptr %78, align 8, !tbaa !28
  %.pre129 = load ptr, ptr %75, align 8, !tbaa !28
  br label %83

83:                                               ; preds = %81, %77
  %84 = phi ptr [ %.pre129, %81 ], [ %76, %77 ]
  %85 = phi ptr [ %82, %81 ], [ %79, %77 ]
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 2 dereferenceable(128) %85, ptr noundef nonnull align 2 dereferenceable(128) %84, i64 128, i1 false)
  %86 = load ptr, ptr %78, align 8, !tbaa !28
  %87 = getelementptr inbounds i8, ptr %86, i64 128
  store i8 0, ptr %87, align 2, !tbaa !29
  br label %88

88:                                               ; preds = %83, %74
  %89 = load i32, ptr %14, align 8, !tbaa !31
  %90 = getelementptr inbounds i8, ptr %1, i64 92
  store i32 %89, ptr %90, align 4, !tbaa !32
  %91 = add i32 %89, -11
  %or.cond119 = icmp ult i32 %91, -10
  br i1 %or.cond119, label %92, label %.lr.ph

92:                                               ; preds = %88
  %93 = load ptr, ptr %1, align 8, !tbaa !13
  %94 = getelementptr inbounds i8, ptr %93, i64 40
  store i32 27, ptr %94, align 8, !tbaa !14
  %95 = getelementptr inbounds i8, ptr %93, i64 44
  store i32 %89, ptr %95, align 4, !tbaa !17
  %96 = load ptr, ptr %1, align 8, !tbaa !13
  %97 = getelementptr inbounds i8, ptr %96, i64 48
  store i32 10, ptr %97, align 4, !tbaa !17
  %98 = load ptr, ptr %1, align 8, !tbaa !13
  %99 = load ptr, ptr %98, align 8, !tbaa !18
  tail call void %99(ptr noundef nonnull %1) #3
  %.pre130 = load i32, ptr %90, align 4, !tbaa !32
  %100 = icmp sgt i32 %.pre130, 0
  br i1 %100, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %88, %92
  %101 = getelementptr inbounds i8, ptr %1, i64 104
  %102 = load ptr, ptr %101, align 8, !tbaa !33
  %103 = getelementptr inbounds i8, ptr %0, i64 288
  %104 = load ptr, ptr %103, align 8, !tbaa !34
  br label %105

105:                                              ; preds = %.lr.ph, %.loopexit
  %.0107124 = phi i32 [ 0, %.lr.ph ], [ %138, %.loopexit ]
  %.0109123 = phi ptr [ %104, %.lr.ph ], [ %139, %.loopexit ]
  %.0110122 = phi ptr [ %102, %.lr.ph ], [ %140, %.loopexit ]
  %106 = load i32, ptr %.0109123, align 8, !tbaa !35
  store i32 %106, ptr %.0110122, align 8, !tbaa !35
  %107 = getelementptr inbounds i8, ptr %.0109123, i64 8
  %108 = getelementptr inbounds i8, ptr %.0110122, i64 8
  %109 = load <2 x i32>, ptr %107, align 8, !tbaa !19
  store <2 x i32> %109, ptr %108, align 8, !tbaa !19
  %110 = getelementptr inbounds i8, ptr %.0109123, i64 16
  %111 = load i32, ptr %110, align 8, !tbaa !37
  %112 = getelementptr inbounds i8, ptr %.0110122, i64 16
  store i32 %111, ptr %112, align 8, !tbaa !37
  %or.cond = icmp ugt i32 %111, 3
  br i1 %or.cond, label %118, label %113

113:                                              ; preds = %105
  %114 = zext nneg i32 %111 to i64
  %115 = getelementptr inbounds [4 x ptr], ptr %33, i64 0, i64 %114
  %116 = load ptr, ptr %115, align 8, !tbaa !28
  %117 = icmp eq ptr %116, null
  br i1 %117, label %118, label %._crit_edge133

118:                                              ; preds = %113, %105
  %119 = load ptr, ptr %1, align 8, !tbaa !13
  %120 = getelementptr inbounds i8, ptr %119, i64 40
  store i32 54, ptr %120, align 8, !tbaa !14
  %121 = getelementptr inbounds i8, ptr %119, i64 44
  store i32 %111, ptr %121, align 4, !tbaa !17
  %122 = load ptr, ptr %1, align 8, !tbaa !13
  %123 = load ptr, ptr %122, align 8, !tbaa !18
  tail call void %123(ptr noundef nonnull %1) #3
  %.phi.trans.insert = sext i32 %111 to i64
  %.phi.trans.insert131 = getelementptr inbounds [4 x ptr], ptr %33, i64 0, i64 %.phi.trans.insert
  %.pre132 = load ptr, ptr %.phi.trans.insert131, align 8, !tbaa !28
  br label %._crit_edge133

._crit_edge133:                                   ; preds = %113, %118
  %124 = phi ptr [ %.pre132, %118 ], [ %116, %113 ]
  %125 = getelementptr inbounds i8, ptr %.0109123, i64 80
  %126 = load ptr, ptr %125, align 8, !tbaa !38
  %.not116 = icmp eq ptr %126, null
  br i1 %.not116, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %._crit_edge133, %137
  %indvars.iv = phi i64 [ %indvars.iv.next, %137 ], [ 0, %._crit_edge133 ]
  %127 = getelementptr inbounds [64 x i16], ptr %126, i64 0, i64 %indvars.iv
  %128 = load i16, ptr %127, align 2, !tbaa !39
  %129 = getelementptr inbounds [64 x i16], ptr %124, i64 0, i64 %indvars.iv
  %130 = load i16, ptr %129, align 2, !tbaa !39
  %.not117 = icmp eq i16 %128, %130
  br i1 %.not117, label %137, label %131

131:                                              ; preds = %.preheader
  %132 = load ptr, ptr %1, align 8, !tbaa !13
  %133 = getelementptr inbounds i8, ptr %132, i64 40
  store i32 45, ptr %133, align 8, !tbaa !14
  %134 = getelementptr inbounds i8, ptr %132, i64 44
  store i32 %111, ptr %134, align 4, !tbaa !17
  %135 = load ptr, ptr %1, align 8, !tbaa !13
  %136 = load ptr, ptr %135, align 8, !tbaa !18
  tail call void %136(ptr noundef nonnull %1) #3
  br label %137

137:                                              ; preds = %.preheader, %131
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 64
  br i1 %exitcond.not, label %.loopexit, label %.preheader, !llvm.loop !40

.loopexit:                                        ; preds = %137, %._crit_edge133
  %138 = add nuw nsw i32 %.0107124, 1
  %139 = getelementptr inbounds i8, ptr %.0109123, i64 96
  %140 = getelementptr inbounds i8, ptr %.0110122, i64 96
  %141 = load i32, ptr %90, align 4, !tbaa !32
  %142 = icmp slt i32 %138, %141
  br i1 %142, label %105, label %._crit_edge, !llvm.loop !42

._crit_edge:                                      ; preds = %.loopexit, %92
  %143 = getelementptr inbounds i8, ptr %0, i64 352
  %144 = load i8, ptr %143, align 8, !tbaa !43
  %.not115 = icmp eq i8 %144, 0
  br i1 %.not115, label %160, label %145

145:                                              ; preds = %._crit_edge
  %146 = getelementptr inbounds i8, ptr %0, i64 353
  %147 = load i8, ptr %146, align 1, !tbaa !44
  %.off = add i8 %147, -1
  %switch = icmp ult i8 %.off, 2
  br i1 %switch, label %148, label %153

148:                                              ; preds = %145
  %149 = getelementptr inbounds i8, ptr %1, i64 313
  store i8 %147, ptr %149, align 1, !tbaa !45
  %150 = getelementptr inbounds i8, ptr %0, i64 354
  %151 = load i8, ptr %150, align 2, !tbaa !46
  %152 = getelementptr inbounds i8, ptr %1, i64 314
  store i8 %151, ptr %152, align 2, !tbaa !47
  br label %153

153:                                              ; preds = %145, %148
  %154 = getelementptr inbounds i8, ptr %0, i64 355
  %155 = load i8, ptr %154, align 1, !tbaa !48
  %156 = getelementptr inbounds i8, ptr %1, i64 315
  store i8 %155, ptr %156, align 1, !tbaa !49
  %157 = getelementptr inbounds i8, ptr %0, i64 356
  %158 = getelementptr inbounds i8, ptr %1, i64 316
  %159 = load <2 x i16>, ptr %157, align 4, !tbaa !39
  store <2 x i16> %159, ptr %158, align 4, !tbaa !39
  br label %160

160:                                              ; preds = %153, %._crit_edge
  ret void
}

declare void @jpeg_set_defaults(ptr noundef) local_unnamed_addr #1

declare void @jpeg_set_colorspace(ptr noundef, i32 noundef) local_unnamed_addr #1

declare ptr @jpeg_alloc_quant_table(ptr noundef) local_unnamed_addr #1

; 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) #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 36}
!6 = !{!"jpeg_compress_struct", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !8, i64 32, !10, i64 36, !7, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !11, i64 64, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !7, i64 104, !8, i64 112, !8, i64 144, !8, i64 160, !8, i64 192, !8, i64 224, !8, i64 240, !8, i64 256, !10, i64 272, !7, i64 280, !8, i64 288, !8, i64 289, !8, i64 290, !8, i64 291, !8, i64 292, !10, i64 296, !10, i64 300, !10, i64 304, !10, i64 308, !8, i64 312, !8, i64 313, !8, i64 314, !8, i64 315, !12, i64 316, !12, i64 318, !8, i64 320, !10, i64 324, !10, i64 328, !8, i64 332, !10, i64 336, !10, i64 340, !10, i64 344, !10, i64 348, !10, i64 352, !10, i64 356, !8, i64 360, !10, i64 392, !10, i64 396, !10, i64 400, !8, i64 404, !10, i64 444, !10, i64 448, !10, i64 452, !10, i64 456, !10, i64 460, !7, i64 464, !10, i64 472, !7, i64 480, !7, i64 488, !7, i64 496, !7, i64 504, !7, i64 512, !7, i64 520, !7, i64 528, !7, i64 536, !7, i64 544, !7, i64 552, !10, i64 560}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = !{!6, !7, i64 0}
!14 = !{!15, !10, i64 40}
!15 = !{!"jpeg_error_mgr", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !8, i64 44, !10, i64 124, !16, i64 128, !7, i64 136, !10, i64 144, !7, i64 152, !10, i64 160, !10, i64 164}
!16 = !{!"long", !8, i64 0}
!17 = !{!8, !8, i64 0}
!18 = !{!15, !7, i64 0}
!19 = !{!10, !10, i64 0}
!20 = !{!21, !10, i64 364}
!21 = !{!"jpeg_decompress_struct", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !8, i64 32, !10, i64 36, !7, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !11, i64 80, !8, i64 88, !8, i64 89, !10, i64 92, !8, i64 96, !8, i64 97, !8, i64 98, !10, i64 100, !8, i64 104, !10, i64 108, !8, i64 112, !8, i64 113, !8, i64 114, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !7, i64 144, !10, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !10, i64 168, !7, i64 176, !8, i64 184, !8, i64 216, !8, i64 248, !10, i64 280, !7, i64 288, !8, i64 296, !8, i64 297, !8, i64 298, !8, i64 299, !8, i64 315, !8, i64 331, !10, i64 348, !8, i64 352, !8, i64 353, !8, i64 354, !8, i64 355, !12, i64 356, !12, i64 358, !8, i64 360, !8, i64 361, !10, i64 364, !8, i64 368, !7, i64 376, !10, i64 384, !10, i64 388, !10, i64 392, !10, i64 396, !10, i64 400, !7, i64 408, !10, i64 416, !8, i64 424, !10, i64 456, !10, i64 460, !10, i64 464, !8, i64 468, !10, i64 508, !10, i64 512, !10, i64 516, !10, i64 520, !10, i64 524, !7, i64 528, !10, i64 536, !10, i64 540, !7, i64 544, !7, i64 552, !7, i64 560, !7, i64 568, !7, i64 576, !7, i64 584, !7, i64 592, !7, i64 600, !7, i64 608, !7, i64 616, !7, i64 624}
!22 = !{!6, !10, i64 324}
!23 = !{!21, !10, i64 60}
!24 = !{!21, !10, i64 280}
!25 = !{!6, !10, i64 88}
!26 = !{!21, !8, i64 368}
!27 = !{!6, !8, i64 291}
!28 = !{!7, !7, i64 0}
!29 = !{!30, !8, i64 128}
!30 = !{!"", !8, i64 0, !8, i64 128}
!31 = !{!21, !10, i64 56}
!32 = !{!6, !10, i64 92}
!33 = !{!6, !7, i64 104}
!34 = !{!21, !7, i64 288}
!35 = !{!36, !10, i64 0}
!36 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !8, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !7, i64 80, !7, i64 88}
!37 = !{!36, !10, i64 16}
!38 = !{!36, !7, i64 80}
!39 = !{!12, !12, i64 0}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}
!42 = distinct !{!42, !41}
!43 = !{!21, !8, i64 352}
!44 = !{!21, !8, i64 353}
!45 = !{!6, !8, i64 313}
!46 = !{!21, !8, i64 354}
!47 = !{!6, !8, i64 314}
!48 = !{!21, !8, i64 355}
!49 = !{!6, !8, i64 315}


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