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

; 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, i32, i32, i32, i32, ptr, [4 x ptr], [4 x i32], [4 x ptr], [4 x ptr], [16 x i8], [16 x i8], [16 x i8], i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8, i8, i8, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x ptr], i32, i32, i32, [10 x i32], i32, i32, i32, i32, i32, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32 }
%struct.jpeg_memory_mgr = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64 }
%struct.my_color_converter = type { %struct.jpeg_color_converter, ptr }
%struct.jpeg_color_converter = 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_converter(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #2
  %4 = load ptr, ptr %2, align 8, !tbaa !5
  %5 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %4, i32 0, i32 1
  %6 = load ptr, ptr %5, align 8, !tbaa !9
  %7 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %6, i32 0, i32 0
  %8 = load ptr, ptr %7, align 8, !tbaa !14
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = call ptr %8(ptr noundef %9, i32 noundef 1, i64 noundef 24)
  store ptr %10, ptr %3, align 8, !tbaa !5
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.my_color_converter, ptr %11, i32 0, i32 0
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %13, i32 0, i32 71
  store ptr %12, ptr %14, align 8, !tbaa !17
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.my_color_converter, ptr %15, i32 0, i32 0
  %17 = getelementptr inbounds %struct.jpeg_color_converter, ptr %16, i32 0, i32 0
  store ptr @null_method, ptr %17, align 8, !tbaa !18
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %18, i32 0, i32 10
  %20 = load i32, ptr %19, align 4, !tbaa !21
  switch i32 %20, label %89 [
    i32 1, label %21
    i32 2, label %38
    i32 6, label %38
    i32 3, label %55
    i32 7, label %55
    i32 4, label %72
    i32 5, label %72
  ]

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

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

37:                                               ; preds = %26, %21
  br label %106

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

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

54:                                               ; preds = %43, %38
  br label %106

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

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

71:                                               ; preds = %60, %55
  br label %106

72:                                               ; preds = %1, %1
  %73 = load ptr, ptr %2, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %73, i32 0, i32 9
  %75 = load i32, ptr %74, align 8, !tbaa !22
  %76 = icmp ne i32 %75, 4
  br i1 %76, label %77, label %88

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

88:                                               ; preds = %77, %72
  br label %106

89:                                               ; preds = %1
  %90 = load ptr, ptr %2, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %90, i32 0, i32 9
  %92 = load i32, ptr %91, align 8, !tbaa !22
  %93 = icmp slt i32 %92, 1
  br i1 %93, label %94, label %105

94:                                               ; preds = %89
  %95 = load ptr, ptr %2, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %95, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8, !tbaa !23
  %98 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %97, i32 0, i32 5
  store i32 10, ptr %98, align 8, !tbaa !24
  %99 = load ptr, ptr %2, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !23
  %102 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %101, i32 0, i32 0
  %103 = load ptr, ptr %102, align 8, !tbaa !26
  %104 = load ptr, ptr %2, align 8, !tbaa !5
  call void %103(ptr noundef %104)
  br label %105

105:                                              ; preds = %94, %89
  br label %106

106:                                              ; preds = %105, %88, %71, %54, %37
  %107 = load ptr, ptr %2, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %107, i32 0, i32 45
  %109 = load i32, ptr %108, align 4, !tbaa !27
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %111, label %132

111:                                              ; preds = %106
  %112 = load ptr, ptr %2, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %112, i32 0, i32 18
  %114 = load i32, ptr %113, align 8, !tbaa !28
  %115 = icmp ne i32 %114, 2
  br i1 %115, label %116, label %132

116:                                              ; preds = %111
  %117 = load ptr, ptr %2, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %117, i32 0, i32 18
  %119 = load i32, ptr %118, align 8, !tbaa !28
  %120 = icmp ne i32 %119, 6
  br i1 %120, label %121, label %132

121:                                              ; preds = %116
  %122 = load ptr, ptr %2, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %122, i32 0, i32 0
  %124 = load ptr, ptr %123, align 8, !tbaa !23
  %125 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %124, i32 0, i32 5
  store i32 28, ptr %125, align 8, !tbaa !24
  %126 = load ptr, ptr %2, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %126, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !23
  %129 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %128, i32 0, i32 0
  %130 = load ptr, ptr %129, align 8, !tbaa !26
  %131 = load ptr, ptr %2, align 8, !tbaa !5
  call void %130(ptr noundef %131)
  br label %132

132:                                              ; preds = %121, %116, %111, %106
  %133 = load ptr, ptr %2, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %133, i32 0, i32 18
  %135 = load i32, ptr %134, align 8, !tbaa !28
  switch i32 %135, label %426 [
    i32 1, label %136
    i32 2, label %179
    i32 6, label %179
    i32 3, label %239
    i32 7, label %282
    i32 4, label %346
    i32 5, label %383
  ]

136:                                              ; preds = %132
  %137 = load ptr, ptr %2, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %137, i32 0, i32 17
  %139 = load i32, ptr %138, align 4, !tbaa !29
  %140 = icmp ne i32 %139, 1
  br i1 %140, label %141, label %152

141:                                              ; preds = %136
  %142 = load ptr, ptr %2, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %142, i32 0, i32 0
  %144 = load ptr, ptr %143, align 8, !tbaa !23
  %145 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %144, i32 0, i32 5
  store i32 11, ptr %145, align 8, !tbaa !24
  %146 = load ptr, ptr %2, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %146, i32 0, i32 0
  %148 = load ptr, ptr %147, align 8, !tbaa !23
  %149 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %148, i32 0, i32 0
  %150 = load ptr, ptr %149, align 8, !tbaa !26
  %151 = load ptr, ptr %2, align 8, !tbaa !5
  call void %150(ptr noundef %151)
  br label %152

152:                                              ; preds = %141, %136
  %153 = load ptr, ptr %2, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %153, i32 0, i32 10
  %155 = load i32, ptr %154, align 4, !tbaa !21
  switch i32 %155, label %167 [
    i32 1, label %156
    i32 3, label %156
    i32 7, label %156
    i32 2, label %160
  ]

156:                                              ; preds = %152, %152, %152
  %157 = load ptr, ptr %3, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.my_color_converter, ptr %157, i32 0, i32 0
  %159 = getelementptr inbounds %struct.jpeg_color_converter, ptr %158, i32 0, i32 1
  store ptr @grayscale_convert, ptr %159, align 8, !tbaa !30
  br label %178

160:                                              ; preds = %152
  %161 = load ptr, ptr %3, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.my_color_converter, ptr %161, i32 0, i32 0
  %163 = getelementptr inbounds %struct.jpeg_color_converter, ptr %162, i32 0, i32 0
  store ptr @rgb_ycc_start, ptr %163, align 8, !tbaa !18
  %164 = load ptr, ptr %3, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.my_color_converter, ptr %164, i32 0, i32 0
  %166 = getelementptr inbounds %struct.jpeg_color_converter, ptr %165, i32 0, i32 1
  store ptr @rgb_gray_convert, ptr %166, align 8, !tbaa !30
  br label %178

167:                                              ; preds = %152
  %168 = load ptr, ptr %2, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %168, i32 0, i32 0
  %170 = load ptr, ptr %169, align 8, !tbaa !23
  %171 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %170, i32 0, i32 5
  store i32 28, ptr %171, align 8, !tbaa !24
  %172 = load ptr, ptr %2, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %172, i32 0, i32 0
  %174 = load ptr, ptr %173, align 8, !tbaa !23
  %175 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %174, i32 0, i32 0
  %176 = load ptr, ptr %175, align 8, !tbaa !26
  %177 = load ptr, ptr %2, align 8, !tbaa !5
  call void %176(ptr noundef %177)
  br label %178

178:                                              ; preds = %167, %160, %156
  br label %457

179:                                              ; preds = %132, %132
  %180 = load ptr, ptr %2, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %180, i32 0, i32 17
  %182 = load i32, ptr %181, align 4, !tbaa !29
  %183 = icmp ne i32 %182, 3
  br i1 %183, label %184, label %195

184:                                              ; preds = %179
  %185 = load ptr, ptr %2, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %185, i32 0, i32 0
  %187 = load ptr, ptr %186, align 8, !tbaa !23
  %188 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %187, i32 0, i32 5
  store i32 11, ptr %188, align 8, !tbaa !24
  %189 = load ptr, ptr %2, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %189, i32 0, i32 0
  %191 = load ptr, ptr %190, align 8, !tbaa !23
  %192 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %191, i32 0, i32 0
  %193 = load ptr, ptr %192, align 8, !tbaa !26
  %194 = load ptr, ptr %2, align 8, !tbaa !5
  call void %193(ptr noundef %194)
  br label %195

195:                                              ; preds = %184, %179
  %196 = load ptr, ptr %2, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %196, i32 0, i32 10
  %198 = load i32, ptr %197, align 4, !tbaa !21
  %199 = load ptr, ptr %2, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %199, i32 0, i32 18
  %201 = load i32, ptr %200, align 8, !tbaa !28
  %202 = icmp eq i32 %198, %201
  br i1 %202, label %203, label %227

203:                                              ; preds = %195
  %204 = load ptr, ptr %2, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %204, i32 0, i32 45
  %206 = load i32, ptr %205, align 4, !tbaa !27
  switch i32 %206, label %215 [
    i32 0, label %207
    i32 1, label %211
  ]

207:                                              ; preds = %203
  %208 = load ptr, ptr %3, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.my_color_converter, ptr %208, i32 0, i32 0
  %210 = getelementptr inbounds %struct.jpeg_color_converter, ptr %209, i32 0, i32 1
  store ptr @rgb_convert, ptr %210, align 8, !tbaa !30
  br label %226

211:                                              ; preds = %203
  %212 = load ptr, ptr %3, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.my_color_converter, ptr %212, i32 0, i32 0
  %214 = getelementptr inbounds %struct.jpeg_color_converter, ptr %213, i32 0, i32 1
  store ptr @rgb_rgb1_convert, ptr %214, align 8, !tbaa !30
  br label %226

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

226:                                              ; preds = %215, %211, %207
  br label %238

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

238:                                              ; preds = %227, %226
  br label %457

239:                                              ; preds = %132
  %240 = load ptr, ptr %2, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %240, i32 0, i32 17
  %242 = load i32, ptr %241, align 4, !tbaa !29
  %243 = icmp ne i32 %242, 3
  br i1 %243, label %244, label %255

244:                                              ; preds = %239
  %245 = load ptr, ptr %2, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %245, i32 0, i32 0
  %247 = load ptr, ptr %246, align 8, !tbaa !23
  %248 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %247, i32 0, i32 5
  store i32 11, ptr %248, align 8, !tbaa !24
  %249 = load ptr, ptr %2, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %249, i32 0, i32 0
  %251 = load ptr, ptr %250, align 8, !tbaa !23
  %252 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %251, i32 0, i32 0
  %253 = load ptr, ptr %252, align 8, !tbaa !26
  %254 = load ptr, ptr %2, align 8, !tbaa !5
  call void %253(ptr noundef %254)
  br label %255

255:                                              ; preds = %244, %239
  %256 = load ptr, ptr %2, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %256, i32 0, i32 10
  %258 = load i32, ptr %257, align 4, !tbaa !21
  switch i32 %258, label %270 [
    i32 2, label %259
    i32 3, label %266
  ]

259:                                              ; preds = %255
  %260 = load ptr, ptr %3, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.my_color_converter, ptr %260, i32 0, i32 0
  %262 = getelementptr inbounds %struct.jpeg_color_converter, ptr %261, i32 0, i32 0
  store ptr @rgb_ycc_start, ptr %262, align 8, !tbaa !18
  %263 = load ptr, ptr %3, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.my_color_converter, ptr %263, i32 0, i32 0
  %265 = getelementptr inbounds %struct.jpeg_color_converter, ptr %264, i32 0, i32 1
  store ptr @rgb_ycc_convert, ptr %265, align 8, !tbaa !30
  br label %281

266:                                              ; preds = %255
  %267 = load ptr, ptr %3, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.my_color_converter, ptr %267, i32 0, i32 0
  %269 = getelementptr inbounds %struct.jpeg_color_converter, ptr %268, i32 0, i32 1
  store ptr @null_convert, ptr %269, align 8, !tbaa !30
  br label %281

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

281:                                              ; preds = %270, %266, %259
  br label %457

282:                                              ; preds = %132
  %283 = load ptr, ptr %2, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %283, i32 0, i32 17
  %285 = load i32, ptr %284, align 4, !tbaa !29
  %286 = icmp ne i32 %285, 3
  br i1 %286, label %287, label %298

287:                                              ; preds = %282
  %288 = load ptr, ptr %2, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %288, i32 0, i32 0
  %290 = load ptr, ptr %289, align 8, !tbaa !23
  %291 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %290, i32 0, i32 5
  store i32 11, ptr %291, align 8, !tbaa !24
  %292 = load ptr, ptr %2, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %292, i32 0, i32 0
  %294 = load ptr, ptr %293, align 8, !tbaa !23
  %295 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %294, i32 0, i32 0
  %296 = load ptr, ptr %295, align 8, !tbaa !26
  %297 = load ptr, ptr %2, align 8, !tbaa !5
  call void %296(ptr noundef %297)
  br label %298

298:                                              ; preds = %287, %282
  %299 = load ptr, ptr %2, align 8, !tbaa !5
  %300 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %299, i32 0, i32 10
  %301 = load i32, ptr %300, align 4, !tbaa !21
  switch i32 %301, label %334 [
    i32 2, label %302
    i32 3, label %319
    i32 7, label %330
  ]

302:                                              ; preds = %298
  %303 = load ptr, ptr %2, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %303, i32 0, i32 19
  %305 = load ptr, ptr %304, align 8, !tbaa !31
  %306 = getelementptr inbounds %struct.jpeg_component_info, ptr %305, i64 1
  %307 = getelementptr inbounds %struct.jpeg_component_info, ptr %306, i32 0, i32 13
  store i32 1, ptr %307, align 4, !tbaa !32
  %308 = load ptr, ptr %2, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %308, i32 0, i32 19
  %310 = load ptr, ptr %309, align 8, !tbaa !31
  %311 = getelementptr inbounds %struct.jpeg_component_info, ptr %310, i64 2
  %312 = getelementptr inbounds %struct.jpeg_component_info, ptr %311, i32 0, i32 13
  store i32 1, ptr %312, align 4, !tbaa !32
  %313 = load ptr, ptr %3, align 8, !tbaa !5
  %314 = getelementptr inbounds %struct.my_color_converter, ptr %313, i32 0, i32 0
  %315 = getelementptr inbounds %struct.jpeg_color_converter, ptr %314, i32 0, i32 0
  store ptr @rgb_ycc_start, ptr %315, align 8, !tbaa !18
  %316 = load ptr, ptr %3, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.my_color_converter, ptr %316, i32 0, i32 0
  %318 = getelementptr inbounds %struct.jpeg_color_converter, ptr %317, i32 0, i32 1
  store ptr @rgb_ycc_convert, ptr %318, align 8, !tbaa !30
  br label %345

319:                                              ; preds = %298
  %320 = load ptr, ptr %2, align 8, !tbaa !5
  %321 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %320, i32 0, i32 19
  %322 = load ptr, ptr %321, align 8, !tbaa !31
  %323 = getelementptr inbounds %struct.jpeg_component_info, ptr %322, i64 1
  %324 = getelementptr inbounds %struct.jpeg_component_info, ptr %323, i32 0, i32 13
  store i32 1, ptr %324, align 4, !tbaa !32
  %325 = load ptr, ptr %2, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %325, i32 0, i32 19
  %327 = load ptr, ptr %326, align 8, !tbaa !31
  %328 = getelementptr inbounds %struct.jpeg_component_info, ptr %327, i64 2
  %329 = getelementptr inbounds %struct.jpeg_component_info, ptr %328, i32 0, i32 13
  store i32 1, ptr %329, align 4, !tbaa !32
  br label %330

330:                                              ; preds = %319, %298
  %331 = load ptr, ptr %3, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct.my_color_converter, ptr %331, i32 0, i32 0
  %333 = getelementptr inbounds %struct.jpeg_color_converter, ptr %332, i32 0, i32 1
  store ptr @null_convert, ptr %333, align 8, !tbaa !30
  br label %345

334:                                              ; preds = %298
  %335 = load ptr, ptr %2, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %335, i32 0, i32 0
  %337 = load ptr, ptr %336, align 8, !tbaa !23
  %338 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %337, i32 0, i32 5
  store i32 28, ptr %338, align 8, !tbaa !24
  %339 = load ptr, ptr %2, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %339, i32 0, i32 0
  %341 = load ptr, ptr %340, align 8, !tbaa !23
  %342 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %341, i32 0, i32 0
  %343 = load ptr, ptr %342, align 8, !tbaa !26
  %344 = load ptr, ptr %2, align 8, !tbaa !5
  call void %343(ptr noundef %344)
  br label %345

345:                                              ; preds = %334, %330, %302
  br label %457

346:                                              ; preds = %132
  %347 = load ptr, ptr %2, align 8, !tbaa !5
  %348 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %347, i32 0, i32 17
  %349 = load i32, ptr %348, align 4, !tbaa !29
  %350 = icmp ne i32 %349, 4
  br i1 %350, label %351, label %362

351:                                              ; preds = %346
  %352 = load ptr, ptr %2, align 8, !tbaa !5
  %353 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %352, i32 0, i32 0
  %354 = load ptr, ptr %353, align 8, !tbaa !23
  %355 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %354, i32 0, i32 5
  store i32 11, ptr %355, align 8, !tbaa !24
  %356 = load ptr, ptr %2, align 8, !tbaa !5
  %357 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %356, i32 0, i32 0
  %358 = load ptr, ptr %357, align 8, !tbaa !23
  %359 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %358, i32 0, i32 0
  %360 = load ptr, ptr %359, align 8, !tbaa !26
  %361 = load ptr, ptr %2, align 8, !tbaa !5
  call void %360(ptr noundef %361)
  br label %362

362:                                              ; preds = %351, %346
  %363 = load ptr, ptr %2, align 8, !tbaa !5
  %364 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %363, i32 0, i32 10
  %365 = load i32, ptr %364, align 4, !tbaa !21
  %366 = icmp eq i32 %365, 4
  br i1 %366, label %367, label %371

367:                                              ; preds = %362
  %368 = load ptr, ptr %3, align 8, !tbaa !5
  %369 = getelementptr inbounds %struct.my_color_converter, ptr %368, i32 0, i32 0
  %370 = getelementptr inbounds %struct.jpeg_color_converter, ptr %369, i32 0, i32 1
  store ptr @null_convert, ptr %370, align 8, !tbaa !30
  br label %382

371:                                              ; preds = %362
  %372 = load ptr, ptr %2, align 8, !tbaa !5
  %373 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %372, i32 0, i32 0
  %374 = load ptr, ptr %373, align 8, !tbaa !23
  %375 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %374, i32 0, i32 5
  store i32 28, ptr %375, align 8, !tbaa !24
  %376 = load ptr, ptr %2, align 8, !tbaa !5
  %377 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %376, i32 0, i32 0
  %378 = load ptr, ptr %377, align 8, !tbaa !23
  %379 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %378, i32 0, i32 0
  %380 = load ptr, ptr %379, align 8, !tbaa !26
  %381 = load ptr, ptr %2, align 8, !tbaa !5
  call void %380(ptr noundef %381)
  br label %382

382:                                              ; preds = %371, %367
  br label %457

383:                                              ; preds = %132
  %384 = load ptr, ptr %2, align 8, !tbaa !5
  %385 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %384, i32 0, i32 17
  %386 = load i32, ptr %385, align 4, !tbaa !29
  %387 = icmp ne i32 %386, 4
  br i1 %387, label %388, label %399

388:                                              ; preds = %383
  %389 = load ptr, ptr %2, align 8, !tbaa !5
  %390 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %389, i32 0, i32 0
  %391 = load ptr, ptr %390, align 8, !tbaa !23
  %392 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %391, i32 0, i32 5
  store i32 11, ptr %392, align 8, !tbaa !24
  %393 = load ptr, ptr %2, align 8, !tbaa !5
  %394 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %393, i32 0, i32 0
  %395 = load ptr, ptr %394, align 8, !tbaa !23
  %396 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %395, i32 0, i32 0
  %397 = load ptr, ptr %396, align 8, !tbaa !26
  %398 = load ptr, ptr %2, align 8, !tbaa !5
  call void %397(ptr noundef %398)
  br label %399

399:                                              ; preds = %388, %383
  %400 = load ptr, ptr %2, align 8, !tbaa !5
  %401 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %400, i32 0, i32 10
  %402 = load i32, ptr %401, align 4, !tbaa !21
  switch i32 %402, label %414 [
    i32 4, label %403
    i32 5, label %410
  ]

403:                                              ; preds = %399
  %404 = load ptr, ptr %3, align 8, !tbaa !5
  %405 = getelementptr inbounds %struct.my_color_converter, ptr %404, i32 0, i32 0
  %406 = getelementptr inbounds %struct.jpeg_color_converter, ptr %405, i32 0, i32 0
  store ptr @rgb_ycc_start, ptr %406, align 8, !tbaa !18
  %407 = load ptr, ptr %3, align 8, !tbaa !5
  %408 = getelementptr inbounds %struct.my_color_converter, ptr %407, i32 0, i32 0
  %409 = getelementptr inbounds %struct.jpeg_color_converter, ptr %408, i32 0, i32 1
  store ptr @cmyk_ycck_convert, ptr %409, align 8, !tbaa !30
  br label %425

410:                                              ; preds = %399
  %411 = load ptr, ptr %3, align 8, !tbaa !5
  %412 = getelementptr inbounds %struct.my_color_converter, ptr %411, i32 0, i32 0
  %413 = getelementptr inbounds %struct.jpeg_color_converter, ptr %412, i32 0, i32 1
  store ptr @null_convert, ptr %413, align 8, !tbaa !30
  br label %425

414:                                              ; preds = %399
  %415 = load ptr, ptr %2, align 8, !tbaa !5
  %416 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %415, i32 0, i32 0
  %417 = load ptr, ptr %416, align 8, !tbaa !23
  %418 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %417, i32 0, i32 5
  store i32 28, ptr %418, align 8, !tbaa !24
  %419 = load ptr, ptr %2, align 8, !tbaa !5
  %420 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %419, i32 0, i32 0
  %421 = load ptr, ptr %420, align 8, !tbaa !23
  %422 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %421, i32 0, i32 0
  %423 = load ptr, ptr %422, align 8, !tbaa !26
  %424 = load ptr, ptr %2, align 8, !tbaa !5
  call void %423(ptr noundef %424)
  br label %425

425:                                              ; preds = %414, %410, %403
  br label %457

426:                                              ; preds = %132
  %427 = load ptr, ptr %2, align 8, !tbaa !5
  %428 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %427, i32 0, i32 18
  %429 = load i32, ptr %428, align 8, !tbaa !28
  %430 = load ptr, ptr %2, align 8, !tbaa !5
  %431 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %430, i32 0, i32 10
  %432 = load i32, ptr %431, align 4, !tbaa !21
  %433 = icmp ne i32 %429, %432
  br i1 %433, label %442, label %434

434:                                              ; preds = %426
  %435 = load ptr, ptr %2, align 8, !tbaa !5
  %436 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %435, i32 0, i32 17
  %437 = load i32, ptr %436, align 4, !tbaa !29
  %438 = load ptr, ptr %2, align 8, !tbaa !5
  %439 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %438, i32 0, i32 9
  %440 = load i32, ptr %439, align 8, !tbaa !22
  %441 = icmp ne i32 %437, %440
  br i1 %441, label %442, label %453

442:                                              ; preds = %434, %426
  %443 = load ptr, ptr %2, align 8, !tbaa !5
  %444 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %443, i32 0, i32 0
  %445 = load ptr, ptr %444, align 8, !tbaa !23
  %446 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %445, i32 0, i32 5
  store i32 28, ptr %446, align 8, !tbaa !24
  %447 = load ptr, ptr %2, align 8, !tbaa !5
  %448 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %447, i32 0, i32 0
  %449 = load ptr, ptr %448, align 8, !tbaa !23
  %450 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %449, i32 0, i32 0
  %451 = load ptr, ptr %450, align 8, !tbaa !26
  %452 = load ptr, ptr %2, align 8, !tbaa !5
  call void %451(ptr noundef %452)
  br label %453

453:                                              ; preds = %442, %434
  %454 = load ptr, ptr %3, align 8, !tbaa !5
  %455 = getelementptr inbounds %struct.my_color_converter, ptr %454, i32 0, i32 0
  %456 = getelementptr inbounds %struct.jpeg_color_converter, ptr %455, i32 0, i32 1
  store ptr @null_convert, ptr %456, align 8, !tbaa !30
  br label %457

457:                                              ; preds = %453, %425, %382, %345, %281, %238, %178
  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 @null_method(ptr noundef) #0

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare hidden void @cmyk_ycck_convert(ptr noundef, ptr noundef, ptr noundef, i32 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_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, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !6, i64 104, !7, i64 112, !7, i64 144, !7, i64 160, !7, i64 192, !7, i64 224, !7, i64 240, !7, i64 256, !11, i64 272, !6, i64 280, !11, i64 288, !11, i64 292, !11, i64 296, !11, i64 300, !11, i64 304, !11, i64 308, !11, i64 312, !11, i64 316, !11, i64 320, !11, i64 324, !7, i64 328, !7, i64 329, !7, i64 330, !13, i64 332, !13, i64 334, !11, i64 336, !11, i64 340, !11, i64 344, !11, i64 348, !11, i64 352, !11, i64 356, !11, i64 360, !11, i64 364, !11, i64 368, !11, i64 372, !7, i64 376, !11, i64 408, !11, i64 412, !11, i64 416, !7, i64 420, !11, i64 460, !11, i64 464, !11, i64 468, !11, i64 472, !11, i64 476, !6, i64 480, !11, i64 488, !6, i64 496, !6, i64 504, !6, i64 512, !6, i64 520, !6, i64 528, !6, i64 536, !6, i64 544, !6, i64 552, !6, i64 560, !6, i64 568, !11, i64 576}
!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 536}
!18 = !{!19, !6, i64 0}
!19 = !{!"", !20, i64 0, !6, i64 16}
!20 = !{!"jpeg_color_converter", !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 340}
!28 = !{!10, !11, i64 96}
!29 = !{!10, !11, i64 92}
!30 = !{!19, !6, i64 8}
!31 = !{!10, !6, i64 104}
!32 = !{!33, !11, i64 52}
!33 = !{!"", !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}


; 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 @jinit_color_converter(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 24) #1
  %6 = getelementptr inbounds i8, ptr %0, i64 536
  store ptr %5, ptr %6, align 8, !tbaa !16
  store ptr @null_method, 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 %21 [
    i32 1, label %9
    i32 2, label %12
    i32 6, label %12
    i32 3, label %15
    i32 7, label %15
    i32 4, label %18
    i32 5, label %18
  ]

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

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

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

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

21:                                               ; preds = %1
  %22 = getelementptr inbounds i8, ptr %0, i64 56
  %23 = load i32, ptr %22, align 8, !tbaa !21
  %24 = icmp slt i32 %23, 1
  br i1 %24, label %.sink.split, label %28

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

28:                                               ; preds = %.sink.split, %21, %18, %15, %12, %9
  %29 = getelementptr inbounds i8, ptr %0, i64 340
  %30 = load i32, ptr %29, align 4, !tbaa !26
  %.not116 = icmp eq i32 %30, 0
  br i1 %.not116, label %38, label %31

31:                                               ; preds = %28
  %32 = getelementptr inbounds i8, ptr %0, i64 96
  %33 = load i32, ptr %32, align 8, !tbaa !27
  switch i32 %33, label %34 [
    i32 2, label %38
    i32 6, label %38
  ]

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

