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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.jpeg_compress_struct = type { ptr, ptr, ptr, ptr, i32, i32, ptr, i32, i32, i32, i32, double, i32, i32, i32, ptr, [4 x ptr], [4 x ptr], [4 x ptr], [16 x i8], [16 x i8], [16 x i8], i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8, i8, i8, i16, i16, i32, i32, i32, i32, i32, i32, i32, [4 x ptr], i32, i32, i32, [10 x i32], i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32 }
%struct.jpeg_error_mgr = type { ptr, ptr, ptr, ptr, ptr, i32, %union.anon, i32, i64, ptr, i32, ptr, i32, i32 }
%union.anon = type { [8 x i32], [48 x i8] }
%struct.jpeg_memory_mgr = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64 }
%struct.jpeg_comp_master = type { ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x [64 x double]], [4 x [64 x double]], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, float, float }

; 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
declare dso_local void @jpeg_set_quality(ptr noundef, i32 noundef, i32 noundef) #1

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

8:                                                ; preds = %1
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %9, i32 0, i32 0
  %11 = load ptr, ptr %10, align 8, !tbaa !14
  %12 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %11, i32 0, i32 5
  store i32 20, ptr %12, align 8, !tbaa !15
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %13, i32 0, i32 5
  %15 = load i32, ptr %14, align 4, !tbaa !9
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %16, i32 0, i32 0
  %18 = load ptr, ptr %17, align 8, !tbaa !14
  %19 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %18, i32 0, i32 6
  %20 = getelementptr inbounds [8 x i32], ptr %19, i64 0, i64 0
  store i32 %15, ptr %20, align 4, !tbaa !18
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %21, i32 0, i32 0
  %23 = load ptr, ptr %22, align 8, !tbaa !14
  %24 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %23, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8, !tbaa !19
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  call void %25(ptr noundef %26)
  br label %27

27:                                               ; preds = %8, %1
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %28, i32 0, i32 15
  %30 = load ptr, ptr %29, align 8, !tbaa !20
  %31 = icmp eq ptr %30, null
  br i1 %31, label %32, label %42

32:                                               ; preds = %27
  %33 = load ptr, ptr %2, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %33, i32 0, i32 1
  %35 = load ptr, ptr %34, align 8, !tbaa !21
  %36 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %35, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !22
  %38 = load ptr, ptr %2, align 8, !tbaa !5
  %39 = call ptr %37(ptr noundef %38, i32 noundef 0, i64 noundef 960)
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %40, i32 0, i32 15
  store ptr %39, ptr %41, align 8, !tbaa !20
  br label %42

42:                                               ; preds = %32, %27
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %43, i32 0, i32 12
  store i32 8, ptr %44, align 8, !tbaa !24
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  call void @jpeg_set_quality(ptr noundef %45, i32 noundef 75, i32 noundef 1)
  %46 = load ptr, ptr %2, align 8, !tbaa !5
  call void @std_huff_tables(ptr noundef %46)
  store i32 0, ptr %3, align 4, !tbaa !25
  br label %47

47:                                               ; preds = %66, %42
  %48 = load i32, ptr %3, align 4, !tbaa !25
  %49 = icmp slt i32 %48, 16
  br i1 %49, label %50, label %69

50:                                               ; preds = %47
  %51 = load ptr, ptr %2, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %51, i32 0, i32 19
  %53 = load i32, ptr %3, align 4, !tbaa !25
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [16 x i8], ptr %52, i64 0, i64 %54
  store i8 0, ptr %55, align 1, !tbaa !18
  %56 = load ptr, ptr %2, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %56, i32 0, i32 20
  %58 = load i32, ptr %3, align 4, !tbaa !25
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [16 x i8], ptr %57, i64 0, i64 %59
  store i8 1, ptr %60, align 1, !tbaa !18
  %61 = load ptr, ptr %2, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %61, i32 0, i32 21
  %63 = load i32, ptr %3, align 4, !tbaa !25
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [16 x i8], ptr %62, i64 0, i64 %64
  store i8 5, ptr %65, align 1, !tbaa !18
  br label %66

