; LLVM IR from EyalAr/lwip :: src/lib/jpeg (jdcolor)

; 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_decompress_struct = type { ptr, ptr, ptr, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, i32, i32, i32, i32, i32, ptr, [4 x ptr], [4 x ptr], [4 x ptr], i32, ptr, i32, i32, i32, [16 x i8], [16 x i8], [16 x i8], i32, i32, i8, i8, i8, i16, i16, i32, i8, i32, i32, 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.jpeg_memory_mgr = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64 }
%struct.my_color_deconverter = type { %struct.jpeg_color_deconverter, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.jpeg_color_deconverter = type { ptr, ptr }
%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_component_info = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr }

; Function Attrs: nounwind uwtable
define dso_local void @jinit_color_deconverter(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #2
  %5 = load ptr, ptr %2, align 8, !tbaa !5
  %6 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %5, i32 0, i32 1
  %7 = load ptr, ptr %6, align 8, !tbaa !9
  %8 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %7, i32 0, i32 0
  %9 = load ptr, ptr %8, align 8, !tbaa !14
  %10 = load ptr, ptr %2, align 8, !tbaa !5
  %11 = call ptr %9(ptr noundef %10, i32 noundef 1, i64 noundef 64)
  store ptr %11, ptr %3, align 8, !tbaa !5
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.my_color_deconverter, ptr %12, i32 0, i32 0
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %14, i32 0, i32 92
  store ptr %13, ptr %15, align 8, !tbaa !17
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.my_color_deconverter, ptr %16, i32 0, i32 0
  %18 = getelementptr inbounds %struct.jpeg_color_deconverter, ptr %17, i32 0, i32 0
  store ptr @start_pass_dcolor, ptr %18, align 8, !tbaa !18
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %19, i32 0, i32 10
  %21 = load i32, ptr %20, align 4, !tbaa !21
  switch i32 %21, label %73 [
    i32 1, label %22
    i32 2, label %39
    i32 3, label %39
    i32 6, label %39
    i32 7, label %39
    i32 4, label %56
    i32 5, label %56
  ]

22:                                               ; preds = %1
  %23 = load ptr, ptr %2, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %23, i32 0, i32 9
  %25 = load i32, ptr %24, align 8, !tbaa !22
  %26 = icmp ne i32 %25, 1
  br i1 %26, label %27, label %38

27:                                               ; preds = %22
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %28, i32 0, i32 0
  %30 = load ptr, ptr %29, align 8, !tbaa !23
  %31 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %30, i32 0, i32 5
  store i32 11, ptr %31, align 8, !tbaa !24
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %32, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !23
  %35 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %34, i32 0, i32 0
  %36 = load ptr, ptr %35, align 8, !tbaa !26
  %37 = load ptr, ptr %2, align 8, !tbaa !5
  call void %36(ptr noundef %37)
  br label %38

38:                                               ; preds = %27, %22
  br label %90

39:                                               ; preds = %1, %1, %1, %1
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %40, i32 0, i32 9
  %42 = load i32, ptr %41, align 8, !tbaa !22
  %43 = icmp ne i32 %42, 3
  br i1 %43, label %44, label %55

44:                                               ; preds = %39
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %45, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8, !tbaa !23
  %48 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %47, i32 0, i32 5
  store i32 11, ptr %48, align 8, !tbaa !24
  %49 = load ptr, ptr %2, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %49, i32 0, i32 0
  %51 = load ptr, ptr %50, align 8, !tbaa !23
  %52 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %51, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !26
  %54 = load ptr, ptr %2, align 8, !tbaa !5
  call void %53(ptr noundef %54)
  br label %55

55:                                               ; preds = %44, %39
  br label %90

56:                                               ; preds = %1, %1
  %57 = load ptr, ptr %2, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %57, i32 0, i32 9
  %59 = load i32, ptr %58, align 8, !tbaa !22
  %60 = icmp ne i32 %59, 4
  br i1 %60, label %61, label %72

61:                                               ; preds = %56
  %62 = load ptr, ptr %2, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %62, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8, !tbaa !23
  %65 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %64, i32 0, i32 5
  store i32 11, ptr %65, align 8, !tbaa !24
  %66 = load ptr, ptr %2, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %66, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8, !tbaa !23
  %69 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %68, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !26
  %71 = load ptr, ptr %2, align 8, !tbaa !5
  call void %70(ptr noundef %71)
  br label %72

72:                                               ; preds = %61, %56
  br label %90

73:                                               ; preds = %1
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %74, i32 0, i32 9
  %76 = load i32, ptr %75, align 8, !tbaa !22
  %77 = icmp slt i32 %76, 1
  br i1 %77, label %78, label %89

78:                                               ; preds = %73
  %79 = load ptr, ptr %2, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %79, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8, !tbaa !23
  %82 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %81, i32 0, i32 5
  store i32 11, ptr %82, align 8, !tbaa !24
  %83 = load ptr, ptr %2, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %83, i32 0, i32 0
  %85 = load ptr, ptr %84, align 8, !tbaa !23
  %86 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %85, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8, !tbaa !26
  %88 = load ptr, ptr %2, align 8, !tbaa !5
  call void %87(ptr noundef %88)
  br label %89

89:                                               ; preds = %78, %73
  br label %90

90:                                               ; preds = %89, %72, %55, %38
  %91 = load ptr, ptr %2, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %91, i32 0, i32 60
  %93 = load i32, ptr %92, align 4, !tbaa !27
  %94 = icmp ne i32 %93, 0
  br i1 %94, label %95, label %116

95:                                               ; preds = %90
  %96 = load ptr, ptr %2, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %96, i32 0, i32 10
  %98 = load i32, ptr %97, align 4, !tbaa !21
  %99 = icmp ne i32 %98, 2
  br i1 %99, label %100, label %116

100:                                              ; preds = %95
  %101 = load ptr, ptr %2, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %101, i32 0, i32 10
  %103 = load i32, ptr %102, align 4, !tbaa !21
  %104 = icmp ne i32 %103, 6
  br i1 %104, label %105, label %116

105:                                              ; preds = %100
  %106 = load ptr, ptr %2, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %106, i32 0, i32 0
  %108 = load ptr, ptr %107, align 8, !tbaa !23
  %109 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %108, i32 0, i32 5
  store i32 28, ptr %109, align 8, !tbaa !24
  %110 = load ptr, ptr %2, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %110, i32 0, i32 0
  %112 = load ptr, ptr %111, align 8, !tbaa !23
  %113 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %112, i32 0, i32 0
  %114 = load ptr, ptr %113, align 8, !tbaa !26
  %115 = load ptr, ptr %2, align 8, !tbaa !5
  call void %114(ptr noundef %115)
  br label %116

116:                                              ; preds = %105, %100, %95, %90
  %117 = load ptr, ptr %2, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %117, i32 0, i32 11
  %119 = load i32, ptr %118, align 8, !tbaa !28
  switch i32 %119, label %311 [
    i32 1, label %120
    i32 2, label %185
    i32 6, label %241
    i32 4, label %284
  ]

120:                                              ; preds = %116
  %121 = load ptr, ptr %2, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %121, i32 0, i32 29
  store i32 1, ptr %122, align 8, !tbaa !29
  %123 = load ptr, ptr %2, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %123, i32 0, i32 10
  %125 = load i32, ptr %124, align 4, !tbaa !21
  switch i32 %125, label %173 [
    i32 1, label %126
    i32 3, label %126
    i32 7, label %126
    i32 2, label %148
  ]

126:                                              ; preds = %120, %120, %120
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.my_color_deconverter, ptr %127, i32 0, i32 0
  %129 = getelementptr inbounds %struct.jpeg_color_deconverter, ptr %128, i32 0, i32 1
  store ptr @grayscale_convert, ptr %129, align 8, !tbaa !30
  store i32 1, ptr %4, align 4, !tbaa !31
  br label %130

130:                                              ; preds = %144, %126
  %131 = load i32, ptr %4, align 4, !tbaa !31
  %132 = load ptr, ptr %2, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %132, i32 0, i32 9
  %134 = load i32, ptr %133, align 8, !tbaa !22
  %135 = icmp slt i32 %131, %134
  br i1 %135, label %136, label %147

136:                                              ; preds = %130
  %137 = load ptr, ptr %2, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %137, i32 0, i32 44
  %139 = load ptr, ptr %138, align 8, !tbaa !32
  %140 = load i32, ptr %4, align 4, !tbaa !31
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds %struct.jpeg_component_info, ptr %139, i64 %141
  %143 = getelementptr inbounds %struct.jpeg_component_info, ptr %142, i32 0, i32 13
  store i32 0, ptr %143, align 4, !tbaa !33
  br label %144

144:                                              ; preds = %136
  %145 = load i32, ptr %4, align 4, !tbaa !31
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %4, align 4, !tbaa !31
  br label %130, !llvm.loop !35

147:                                              ; preds = %130
  br label %184

148:                                              ; preds = %120
  %149 = load ptr, ptr %2, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %149, i32 0, i32 60
  %151 = load i32, ptr %150, align 4, !tbaa !27
  switch i32 %151, label %160 [
    i32 0, label %152
    i32 1, label %156
  ]

152:                                              ; preds = %148
  %153 = load ptr, ptr %3, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.my_color_deconverter, ptr %153, i32 0, i32 0
  %155 = getelementptr inbounds %struct.jpeg_color_deconverter, ptr %154, i32 0, i32 1
  store ptr @rgb_gray_convert, ptr %155, align 8, !tbaa !30
  br label %171

156:                                              ; preds = %148
  %157 = load ptr, ptr %3, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.my_color_deconverter, ptr %157, i32 0, i32 0
  %159 = getelementptr inbounds %struct.jpeg_color_deconverter, ptr %158, i32 0, i32 1
  store ptr @rgb1_gray_convert, ptr %159, align 8, !tbaa !30
  br label %171

160:                                              ; preds = %148
  %161 = load ptr, ptr %2, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %161, i32 0, i32 0
  %163 = load ptr, ptr %162, align 8, !tbaa !23
  %164 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %163, i32 0, i32 5
  store i32 28, ptr %164, align 8, !tbaa !24
  %165 = load ptr, ptr %2, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %165, i32 0, i32 0
  %167 = load ptr, ptr %166, align 8, !tbaa !23
  %168 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %167, i32 0, i32 0
  %169 = load ptr, ptr %168, align 8, !tbaa !26
  %170 = load ptr, ptr %2, align 8, !tbaa !5
  call void %169(ptr noundef %170)
  br label %171

171:                                              ; preds = %160, %156, %152
  %172 = load ptr, ptr %2, align 8, !tbaa !5
  call void @build_rgb_y_table(ptr noundef %172)
  br label %184

173:                                              ; preds = %120
  %174 = load ptr, ptr %2, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %174, i32 0, i32 0
  %176 = load ptr, ptr %175, align 8, !tbaa !23
  %177 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %176, i32 0, i32 5
  store i32 28, ptr %177, align 8, !tbaa !24
  %178 = load ptr, ptr %2, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %178, i32 0, i32 0
  %180 = load ptr, ptr %179, align 8, !tbaa !23
  %181 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %180, i32 0, i32 0
  %182 = load ptr, ptr %181, align 8, !tbaa !26
  %183 = load ptr, ptr %2, align 8, !tbaa !5
  call void %182(ptr noundef %183)
  br label %184

184:                                              ; preds = %173, %171, %147
  br label %340

185:                                              ; preds = %116
  %186 = load ptr, ptr %2, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %186, i32 0, i32 29
  store i32 3, ptr %187, align 8, !tbaa !29
  %188 = load ptr, ptr %2, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %188, i32 0, i32 10
  %190 = load i32, ptr %189, align 4, !tbaa !21
  switch i32 %190, label %229 [
    i32 1, label %191
    i32 3, label %195
    i32 7, label %200
    i32 2, label %205
  ]

191:                                              ; preds = %185
  %192 = load ptr, ptr %3, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.my_color_deconverter, ptr %192, i32 0, i32 0
  %194 = getelementptr inbounds %struct.jpeg_color_deconverter, ptr %193, i32 0, i32 1
  store ptr @gray_rgb_convert, ptr %194, align 8, !tbaa !30
  br label %240

195:                                              ; preds = %185
  %196 = load ptr, ptr %3, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.my_color_deconverter, ptr %196, i32 0, i32 0
  %198 = getelementptr inbounds %struct.jpeg_color_deconverter, ptr %197, i32 0, i32 1
  store ptr @ycc_rgb_convert, ptr %198, align 8, !tbaa !30
  %199 = load ptr, ptr %2, align 8, !tbaa !5
  call void @build_ycc_rgb_table(ptr noundef %199)
  br label %240

200:                                              ; preds = %185
  %201 = load ptr, ptr %3, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.my_color_deconverter, ptr %201, i32 0, i32 0
  %203 = getelementptr inbounds %struct.jpeg_color_deconverter, ptr %202, i32 0, i32 1
  store ptr @ycc_rgb_convert, ptr %203, align 8, !tbaa !30
  %204 = load ptr, ptr %2, align 8, !tbaa !5
  call void @build_bg_ycc_rgb_table(ptr noundef %204)
  br label %240

205:                                              ; preds = %185
  %206 = load ptr, ptr %2, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %206, i32 0, i32 60
  %208 = load i32, ptr %207, align 4, !tbaa !27
  switch i32 %208, label %217 [
    i32 0, label %209
    i32 1, label %213
  ]

209:                                              ; preds = %205
  %210 = load ptr, ptr %3, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.my_color_deconverter, ptr %210, i32 0, i32 0
  %212 = getelementptr inbounds %struct.jpeg_color_deconverter, ptr %211, i32 0, i32 1
  store ptr @rgb_convert, ptr %212, align 8, !tbaa !30
  br label %228

213:                                              ; preds = %205
  %214 = load ptr, ptr %3, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.my_color_deconverter, ptr %214, i32 0, i32 0
  %216 = getelementptr inbounds %struct.jpeg_color_deconverter, ptr %215, i32 0, i32 1
  store ptr @rgb1_rgb_convert, ptr %216, align 8, !tbaa !30
  br label %228

217:                                              ; preds = %205
  %218 = load ptr, ptr %2, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %218, i32 0, i32 0
  %220 = load ptr, ptr %219, align 8, !tbaa !23
  %221 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %220, i32 0, i32 5
  store i32 28, ptr %221, align 8, !tbaa !24
  %222 = load ptr, ptr %2, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %222, i32 0, i32 0
  %224 = load ptr, ptr %223, align 8, !tbaa !23
  %225 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %224, i32 0, i32 0
  %226 = load ptr, ptr %225, align 8, !tbaa !26
  %227 = load ptr, ptr %2, align 8, !tbaa !5
  call void %226(ptr noundef %227)
  br label %228

228:                                              ; preds = %217, %213, %209
  br label %240

229:                                              ; preds = %185
  %230 = load ptr, ptr %2, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %230, i32 0, i32 0
  %232 = load ptr, ptr %231, align 8, !tbaa !23
  %233 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %232, i32 0, i32 5
  store i32 28, ptr %233, align 8, !tbaa !24
  %234 = load ptr, ptr %2, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %234, i32 0, i32 0
  %236 = load ptr, ptr %235, align 8, !tbaa !23
  %237 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %236, i32 0, i32 0
  %238 = load ptr, ptr %237, align 8, !tbaa !26
  %239 = load ptr, ptr %2, align 8, !tbaa !5
  call void %238(ptr noundef %239)
  br label %240

240:                                              ; preds = %229, %228, %200, %195, %191
  br label %340

241:                                              ; preds = %116
  %242 = load ptr, ptr %2, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %242, i32 0, i32 29
  store i32 3, ptr %243, align 8, !tbaa !29
  %244 = load ptr, ptr %2, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %244, i32 0, i32 10
  %246 = load i32, ptr %245, align 4, !tbaa !21
  %247 = icmp eq i32 %246, 6
  br i1 %247, label %248, label %272

248:                                              ; preds = %241
  %249 = load ptr, ptr %2, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %249, i32 0, i32 60
  %251 = load i32, ptr %250, align 4, !tbaa !27
  switch i32 %251, label %260 [
    i32 0, label %252
    i32 1, label %256
  ]

252:                                              ; preds = %248
  %253 = load ptr, ptr %3, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.my_color_deconverter, ptr %253, i32 0, i32 0
  %255 = getelementptr inbounds %struct.jpeg_color_deconverter, ptr %254, i32 0, i32 1
  store ptr @rgb_convert, ptr %255, align 8, !tbaa !30
  br label %271

256:                                              ; preds = %248
  %257 = load ptr, ptr %3, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.my_color_deconverter, ptr %257, i32 0, i32 0
  %259 = getelementptr inbounds %struct.jpeg_color_deconverter, ptr %258, i32 0, i32 1
  store ptr @rgb1_rgb_convert, ptr %259, align 8, !tbaa !30
  br label %271

260:                                              ; preds = %248
  %261 = load ptr, ptr %2, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %261, i32 0, i32 0
  %263 = load ptr, ptr %262, align 8, !tbaa !23
  %264 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %263, i32 0, i32 5
  store i32 28, ptr %264, align 8, !tbaa !24
  %265 = load ptr, ptr %2, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %265, i32 0, i32 0
  %267 = load ptr, ptr %266, align 8, !tbaa !23
  %268 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %267, i32 0, i32 0
  %269 = load ptr, ptr %268, align 8, !tbaa !26
  %270 = load ptr, ptr %2, align 8, !tbaa !5
  call void %269(ptr noundef %270)
  br label %271

271:                                              ; preds = %260, %256, %252
  br label %283

272:                                              ; preds = %241
  %273 = load ptr, ptr %2, align 8, !tbaa !5
  %274 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %273, i32 0, i32 0
  %275 = load ptr, ptr %274, align 8, !tbaa !23
  %276 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %275, i32 0, i32 5
  store i32 28, ptr %276, align 8, !tbaa !24
  %277 = load ptr, ptr %2, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %277, i32 0, i32 0
  %279 = load ptr, ptr %278, align 8, !tbaa !23
  %280 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %279, i32 0, i32 0
  %281 = load ptr, ptr %280, align 8, !tbaa !26
  %282 = load ptr, ptr %2, align 8, !tbaa !5
  call void %281(ptr noundef %282)
  br label %283

283:                                              ; preds = %272, %271
  br label %340

284:                                              ; preds = %116
  %285 = load ptr, ptr %2, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %285, i32 0, i32 29
  store i32 4, ptr %286, align 8, !tbaa !29
  %287 = load ptr, ptr %2, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %287, i32 0, i32 10
  %289 = load i32, ptr %288, align 4, !tbaa !21
  switch i32 %289, label %299 [
    i32 5, label %290
    i32 4, label %295
  ]

290:                                              ; preds = %284
  %291 = load ptr, ptr %3, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.my_color_deconverter, ptr %291, i32 0, i32 0
  %293 = getelementptr inbounds %struct.jpeg_color_deconverter, ptr %292, i32 0, i32 1
  store ptr @ycck_cmyk_convert, ptr %293, align 8, !tbaa !30
  %294 = load ptr, ptr %2, align 8, !tbaa !5
  call void @build_ycc_rgb_table(ptr noundef %294)
  br label %310

295:                                              ; preds = %284
  %296 = load ptr, ptr %3, align 8, !tbaa !5
  %297 = getelementptr inbounds %struct.my_color_deconverter, ptr %296, i32 0, i32 0
  %298 = getelementptr inbounds %struct.jpeg_color_deconverter, ptr %297, i32 0, i32 1
  store ptr @null_convert, ptr %298, align 8, !tbaa !30
  br label %310

299:                                              ; preds = %284
  %300 = load ptr, ptr %2, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %300, i32 0, i32 0
  %302 = load ptr, ptr %301, align 8, !tbaa !23
  %303 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %302, i32 0, i32 5
  store i32 28, ptr %303, align 8, !tbaa !24
  %304 = load ptr, ptr %2, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %304, i32 0, i32 0
  %306 = load ptr, ptr %305, align 8, !tbaa !23
  %307 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %306, i32 0, i32 0
  %308 = load ptr, ptr %307, align 8, !tbaa !26
  %309 = load ptr, ptr %2, align 8, !tbaa !5
  call void %308(ptr noundef %309)
  br label %310

310:                                              ; preds = %299, %295, %290
  br label %340

311:                                              ; preds = %116
  %312 = load ptr, ptr %2, align 8, !tbaa !5
  %313 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %312, i32 0, i32 11
  %314 = load i32, ptr %313, align 8, !tbaa !28
  %315 = load ptr, ptr %2, align 8, !tbaa !5
  %316 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %315, i32 0, i32 10
  %317 = load i32, ptr %316, align 4, !tbaa !21
  %318 = icmp eq i32 %314, %317
  br i1 %318, label %319, label %328

319:                                              ; preds = %311
  %320 = load ptr, ptr %2, align 8, !tbaa !5
  %321 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %320, i32 0, i32 9
  %322 = load i32, ptr %321, align 8, !tbaa !22
  %323 = load ptr, ptr %2, align 8, !tbaa !5
  %324 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %323, i32 0, i32 29
  store i32 %322, ptr %324, align 8, !tbaa !29
  %325 = load ptr, ptr %3, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.my_color_deconverter, ptr %325, i32 0, i32 0
  %327 = getelementptr inbounds %struct.jpeg_color_deconverter, ptr %326, i32 0, i32 1
  store ptr @null_convert, ptr %327, align 8, !tbaa !30
  br label %339

328:                                              ; preds = %311
  %329 = load ptr, ptr %2, align 8, !tbaa !5
  %330 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %329, i32 0, i32 0
  %331 = load ptr, ptr %330, align 8, !tbaa !23
  %332 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %331, i32 0, i32 5
  store i32 28, ptr %332, align 8, !tbaa !24
  %333 = load ptr, ptr %2, align 8, !tbaa !5
  %334 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %333, i32 0, i32 0
  %335 = load ptr, ptr %334, align 8, !tbaa !23
  %336 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %335, i32 0, i32 0
  %337 = load ptr, ptr %336, align 8, !tbaa !26
  %338 = load ptr, ptr %2, align 8, !tbaa !5
  call void %337(ptr noundef %338)
  br label %339

339:                                              ; preds = %328, %319
  br label %340

340:                                              ; preds = %339, %310, %283, %240, %184
  %341 = load ptr, ptr %2, align 8, !tbaa !5
  %342 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %341, i32 0, i32 20
  %343 = load i32, ptr %342, align 4, !tbaa !37
  %344 = icmp ne i32 %343, 0
  br i1 %344, label %345, label %348

345:                                              ; preds = %340
  %346 = load ptr, ptr %2, align 8, !tbaa !5
  %347 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %346, i32 0, i32 30
  store i32 1, ptr %347, align 4, !tbaa !38
  br label %354

348:                                              ; preds = %340
  %349 = load ptr, ptr %2, align 8, !tbaa !5
  %350 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %349, i32 0, i32 29
  %351 = load i32, ptr %350, align 8, !tbaa !29
  %352 = load ptr, ptr %2, align 8, !tbaa !5
  %353 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %352, i32 0, i32 30
  store i32 %351, ptr %353, align 4, !tbaa !38
  br label %354

354:                                              ; preds = %348, %345
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #2
  ret void
}

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