38:                                               ; preds = %31, %31, %34, %28
  %39 = getelementptr inbounds i8, ptr %0, i64 96
  %40 = load i32, ptr %39, align 8, !tbaa !27
  switch i32 %40, label %159 [
    i32 1, label %41
    i32 2, label %58
    i32 6, label %58
    i32 3, label %83
    i32 7, label %100
    i32 4, label %126
    i32 5, label %142
  ]

41:                                               ; preds = %38
  %42 = getelementptr inbounds i8, ptr %0, i64 92
  %43 = load i32, ptr %42, align 4, !tbaa !28
  %.not124 = icmp eq i32 %43, 1
  br i1 %.not124, label %48, label %44

44:                                               ; preds = %41
  %45 = load ptr, ptr %0, align 8, !tbaa !22
  %46 = getelementptr inbounds i8, ptr %45, i64 40
  store i32 11, ptr %46, align 8, !tbaa !23
  %47 = load ptr, ptr %45, align 8, !tbaa !25
  tail call void %47(ptr noundef nonnull %0) #1
  br label %48

48:                                               ; preds = %44, %41
  %49 = load i32, ptr %7, align 4, !tbaa !20
  switch i32 %49, label %54 [
    i32 1, label %50
    i32 3, label %50
    i32 7, label %50
    i32 2, label %52
  ]

50:                                               ; preds = %48, %48, %48
  %51 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @grayscale_convert, ptr %51, align 8, !tbaa !29
  br label %172

52:                                               ; preds = %48
  store ptr @rgb_ycc_start, ptr %5, align 8, !tbaa !17
  %53 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @rgb_gray_convert, ptr %53, align 8, !tbaa !29
  br label %172

54:                                               ; preds = %48
  %55 = load ptr, ptr %0, align 8, !tbaa !22
  %56 = getelementptr inbounds i8, ptr %55, i64 40
  store i32 28, ptr %56, align 8, !tbaa !23
  %57 = load ptr, ptr %55, align 8, !tbaa !25
  tail call void %57(ptr noundef nonnull %0) #1
  br label %172

58:                                               ; preds = %38, %38
  %59 = getelementptr inbounds i8, ptr %0, i64 92
  %60 = load i32, ptr %59, align 4, !tbaa !28
  %.not123 = icmp eq i32 %60, 3
  br i1 %.not123, label %65, label %61

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

65:                                               ; preds = %61, %58
  %66 = phi i32 [ %.pre, %61 ], [ %40, %58 ]
  %67 = load i32, ptr %7, align 4, !tbaa !20
  %68 = icmp eq i32 %67, %66
  br i1 %68, label %69, label %79