66:                                               ; preds = %50
  %67 = load i32, ptr %3, align 4, !tbaa !25
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %3, align 4, !tbaa !25
  br label %47, !llvm.loop !26

69:                                               ; preds = %47
  %70 = load ptr, ptr %2, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %70, i32 0, i32 23
  store ptr null, ptr %71, align 8, !tbaa !28
  %72 = load ptr, ptr %2, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %72, i32 0, i32 22
  store i32 0, ptr %73, align 8, !tbaa !29
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %74, i32 0, i32 24
  store i32 0, ptr %75, align 8, !tbaa !30
  %76 = load ptr, ptr %2, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %76, i32 0, i32 25
  store i32 0, ptr %77, align 4, !tbaa !31
  %78 = load ptr, ptr %2, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %78, i32 0, i32 54
  %80 = load ptr, ptr %79, align 8, !tbaa !32
  %81 = getelementptr inbounds %struct.jpeg_comp_master, ptr %80, i32 0, i32 16
  %82 = load i32, ptr %81, align 8, !tbaa !33
  %83 = icmp eq i32 %82, 1560820397
  br i1 %83, label %84, label %87

84:                                               ; preds = %69
  %85 = load ptr, ptr %2, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %85, i32 0, i32 26
  store i32 1, ptr %86, align 8, !tbaa !36
  br label %90

87:                                               ; preds = %69
  %88 = load ptr, ptr %2, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %88, i32 0, i32 26
  store i32 0, ptr %89, align 8, !tbaa !36
  br label %90

90:                                               ; preds = %87, %84
  %91 = load ptr, ptr %2, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %91, i32 0, i32 12
  %93 = load i32, ptr %92, align 8, !tbaa !24
  %94 = icmp sgt i32 %93, 8
  br i1 %94, label %95, label %98

95:                                               ; preds = %90
  %96 = load ptr, ptr %2, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %96, i32 0, i32 26
  store i32 1, ptr %97, align 8, !tbaa !36
  br label %98

98:                                               ; preds = %95, %90
  %99 = load ptr, ptr %2, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %99, i32 0, i32 27
  store i32 0, ptr %100, align 4, !tbaa !37
  %101 = load ptr, ptr %2, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %101, i32 0, i32 54
  %103 = load ptr, ptr %102, align 8, !tbaa !32
  %104 = getelementptr inbounds %struct.jpeg_comp_master, ptr %103, i32 0, i32 16
  %105 = load i32, ptr %104, align 8, !tbaa !33
  %106 = icmp eq i32 %105, 1560820397
  %107 = zext i1 %106 to i32
  %108 = load ptr, ptr %2, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %108, i32 0, i32 54
  %110 = load ptr, ptr %109, align 8, !tbaa !32
  %111 = getelementptr inbounds %struct.jpeg_comp_master, ptr %110, i32 0, i32 13
  store i32 %107, ptr %111, align 8, !tbaa !38
  %112 = load ptr, ptr %2, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %112, i32 0, i32 28
  store i32 0, ptr %113, align 8, !tbaa !39
  %114 = load ptr, ptr %2, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %114, i32 0, i32 29
  store i32 0, ptr %115, align 4, !tbaa !40
  %116 = load ptr, ptr %2, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %116, i32 0, i32 30
  store i32 0, ptr %117, align 8, !tbaa !41
  %118 = load ptr, ptr %2, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %118, i32 0, i32 31
  store i32 0, ptr %119, align 4, !tbaa !42
  %120 = load ptr, ptr %2, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %120, i32 0, i32 33
  store i8 1, ptr %121, align 4, !tbaa !43
  %122 = load ptr, ptr %2, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %122, i32 0, i32 34
  store i8 1, ptr %123, align 1, !tbaa !44
  %124 = load ptr, ptr %2, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %124, i32 0, i32 35
  store i8 0, ptr %125, align 2, !tbaa !45
  %126 = load ptr, ptr %2, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %126, i32 0, i32 36
  store i16 1, ptr %127, align 8, !tbaa !46
  %128 = load ptr, ptr %2, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %128, i32 0, i32 37
  store i16 1, ptr %129, align 2, !tbaa !47
  %130 = load ptr, ptr %2, align 8, !tbaa !5
  call void @jpeg_default_colorspace(ptr noundef %130)
  %131 = load ptr, ptr %2, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %131, i32 0, i32 54
  %133 = load ptr, ptr %132, align 8, !tbaa !32
  %134 = getelementptr inbounds %struct.jpeg_comp_master, ptr %133, i32 0, i32 17
  store i32 1, ptr %134, align 4, !tbaa !48
  %135 = load ptr, ptr %2, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %135, i32 0, i32 54
  %137 = load ptr, ptr %136, align 8, !tbaa !32
  %138 = getelementptr inbounds %struct.jpeg_comp_master, ptr %137, i32 0, i32 16
  %139 = load i32, ptr %138, align 8, !tbaa !33
  %140 = icmp eq i32 %139, 1560820397
  br i1 %140, label %141, label %147

