; LLVM IR from JayXon/Leanify :: lib/mozjpeg (jcparam)

; 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, i32, i32, ptr, i32, i32, i32, i32, double, i32, i32, i32, ptr, [4 x ptr], [4 x ptr], [4 x ptr], [16 x i8], [16 x i8], [16 x i8], i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8, i8, i8, i16, i16, i32, i32, i32, i32, i32, i32, i32, [4 x ptr], i32, i32, i32, [10 x i32], i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32 }
%struct.jpeg_comp_master = type { ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x [64 x double]], [4 x [64 x double]], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, float, float }
%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_memory_mgr = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64 }

; 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: nounwind uwtable
define dso_local void @jpeg_simple_progression(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #2
  %7 = load ptr, ptr %2, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %7, i32 0, i32 54
  %9 = load ptr, ptr %8, align 8, !tbaa !9
  %10 = getelementptr inbounds %struct.jpeg_comp_master, ptr %9, i32 0, i32 5
  %11 = load i32, ptr %10, align 8, !tbaa !14
  %12 = icmp ne i32 %11, 0
  br i1 %12, label %13, label %19

13:                                               ; preds = %1
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = call i32 @jpeg_search_progression(ptr noundef %14)
  %16 = icmp eq i32 %15, 1
  br i1 %16, label %17, label %18

17:                                               ; preds = %13
  store i32 1, ptr %6, align 4
  br label %287

18:                                               ; preds = %13
  br label %19

19:                                               ; preds = %18, %1
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %20, i32 0, i32 5
  %22 = load i32, ptr %21, align 4, !tbaa !17
  %23 = icmp ne i32 %22, 100
  br i1 %23, label %24, label %43

24:                                               ; preds = %19
  %25 = load ptr, ptr %2, 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 !18
  %28 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %27, i32 0, i32 5
  store i32 20, ptr %28, align 8, !tbaa !19
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %29, i32 0, i32 5
  %31 = load i32, ptr %30, align 4, !tbaa !17
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %32, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !18
  %35 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %34, i32 0, i32 6
  %36 = getelementptr inbounds [8 x i32], ptr %35, i64 0, i64 0
  store i32 %31, ptr %36, align 4, !tbaa !22
  %37 = load ptr, ptr %2, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %37, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !18
  %40 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %39, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8, !tbaa !23
  %42 = load ptr, ptr %2, align 8, !tbaa !5
  call void %41(ptr noundef %42)
  br label %43

43:                                               ; preds = %24, %19
  %44 = load ptr, ptr %2, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %44, i32 0, i32 13
  %46 = load i32, ptr %45, align 4, !tbaa !24
  store i32 %46, ptr %3, align 4, !tbaa !25
  %47 = load i32, ptr %3, align 4, !tbaa !25
  %48 = icmp eq i32 %47, 3
  br i1 %48, label %49, label %82

49:                                               ; preds = %43
  %50 = load ptr, ptr %2, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %50, i32 0, i32 14
  %52 = load i32, ptr %51, align 8, !tbaa !26
  %53 = icmp eq i32 %52, 3
  br i1 %53, label %54, label %82

54:                                               ; preds = %49
  %55 = load ptr, ptr %2, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %55, i32 0, i32 54
  %57 = load ptr, ptr %56, align 8, !tbaa !9
  %58 = getelementptr inbounds %struct.jpeg_comp_master, ptr %57, i32 0, i32 16
  %59 = load i32, ptr %58, align 8, !tbaa !27
  %60 = icmp eq i32 %59, 1560820397
  br i1 %60, label %61, label %80

61:                                               ; preds = %54
  %62 = load ptr, ptr %2, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %62, i32 0, i32 54
  %64 = load ptr, ptr %63, align 8, !tbaa !9
  %65 = getelementptr inbounds %struct.jpeg_comp_master, ptr %64, i32 0, i32 17
  %66 = load i32, ptr %65, align 4, !tbaa !28
  %67 = icmp eq i32 %66, 0
  br i1 %67, label %68, label %69

68:                                               ; preds = %61
  store i32 9, ptr %4, align 4, !tbaa !25
  br label %79

69:                                               ; preds = %61
  %70 = load ptr, ptr %2, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %70, i32 0, i32 54
  %72 = load ptr, ptr %71, align 8, !tbaa !9
  %73 = getelementptr inbounds %struct.jpeg_comp_master, ptr %72, i32 0, i32 17
  %74 = load i32, ptr %73, align 4, !tbaa !28
  %75 = icmp eq i32 %74, 1
  br i1 %75, label %76, label %77

76:                                               ; preds = %69
  store i32 11, ptr %4, align 4, !tbaa !25
  br label %78

77:                                               ; preds = %69
  store i32 10, ptr %4, align 4, !tbaa !25
  br label %78

78:                                               ; preds = %77, %76
  br label %79

79:                                               ; preds = %78, %68
  br label %81

80:                                               ; preds = %54
  store i32 10, ptr %4, align 4, !tbaa !25
  br label %81

81:                                               ; preds = %80, %79
  br label %112

82:                                               ; preds = %49, %43
  %83 = load ptr, ptr %2, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %83, i32 0, i32 54
  %85 = load ptr, ptr %84, align 8, !tbaa !9
  %86 = getelementptr inbounds %struct.jpeg_comp_master, ptr %85, i32 0, i32 16
  %87 = load i32, ptr %86, align 8, !tbaa !27
  %88 = icmp eq i32 %87, 1560820397
  br i1 %88, label %89, label %100

89:                                               ; preds = %82
  %90 = load i32, ptr %3, align 4, !tbaa !25
  %91 = icmp sgt i32 %90, 4
  br i1 %91, label %92, label %95

92:                                               ; preds = %89
  %93 = load i32, ptr %3, align 4, !tbaa !25
  %94 = mul nsw i32 5, %93
  store i32 %94, ptr %4, align 4, !tbaa !25
  br label %99

95:                                               ; preds = %89
  %96 = load i32, ptr %3, align 4, !tbaa !25
  %97 = mul nsw i32 4, %96
  %98 = add nsw i32 1, %97
  store i32 %98, ptr %4, align 4, !tbaa !25
  br label %99

99:                                               ; preds = %95, %92
  br label %111

100:                                              ; preds = %82
  %101 = load i32, ptr %3, align 4, !tbaa !25
  %102 = icmp sgt i32 %101, 4
  br i1 %102, label %103, label %106

103:                                              ; preds = %100
  %104 = load i32, ptr %3, align 4, !tbaa !25
  %105 = mul nsw i32 6, %104
  store i32 %105, ptr %4, align 4, !tbaa !25
  br label %110

106:                                              ; preds = %100
  %107 = load i32, ptr %3, align 4, !tbaa !25
  %108 = mul nsw i32 4, %107
  %109 = add nsw i32 2, %108
  store i32 %109, ptr %4, align 4, !tbaa !25
  br label %110

110:                                              ; preds = %106, %103
  br label %111

111:                                              ; preds = %110, %99
  br label %112

112:                                              ; preds = %111, %81
  %113 = load ptr, ptr %2, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %113, i32 0, i32 63
  %115 = load ptr, ptr %114, align 8, !tbaa !29
  %116 = icmp eq ptr %115, null
  br i1 %116, label %123, label %117

117:                                              ; preds = %112
  %118 = load ptr, ptr %2, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %118, i32 0, i32 64
  %120 = load i32, ptr %119, align 8, !tbaa !30
  %121 = load i32, ptr %4, align 4, !tbaa !25
  %122 = icmp slt i32 %120, %121
  br i1 %122, label %123, label %147

123:                                              ; preds = %117, %112
  %124 = load i32, ptr %4, align 4, !tbaa !25
  %125 = icmp sgt i32 %124, 10
  br i1 %125, label %126, label %128

126:                                              ; preds = %123
  %127 = load i32, ptr %4, align 4, !tbaa !25
  br label %129

128:                                              ; preds = %123
  br label %129

129:                                              ; preds = %128, %126
  %130 = phi i32 [ %127, %126 ], [ 10, %128 ]
  %131 = load ptr, ptr %2, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %131, i32 0, i32 64
  store i32 %130, ptr %132, align 8, !tbaa !30
  %133 = load ptr, ptr %2, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %133, i32 0, i32 1
  %135 = load ptr, ptr %134, align 8, !tbaa !31
  %136 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %135, i32 0, i32 0
  %137 = load ptr, ptr %136, align 8, !tbaa !32
  %138 = load ptr, ptr %2, align 8, !tbaa !5
  %139 = load ptr, ptr %2, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %139, i32 0, i32 64
  %141 = load i32, ptr %140, align 8, !tbaa !30
  %142 = sext i32 %141 to i64
  %143 = mul i64 %142, 36
  %144 = call ptr %137(ptr noundef %138, i32 noundef 0, i64 noundef %143)
  %145 = load ptr, ptr %2, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %145, i32 0, i32 63
  store ptr %144, ptr %146, align 8, !tbaa !29
  br label %147

147:                                              ; preds = %129, %117
  %148 = load ptr, ptr %2, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %148, i32 0, i32 63
  %150 = load ptr, ptr %149, align 8, !tbaa !29
  store ptr %150, ptr %5, align 8, !tbaa !5
  %151 = load ptr, ptr %5, align 8, !tbaa !5
  %152 = load ptr, ptr %2, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %152, i32 0, i32 23
  store ptr %151, ptr %153, align 8, !tbaa !34
  %154 = load i32, ptr %4, align 4, !tbaa !25
  %155 = load ptr, ptr %2, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %155, i32 0, i32 22
  store i32 %154, ptr %156, align 8, !tbaa !35
  %157 = load i32, ptr %3, align 4, !tbaa !25
  %158 = icmp eq i32 %157, 3
  br i1 %158, label %159, label %243

159:                                              ; preds = %147
  %160 = load ptr, ptr %2, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %160, i32 0, i32 14
  %162 = load i32, ptr %161, align 8, !tbaa !26
  %163 = icmp eq i32 %162, 3
  br i1 %163, label %164, label %243

164:                                              ; preds = %159
  %165 = load ptr, ptr %2, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %165, i32 0, i32 54
  %167 = load ptr, ptr %166, align 8, !tbaa !9
  %168 = getelementptr inbounds %struct.jpeg_comp_master, ptr %167, i32 0, i32 16
  %169 = load i32, ptr %168, align 8, !tbaa !27
  %170 = icmp eq i32 %169, 1560820397
  br i1 %170, label %171, label %219

171:                                              ; preds = %164
  %172 = load ptr, ptr %2, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %172, i32 0, i32 54
  %174 = load ptr, ptr %173, align 8, !tbaa !9
  %175 = getelementptr inbounds %struct.jpeg_comp_master, ptr %174, i32 0, i32 17
  %176 = load i32, ptr %175, align 4, !tbaa !28
  %177 = icmp eq i32 %176, 0
  br i1 %177, label %178, label %182

178:                                              ; preds = %171
  %179 = load ptr, ptr %5, align 8, !tbaa !5
  %180 = load i32, ptr %3, align 4, !tbaa !25
  %181 = call ptr @fill_dc_scans(ptr noundef %179, i32 noundef %180, i32 noundef 0, i32 noundef 0)
  store ptr %181, ptr %5, align 8, !tbaa !5
  br label %202

182:                                              ; preds = %171
  %183 = load ptr, ptr %2, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %183, i32 0, i32 54
  %185 = load ptr, ptr %184, align 8, !tbaa !9
  %186 = getelementptr inbounds %struct.jpeg_comp_master, ptr %185, i32 0, i32 17
  %187 = load i32, ptr %186, align 4, !tbaa !28
  %188 = icmp eq i32 %187, 1
  br i1 %188, label %189, label %196

189:                                              ; preds = %182
  %190 = load ptr, ptr %5, align 8, !tbaa !5
  %191 = call ptr @fill_a_scan(ptr noundef %190, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  store ptr %191, ptr %5, align 8, !tbaa !5
  %192 = load ptr, ptr %5, align 8, !tbaa !5
  %193 = call ptr @fill_a_scan(ptr noundef %192, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  store ptr %193, ptr %5, align 8, !tbaa !5
  %194 = load ptr, ptr %5, align 8, !tbaa !5
  %195 = call ptr @fill_a_scan(ptr noundef %194, i32 noundef 2, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  store ptr %195, ptr %5, align 8, !tbaa !5
  br label %201

196:                                              ; preds = %182
  %197 = load ptr, ptr %5, align 8, !tbaa !5
  %198 = call ptr @fill_dc_scans(ptr noundef %197, i32 noundef 1, i32 noundef 0, i32 noundef 0)
  store ptr %198, ptr %5, align 8, !tbaa !5
  %199 = load ptr, ptr %5, align 8, !tbaa !5
  %200 = call ptr @fill_a_scan_pair(ptr noundef %199, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  store ptr %200, ptr %5, align 8, !tbaa !5
  br label %201

201:                                              ; preds = %196, %189
  br label %202

202:                                              ; preds = %201, %178
  %203 = load ptr, ptr %5, align 8, !tbaa !5
  %204 = call ptr @fill_a_scan(ptr noundef %203, i32 noundef 0, i32 noundef 1, i32 noundef 8, i32 noundef 0, i32 noundef 2)
  store ptr %204, ptr %5, align 8, !tbaa !5
  %205 = load ptr, ptr %5, align 8, !tbaa !5
  %206 = call ptr @fill_a_scan(ptr noundef %205, i32 noundef 1, i32 noundef 1, i32 noundef 8, i32 noundef 0, i32 noundef 0)
  store ptr %206, ptr %5, align 8, !tbaa !5
  %207 = load ptr, ptr %5, align 8, !tbaa !5
  %208 = call ptr @fill_a_scan(ptr noundef %207, i32 noundef 2, i32 noundef 1, i32 noundef 8, i32 noundef 0, i32 noundef 0)
  store ptr %208, ptr %5, align 8, !tbaa !5
  %209 = load ptr, ptr %5, align 8, !tbaa !5
  %210 = call ptr @fill_a_scan(ptr noundef %209, i32 noundef 0, i32 noundef 9, i32 noundef 63, i32 noundef 0, i32 noundef 2)
  store ptr %210, ptr %5, align 8, !tbaa !5
  %211 = load ptr, ptr %5, align 8, !tbaa !5
  %212 = call ptr @fill_a_scan(ptr noundef %211, i32 noundef 0, i32 noundef 1, i32 noundef 63, i32 noundef 2, i32 noundef 1)
  store ptr %212, ptr %5, align 8, !tbaa !5
  %213 = load ptr, ptr %5, align 8, !tbaa !5
  %214 = call ptr @fill_a_scan(ptr noundef %213, i32 noundef 0, i32 noundef 1, i32 noundef 63, i32 noundef 1, i32 noundef 0)
  store ptr %214, ptr %5, align 8, !tbaa !5
  %215 = load ptr, ptr %5, align 8, !tbaa !5
  %216 = call ptr @fill_a_scan(ptr noundef %215, i32 noundef 1, i32 noundef 9, i32 noundef 63, i32 noundef 0, i32 noundef 0)
  store ptr %216, ptr %5, align 8, !tbaa !5
  %217 = load ptr, ptr %5, align 8, !tbaa !5
  %218 = call ptr @fill_a_scan(ptr noundef %217, i32 noundef 2, i32 noundef 9, i32 noundef 63, i32 noundef 0, i32 noundef 0)
  store ptr %218, ptr %5, align 8, !tbaa !5
  br label %242

219:                                              ; preds = %164
  %220 = load ptr, ptr %5, align 8, !tbaa !5
  %221 = load i32, ptr %3, align 4, !tbaa !25
  %222 = call ptr @fill_dc_scans(ptr noundef %220, i32 noundef %221, i32 noundef 0, i32 noundef 1)
  store ptr %222, ptr %5, align 8, !tbaa !5
  %223 = load ptr, ptr %5, align 8, !tbaa !5
  %224 = call ptr @fill_a_scan(ptr noundef %223, i32 noundef 0, i32 noundef 1, i32 noundef 5, i32 noundef 0, i32 noundef 2)
  store ptr %224, ptr %5, align 8, !tbaa !5
  %225 = load ptr, ptr %5, align 8, !tbaa !5
  %226 = call ptr @fill_a_scan(ptr noundef %225, i32 noundef 2, i32 noundef 1, i32 noundef 63, i32 noundef 0, i32 noundef 1)
  store ptr %226, ptr %5, align 8, !tbaa !5
  %227 = load ptr, ptr %5, align 8, !tbaa !5
  %228 = call ptr @fill_a_scan(ptr noundef %227, i32 noundef 1, i32 noundef 1, i32 noundef 63, i32 noundef 0, i32 noundef 1)
  store ptr %228, ptr %5, align 8, !tbaa !5
  %229 = load ptr, ptr %5, align 8, !tbaa !5
  %230 = call ptr @fill_a_scan(ptr noundef %229, i32 noundef 0, i32 noundef 6, i32 noundef 63, i32 noundef 0, i32 noundef 2)
  store ptr %230, ptr %5, align 8, !tbaa !5
  %231 = load ptr, ptr %5, align 8, !tbaa !5
  %232 = call ptr @fill_a_scan(ptr noundef %231, i32 noundef 0, i32 noundef 1, i32 noundef 63, i32 noundef 2, i32 noundef 1)
  store ptr %232, ptr %5, align 8, !tbaa !5
  %233 = load ptr, ptr %5, align 8, !tbaa !5
  %234 = load i32, ptr %3, align 4, !tbaa !25
  %235 = call ptr @fill_dc_scans(ptr noundef %233, i32 noundef %234, i32 noundef 1, i32 noundef 0)
  store ptr %235, ptr %5, align 8, !tbaa !5
  %236 = load ptr, ptr %5, align 8, !tbaa !5
  %237 = call ptr @fill_a_scan(ptr noundef %236, i32 noundef 2, i32 noundef 1, i32 noundef 63, i32 noundef 1, i32 noundef 0)
  store ptr %237, ptr %5, align 8, !tbaa !5
  %238 = load ptr, ptr %5, align 8, !tbaa !5
  %239 = call ptr @fill_a_scan(ptr noundef %238, i32 noundef 1, i32 noundef 1, i32 noundef 63, i32 noundef 1, i32 noundef 0)
  store ptr %239, ptr %5, align 8, !tbaa !5
  %240 = load ptr, ptr %5, align 8, !tbaa !5
  %241 = call ptr @fill_a_scan(ptr noundef %240, i32 noundef 0, i32 noundef 1, i32 noundef 63, i32 noundef 1, i32 noundef 0)
  store ptr %241, ptr %5, align 8, !tbaa !5
  br label %242

242:                                              ; preds = %219, %202
  br label %286

243:                                              ; preds = %159, %147
  %244 = load ptr, ptr %2, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %244, i32 0, i32 54
  %246 = load ptr, ptr %245, align 8, !tbaa !9
  %247 = getelementptr inbounds %struct.jpeg_comp_master, ptr %246, i32 0, i32 16
  %248 = load i32, ptr %247, align 8, !tbaa !27
  %249 = icmp eq i32 %248, 1560820397
  br i1 %249, label %250, label %266

250:                                              ; preds = %243
  %251 = load ptr, ptr %5, align 8, !tbaa !5
  %252 = load i32, ptr %3, align 4, !tbaa !25
  %253 = call ptr @fill_dc_scans(ptr noundef %251, i32 noundef %252, i32 noundef 0, i32 noundef 0)
  store ptr %253, ptr %5, align 8, !tbaa !5
  %254 = load ptr, ptr %5, align 8, !tbaa !5
  %255 = load i32, ptr %3, align 4, !tbaa !25
  %256 = call ptr @fill_scans(ptr noundef %254, i32 noundef %255, i32 noundef 1, i32 noundef 8, i32 noundef 0, i32 noundef 2)
  store ptr %256, ptr %5, align 8, !tbaa !5
  %257 = load ptr, ptr %5, align 8, !tbaa !5
  %258 = load i32, ptr %3, align 4, !tbaa !25
  %259 = call ptr @fill_scans(ptr noundef %257, i32 noundef %258, i32 noundef 9, i32 noundef 63, i32 noundef 0, i32 noundef 2)
  store ptr %259, ptr %5, align 8, !tbaa !5
  %260 = load ptr, ptr %5, align 8, !tbaa !5
  %261 = load i32, ptr %3, align 4, !tbaa !25
  %262 = call ptr @fill_scans(ptr noundef %260, i32 noundef %261, i32 noundef 1, i32 noundef 63, i32 noundef 2, i32 noundef 1)
  store ptr %262, ptr %5, align 8, !tbaa !5
  %263 = load ptr, ptr %5, align 8, !tbaa !5
  %264 = load i32, ptr %3, align 4, !tbaa !25
  %265 = call ptr @fill_scans(ptr noundef %263, i32 noundef %264, i32 noundef 1, i32 noundef 63, i32 noundef 1, i32 noundef 0)
  store ptr %265, ptr %5, align 8, !tbaa !5
  br label %285

266:                                              ; preds = %243
  %267 = load ptr, ptr %5, align 8, !tbaa !5
  %268 = load i32, ptr %3, align 4, !tbaa !25
  %269 = call ptr @fill_dc_scans(ptr noundef %267, i32 noundef %268, i32 noundef 0, i32 noundef 1)
  store ptr %269, ptr %5, align 8, !tbaa !5
  %270 = load ptr, ptr %5, align 8, !tbaa !5
  %271 = load i32, ptr %3, align 4, !tbaa !25
  %272 = call ptr @fill_scans(ptr noundef %270, i32 noundef %271, i32 noundef 1, i32 noundef 5, i32 noundef 0, i32 noundef 2)
  store ptr %272, ptr %5, align 8, !tbaa !5
  %273 = load ptr, ptr %5, align 8, !tbaa !5
  %274 = load i32, ptr %3, align 4, !tbaa !25
  %275 = call ptr @fill_scans(ptr noundef %273, i32 noundef %274, i32 noundef 6, i32 noundef 63, i32 noundef 0, i32 noundef 2)
  store ptr %275, ptr %5, align 8, !tbaa !5
  %276 = load ptr, ptr %5, align 8, !tbaa !5
  %277 = load i32, ptr %3, align 4, !tbaa !25
  %278 = call ptr @fill_scans(ptr noundef %276, i32 noundef %277, i32 noundef 1, i32 noundef 63, i32 noundef 2, i32 noundef 1)
  store ptr %278, ptr %5, align 8, !tbaa !5
  %279 = load ptr, ptr %5, align 8, !tbaa !5
  %280 = load i32, ptr %3, align 4, !tbaa !25
  %281 = call ptr @fill_dc_scans(ptr noundef %279, i32 noundef %280, i32 noundef 1, i32 noundef 0)
  store ptr %281, ptr %5, align 8, !tbaa !5
  %282 = load ptr, ptr %5, align 8, !tbaa !5
  %283 = load i32, ptr %3, align 4, !tbaa !25
  %284 = call ptr @fill_scans(ptr noundef %282, i32 noundef %283, i32 noundef 1, i32 noundef 63, i32 noundef 1, i32 noundef 0)
  store ptr %284, ptr %5, align 8, !tbaa !5
  br label %285

285:                                              ; preds = %266, %250
  br label %286

286:                                              ; preds = %285, %242
  store i32 0, ptr %6, align 4
  br label %287

287:                                              ; preds = %286, %17
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #2
  %288 = load i32, ptr %6, align 4
  switch i32 %288, label %290 [
    i32 0, label %289
    i32 1, label %289
  ]

289:                                              ; preds = %287, %287
  ret void

290:                                              ; preds = %287
  unreachable
}

; Function Attrs: nounwind uwtable
declare hidden i32 @jpeg_search_progression(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden ptr @fill_dc_scans(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden ptr @fill_a_scan(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden ptr @fill_a_scan_pair(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden ptr @fill_scans(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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, !6, i64 432}
!10 = !{!"jpeg_compress_struct", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !11, 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, !6, i64 88, !7, i64 96, !7, i64 128, !7, i64 160, !7, i64 192, !7, i64 208, !7, i64 224, !11, i64 240, !6, i64 248, !11, i64 256, !11, i64 260, !11, i64 264, !11, i64 268, !11, i64 272, !11, i64 276, !11, i64 280, !11, i64 284, !11, i64 288, !7, i64 292, !7, i64 293, !7, i64 294, !13, i64 296, !13, i64 298, !11, i64 300, !11, i64 304, !11, i64 308, !11, i64 312, !11, i64 316, !11, i64 320, !11, i64 324, !7, i64 328, !11, i64 360, !11, i64 364, !11, i64 368, !7, i64 372, !11, i64 412, !11, i64 416, !11, i64 420, !11, i64 424, !6, i64 432, !6, i64 440, !6, i64 448, !6, i64 456, !6, i64 464, !6, i64 472, !6, i64 480, !6, i64 488, !6, i64 496, !6, i64 504, !11, i64 512}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!15, !11, i64 32}
!15 = !{!"jpeg_comp_master", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !7, i64 72, !7, i64 2120, !11, i64 4168, !11, i64 4172, !11, i64 4176, !11, i64 4180, !11, i64 4184, !11, i64 4188, !11, i64 4192, !11, i64 4196, !11, i64 4200, !11, i64 4204, !11, i64 4208, !16, i64 4212, !16, i64 4216, !16, i64 4220}
!16 = !{!"float", !7, i64 0}
!17 = !{!10, !11, i64 36}
!18 = !{!10, !6, i64 0}
!19 = !{!20, !11, i64 40}
!20 = !{!"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, !21, i64 128, !6, i64 136, !11, i64 144, !6, i64 152, !11, i64 160, !11, i64 164}
!21 = !{!"long", !7, i64 0}
!22 = !{!7, !7, i64 0}
!23 = !{!20, !6, i64 0}
!24 = !{!10, !11, i64 76}
!25 = !{!11, !11, i64 0}
!26 = !{!10, !11, i64 80}
!27 = !{!15, !11, i64 4168}
!28 = !{!15, !11, i64 4172}
!29 = !{!10, !6, i64 504}
!30 = !{!10, !11, i64 512}
!31 = !{!10, !6, i64 8}
!32 = !{!33, !6, i64 0}
!33 = !{!"jpeg_memory_mgr", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !21, i64 88, !21, i64 96}
!34 = !{!10, !6, i64 248}
!35 = !{!10, !11, i64 240}


; 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_simple_progression(ptr noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 432
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %3, i64 32
  %5 = load i32, ptr %4, align 8, !tbaa !13
  %.not = icmp eq i32 %5, 0
  br i1 %.not, label %9, label %6

6:                                                ; preds = %1
  %7 = tail call i32 @jpeg_search_progression(ptr noundef nonnull %0)
  %8 = icmp eq i32 %7, 1
  br i1 %8, label %129, label %9

9:                                                ; preds = %6, %1
  %10 = getelementptr inbounds i8, ptr %0, i64 36
  %11 = load i32, ptr %10, align 4, !tbaa !16
  %.not94 = icmp eq i32 %11, 100
  br i1 %.not94, label %18, label %12

12:                                               ; preds = %9
  %13 = load ptr, ptr %0, align 8, !tbaa !17
  %14 = getelementptr inbounds i8, ptr %13, i64 40
  store i32 20, ptr %14, align 8, !tbaa !18
  %15 = getelementptr inbounds i8, ptr %13, i64 44
  store i32 %11, ptr %15, align 4, !tbaa !21
  %16 = load ptr, ptr %0, align 8, !tbaa !17
  %17 = load ptr, ptr %16, align 8, !tbaa !22
  tail call void %17(ptr noundef nonnull %0) #2
  br label %18

18:                                               ; preds = %12, %9
  %19 = getelementptr inbounds i8, ptr %0, i64 76
  %20 = load i32, ptr %19, align 4, !tbaa !23
  %21 = icmp eq i32 %20, 3
  br i1 %21, label %22, label %34

22:                                               ; preds = %18
  %23 = getelementptr inbounds i8, ptr %0, i64 80
  %24 = load i32, ptr %23, align 8, !tbaa !24
  %25 = icmp eq i32 %24, 3
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %26, i64 4168
  %28 = load i32, ptr %27, align 8, !tbaa !25
  %29 = icmp eq i32 %28, 1560820397
  br i1 %25, label %30, label %.thread

30:                                               ; preds = %22
  br i1 %29, label %31, label %50

31:                                               ; preds = %30
  %32 = getelementptr inbounds i8, ptr %26, i64 4172
  %33 = load i32, ptr %32, align 4, !tbaa !26
  %switch.selectcmp = icmp eq i32 %33, 1
  %switch.select = select i1 %switch.selectcmp, i32 11, i32 10
  %switch.selectcmp95 = icmp eq i32 %33, 0
  %switch.select96 = select i1 %switch.selectcmp95, i32 9, i32 %switch.select
  br label %50

34:                                               ; preds = %18
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %35, i64 4168
  %37 = load i32, ptr %36, align 8, !tbaa !25
  %38 = icmp eq i32 %37, 1560820397
  %39 = icmp sgt i32 %20, 4
  br i1 %38, label %40, label %45

.thread:                                          ; preds = %22
  br i1 %29, label %.thread97, label %.thread98

40:                                               ; preds = %34
  br i1 %39, label %41, label %.thread97

41:                                               ; preds = %40
  %42 = mul nuw nsw i32 %20, 5
  br label %50

.thread97:                                        ; preds = %.thread, %40
  %43 = shl nsw i32 %20, 2
  %44 = or disjoint i32 %43, 1
  br label %50

45:                                               ; preds = %34
  br i1 %39, label %46, label %.thread98

46:                                               ; preds = %45
  %47 = mul nuw nsw i32 %20, 6
  br label %50

.thread98:                                        ; preds = %.thread, %45
  %48 = shl nsw i32 %20, 2
  %49 = or disjoint i32 %48, 2
  br label %50

50:                                               ; preds = %31, %30, %.thread97, %41, %.thread98, %46
  %.090 = phi i32 [ %42, %41 ], [ %44, %.thread97 ], [ %47, %46 ], [ %49, %.thread98 ], [ 10, %30 ], [ %switch.select96, %31 ]
  %51 = getelementptr inbounds i8, ptr %0, i64 504
  %52 = load ptr, ptr %51, align 8, !tbaa !27
  %53 = icmp eq ptr %52, null
  br i1 %53, label %58, label %54

54:                                               ; preds = %50
  %55 = getelementptr inbounds i8, ptr %0, i64 512
  %56 = load i32, ptr %55, align 8, !tbaa !28
  %57 = icmp slt i32 %56, %.090
  br i1 %57, label %58, label %67

58:                                               ; preds = %54, %50
  %59 = tail call i32 @llvm.smax.i32(i32 %.090, i32 10)
  %60 = getelementptr inbounds i8, ptr %0, i64 512
  store i32 %59, ptr %60, align 8, !tbaa !28
  %61 = getelementptr inbounds i8, ptr %0, i64 8
  %62 = load ptr, ptr %61, align 8, !tbaa !29
  %63 = load ptr, ptr %62, align 8, !tbaa !30
  %64 = zext nneg i32 %59 to i64
  %65 = mul nuw nsw i64 %64, 36
  %66 = tail call ptr %63(ptr noundef nonnull %0, i32 noundef 0, i64 noundef %65) #2
  store ptr %66, ptr %51, align 8, !tbaa !27
  br label %67

67:                                               ; preds = %58, %54
  %68 = phi ptr [ %66, %58 ], [ %52, %54 ]
  %69 = getelementptr inbounds i8, ptr %0, i64 248
  store ptr %68, ptr %69, align 8, !tbaa !32
  %70 = getelementptr inbounds i8, ptr %0, i64 240
  store i32 %.090, ptr %70, align 8, !tbaa !33
  br i1 %21, label %71, label %._crit_edge

._crit_edge:                                      ; preds = %67
  %.pre = load ptr, ptr %2, align 8, !tbaa !5
  br label %111

71:                                               ; preds = %67
  %72 = getelementptr inbounds i8, ptr %0, i64 80
  %73 = load i32, ptr %72, align 8, !tbaa !24
  %74 = icmp eq i32 %73, 3
  %.pre99 = load ptr, ptr %2, align 8, !tbaa !5
  br i1 %74, label %75, label %111

75:                                               ; preds = %71
  %76 = getelementptr inbounds i8, ptr %.pre99, i64 4168
  %77 = load i32, ptr %76, align 8, !tbaa !25
  %78 = icmp eq i32 %77, 1560820397
  br i1 %78, label %79, label %100

79:                                               ; preds = %75
  %80 = getelementptr inbounds i8, ptr %.pre99, i64 4172
  %81 = load i32, ptr %80, align 4, !tbaa !26
  switch i32 %81, label %88 [
    i32 0, label %82
    i32 1, label %84
  ]

82:                                               ; preds = %79
  %83 = tail call ptr @fill_dc_scans(ptr noundef %68, i32 noundef 3, i32 noundef 0, i32 noundef 0)
  br label %91

84:                                               ; preds = %79
  %85 = tail call ptr @fill_a_scan(ptr noundef %68, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  %86 = tail call ptr @fill_a_scan(ptr noundef %85, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  %87 = tail call ptr @fill_a_scan(ptr noundef %86, i32 noundef 2, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  br label %91

88:                                               ; preds = %79
  %89 = tail call ptr @fill_dc_scans(ptr noundef %68, i32 noundef 1, i32 noundef 0, i32 noundef 0)
  %90 = tail call ptr @fill_a_scan_pair(ptr noundef %89, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  br label %91

91:                                               ; preds = %84, %88, %82
  %.0 = phi ptr [ %83, %82 ], [ %87, %84 ], [ %90, %88 ]
  %92 = tail call ptr @fill_a_scan(ptr noundef %.0, i32 noundef 0, i32 noundef 1, i32 noundef 8, i32 noundef 0, i32 noundef 2)
  %93 = tail call ptr @fill_a_scan(ptr noundef %92, i32 noundef 1, i32 noundef 1, i32 noundef 8, i32 noundef 0, i32 noundef 0)
  %94 = tail call ptr @fill_a_scan(ptr noundef %93, i32 noundef 2, i32 noundef 1, i32 noundef 8, i32 noundef 0, i32 noundef 0)
  %95 = tail call ptr @fill_a_scan(ptr noundef %94, i32 noundef 0, i32 noundef 9, i32 noundef 63, i32 noundef 0, i32 noundef 2)
  %96 = tail call ptr @fill_a_scan(ptr noundef %95, i32 noundef 0, i32 noundef 1, i32 noundef 63, i32 noundef 2, i32 noundef 1)
  %97 = tail call ptr @fill_a_scan(ptr noundef %96, i32 noundef 0, i32 noundef 1, i32 noundef 63, i32 noundef 1, i32 noundef 0)
  %98 = tail call ptr @fill_a_scan(ptr noundef %97, i32 noundef 1, i32 noundef 9, i32 noundef 63, i32 noundef 0, i32 noundef 0)
  %99 = tail call ptr @fill_a_scan(ptr noundef %98, i32 noundef 2, i32 noundef 9, i32 noundef 63, i32 noundef 0, i32 noundef 0)
  br label %129

100:                                              ; preds = %75
  %101 = tail call ptr @fill_dc_scans(ptr noundef %68, i32 noundef 3, i32 noundef 0, i32 noundef 1)
  %102 = tail call ptr @fill_a_scan(ptr noundef %101, i32 noundef 0, i32 noundef 1, i32 noundef 5, i32 noundef 0, i32 noundef 2)
  %103 = tail call ptr @fill_a_scan(ptr noundef %102, i32 noundef 2, i32 noundef 1, i32 noundef 63, i32 noundef 0, i32 noundef 1)
  %104 = tail call ptr @fill_a_scan(ptr noundef %103, i32 noundef 1, i32 noundef 1, i32 noundef 63, i32 noundef 0, i32 noundef 1)
  %105 = tail call ptr @fill_a_scan(ptr noundef %104, i32 noundef 0, i32 noundef 6, i32 noundef 63, i32 noundef 0, i32 noundef 2)
  %106 = tail call ptr @fill_a_scan(ptr noundef %105, i32 noundef 0, i32 noundef 1, i32 noundef 63, i32 noundef 2, i32 noundef 1)
  %107 = tail call ptr @fill_dc_scans(ptr noundef %106, i32 noundef 3, i32 noundef 1, i32 noundef 0)
  %108 = tail call ptr @fill_a_scan(ptr noundef %107, i32 noundef 2, i32 noundef 1, i32 noundef 63, i32 noundef 1, i32 noundef 0)
  %109 = tail call ptr @fill_a_scan(ptr noundef %108, i32 noundef 1, i32 noundef 1, i32 noundef 63, i32 noundef 1, i32 noundef 0)
  %110 = tail call ptr @fill_a_scan(ptr noundef %109, i32 noundef 0, i32 noundef 1, i32 noundef 63, i32 noundef 1, i32 noundef 0)
  br label %129

111:                                              ; preds = %._crit_edge, %71
  %112 = phi ptr [ %.pre, %._crit_edge ], [ %.pre99, %71 ]
  %113 = getelementptr inbounds i8, ptr %112, i64 4168
  %114 = load i32, ptr %113, align 8, !tbaa !25
  %115 = icmp eq i32 %114, 1560820397
  br i1 %115, label %116, label %122

116:                                              ; preds = %111
  %117 = tail call ptr @fill_dc_scans(ptr noundef %68, i32 noundef %20, i32 noundef 0, i32 noundef 0)
  %118 = tail call ptr @fill_scans(ptr noundef %117, i32 noundef %20, i32 noundef 1, i32 noundef 8, i32 noundef 0, i32 noundef 2)
  %119 = tail call ptr @fill_scans(ptr noundef %118, i32 noundef %20, i32 noundef 9, i32 noundef 63, i32 noundef 0, i32 noundef 2)
  %120 = tail call ptr @fill_scans(ptr noundef %119, i32 noundef %20, i32 noundef 1, i32 noundef 63, i32 noundef 2, i32 noundef 1)
  %121 = tail call ptr @fill_scans(ptr noundef %120, i32 noundef %20, i32 noundef 1, i32 noundef 63, i32 noundef 1, i32 noundef 0)
  br label %129

122:                                              ; preds = %111
  %123 = tail call ptr @fill_dc_scans(ptr noundef %68, i32 noundef %20, i32 noundef 0, i32 noundef 1)
  %124 = tail call ptr @fill_scans(ptr noundef %123, i32 noundef %20, i32 noundef 1, i32 noundef 5, i32 noundef 0, i32 noundef 2)
  %125 = tail call ptr @fill_scans(ptr noundef %124, i32 noundef %20, i32 noundef 6, i32 noundef 63, i32 noundef 0, i32 noundef 2)
  %126 = tail call ptr @fill_scans(ptr noundef %125, i32 noundef %20, i32 noundef 1, i32 noundef 63, i32 noundef 2, i32 noundef 1)
  %127 = tail call ptr @fill_dc_scans(ptr noundef %126, i32 noundef %20, i32 noundef 1, i32 noundef 0)
  %128 = tail call ptr @fill_scans(ptr noundef %127, i32 noundef %20, i32 noundef 1, i32 noundef 63, i32 noundef 1, i32 noundef 0)
  br label %129

129:                                              ; preds = %100, %91, %122, %116, %6
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden i32 @jpeg_search_progression(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden ptr @fill_dc_scans(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden ptr @fill_a_scan(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden ptr @fill_a_scan_pair(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden ptr @fill_scans(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #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 speculatable willreturn memory(none) }
attributes #2 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 432}
!6 = !{!"jpeg_compress_struct", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, 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, !7, i64 88, !8, i64 96, !8, i64 128, !8, i64 160, !8, i64 192, !8, i64 208, !8, i64 224, !10, i64 240, !7, i64 248, !10, i64 256, !10, i64 260, !10, i64 264, !10, i64 268, !10, i64 272, !10, i64 276, !10, i64 280, !10, i64 284, !10, i64 288, !8, i64 292, !8, i64 293, !8, i64 294, !12, i64 296, !12, i64 298, !10, i64 300, !10, i64 304, !10, i64 308, !10, i64 312, !10, i64 316, !10, i64 320, !10, i64 324, !8, i64 328, !10, i64 360, !10, i64 364, !10, i64 368, !8, i64 372, !10, i64 412, !10, i64 416, !10, i64 420, !10, i64 424, !7, i64 432, !7, i64 440, !7, i64 448, !7, i64 456, !7, i64 464, !7, i64 472, !7, i64 480, !7, i64 488, !7, i64 496, !7, i64 504, !10, i64 512}
!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 = !{!14, !10, i64 32}
!14 = !{!"jpeg_comp_master", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !8, i64 72, !8, i64 2120, !10, i64 4168, !10, i64 4172, !10, i64 4176, !10, i64 4180, !10, i64 4184, !10, i64 4188, !10, i64 4192, !10, i64 4196, !10, i64 4200, !10, i64 4204, !10, i64 4208, !15, i64 4212, !15, i64 4216, !15, i64 4220}
!15 = !{!"float", !8, i64 0}
!16 = !{!6, !10, i64 36}
!17 = !{!6, !7, i64 0}
!18 = !{!19, !10, i64 40}
!19 = !{!"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, !20, i64 128, !7, i64 136, !10, i64 144, !7, i64 152, !10, i64 160, !10, i64 164}
!20 = !{!"long", !8, i64 0}
!21 = !{!8, !8, i64 0}
!22 = !{!19, !7, i64 0}
!23 = !{!6, !10, i64 76}
!24 = !{!6, !10, i64 80}
!25 = !{!14, !10, i64 4168}
!26 = !{!14, !10, i64 4172}
!27 = !{!6, !7, i64 504}
!28 = !{!6, !10, i64 512}
!29 = !{!6, !7, i64 8}
!30 = !{!31, !7, i64 0}
!31 = !{!"jpeg_memory_mgr", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !20, i64 88, !20, i64 96}
!32 = !{!6, !7, i64 248}
!33 = !{!6, !10, i64 240}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass