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

; 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_transform_info = type { i32, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.jpeg_compress_struct = type { ptr, ptr, ptr, ptr, i8, i32, ptr, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, ptr, [4 x ptr], [4 x i32], [4 x ptr], [4 x ptr], [16 x i8], [16 x i8], [16 x i8], i32, ptr, i8, i8, i8, i8, i8, i32, i32, i32, i32, i8, i8, i8, i8, i16, i16, i8, i32, i32, i8, i32, i32, i32, i32, i32, i32, [4 x ptr], i32, i32, i32, [10 x i32], i32, i32, i32, i32, i32, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32 }
%struct.jpeg_decompress_struct = type { ptr, ptr, ptr, ptr, i8, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, i8, i8, i32, i8, i8, i8, i32, i8, i32, i8, i8, i8, i32, i32, i32, i32, i32, i32, ptr, i32, i32, i32, i32, i32, ptr, [4 x ptr], [4 x ptr], [4 x ptr], i32, ptr, i8, i8, i8, [16 x i8], [16 x i8], [16 x i8], i32, i8, i8, i8, i8, i16, i16, i8, i8, i32, i8, ptr, i32, i32, i32, i32, i32, ptr, i32, [4 x ptr], i32, i32, i32, [10 x i32], i32, i32, i32, i32, i32, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.jpeg_component_info = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8, i32, i32, i32, i32, i32, i32, ptr, ptr }
%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_marker_struct = type { ptr, i8, i32, i32, ptr }

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @jtransform_adjust_parameters(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %11 = load ptr, ptr %9, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.jpeg_transform_info, ptr %11, i32 0, i32 3
  %13 = load i8, ptr %12, align 2, !tbaa !9
  %14 = icmp ne i8 %13, 0
  br i1 %14, label %15, label %88

15:                                               ; preds = %4
  %16 = load ptr, ptr %7, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %16, i32 0, i32 18
  %18 = load i32, ptr %17, align 8, !tbaa !12
  %19 = icmp eq i32 %18, 3
  br i1 %19, label %25, label %20

20:                                               ; preds = %15
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %21, i32 0, i32 18
  %23 = load i32, ptr %22, align 8, !tbaa !12
  %24 = icmp eq i32 %23, 7
  br i1 %24, label %25, label %30

25:                                               ; preds = %20, %15
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %26, i32 0, i32 17
  %28 = load i32, ptr %27, align 4, !tbaa !16
  %29 = icmp eq i32 %28, 3
  br i1 %29, label %40, label %30

30:                                               ; preds = %25, %20
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %31, i32 0, i32 18
  %33 = load i32, ptr %32, align 8, !tbaa !12
  %34 = icmp eq i32 %33, 1
  br i1 %34, label %35, label %76

35:                                               ; preds = %30
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %36, i32 0, i32 17
  %38 = load i32, ptr %37, align 4, !tbaa !16
  %39 = icmp eq i32 %38, 1
  br i1 %39, label %40, label %76

40:                                               ; preds = %35, %25
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %41, i32 0, i32 44
  %43 = load ptr, ptr %42, align 8, !tbaa !17
  %44 = getelementptr inbounds %struct.jpeg_component_info, ptr %43, i64 0
  %45 = getelementptr inbounds %struct.jpeg_component_info, ptr %44, i32 0, i32 2
  %46 = load i32, ptr %45, align 8, !tbaa !19
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %47, i32 0, i32 63
  %49 = load i32, ptr %48, align 8, !tbaa !21
  %50 = icmp eq i32 %46, %49
  br i1 %50, label %51, label %76

51:                                               ; preds = %40
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %52, i32 0, i32 44
  %54 = load ptr, ptr %53, align 8, !tbaa !17
  %55 = getelementptr inbounds %struct.jpeg_component_info, ptr %54, i64 0
  %56 = getelementptr inbounds %struct.jpeg_component_info, ptr %55, i32 0, i32 3
  %57 = load i32, ptr %56, align 4, !tbaa !22
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %58, i32 0, i32 64
  %60 = load i32, ptr %59, align 4, !tbaa !23
  %61 = icmp eq i32 %57, %60
  br i1 %61, label %62, label %76

62:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %63, i32 0, i32 19
  %65 = load ptr, ptr %64, align 8, !tbaa !24
  %66 = getelementptr inbounds %struct.jpeg_component_info, ptr %65, i64 0
  %67 = getelementptr inbounds %struct.jpeg_component_info, ptr %66, i32 0, i32 4
  %68 = load i32, ptr %67, align 8, !tbaa !25
  store i32 %68, ptr %10, align 4, !tbaa !26
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  call void @jpeg_set_colorspace(ptr noundef %69, i32 noundef 1)
  %70 = load i32, ptr %10, align 4, !tbaa !26
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %71, i32 0, i32 19
  %73 = load ptr, ptr %72, align 8, !tbaa !24
  %74 = getelementptr inbounds %struct.jpeg_component_info, ptr %73, i64 0
  %75 = getelementptr inbounds %struct.jpeg_component_info, ptr %74, i32 0, i32 4
  store i32 %70, ptr %75, align 8, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %87

76:                                               ; preds = %51, %40, %35, %30
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %77, i32 0, i32 0
  %79 = load ptr, ptr %78, align 8, !tbaa !27
  %80 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %79, i32 0, i32 5
  store i32 28, ptr %80, align 8, !tbaa !28
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !27
  %84 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %83, i32 0, i32 0
  %85 = load ptr, ptr %84, align 8, !tbaa !31
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  call void %85(ptr noundef %86)
  br label %87

87:                                               ; preds = %76, %62
  br label %105

88:                                               ; preds = %4
  %89 = load ptr, ptr %9, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.jpeg_transform_info, ptr %89, i32 0, i32 13
  %91 = load i32, ptr %90, align 8, !tbaa !32
  %92 = icmp eq i32 %91, 1
  br i1 %92, label %93, label %104

93:                                               ; preds = %88
  %94 = load ptr, ptr %7, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %94, i32 0, i32 19
  %96 = load ptr, ptr %95, align 8, !tbaa !24
  %97 = getelementptr inbounds %struct.jpeg_component_info, ptr %96, i64 0
  %98 = getelementptr inbounds %struct.jpeg_component_info, ptr %97, i32 0, i32 2
  store i32 1, ptr %98, align 8, !tbaa !19
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %99, i32 0, i32 19
  %101 = load ptr, ptr %100, align 8, !tbaa !24
  %102 = getelementptr inbounds %struct.jpeg_component_info, ptr %101, i64 0
  %103 = getelementptr inbounds %struct.jpeg_component_info, ptr %102, i32 0, i32 3
  store i32 1, ptr %103, align 4, !tbaa !22
  br label %104

104:                                              ; preds = %93, %88
  br label %105

105:                                              ; preds = %104, %87
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.jpeg_transform_info, ptr %106, i32 0, i32 15
  %108 = load i32, ptr %107, align 8, !tbaa !33
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %109, i32 0, i32 14
  store i32 %108, ptr %110, align 8, !tbaa !34
  %111 = load ptr, ptr %9, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.jpeg_transform_info, ptr %111, i32 0, i32 16
  %113 = load i32, ptr %112, align 4, !tbaa !35
  %114 = load ptr, ptr %7, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %114, i32 0, i32 15
  store i32 %113, ptr %115, align 4, !tbaa !36
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.jpeg_transform_info, ptr %116, i32 0, i32 0
  %118 = load i32, ptr %117, align 8, !tbaa !37
  switch i32 %118, label %121 [
    i32 3, label %119
    i32 4, label %119
    i32 5, label %119
    i32 7, label %119
  ]

119:                                              ; preds = %105, %105, %105, %105
  %120 = load ptr, ptr %7, align 8, !tbaa !5
  call void @transpose_critical_parameters(ptr noundef %120)
  br label %122

121:                                              ; preds = %105
  br label %122

122:                                              ; preds = %121, %119
  %123 = load ptr, ptr %6, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %123, i32 0, i32 62
  %125 = load ptr, ptr %124, align 8, !tbaa !38
  %126 = icmp ne ptr %125, null
  br i1 %126, label %127, label %240

127:                                              ; preds = %122
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %128, i32 0, i32 62
  %130 = load ptr, ptr %129, align 8, !tbaa !38
  %131 = getelementptr inbounds %struct.jpeg_marker_struct, ptr %130, i32 0, i32 1
  %132 = load i8, ptr %131, align 8, !tbaa !39
  %133 = zext i8 %132 to i32
  %134 = icmp eq i32 %133, 225
  br i1 %134, label %135, label %240

135:                                              ; preds = %127
  %136 = load ptr, ptr %6, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %136, i32 0, i32 62
  %138 = load ptr, ptr %137, align 8, !tbaa !38
  %139 = getelementptr inbounds %struct.jpeg_marker_struct, ptr %138, i32 0, i32 3
  %140 = load i32, ptr %139, align 8, !tbaa !41
  %141 = icmp uge i32 %140, 6
  br i1 %141, label %142, label %240

142:                                              ; preds = %135
  %143 = load ptr, ptr %6, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %143, i32 0, i32 62
  %145 = load ptr, ptr %144, align 8, !tbaa !38
  %146 = getelementptr inbounds %struct.jpeg_marker_struct, ptr %145, i32 0, i32 4
  %147 = load ptr, ptr %146, align 8, !tbaa !42
  %148 = getelementptr inbounds i8, ptr %147, i64 0
  %149 = load i8, ptr %148, align 1, !tbaa !43
  %150 = zext i8 %149 to i32
  %151 = icmp eq i32 %150, 69
  br i1 %151, label %152, label %240

152:                                              ; preds = %142
  %153 = load ptr, ptr %6, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %153, i32 0, i32 62
  %155 = load ptr, ptr %154, align 8, !tbaa !38
  %156 = getelementptr inbounds %struct.jpeg_marker_struct, ptr %155, i32 0, i32 4
  %157 = load ptr, ptr %156, align 8, !tbaa !42
  %158 = getelementptr inbounds i8, ptr %157, i64 1
  %159 = load i8, ptr %158, align 1, !tbaa !43
  %160 = zext i8 %159 to i32
  %161 = icmp eq i32 %160, 120
  br i1 %161, label %162, label %240

162:                                              ; preds = %152
  %163 = load ptr, ptr %6, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %163, i32 0, i32 62
  %165 = load ptr, ptr %164, align 8, !tbaa !38
  %166 = getelementptr inbounds %struct.jpeg_marker_struct, ptr %165, i32 0, i32 4
  %167 = load ptr, ptr %166, align 8, !tbaa !42
  %168 = getelementptr inbounds i8, ptr %167, i64 2
  %169 = load i8, ptr %168, align 1, !tbaa !43
  %170 = zext i8 %169 to i32
  %171 = icmp eq i32 %170, 105
  br i1 %171, label %172, label %240

172:                                              ; preds = %162
  %173 = load ptr, ptr %6, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %173, i32 0, i32 62
  %175 = load ptr, ptr %174, align 8, !tbaa !38
  %176 = getelementptr inbounds %struct.jpeg_marker_struct, ptr %175, i32 0, i32 4
  %177 = load ptr, ptr %176, align 8, !tbaa !42
  %178 = getelementptr inbounds i8, ptr %177, i64 3
  %179 = load i8, ptr %178, align 1, !tbaa !43
  %180 = zext i8 %179 to i32
  %181 = icmp eq i32 %180, 102
  br i1 %181, label %182, label %240

182:                                              ; preds = %172
  %183 = load ptr, ptr %6, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %183, i32 0, i32 62
  %185 = load ptr, ptr %184, align 8, !tbaa !38
  %186 = getelementptr inbounds %struct.jpeg_marker_struct, ptr %185, i32 0, i32 4
  %187 = load ptr, ptr %186, align 8, !tbaa !42
  %188 = getelementptr inbounds i8, ptr %187, i64 4
  %189 = load i8, ptr %188, align 1, !tbaa !43
  %190 = zext i8 %189 to i32
  %191 = icmp eq i32 %190, 0
  br i1 %191, label %192, label %240

192:                                              ; preds = %182
  %193 = load ptr, ptr %6, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %193, i32 0, i32 62
  %195 = load ptr, ptr %194, align 8, !tbaa !38
  %196 = getelementptr inbounds %struct.jpeg_marker_struct, ptr %195, i32 0, i32 4
  %197 = load ptr, ptr %196, align 8, !tbaa !42
  %198 = getelementptr inbounds i8, ptr %197, i64 5
  %199 = load i8, ptr %198, align 1, !tbaa !43
  %200 = zext i8 %199 to i32
  %201 = icmp eq i32 %200, 0
  br i1 %201, label %202, label %240

202:                                              ; preds = %192
  %203 = load ptr, ptr %7, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %203, i32 0, i32 38
  store i8 0, ptr %204, align 8, !tbaa !44
  %205 = load ptr, ptr %7, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %205, i32 0, i32 14
  %207 = load i32, ptr %206, align 8, !tbaa !34
  %208 = load ptr, ptr %6, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %208, i32 0, i32 7
  %210 = load i32, ptr %209, align 8, !tbaa !45
  %211 = icmp ne i32 %207, %210
  br i1 %211, label %220, label %212

212:                                              ; preds = %202
  %213 = load ptr, ptr %7, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %213, i32 0, i32 15
  %215 = load i32, ptr %214, align 4, !tbaa !36
  %216 = load ptr, ptr %6, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %216, i32 0, i32 8
  %218 = load i32, ptr %217, align 4, !tbaa !46
  %219 = icmp ne i32 %215, %218
  br i1 %219, label %220, label %239

220:                                              ; preds = %212, %202
  %221 = load ptr, ptr %6, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %221, i32 0, i32 62
  %223 = load ptr, ptr %222, align 8, !tbaa !38
  %224 = getelementptr inbounds %struct.jpeg_marker_struct, ptr %223, i32 0, i32 4
  %225 = load ptr, ptr %224, align 8, !tbaa !42
  %226 = getelementptr inbounds i8, ptr %225, i64 6
  %227 = load ptr, ptr %6, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %227, i32 0, i32 62
  %229 = load ptr, ptr %228, align 8, !tbaa !38
  %230 = getelementptr inbounds %struct.jpeg_marker_struct, ptr %229, i32 0, i32 3
  %231 = load i32, ptr %230, align 8, !tbaa !41
  %232 = sub i32 %231, 6
  %233 = load ptr, ptr %7, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %233, i32 0, i32 14
  %235 = load i32, ptr %234, align 8, !tbaa !34
  %236 = load ptr, ptr %7, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %236, i32 0, i32 15
  %238 = load i32, ptr %237, align 4, !tbaa !36
  call void @adjust_exif_parameters(ptr noundef %226, i32 noundef %232, i32 noundef %235, i32 noundef %238)
  br label %239

239:                                              ; preds = %220, %212
  br label %240

240:                                              ; preds = %239, %192, %182, %172, %162, %152, %142, %135, %127, %122
  %241 = load ptr, ptr %9, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.jpeg_transform_info, ptr %241, i32 0, i32 14
  %243 = load ptr, ptr %242, align 8, !tbaa !47
  %244 = icmp ne ptr %243, null
  br i1 %244, label %245, label %249

245:                                              ; preds = %240
  %246 = load ptr, ptr %9, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.jpeg_transform_info, ptr %246, i32 0, i32 14
  %248 = load ptr, ptr %247, align 8, !tbaa !47
  store ptr %248, ptr %5, align 8
  br label %251

249:                                              ; preds = %240
  %250 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %250, ptr %5, align 8
  br label %251

251:                                              ; preds = %249, %245
  %252 = load ptr, ptr %5, align 8
  ret ptr %252
}

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

; Function Attrs: nounwind uwtable
declare hidden void @transpose_critical_parameters(ptr noundef) #1

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

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


; 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 ptr @jtransform_adjust_parameters(ptr nocapture noundef readonly %0, ptr noundef %1, ptr noundef readnone %2, ptr nocapture noundef readonly %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %3, i64 6
  %6 = load i8, ptr %5, align 2, !tbaa !5
  %.not = icmp eq i8 %6, 0
  br i1 %.not, label %42, label %7

7:                                                ; preds = %4
  %8 = getelementptr inbounds i8, ptr %1, i64 96
  %9 = load i32, ptr %8, align 8, !tbaa !11
  switch i32 %9, label %.thread [
    i32 3, label %10
    i32 7, label %10
    i32 1, label %14
  ]

10:                                               ; preds = %7, %7
  %11 = getelementptr inbounds i8, ptr %1, i64 92
  %12 = load i32, ptr %11, align 4, !tbaa !15
  %13 = icmp eq i32 %12, 3
  br i1 %13, label %18, label %.thread

14:                                               ; preds = %7
  %15 = getelementptr inbounds i8, ptr %1, i64 92
  %16 = load i32, ptr %15, align 4, !tbaa !15
  %17 = icmp eq i32 %16, 1
  br i1 %17, label %18, label %.thread

18:                                               ; preds = %14, %10
  %19 = getelementptr inbounds i8, ptr %0, i64 288
  %20 = load ptr, ptr %19, align 8, !tbaa !16
  %21 = getelementptr inbounds i8, ptr %20, i64 8
  %22 = load i32, ptr %21, align 8, !tbaa !18
  %23 = getelementptr inbounds i8, ptr %0, i64 384
  %24 = load i32, ptr %23, align 8, !tbaa !20
  %25 = icmp eq i32 %22, %24
  br i1 %25, label %26, label %.thread

26:                                               ; preds = %18
  %27 = getelementptr inbounds i8, ptr %20, i64 12
  %28 = load i32, ptr %27, align 4, !tbaa !21
  %29 = getelementptr inbounds i8, ptr %0, i64 388
  %30 = load i32, ptr %29, align 4, !tbaa !22
  %31 = icmp eq i32 %28, %30
  br i1 %31, label %32, label %.thread

32:                                               ; preds = %26
  %33 = getelementptr inbounds i8, ptr %1, i64 104
  %34 = load ptr, ptr %33, align 8, !tbaa !23
  %35 = getelementptr inbounds i8, ptr %34, i64 16
  %36 = load i32, ptr %35, align 8, !tbaa !24
  tail call void @jpeg_set_colorspace(ptr noundef nonnull %1, i32 noundef 1) #2
  %37 = load ptr, ptr %33, align 8, !tbaa !23
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  store i32 %36, ptr %38, align 8, !tbaa !24
  br label %51

.thread:                                          ; preds = %7, %10, %26, %18, %14
  %39 = load ptr, ptr %1, align 8, !tbaa !25
  %40 = getelementptr inbounds i8, ptr %39, i64 40
  store i32 28, ptr %40, align 8, !tbaa !26
  %41 = load ptr, ptr %39, align 8, !tbaa !29
  tail call void %41(ptr noundef nonnull %1) #2
  br label %51

42:                                               ; preds = %4
  %43 = getelementptr inbounds i8, ptr %3, i64 40
  %44 = load i32, ptr %43, align 8, !tbaa !30
  %45 = icmp eq i32 %44, 1
  br i1 %45, label %46, label %51

46:                                               ; preds = %42
  %47 = getelementptr inbounds i8, ptr %1, i64 104
  %48 = load ptr, ptr %47, align 8, !tbaa !23
  %49 = getelementptr inbounds i8, ptr %48, i64 8
  store i32 1, ptr %49, align 8, !tbaa !18
  %50 = getelementptr inbounds i8, ptr %48, i64 12
  store i32 1, ptr %50, align 4, !tbaa !21
  br label %51

51:                                               ; preds = %42, %46, %32, %.thread
  %52 = getelementptr inbounds i8, ptr %3, i64 56
  %53 = getelementptr inbounds i8, ptr %1, i64 80
  %54 = getelementptr inbounds i8, ptr %1, i64 84
  %55 = load <2 x i32>, ptr %52, align 8, !tbaa !31
  store <2 x i32> %55, ptr %53, align 8, !tbaa !31
  %56 = load i32, ptr %3, align 8, !tbaa !32
  switch i32 %56, label %58 [
    i32 3, label %57
    i32 4, label %57
    i32 5, label %57
    i32 7, label %57
  ]

57:                                               ; preds = %51, %51, %51, %51
  tail call void @transpose_critical_parameters(ptr noundef nonnull %1)
  br label %58

58:                                               ; preds = %51, %57
  %59 = getelementptr inbounds i8, ptr %0, i64 376
  %60 = load ptr, ptr %59, align 8, !tbaa !33
  %.not50 = icmp eq ptr %60, null
  br i1 %.not50, label %105, label %61

61:                                               ; preds = %58
  %62 = getelementptr inbounds i8, ptr %60, i64 8
  %63 = load i8, ptr %62, align 8, !tbaa !34
  %64 = icmp eq i8 %63, -31
  br i1 %64, label %65, label %105

65:                                               ; preds = %61
  %66 = getelementptr inbounds i8, ptr %60, i64 16
  %67 = load i32, ptr %66, align 8, !tbaa !36
  %68 = icmp ugt i32 %67, 5
  br i1 %68, label %69, label %105

69:                                               ; preds = %65
  %70 = getelementptr inbounds i8, ptr %60, i64 24
  %71 = load ptr, ptr %70, align 8, !tbaa !37
  %72 = load i8, ptr %71, align 1, !tbaa !38
  %73 = icmp eq i8 %72, 69
  br i1 %73, label %74, label %105

74:                                               ; preds = %69
  %75 = getelementptr inbounds i8, ptr %71, i64 1
  %76 = load i8, ptr %75, align 1, !tbaa !38
  %77 = icmp eq i8 %76, 120
  br i1 %77, label %78, label %105

78:                                               ; preds = %74
  %79 = getelementptr inbounds i8, ptr %71, i64 2
  %80 = load i8, ptr %79, align 1, !tbaa !38
  %81 = icmp eq i8 %80, 105
  br i1 %81, label %82, label %105

82:                                               ; preds = %78
  %83 = getelementptr inbounds i8, ptr %71, i64 3
  %84 = load i8, ptr %83, align 1, !tbaa !38
  %85 = icmp eq i8 %84, 102
  br i1 %85, label %86, label %105

86:                                               ; preds = %82
  %87 = getelementptr inbounds i8, ptr %71, i64 4
  %88 = load i8, ptr %87, align 1, !tbaa !38
  %89 = icmp eq i8 %88, 0
  br i1 %89, label %90, label %105

90:                                               ; preds = %86
  %91 = getelementptr inbounds i8, ptr %71, i64 5
  %92 = load i8, ptr %91, align 1, !tbaa !38
  %93 = icmp eq i8 %92, 0
  br i1 %93, label %94, label %105

94:                                               ; preds = %90
  %95 = getelementptr inbounds i8, ptr %1, i64 312
  store i8 0, ptr %95, align 8, !tbaa !39
  %96 = load i32, ptr %53, align 8, !tbaa !40
  %97 = getelementptr inbounds i8, ptr %0, i64 48
  %98 = load i32, ptr %97, align 8, !tbaa !41
  %.not51 = icmp eq i32 %96, %98
  %.pre = load i32, ptr %54, align 4, !tbaa !42
  br i1 %.not51, label %99, label %102

99:                                               ; preds = %94
  %100 = getelementptr inbounds i8, ptr %0, i64 52
  %101 = load i32, ptr %100, align 4, !tbaa !43
  %.not52 = icmp eq i32 %.pre, %101
  br i1 %.not52, label %105, label %102

102:                                              ; preds = %99, %94
  %103 = getelementptr inbounds i8, ptr %71, i64 6
  %104 = add i32 %67, -6
  tail call void @adjust_exif_parameters(ptr noundef nonnull %103, i32 noundef %104, i32 noundef %96, i32 noundef %.pre)
  br label %105

105:                                              ; preds = %99, %102, %90, %86, %82, %78, %74, %69, %65, %61, %58
  %106 = getelementptr inbounds i8, ptr %3, i64 48
  %107 = load ptr, ptr %106, align 8, !tbaa !44
  %.not53 = icmp eq ptr %107, null
  %. = select i1 %.not53, ptr %2, ptr %107
  ret ptr %.
}

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

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

; Function Attrs: nounwind uwtable
declare hidden void @adjust_exif_parameters(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind }

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

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


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