141:                                              ; preds = %98
  %142 = load ptr, ptr %2, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %142, i32 0, i32 54
  %144 = load ptr, ptr %143, align 8, !tbaa !32
  %145 = getelementptr inbounds %struct.jpeg_comp_master, ptr %144, i32 0, i32 5
  store i32 1, ptr %145, align 8, !tbaa !49
  %146 = load ptr, ptr %2, align 8, !tbaa !5
  call void @jpeg_simple_progression(ptr noundef %146)
  br label %152

147:                                              ; preds = %98
  %148 = load ptr, ptr %2, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %148, i32 0, i32 54
  %150 = load ptr, ptr %149, align 8, !tbaa !32
  %151 = getelementptr inbounds %struct.jpeg_comp_master, ptr %150, i32 0, i32 5
  store i32 0, ptr %151, align 8, !tbaa !49
  br label %152

152:                                              ; preds = %147, %141
  %153 = load ptr, ptr %2, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %153, i32 0, i32 54
  %155 = load ptr, ptr %154, align 8, !tbaa !32
  %156 = getelementptr inbounds %struct.jpeg_comp_master, ptr %155, i32 0, i32 16
  %157 = load i32, ptr %156, align 8, !tbaa !33
  %158 = icmp eq i32 %157, 1560820397
  %159 = zext i1 %158 to i32
  %160 = load ptr, ptr %2, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %160, i32 0, i32 54
  %162 = load ptr, ptr %161, align 8, !tbaa !32
  %163 = getelementptr inbounds %struct.jpeg_comp_master, ptr %162, i32 0, i32 6
  store i32 %159, ptr %163, align 4, !tbaa !50
  %164 = load ptr, ptr %2, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %164, i32 0, i32 54
  %166 = load ptr, ptr %165, align 8, !tbaa !32
  %167 = getelementptr inbounds %struct.jpeg_comp_master, ptr %166, i32 0, i32 27
  store float 1.475000e+01, ptr %167, align 4, !tbaa !51
  %168 = load ptr, ptr %2, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %168, i32 0, i32 54
  %170 = load ptr, ptr %169, align 8, !tbaa !32
  %171 = getelementptr inbounds %struct.jpeg_comp_master, ptr %170, i32 0, i32 28
  store float 1.650000e+01, ptr %171, align 8, !tbaa !52
  %172 = load ptr, ptr %2, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %172, i32 0, i32 54
  %174 = load ptr, ptr %173, align 8, !tbaa !32
  %175 = getelementptr inbounds %struct.jpeg_comp_master, ptr %174, i32 0, i32 16
  %176 = load i32, ptr %175, align 8, !tbaa !33
  %177 = icmp eq i32 %176, 1560820397
  %178 = zext i1 %177 to i64
  %179 = select i1 %177, i32 3, i32 0
  %180 = load ptr, ptr %2, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %180, i32 0, i32 54
  %182 = load ptr, ptr %181, align 8, !tbaa !32
  %183 = getelementptr inbounds %struct.jpeg_comp_master, ptr %182, i32 0, i32 18
  store i32 %179, ptr %183, align 8, !tbaa !53
  %184 = load ptr, ptr %2, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %184, i32 0, i32 54
  %186 = load ptr, ptr %185, align 8, !tbaa !32
  %187 = getelementptr inbounds %struct.jpeg_comp_master, ptr %186, i32 0, i32 9
  store i32 1, ptr %187, align 8, !tbaa !54
  %188 = load ptr, ptr %2, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %188, i32 0, i32 54
  %190 = load ptr, ptr %189, align 8, !tbaa !32
  %191 = getelementptr inbounds %struct.jpeg_comp_master, ptr %190, i32 0, i32 10
  store i32 0, ptr %191, align 4, !tbaa !55
  %192 = load ptr, ptr %2, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %192, i32 0, i32 54
  %194 = load ptr, ptr %193, align 8, !tbaa !32
  %195 = getelementptr inbounds %struct.jpeg_comp_master, ptr %194, i32 0, i32 19
  store i32 8, ptr %195, align 4, !tbaa !56
  %196 = load ptr, ptr %2, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %196, i32 0, i32 54
  %198 = load ptr, ptr %197, align 8, !tbaa !32
  %199 = getelementptr inbounds %struct.jpeg_comp_master, ptr %198, i32 0, i32 20
  store i32 1, ptr %199, align 8, !tbaa !57
  %200 = load ptr, ptr %2, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %200, i32 0, i32 54
  %202 = load ptr, ptr %201, align 8, !tbaa !32
  %203 = getelementptr inbounds %struct.jpeg_comp_master, ptr %202, i32 0, i32 12
  store i32 0, ptr %203, align 4, !tbaa !58
  %204 = load ptr, ptr %2, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %204, i32 0, i32 54
  %206 = load ptr, ptr %205, align 8, !tbaa !32
  %207 = getelementptr inbounds %struct.jpeg_comp_master, ptr %206, i32 0, i32 7
  store i32 1, ptr %207, align 8, !tbaa !59
  %208 = load ptr, ptr %2, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %208, i32 0, i32 54
  %210 = load ptr, ptr %209, align 8, !tbaa !32
  %211 = getelementptr inbounds %struct.jpeg_comp_master, ptr %210, i32 0, i32 29
  store float 0.000000e+00, ptr %211, align 4, !tbaa !60
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #2
  ret void
}

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