; Function Attrs: nounwind uwtable
declare hidden void @start_pass_dcolor(ptr noundef) #0

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

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

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

; Function Attrs: nounwind uwtable
declare hidden void @build_rgb_y_table(ptr noundef) #0

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

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

; Function Attrs: nounwind uwtable
declare hidden void @build_ycc_rgb_table(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @build_bg_ycc_rgb_table(ptr noundef) #0

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

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

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

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

; 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 = { 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 8}
!10 = !{!"jpeg_decompress_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, !11, i64 64, !11, i64 68, !11, i64 72, !12, i64 80, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !11, i64 144, !11, i64 148, !11, i64 152, !11, i64 156, !6, i64 160, !11, i64 168, !11, i64 172, !11, i64 176, !11, i64 180, !11, i64 184, !6, i64 192, !7, i64 200, !7, i64 232, !7, i64 264, !11, i64 296, !6, i64 304, !11, i64 312, !11, i64 316, !11, i64 320, !7, i64 324, !7, i64 340, !7, i64 356, !11, i64 372, !11, i64 376, !7, i64 380, !7, i64 381, !7, i64 382, !13, i64 384, !13, i64 386, !11, i64 388, !7, i64 392, !11, i64 396, !11, i64 400, !6, i64 408, !11, i64 416, !11, i64 420, !11, i64 424, !11, i64 428, !11, i64 432, !6, i64 440, !11, i64 448, !7, i64 456, !11, i64 488, !11, i64 492, !11, i64 496, !7, i64 500, !11, i64 540, !11, i64 544, !11, i64 548, !11, i64 552, !11, i64 556, !6, i64 560, !11, i64 568, !11, i64 572, !6, i64 576, !6, i64 584, !6, i64 592, !6, i64 600, !6, i64 608, !6, i64 616, !6, i64 624, !6, i64 632, !6, i64 640, !6, i64 648, !6, i64 656}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"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, !16, i64 88, !16, i64 96}
!16 = !{!"long", !7, i64 0}
!17 = !{!10, !6, i64 648}
!18 = !{!19, !6, i64 0}
!19 = !{!"", !20, i64 0, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!20 = !{!"jpeg_color_deconverter", !6, i64 0, !6, i64 8}
!21 = !{!10, !11, i64 60}
!22 = !{!10, !11, i64 56}
!23 = !{!10, !6, i64 0}
!24 = !{!25, !11, i64 40}
!25 = !{!"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, !16, i64 128, !6, i64 136, !11, i64 144, !6, i64 152, !11, i64 160, !11, i64 164}
!26 = !{!25, !6, i64 0}
!27 = !{!10, !11, i64 396}
!28 = !{!10, !11, i64 64}
!29 = !{!10, !11, i64 144}
!30 = !{!19, !6, i64 8}
!31 = !{!11, !11, i64 0}
!32 = !{!10, !6, i64 304}
!33 = !{!34, !11, i64 52}
!34 = !{!"", !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, !11, 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}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = !{!10, !11, i64 108}
!38 = !{!10, !11, i64 148}


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

%struct.jpeg_component_info = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr }

; Function Attrs: nounwind uwtable
define dso_local void @jinit_color_deconverter(ptr noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 8
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = load ptr, ptr %3, align 8, !tbaa !13
  %5 = tail call ptr %4(ptr noundef %0, i32 noundef 1, i64 noundef 64) #1
  %6 = getelementptr inbounds i8, ptr %0, i64 648
  store ptr %5, ptr %6, align 8, !tbaa !16
  store ptr @start_pass_dcolor, ptr %5, align 8, !tbaa !17
  %7 = getelementptr inbounds i8, ptr %0, i64 60
  %8 = load i32, ptr %7, align 4, !tbaa !20
  switch i32 %8, label %18 [
    i32 1, label %9
    i32 2, label %12
    i32 3, label %12
    i32 6, label %12
    i32 7, label %12
    i32 4, label %15
    i32 5, label %15
  ]

9:                                                ; preds = %1
  %10 = getelementptr inbounds i8, ptr %0, i64 56
  %11 = load i32, ptr %10, align 8, !tbaa !21
  %.not95 = icmp eq i32 %11, 1
  br i1 %.not95, label %25, label %.sink.split

12:                                               ; preds = %1, %1, %1, %1
  %13 = getelementptr inbounds i8, ptr %0, i64 56
  %14 = load i32, ptr %13, align 8, !tbaa !21
  %.not94 = icmp eq i32 %14, 3
  br i1 %.not94, label %25, label %.sink.split

15:                                               ; preds = %1, %1
  %16 = getelementptr inbounds i8, ptr %0, i64 56
  %17 = load i32, ptr %16, align 8, !tbaa !21
  %.not = icmp eq i32 %17, 4
  br i1 %.not, label %25, label %.sink.split

18:                                               ; preds = %1
  %19 = getelementptr inbounds i8, ptr %0, i64 56
  %20 = load i32, ptr %19, align 8, !tbaa !21
  %21 = icmp slt i32 %20, 1
  br i1 %21, label %.sink.split, label %25

.sink.split:                                      ; preds = %18, %15, %12, %9
  %22 = load ptr, ptr %0, align 8, !tbaa !22
  %23 = getelementptr inbounds i8, ptr %22, i64 40
  store i32 11, ptr %23, align 8, !tbaa !23
  %24 = load ptr, ptr %22, align 8, !tbaa !25
  tail call void %24(ptr noundef nonnull %0) #1
  br label %25

25:                                               ; preds = %.sink.split, %18, %15, %12, %9
  %26 = getelementptr inbounds i8, ptr %0, i64 396
  %27 = load i32, ptr %26, align 4, !tbaa !26
  %.not96 = icmp eq i32 %27, 0
  br i1 %.not96, label %34, label %28

28:                                               ; preds = %25
  %29 = load i32, ptr %7, align 4, !tbaa !20
  switch i32 %29, label %30 [
    i32 2, label %34
    i32 6, label %34
  ]

30:                                               ; preds = %28
  %31 = load ptr, ptr %0, align 8, !tbaa !22
  %32 = getelementptr inbounds i8, ptr %31, i64 40
  store i32 28, ptr %32, align 8, !tbaa !23
  %33 = load ptr, ptr %31, align 8, !tbaa !25
  tail call void %33(ptr noundef nonnull %0) #1
  br label %34

34:                                               ; preds = %28, %28, %30, %25
  %35 = getelementptr inbounds i8, ptr %0, i64 64
  %36 = load i32, ptr %35, align 8, !tbaa !27
  switch i32 %36, label %122 [
    i32 1, label %37
    i32 2, label %70
    i32 6, label %93
    i32 4, label %111
  ]

37:                                               ; preds = %34
  %38 = getelementptr inbounds i8, ptr %0, i64 144
  store i32 1, ptr %38, align 8, !tbaa !28
  %39 = load i32, ptr %7, align 4, !tbaa !20
  switch i32 %39, label %66 [
    i32 1, label %40
    i32 3, label %40
    i32 7, label %40
    i32 2, label %55
  ]

40:                                               ; preds = %37, %37, %37
  %41 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @grayscale_convert, ptr %41, align 8, !tbaa !29
  %42 = getelementptr inbounds i8, ptr %0, i64 56
  %43 = load i32, ptr %42, align 8, !tbaa !21
  %44 = icmp sgt i32 %43, 1
  br i1 %44, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %40
  %45 = getelementptr inbounds i8, ptr %0, i64 304
  %46 = load ptr, ptr %45, align 8, !tbaa !30
  %wide.trip.count = zext nneg i32 %43 to i64
  %47 = add nsw i64 %wide.trip.count, -1
  %48 = add nsw i64 %wide.trip.count, -2
  %xtraiter = and i64 %47, 3
  %49 = icmp ult i64 %48, 3
  br i1 %49, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %47, -4
  br label %50

50:                                               ; preds = %50, %.lr.ph.new
  %indvars.iv = phi i64 [ 1, %.lr.ph.new ], [ %indvars.iv.next.3, %50 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %50 ]
  %51 = getelementptr inbounds %struct.jpeg_component_info, ptr %46, i64 %indvars.iv, i32 13
  store i32 0, ptr %51, align 4, !tbaa !31
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %52 = getelementptr inbounds %struct.jpeg_component_info, ptr %46, i64 %indvars.iv.next, i32 13
  store i32 0, ptr %52, align 4, !tbaa !31
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %53 = getelementptr inbounds %struct.jpeg_component_info, ptr %46, i64 %indvars.iv.next.1, i32 13
  store i32 0, ptr %53, align 4, !tbaa !31
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %54 = getelementptr inbounds %struct.jpeg_component_info, ptr %46, i64 %indvars.iv.next.2, i32 13
  store i32 0, ptr %54, align 4, !tbaa !31
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %50, !llvm.loop !33

55:                                               ; preds = %37
  %56 = load i32, ptr %26, align 4, !tbaa !26
  switch i32 %56, label %61 [
    i32 0, label %57
    i32 1, label %59
  ]

57:                                               ; preds = %55
  %58 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @rgb_gray_convert, ptr %58, align 8, !tbaa !29
  br label %65

59:                                               ; preds = %55
  %60 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @rgb1_gray_convert, ptr %60, align 8, !tbaa !29
  br label %65

61:                                               ; preds = %55
  %62 = load ptr, ptr %0, align 8, !tbaa !22
  %63 = getelementptr inbounds i8, ptr %62, i64 40
  store i32 28, ptr %63, align 8, !tbaa !23
  %64 = load ptr, ptr %62, align 8, !tbaa !25
  tail call void %64(ptr noundef nonnull %0) #1
  br label %65

65:                                               ; preds = %61, %59, %57
  tail call void @build_rgb_y_table(ptr noundef nonnull %0)
  br label %.loopexit

66:                                               ; preds = %37
  %67 = load ptr, ptr %0, align 8, !tbaa !22
  %68 = getelementptr inbounds i8, ptr %67, i64 40
  store i32 28, ptr %68, align 8, !tbaa !23
  %69 = load ptr, ptr %67, align 8, !tbaa !25
  tail call void %69(ptr noundef nonnull %0) #1
  br label %.loopexit

70:                                               ; preds = %34
  %71 = getelementptr inbounds i8, ptr %0, i64 144
  store i32 3, ptr %71, align 8, !tbaa !28
  %72 = load i32, ptr %7, align 4, !tbaa !20
  switch i32 %72, label %89 [
    i32 1, label %73
    i32 3, label %75
    i32 7, label %77
    i32 2, label %79
  ]

73:                                               ; preds = %70
  %74 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @gray_rgb_convert, ptr %74, align 8, !tbaa !29
  br label %.loopexit

75:                                               ; preds = %70
  %76 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @ycc_rgb_convert, ptr %76, align 8, !tbaa !29
  tail call void @build_ycc_rgb_table(ptr noundef nonnull %0)
  br label %.loopexit

77:                                               ; preds = %70
  %78 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @ycc_rgb_convert, ptr %78, align 8, !tbaa !29
  tail call void @build_bg_ycc_rgb_table(ptr noundef nonnull %0)
  br label %.loopexit

79:                                               ; preds = %70
  %80 = load i32, ptr %26, align 4, !tbaa !26
  switch i32 %80, label %85 [
    i32 0, label %81
    i32 1, label %83
  ]

81:                                               ; preds = %79
  %82 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @rgb_convert, ptr %82, align 8, !tbaa !29
  br label %.loopexit

83:                                               ; preds = %79
  %84 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @rgb1_rgb_convert, ptr %84, align 8, !tbaa !29
  br label %.loopexit

85:                                               ; preds = %79
  %86 = load ptr, ptr %0, align 8, !tbaa !22
  %87 = getelementptr inbounds i8, ptr %86, i64 40
  store i32 28, ptr %87, align 8, !tbaa !23
  %88 = load ptr, ptr %86, align 8, !tbaa !25
  tail call void %88(ptr noundef nonnull %0) #1
  br label %.loopexit

89:                                               ; preds = %70
  %90 = load ptr, ptr %0, align 8, !tbaa !22
  %91 = getelementptr inbounds i8, ptr %90, i64 40
  store i32 28, ptr %91, align 8, !tbaa !23
  %92 = load ptr, ptr %90, align 8, !tbaa !25
  tail call void %92(ptr noundef nonnull %0) #1
  br label %.loopexit

93:                                               ; preds = %34
  %94 = getelementptr inbounds i8, ptr %0, i64 144
  store i32 3, ptr %94, align 8, !tbaa !28
  %95 = load i32, ptr %7, align 4, !tbaa !20
  %96 = icmp eq i32 %95, 6
  br i1 %96, label %97, label %107

97:                                               ; preds = %93
  %98 = load i32, ptr %26, align 4, !tbaa !26
  switch i32 %98, label %103 [
    i32 0, label %99
    i32 1, label %101
  ]

99:                                               ; preds = %97
  %100 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @rgb_convert, ptr %100, align 8, !tbaa !29
  br label %.loopexit

101:                                              ; preds = %97
  %102 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @rgb1_rgb_convert, ptr %102, align 8, !tbaa !29
  br label %.loopexit

103:                                              ; preds = %97
  %104 = load ptr, ptr %0, align 8, !tbaa !22
  %105 = getelementptr inbounds i8, ptr %104, i64 40
  store i32 28, ptr %105, align 8, !tbaa !23
  %106 = load ptr, ptr %104, align 8, !tbaa !25
  tail call void %106(ptr noundef nonnull %0) #1
  br label %.loopexit

107:                                              ; preds = %93
  %108 = load ptr, ptr %0, align 8, !tbaa !22
  %109 = getelementptr inbounds i8, ptr %108, i64 40
  store i32 28, ptr %109, align 8, !tbaa !23
  %110 = load ptr, ptr %108, align 8, !tbaa !25
  tail call void %110(ptr noundef nonnull %0) #1
  br label %.loopexit

111:                                              ; preds = %34
  %112 = getelementptr inbounds i8, ptr %0, i64 144
  store i32 4, ptr %112, align 8, !tbaa !28
  %113 = load i32, ptr %7, align 4, !tbaa !20
  switch i32 %113, label %118 [
    i32 5, label %114
    i32 4, label %116
  ]

114:                                              ; preds = %111
  %115 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @ycck_cmyk_convert, ptr %115, align 8, !tbaa !29
  tail call void @build_ycc_rgb_table(ptr noundef nonnull %0)
  br label %.loopexit

116:                                              ; preds = %111
  %117 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @null_convert, ptr %117, align 8, !tbaa !29
  br label %.loopexit

118:                                              ; preds = %111
  %119 = load ptr, ptr %0, align 8, !tbaa !22
  %120 = getelementptr inbounds i8, ptr %119, i64 40
  store i32 28, ptr %120, align 8, !tbaa !23
  %121 = load ptr, ptr %119, align 8, !tbaa !25
  tail call void %121(ptr noundef nonnull %0) #1
  br label %.loopexit

122:                                              ; preds = %34
  %123 = load i32, ptr %7, align 4, !tbaa !20
  %124 = icmp eq i32 %36, %123
  br i1 %124, label %125, label %130

125:                                              ; preds = %122
  %126 = getelementptr inbounds i8, ptr %0, i64 56
  %127 = load i32, ptr %126, align 8, !tbaa !21
  %128 = getelementptr inbounds i8, ptr %0, i64 144
  store i32 %127, ptr %128, align 8, !tbaa !28
  %129 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @null_convert, ptr %129, align 8, !tbaa !29
  br label %.loopexit

130:                                              ; preds = %122
  %131 = load ptr, ptr %0, align 8, !tbaa !22
  %132 = getelementptr inbounds i8, ptr %131, i64 40
  store i32 28, ptr %132, align 8, !tbaa !23
  %133 = load ptr, ptr %131, align 8, !tbaa !25
  tail call void %133(ptr noundef nonnull %0) #1
  br label %.loopexit

.loopexit.loopexit.unr-lcssa:                     ; preds = %50, %.lr.ph
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next.3, %50 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.epil.preheader

.epil.preheader:                                  ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %134 = getelementptr inbounds %struct.jpeg_component_info, ptr %46, i64 %indvars.iv.epil, i32 13
  store i32 0, ptr %134, align 4, !tbaa !31
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.loopexit, label %.epil.preheader, !llvm.loop !35

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader, %40, %125, %130, %114, %116, %118, %107, %103, %101, %99, %73, %75, %77, %89, %85, %83, %81, %65, %66
  %135 = getelementptr inbounds i8, ptr %0, i64 108
  %136 = load i32, ptr %135, align 4, !tbaa !37
  %.not99 = icmp eq i32 %136, 0
  br i1 %.not99, label %137, label %140

137:                                              ; preds = %.loopexit
  %138 = getelementptr inbounds i8, ptr %0, i64 144
  %139 = load i32, ptr %138, align 8, !tbaa !28
  br label %140

140:                                              ; preds = %.loopexit, %137
  %.sink = phi i32 [ %139, %137 ], [ 1, %.loopexit ]
  %141 = getelementptr inbounds i8, ptr %0, i64 148
  store i32 %.sink, ptr %141, align 4
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden void @start_pass_dcolor(ptr noundef) #0

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

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

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

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

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

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

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

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

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

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

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

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

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 = { 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 8}
!6 = !{!"jpeg_decompress_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, !10, i64 64, !10, i64 68, !10, i64 72, !11, i64 80, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !10, i64 152, !10, i64 156, !7, i64 160, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !7, i64 192, !8, i64 200, !8, i64 232, !8, i64 264, !10, i64 296, !7, i64 304, !10, i64 312, !10, i64 316, !10, i64 320, !8, i64 324, !8, i64 340, !8, i64 356, !10, i64 372, !10, i64 376, !8, i64 380, !8, i64 381, !8, i64 382, !12, i64 384, !12, i64 386, !10, i64 388, !8, i64 392, !10, i64 396, !10, i64 400, !7, i64 408, !10, i64 416, !10, i64 420, !10, i64 424, !10, i64 428, !10, i64 432, !7, i64 440, !10, i64 448, !8, i64 456, !10, i64 488, !10, i64 492, !10, i64 496, !8, i64 500, !10, i64 540, !10, i64 544, !10, i64 548, !10, i64 552, !10, i64 556, !7, i64 560, !10, i64 568, !10, i64 572, !7, i64 576, !7, i64 584, !7, i64 592, !7, i64 600, !7, i64 608, !7, i64 616, !7, i64 624, !7, i64 632, !7, i64 640, !7, i64 648, !7, i64 656}
!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, !7, i64 0}
!14 = !{!"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, !15, i64 88, !15, i64 96}
!15 = !{!"long", !8, i64 0}
!16 = !{!6, !7, i64 648}
!17 = !{!18, !7, i64 0}
!18 = !{!"", !19, i64 0, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56}
!19 = !{!"jpeg_color_deconverter", !7, i64 0, !7, i64 8}
!20 = !{!6, !10, i64 60}
!21 = !{!6, !10, i64 56}
!22 = !{!6, !7, i64 0}
!23 = !{!24, !10, i64 40}
!24 = !{!"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, !15, i64 128, !7, i64 136, !10, i64 144, !7, i64 152, !10, i64 160, !10, i64 164}
!25 = !{!24, !7, i64 0}
!26 = !{!6, !10, i64 396}
!27 = !{!6, !10, i64 64}
!28 = !{!6, !10, i64 144}
!29 = !{!18, !7, i64 8}
!30 = !{!6, !7, i64 304}
!31 = !{!32, !10, i64 52}
!32 = !{!"", !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, !10, 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}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.unroll.disable"}
!37 = !{!6, !10, i64 108}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,SROAPass,SimplifyCFGPass,TailCallElimPass