69:                                               ; preds = %65
  %70 = load i32, ptr %29, align 4, !tbaa !26
  switch i32 %70, label %75 [
    i32 0, label %71
    i32 1, label %73
  ]

71:                                               ; preds = %69
  %72 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @rgb_convert, ptr %72, align 8, !tbaa !29
  br label %172

73:                                               ; preds = %69
  %74 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @rgb_rgb1_convert, ptr %74, align 8, !tbaa !29
  br label %172

75:                                               ; preds = %69
  %76 = load ptr, ptr %0, align 8, !tbaa !22
  %77 = getelementptr inbounds i8, ptr %76, i64 40
  store i32 28, ptr %77, align 8, !tbaa !23
  %78 = load ptr, ptr %76, align 8, !tbaa !25
  tail call void %78(ptr noundef nonnull %0) #1
  br label %172

79:                                               ; preds = %65
  %80 = load ptr, ptr %0, align 8, !tbaa !22
  %81 = getelementptr inbounds i8, ptr %80, i64 40
  store i32 28, ptr %81, align 8, !tbaa !23
  %82 = load ptr, ptr %80, align 8, !tbaa !25
  tail call void %82(ptr noundef nonnull %0) #1
  br label %172

83:                                               ; preds = %38
  %84 = getelementptr inbounds i8, ptr %0, i64 92
  %85 = load i32, ptr %84, align 4, !tbaa !28
  %.not122 = icmp eq i32 %85, 3
  br i1 %.not122, label %90, label %86

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