; Function Attrs: nounwind uwtable
declare dso_local void @jpeg_default_colorspace(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @jpeg_simple_progression(ptr noundef) #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 36}
!10 = !{!"jpeg_compress_struct", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !11, i64 32, !11, i64 36, !6, i64 40, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !12, i64 64, !11, i64 72, !11, i64 76, !11, i64 80, !6, i64 88, !7, i64 96, !7, i64 128, !7, i64 160, !7, i64 192, !7, i64 208, !7, i64 224, !11, i64 240, !6, i64 248, !11, i64 256, !11, i64 260, !11, i64 264, !11, i64 268, !11, i64 272, !11, i64 276, !11, i64 280, !11, i64 284, !11, i64 288, !7, i64 292, !7, i64 293, !7, i64 294, !13, i64 296, !13, i64 298, !11, i64 300, !11, i64 304, !11, i64 308, !11, i64 312, !11, i64 316, !11, i64 320, !11, i64 324, !7, i64 328, !11, i64 360, !11, i64 364, !11, i64 368, !7, i64 372, !11, i64 412, !11, i64 416, !11, i64 420, !11, i64 424, !6, i64 432, !6, i64 440, !6, i64 448, !6, i64 456, !6, i64 464, !6, i64 472, !6, i64 480, !6, i64 488, !6, i64 496, !6, i64 504, !11, i64 512}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!10, !6, i64 0}
!15 = !{!16, !11, i64 40}
!16 = !{!"jpeg_error_mgr", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !11, i64 40, !7, i64 44, !11, i64 124, !17, i64 128, !6, i64 136, !11, i64 144, !6, i64 152, !11, i64 160, !11, i64 164}
!17 = !{!"long", !7, i64 0}
!18 = !{!7, !7, i64 0}
!19 = !{!16, !6, i64 0}
!20 = !{!10, !6, i64 88}
!21 = !{!10, !6, i64 8}
!22 = !{!23, !6, i64 0}
!23 = !{!"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, !17, i64 88, !17, i64 96}
!24 = !{!10, !11, i64 72}
!25 = !{!11, !11, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!10, !6, i64 248}
!29 = !{!10, !11, i64 240}
!30 = !{!10, !11, i64 256}
!31 = !{!10, !11, i64 260}
!32 = !{!10, !6, i64 432}
!33 = !{!34, !11, i64 4168}
!34 = !{!"jpeg_comp_master", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !7, i64 72, !7, i64 2120, !11, i64 4168, !11, i64 4172, !11, i64 4176, !11, i64 4180, !11, i64 4184, !11, i64 4188, !11, i64 4192, !11, i64 4196, !11, i64 4200, !11, i64 4204, !11, i64 4208, !35, i64 4212, !35, i64 4216, !35, i64 4220}
!35 = !{!"float", !7, i64 0}
!36 = !{!10, !11, i64 264}
!37 = !{!10, !11, i64 268}
!38 = !{!34, !11, i64 64}
!39 = !{!10, !11, i64 272}
!40 = !{!10, !11, i64 276}
!41 = !{!10, !11, i64 280}
!42 = !{!10, !11, i64 284}
!43 = !{!10, !7, i64 292}
!44 = !{!10, !7, i64 293}
!45 = !{!10, !7, i64 294}
!46 = !{!10, !13, i64 296}
!47 = !{!10, !13, i64 298}
!48 = !{!34, !11, i64 4172}
!49 = !{!34, !11, i64 32}
!50 = !{!34, !11, i64 36}
!51 = !{!34, !35, i64 4212}
!52 = !{!34, !35, i64 4216}
!53 = !{!34, !11, i64 4176}
!54 = !{!34, !11, i64 48}
!55 = !{!34, !11, i64 52}
!56 = !{!34, !11, i64 4180}
!57 = !{!34, !11, i64 4184}
!58 = !{!34, !11, i64 60}
!59 = !{!34, !11, i64 40}
!60 = !{!34, !35, i64 4220}


; 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
declare dso_local void @jpeg_set_quality(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

10:                                               ; preds = %4, %1
  %11 = getelementptr inbounds i8, ptr %0, i64 88
  %12 = load ptr, ptr %11, align 8, !tbaa !19
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %19

14:                                               ; preds = %10
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = load ptr, ptr %15, align 8, !tbaa !20
  %17 = load ptr, ptr %16, align 8, !tbaa !21
  %18 = tail call ptr %17(ptr noundef nonnull %0, i32 noundef 0, i64 noundef 960) #2
  store ptr %18, ptr %11, align 8, !tbaa !19
  br label %19

19:                                               ; preds = %14, %10
  %20 = getelementptr inbounds i8, ptr %0, i64 72
  store i32 8, ptr %20, align 8, !tbaa !23
  tail call void @jpeg_set_quality(ptr noundef nonnull %0, i32 noundef 75, i32 noundef 1)
  tail call void @std_huff_tables(ptr noundef nonnull %0)
  %21 = getelementptr inbounds i8, ptr %0, i64 192
  %22 = getelementptr inbounds i8, ptr %0, i64 208
  %23 = getelementptr inbounds i8, ptr %0, i64 224
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %21, i8 0, i64 16, i1 false), !tbaa !17
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %22, i8 1, i64 16, i1 false), !tbaa !17
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %23, i8 5, i64 16, i1 false), !tbaa !17
  %24 = getelementptr inbounds i8, ptr %0, i64 248
  %25 = getelementptr inbounds i8, ptr %0, i64 240
  store i32 0, ptr %25, align 8, !tbaa !24
  %26 = getelementptr inbounds i8, ptr %0, i64 432
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %24, i8 0, i64 16, i1 false)
  %27 = load ptr, ptr %26, align 8, !tbaa !25
  %28 = getelementptr inbounds i8, ptr %27, i64 4168
  %29 = load i32, ptr %28, align 8, !tbaa !26
  %30 = icmp eq i32 %29, 1560820397
  %spec.select = zext i1 %30 to i32
  %31 = getelementptr inbounds i8, ptr %0, i64 264
  store i32 %spec.select, ptr %31, align 8
  %32 = load i32, ptr %20, align 8, !tbaa !23
  %33 = icmp sgt i32 %32, 8
  %spec.store.select = select i1 %33, i32 1, i32 %spec.select
  store i32 %spec.store.select, ptr %31, align 8
  %34 = getelementptr inbounds i8, ptr %0, i64 268
  store i32 0, ptr %34, align 4, !tbaa !29
  %35 = zext i1 %30 to i32
  %36 = getelementptr inbounds i8, ptr %27, i64 64
  store i32 %35, ptr %36, align 8, !tbaa !30
  %37 = getelementptr inbounds i8, ptr %0, i64 272
  %38 = getelementptr inbounds i8, ptr %0, i64 292
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %37, i8 0, i64 16, i1 false)
  store i8 1, ptr %38, align 4, !tbaa !31
  %39 = getelementptr inbounds i8, ptr %0, i64 293
  store i8 1, ptr %39, align 1, !tbaa !32
  %40 = getelementptr inbounds i8, ptr %0, i64 294
  store i8 0, ptr %40, align 2, !tbaa !33
  %41 = getelementptr inbounds i8, ptr %0, i64 296
  store i16 1, ptr %41, align 8, !tbaa !34
  %42 = getelementptr inbounds i8, ptr %0, i64 298
  store i16 1, ptr %42, align 2, !tbaa !35
  tail call void @jpeg_default_colorspace(ptr noundef nonnull %0)
  %43 = load ptr, ptr %26, align 8, !tbaa !25
  %44 = getelementptr inbounds i8, ptr %43, i64 4172
  store i32 1, ptr %44, align 4, !tbaa !36
  %45 = getelementptr inbounds i8, ptr %43, i64 4168
  %46 = load i32, ptr %45, align 8, !tbaa !26
  %47 = icmp eq i32 %46, 1560820397
  %48 = getelementptr inbounds i8, ptr %43, i64 32
  br i1 %47, label %51, label %.thread

.thread:                                          ; preds = %19
  store i32 0, ptr %48, align 8, !tbaa !37
  %49 = getelementptr inbounds i8, ptr %43, i64 36
  store i32 0, ptr %49, align 4, !tbaa !38
  %50 = getelementptr inbounds i8, ptr %43, i64 4212
  store <2 x float> <float 1.475000e+01, float 1.650000e+01>, ptr %50, align 4, !tbaa !39
  br label %56

51:                                               ; preds = %19
  store i32 1, ptr %48, align 8, !tbaa !37
  tail call void @jpeg_simple_progression(ptr noundef nonnull %0)
  %.pre = load ptr, ptr %26, align 8, !tbaa !25
  %.phi.trans.insert = getelementptr inbounds i8, ptr %.pre, i64 4168
  %.pre62 = load i32, ptr %.phi.trans.insert, align 8, !tbaa !26
  %.pre62.fr = freeze i32 %.pre62
  %52 = icmp eq i32 %.pre62.fr, 1560820397
  %53 = zext i1 %52 to i32
  %54 = getelementptr inbounds i8, ptr %.pre, i64 36
  store i32 %53, ptr %54, align 4, !tbaa !38
  %55 = getelementptr inbounds i8, ptr %.pre, i64 4212
  store <2 x float> <float 1.475000e+01, float 1.650000e+01>, ptr %55, align 4, !tbaa !39
  %spec.select64 = select i1 %52, i32 3, i32 0
  br label %56