90:                                               ; preds = %86, %83
  %91 = load i32, ptr %7, align 4, !tbaa !20
  switch i32 %91, label %96 [
    i32 2, label %92
    i32 3, label %94
  ]

92:                                               ; preds = %90
  store ptr @rgb_ycc_start, ptr %5, align 8, !tbaa !17
  %93 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @rgb_ycc_convert, ptr %93, align 8, !tbaa !29
  br label %172

94:                                               ; preds = %90
  %95 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @null_convert, ptr %95, align 8, !tbaa !29
  br label %172

96:                                               ; preds = %90
  %97 = load ptr, ptr %0, align 8, !tbaa !22
  %98 = getelementptr inbounds i8, ptr %97, i64 40
  store i32 28, ptr %98, align 8, !tbaa !23
  %99 = load ptr, ptr %97, align 8, !tbaa !25
  tail call void %99(ptr noundef nonnull %0) #1
  br label %172

100:                                              ; preds = %38
  %101 = getelementptr inbounds i8, ptr %0, i64 92
  %102 = load i32, ptr %101, align 4, !tbaa !28
  %.not121 = icmp eq i32 %102, 3
  br i1 %.not121, label %107, label %103

103:                                              ; preds = %100
  %104 = load ptr, ptr %0, align 8, !tbaa !22
  %105 = getelementptr inbounds i8, ptr %104, i64 40
  store i32 11, 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 %107

107:                                              ; preds = %103, %100
  %108 = load i32, ptr %7, align 4, !tbaa !20
  switch i32 %108, label %122 [
    i32 2, label %109
    i32 3, label %115
    i32 7, label %120
  ]

109:                                              ; preds = %107
  %110 = getelementptr inbounds i8, ptr %0, i64 104
  %111 = load ptr, ptr %110, align 8, !tbaa !30
  %112 = getelementptr inbounds i8, ptr %111, i64 148
  store i32 1, ptr %112, align 4, !tbaa !31
  %113 = getelementptr inbounds i8, ptr %111, i64 244
  store i32 1, ptr %113, align 4, !tbaa !31
  store ptr @rgb_ycc_start, ptr %5, align 8, !tbaa !17
  %114 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @rgb_ycc_convert, ptr %114, align 8, !tbaa !29
  br label %172

115:                                              ; preds = %107
  %116 = getelementptr inbounds i8, ptr %0, i64 104
  %117 = load ptr, ptr %116, align 8, !tbaa !30
  %118 = getelementptr inbounds i8, ptr %117, i64 148
  store i32 1, ptr %118, align 4, !tbaa !31
  %119 = getelementptr inbounds i8, ptr %117, i64 244
  store i32 1, ptr %119, align 4, !tbaa !31
  br label %120

120:                                              ; preds = %115, %107
  %121 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @null_convert, ptr %121, align 8, !tbaa !29
  br label %172

122:                                              ; preds = %107
  %123 = load ptr, ptr %0, align 8, !tbaa !22
  %124 = getelementptr inbounds i8, ptr %123, i64 40
  store i32 28, ptr %124, align 8, !tbaa !23
  %125 = load ptr, ptr %123, align 8, !tbaa !25
  tail call void %125(ptr noundef nonnull %0) #1
  br label %172

126:                                              ; preds = %38
  %127 = getelementptr inbounds i8, ptr %0, i64 92
  %128 = load i32, ptr %127, align 4, !tbaa !28
  %.not120 = icmp eq i32 %128, 4
  br i1 %.not120, label %133, label %129

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

133:                                              ; preds = %129, %126
  %134 = load i32, ptr %7, align 4, !tbaa !20
  %135 = icmp eq i32 %134, 4
  br i1 %135, label %136, label %138

136:                                              ; preds = %133
  %137 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @null_convert, ptr %137, align 8, !tbaa !29
  br label %172

138:                                              ; preds = %133
  %139 = load ptr, ptr %0, align 8, !tbaa !22
  %140 = getelementptr inbounds i8, ptr %139, i64 40
  store i32 28, ptr %140, align 8, !tbaa !23
  %141 = load ptr, ptr %139, align 8, !tbaa !25
  tail call void %141(ptr noundef nonnull %0) #1
  br label %172

142:                                              ; preds = %38
  %143 = getelementptr inbounds i8, ptr %0, i64 92
  %144 = load i32, ptr %143, align 4, !tbaa !28
  %.not119 = icmp eq i32 %144, 4
  br i1 %.not119, label %149, label %145

145:                                              ; preds = %142
  %146 = load ptr, ptr %0, align 8, !tbaa !22
  %147 = getelementptr inbounds i8, ptr %146, i64 40
  store i32 11, ptr %147, align 8, !tbaa !23
  %148 = load ptr, ptr %146, align 8, !tbaa !25
  tail call void %148(ptr noundef nonnull %0) #1
  br label %149

149:                                              ; preds = %145, %142
  %150 = load i32, ptr %7, align 4, !tbaa !20
  switch i32 %150, label %155 [
    i32 4, label %151
    i32 5, label %153
  ]

151:                                              ; preds = %149
  store ptr @rgb_ycc_start, ptr %5, align 8, !tbaa !17
  %152 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @cmyk_ycck_convert, ptr %152, align 8, !tbaa !29
  br label %172

153:                                              ; preds = %149
  %154 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @null_convert, ptr %154, align 8, !tbaa !29
  br label %172

155:                                              ; preds = %149
  %156 = load ptr, ptr %0, align 8, !tbaa !22
  %157 = getelementptr inbounds i8, ptr %156, i64 40
  store i32 28, ptr %157, align 8, !tbaa !23
  %158 = load ptr, ptr %156, align 8, !tbaa !25
  tail call void %158(ptr noundef nonnull %0) #1
  br label %172

159:                                              ; preds = %38
  %160 = load i32, ptr %7, align 4, !tbaa !20
  %.not125 = icmp eq i32 %40, %160
  br i1 %.not125, label %161, label %166

161:                                              ; preds = %159
  %162 = getelementptr inbounds i8, ptr %0, i64 92
  %163 = load i32, ptr %162, align 4, !tbaa !28
  %164 = getelementptr inbounds i8, ptr %0, i64 56
  %165 = load i32, ptr %164, align 8, !tbaa !21
  %.not126 = icmp eq i32 %163, %165
  br i1 %.not126, label %170, label %166

166:                                              ; preds = %161, %159
  %167 = load ptr, ptr %0, align 8, !tbaa !22
  %168 = getelementptr inbounds i8, ptr %167, i64 40
  store i32 28, ptr %168, align 8, !tbaa !23
  %169 = load ptr, ptr %167, align 8, !tbaa !25
  tail call void %169(ptr noundef nonnull %0) #1
  br label %170

170:                                              ; preds = %166, %161
  %171 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @null_convert, ptr %171, align 8, !tbaa !29
  br label %172

172:                                              ; preds = %151, %153, %155, %136, %138, %109, %120, %122, %92, %94, %96, %79, %75, %73, %71, %50, %52, %54, %170
  ret void
}

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare hidden void @cmyk_ycck_convert(ptr noundef, ptr noundef, ptr noundef, i32 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_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, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !7, i64 104, !8, i64 112, !8, i64 144, !8, i64 160, !8, i64 192, !8, i64 224, !8, i64 240, !8, i64 256, !10, i64 272, !7, i64 280, !10, i64 288, !10, i64 292, !10, i64 296, !10, i64 300, !10, i64 304, !10, i64 308, !10, i64 312, !10, i64 316, !10, i64 320, !10, i64 324, !8, i64 328, !8, i64 329, !8, i64 330, !12, i64 332, !12, i64 334, !10, i64 336, !10, i64 340, !10, i64 344, !10, i64 348, !10, i64 352, !10, i64 356, !10, i64 360, !10, i64 364, !10, i64 368, !10, i64 372, !8, i64 376, !10, i64 408, !10, i64 412, !10, i64 416, !8, i64 420, !10, i64 460, !10, i64 464, !10, i64 468, !10, i64 472, !10, i64 476, !7, i64 480, !10, i64 488, !7, i64 496, !7, i64 504, !7, i64 512, !7, i64 520, !7, i64 528, !7, i64 536, !7, i64 544, !7, i64 552, !7, i64 560, !7, i64 568, !10, i64 576}
!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 536}
!17 = !{!18, !7, i64 0}
!18 = !{!"", !19, i64 0, !7, i64 16}
!19 = !{!"jpeg_color_converter", !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 340}
!27 = !{!6, !10, i64 96}
!28 = !{!6, !10, i64 92}
!29 = !{!18, !7, i64 8}
!30 = !{!6, !7, i64 104}
!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}


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