56:                                               ; preds = %51, %.thread
  %57 = phi ptr [ %43, %.thread ], [ %.pre, %51 ]
  %58 = phi i32 [ 0, %.thread ], [ %spec.select64, %51 ]
  %59 = getelementptr inbounds i8, ptr %57, i64 4176
  store i32 %58, ptr %59, align 8, !tbaa !40
  %60 = getelementptr inbounds i8, ptr %57, i64 48
  store i32 1, ptr %60, align 8, !tbaa !41
  %61 = getelementptr inbounds i8, ptr %57, i64 52
  store i32 0, ptr %61, align 4, !tbaa !42
  %62 = getelementptr inbounds i8, ptr %57, i64 4180
  store i32 8, ptr %62, align 4, !tbaa !43
  %63 = getelementptr inbounds i8, ptr %57, i64 4184
  store i32 1, ptr %63, align 8, !tbaa !44
  %64 = getelementptr inbounds i8, ptr %57, i64 60
  store i32 0, ptr %64, align 4, !tbaa !45
  %65 = getelementptr inbounds i8, ptr %57, i64 40
  store i32 1, ptr %65, align 8, !tbaa !46
  %66 = getelementptr inbounds i8, ptr %57, i64 4220
  store float 0.000000e+00, ptr %66, align 4, !tbaa !47
  ret void
}

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 nounwind willreturn memory(argmem: write) }
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, !10, i64 36}
!6 = !{!"jpeg_compress_struct", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !10, i64 36, !7, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !11, i64 64, !10, i64 72, !10, i64 76, !10, i64 80, !7, i64 88, !8, i64 96, !8, i64 128, !8, i64 160, !8, i64 192, !8, i64 208, !8, i64 224, !10, i64 240, !7, i64 248, !10, i64 256, !10, i64 260, !10, i64 264, !10, i64 268, !10, i64 272, !10, i64 276, !10, i64 280, !10, i64 284, !10, i64 288, !8, i64 292, !8, i64 293, !8, i64 294, !12, i64 296, !12, i64 298, !10, i64 300, !10, i64 304, !10, i64 308, !10, i64 312, !10, i64 316, !10, i64 320, !10, i64 324, !8, i64 328, !10, i64 360, !10, i64 364, !10, i64 368, !8, i64 372, !10, i64 412, !10, i64 416, !10, i64 420, !10, i64 424, !7, i64 432, !7, i64 440, !7, i64 448, !7, i64 456, !7, i64 464, !7, i64 472, !7, i64 480, !7, i64 488, !7, i64 496, !7, i64 504, !10, i64 512}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = !{!6, !7, i64 0}
!14 = !{!15, !10, i64 40}
!15 = !{!"jpeg_error_mgr", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !8, i64 44, !10, i64 124, !16, i64 128, !7, i64 136, !10, i64 144, !7, i64 152, !10, i64 160, !10, i64 164}
!16 = !{!"long", !8, i64 0}
!17 = !{!8, !8, i64 0}
!18 = !{!15, !7, i64 0}
!19 = !{!6, !7, i64 88}
!20 = !{!6, !7, i64 8}
!21 = !{!22, !7, i64 0}
!22 = !{!"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, !16, i64 88, !16, i64 96}
!23 = !{!6, !10, i64 72}
!24 = !{!6, !10, i64 240}
!25 = !{!6, !7, i64 432}
!26 = !{!27, !10, i64 4168}
!27 = !{!"jpeg_comp_master", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !8, i64 72, !8, i64 2120, !10, i64 4168, !10, i64 4172, !10, i64 4176, !10, i64 4180, !10, i64 4184, !10, i64 4188, !10, i64 4192, !10, i64 4196, !10, i64 4200, !10, i64 4204, !10, i64 4208, !28, i64 4212, !28, i64 4216, !28, i64 4220}
!28 = !{!"float", !8, i64 0}
!29 = !{!6, !10, i64 268}
!30 = !{!27, !10, i64 64}
!31 = !{!6, !8, i64 292}
!32 = !{!6, !8, i64 293}
!33 = !{!6, !8, i64 294}
!34 = !{!6, !12, i64 296}
!35 = !{!6, !12, i64 298}
!36 = !{!27, !10, i64 4172}
!37 = !{!27, !10, i64 32}
!38 = !{!27, !10, i64 36}
!39 = !{!28, !28, i64 0}
!40 = !{!27, !10, i64 4176}
!41 = !{!27, !10, i64 48}
!42 = !{!27, !10, i64 52}
!43 = !{!27, !10, i64 4180}
!44 = !{!27, !10, i64 4184}
!45 = !{!27, !10, i64 60}
!46 = !{!27, !10, i64 40}
!47 = !{!27, !28, i64 4220}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,MemCpyOptPass,MergedLoadStoreMotionPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass