; LLVM IR from niessner/Matterport :: code/gaps/pkgs/jpeg (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 }

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

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

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

13:                                               ; preds = %1
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %14, i32 0, i32 0
  %16 = load ptr, ptr %15, align 8, !tbaa !16
  %17 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %16, i32 0, i32 5
  store i32 20, ptr %17, align 8, !tbaa !17
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %18, i32 0, i32 5
  %20 = load i32, ptr %19, align 4, !tbaa !15
  %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 !16
  %24 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %23, i32 0, i32 6
  %25 = getelementptr inbounds [8 x i32], ptr %24, i64 0, i64 0
  store i32 %20, ptr %25, align 4, !tbaa !20
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %26, i32 0, i32 0
  %28 = load ptr, ptr %27, align 8, !tbaa !16
  %29 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %28, i32 0, i32 0
  %30 = load ptr, ptr %29, align 8, !tbaa !21
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  call void %30(ptr noundef %31)
  br label %32

32:                                               ; preds = %13, %1
  %33 = load i32, ptr %3, align 4, !tbaa !14
  %34 = icmp eq i32 %33, 3
  br i1 %34, label %35, label %41

35:                                               ; preds = %32
  %36 = load ptr, ptr %2, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %36, i32 0, i32 14
  %38 = load i32, ptr %37, align 8, !tbaa !22
  %39 = icmp eq i32 %38, 3
  br i1 %39, label %40, label %41

40:                                               ; preds = %35
  store i32 10, ptr %4, align 4, !tbaa !14
  br label %52

41:                                               ; preds = %35, %32
  %42 = load i32, ptr %3, align 4, !tbaa !14
  %43 = icmp sgt i32 %42, 4
  br i1 %43, label %44, label %47

44:                                               ; preds = %41
  %45 = load i32, ptr %3, align 4, !tbaa !14
  %46 = mul nsw i32 6, %45
  store i32 %46, ptr %4, align 4, !tbaa !14
  br label %51

47:                                               ; preds = %41
  %48 = load i32, ptr %3, align 4, !tbaa !14
  %49 = mul nsw i32 4, %48
  %50 = add nsw i32 2, %49
  store i32 %50, ptr %4, align 4, !tbaa !14
  br label %51

51:                                               ; preds = %47, %44
  br label %52

52:                                               ; preds = %51, %40
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %53, i32 0, i32 63
  %55 = load ptr, ptr %54, align 8, !tbaa !23
  %56 = icmp eq ptr %55, null
  br i1 %56, label %63, label %57

57:                                               ; preds = %52
  %58 = load ptr, ptr %2, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %58, i32 0, i32 64
  %60 = load i32, ptr %59, align 8, !tbaa !24
  %61 = load i32, ptr %4, align 4, !tbaa !14
  %62 = icmp slt i32 %60, %61
  br i1 %62, label %63, label %87

63:                                               ; preds = %57, %52
  %64 = load i32, ptr %4, align 4, !tbaa !14
  %65 = icmp sgt i32 %64, 10
  br i1 %65, label %66, label %68

66:                                               ; preds = %63
  %67 = load i32, ptr %4, align 4, !tbaa !14
  br label %69

68:                                               ; preds = %63
  br label %69

69:                                               ; preds = %68, %66
  %70 = phi i32 [ %67, %66 ], [ 10, %68 ]
  %71 = load ptr, ptr %2, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %71, i32 0, i32 64
  store i32 %70, ptr %72, align 8, !tbaa !24
  %73 = load ptr, ptr %2, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %73, i32 0, i32 1
  %75 = load ptr, ptr %74, align 8, !tbaa !25
  %76 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %75, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8, !tbaa !26
  %78 = load ptr, ptr %2, align 8, !tbaa !5
  %79 = load ptr, ptr %2, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %79, i32 0, i32 64
  %81 = load i32, ptr %80, align 8, !tbaa !24
  %82 = sext i32 %81 to i64
  %83 = mul i64 %82, 36
  %84 = call ptr %77(ptr noundef %78, i32 noundef 0, i64 noundef %83)
  %85 = load ptr, ptr %2, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %85, i32 0, i32 63
  store ptr %84, ptr %86, align 8, !tbaa !23
  br label %87

87:                                               ; preds = %69, %57
  %88 = load ptr, ptr %2, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %88, i32 0, i32 63
  %90 = load ptr, ptr %89, align 8, !tbaa !23
  store ptr %90, ptr %5, align 8, !tbaa !5
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = load ptr, ptr %2, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %92, i32 0, i32 23
  store ptr %91, ptr %93, align 8, !tbaa !28
  %94 = load i32, ptr %4, align 4, !tbaa !14
  %95 = load ptr, ptr %2, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %95, i32 0, i32 22
  store i32 %94, ptr %96, align 8, !tbaa !29
  %97 = load i32, ptr %3, align 4, !tbaa !14
  %98 = icmp eq i32 %97, 3
  br i1 %98, label %99, label %127

99:                                               ; preds = %87
  %100 = load ptr, ptr %2, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %100, i32 0, i32 14
  %102 = load i32, ptr %101, align 8, !tbaa !22
  %103 = icmp eq i32 %102, 3
  br i1 %103, label %104, label %127

104:                                              ; preds = %99
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = load i32, ptr %3, align 4, !tbaa !14
  %107 = call ptr @fill_dc_scans(ptr noundef %105, i32 noundef %106, i32 noundef 0, i32 noundef 1)
  store ptr %107, ptr %5, align 8, !tbaa !5
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = call ptr @fill_a_scan(ptr noundef %108, i32 noundef 0, i32 noundef 1, i32 noundef 5, i32 noundef 0, i32 noundef 2)
  store ptr %109, ptr %5, align 8, !tbaa !5
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = call ptr @fill_a_scan(ptr noundef %110, i32 noundef 2, i32 noundef 1, i32 noundef 63, i32 noundef 0, i32 noundef 1)
  store ptr %111, ptr %5, align 8, !tbaa !5
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = call ptr @fill_a_scan(ptr noundef %112, i32 noundef 1, i32 noundef 1, i32 noundef 63, i32 noundef 0, i32 noundef 1)
  store ptr %113, ptr %5, align 8, !tbaa !5
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = call ptr @fill_a_scan(ptr noundef %114, i32 noundef 0, i32 noundef 6, i32 noundef 63, i32 noundef 0, i32 noundef 2)
  store ptr %115, ptr %5, align 8, !tbaa !5
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = call ptr @fill_a_scan(ptr noundef %116, i32 noundef 0, i32 noundef 1, i32 noundef 63, i32 noundef 2, i32 noundef 1)
  store ptr %117, ptr %5, align 8, !tbaa !5
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = load i32, ptr %3, align 4, !tbaa !14
  %120 = call ptr @fill_dc_scans(ptr noundef %118, i32 noundef %119, i32 noundef 1, i32 noundef 0)
  store ptr %120, ptr %5, align 8, !tbaa !5
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = call ptr @fill_a_scan(ptr noundef %121, i32 noundef 2, i32 noundef 1, i32 noundef 63, i32 noundef 1, i32 noundef 0)
  store ptr %122, ptr %5, align 8, !tbaa !5
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = call ptr @fill_a_scan(ptr noundef %123, i32 noundef 1, i32 noundef 1, i32 noundef 63, i32 noundef 1, i32 noundef 0)
  store ptr %124, ptr %5, align 8, !tbaa !5
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = call ptr @fill_a_scan(ptr noundef %125, i32 noundef 0, i32 noundef 1, i32 noundef 63, i32 noundef 1, i32 noundef 0)
  store ptr %126, ptr %5, align 8, !tbaa !5
  br label %146

127:                                              ; preds = %99, %87
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  %129 = load i32, ptr %3, align 4, !tbaa !14
  %130 = call ptr @fill_dc_scans(ptr noundef %128, i32 noundef %129, i32 noundef 0, i32 noundef 1)
  store ptr %130, ptr %5, align 8, !tbaa !5
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = load i32, ptr %3, align 4, !tbaa !14
  %133 = call ptr @fill_scans(ptr noundef %131, i32 noundef %132, i32 noundef 1, i32 noundef 5, i32 noundef 0, i32 noundef 2)
  store ptr %133, ptr %5, align 8, !tbaa !5
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = load i32, ptr %3, align 4, !tbaa !14
  %136 = call ptr @fill_scans(ptr noundef %134, i32 noundef %135, i32 noundef 6, i32 noundef 63, i32 noundef 0, i32 noundef 2)
  store ptr %136, ptr %5, align 8, !tbaa !5
  %137 = load ptr, ptr %5, align 8, !tbaa !5
  %138 = load i32, ptr %3, align 4, !tbaa !14
  %139 = call ptr @fill_scans(ptr noundef %137, i32 noundef %138, i32 noundef 1, i32 noundef 63, i32 noundef 2, i32 noundef 1)
  store ptr %139, ptr %5, align 8, !tbaa !5
  %140 = load ptr, ptr %5, align 8, !tbaa !5
  %141 = load i32, ptr %3, align 4, !tbaa !14
  %142 = call ptr @fill_dc_scans(ptr noundef %140, i32 noundef %141, i32 noundef 1, i32 noundef 0)
  store ptr %142, ptr %5, align 8, !tbaa !5
  %143 = load ptr, ptr %5, align 8, !tbaa !5
  %144 = load i32, ptr %3, align 4, !tbaa !14
  %145 = call ptr @fill_scans(ptr noundef %143, i32 noundef %144, i32 noundef 1, i32 noundef 63, i32 noundef 1, i32 noundef 0)
  store ptr %145, ptr %5, align 8, !tbaa !5
  br label %146

146:                                              ; preds = %127, %104
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #2
  ret void
}

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 76}
!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 = !{!11, !11, i64 0}
!15 = !{!10, !11, i64 36}
!16 = !{!10, !6, i64 0}
!17 = !{!18, !11, i64 40}
!18 = !{!"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, !19, i64 128, !6, i64 136, !11, i64 144, !6, i64 152, !11, i64 160, !11, i64 164}
!19 = !{!"long", !7, i64 0}
!20 = !{!7, !7, i64 0}
!21 = !{!18, !6, i64 0}
!22 = !{!10, !11, i64 80}
!23 = !{!10, !6, i64 504}
!24 = !{!10, !11, i64 512}
!25 = !{!10, !6, i64 8}
!26 = !{!27, !6, i64 0}
!27 = !{!"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, !19, i64 88, !19, i64 96}
!28 = !{!10, !6, i64 248}
!29 = !{!10, !11, i64 240}


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

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

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

12:                                               ; preds = %6, %1
  %13 = icmp eq i32 %3, 3
  br i1 %13, label %14, label %18

14:                                               ; preds = %12
  %15 = getelementptr inbounds i8, ptr %0, i64 80
  %16 = load i32, ptr %15, align 8, !tbaa !20
  %17 = icmp eq i32 %16, 3
  br i1 %17, label %24, label %.thread

18:                                               ; preds = %12
  %19 = icmp sgt i32 %3, 4
  br i1 %19, label %20, label %.thread

20:                                               ; preds = %18
  %21 = mul nuw nsw i32 %3, 6
  br label %24

.thread:                                          ; preds = %14, %18
  %22 = shl nsw i32 %3, 2
  %23 = or disjoint i32 %22, 2
  br label %24

24:                                               ; preds = %14, %20, %.thread
  %.0 = phi i32 [ %21, %20 ], [ %23, %.thread ], [ 10, %14 ]
  %25 = getelementptr inbounds i8, ptr %0, i64 504
  %26 = load ptr, ptr %25, align 8, !tbaa !21
  %27 = icmp eq ptr %26, null
  br i1 %27, label %32, label %28

28:                                               ; preds = %24
  %29 = getelementptr inbounds i8, ptr %0, i64 512
  %30 = load i32, ptr %29, align 8, !tbaa !22
  %31 = icmp slt i32 %30, %.0
  br i1 %31, label %32, label %41

32:                                               ; preds = %28, %24
  %33 = tail call i32 @llvm.smax.i32(i32 %.0, i32 10)
  %34 = getelementptr inbounds i8, ptr %0, i64 512
  store i32 %33, ptr %34, align 8, !tbaa !22
  %35 = getelementptr inbounds i8, ptr %0, i64 8
  %36 = load ptr, ptr %35, align 8, !tbaa !23
  %37 = load ptr, ptr %36, align 8, !tbaa !24
  %38 = zext nneg i32 %33 to i64
  %39 = mul nuw nsw i64 %38, 36
  %40 = tail call ptr %37(ptr noundef nonnull %0, i32 noundef 0, i64 noundef %39) #2
  store ptr %40, ptr %25, align 8, !tbaa !21
  br label %41

41:                                               ; preds = %32, %28
  %42 = phi ptr [ %40, %32 ], [ %26, %28 ]
  %43 = getelementptr inbounds i8, ptr %0, i64 248
  store ptr %42, ptr %43, align 8, !tbaa !26
  %44 = getelementptr inbounds i8, ptr %0, i64 240
  store i32 %.0, ptr %44, align 8, !tbaa !27
  br i1 %13, label %45, label %60

45:                                               ; preds = %41
  %46 = getelementptr inbounds i8, ptr %0, i64 80
  %47 = load i32, ptr %46, align 8, !tbaa !20
  %48 = icmp eq i32 %47, 3
  br i1 %48, label %49, label %60

49:                                               ; preds = %45
  %50 = tail call ptr @fill_dc_scans(ptr noundef %42, i32 noundef 3, i32 noundef 0, i32 noundef 1)
  %51 = tail call ptr @fill_a_scan(ptr noundef %50, i32 noundef 0, i32 noundef 1, i32 noundef 5, i32 noundef 0, i32 noundef 2)
  %52 = tail call ptr @fill_a_scan(ptr noundef %51, i32 noundef 2, i32 noundef 1, i32 noundef 63, i32 noundef 0, i32 noundef 1)
  %53 = tail call ptr @fill_a_scan(ptr noundef %52, i32 noundef 1, i32 noundef 1, i32 noundef 63, i32 noundef 0, i32 noundef 1)
  %54 = tail call ptr @fill_a_scan(ptr noundef %53, i32 noundef 0, i32 noundef 6, i32 noundef 63, i32 noundef 0, i32 noundef 2)
  %55 = tail call ptr @fill_a_scan(ptr noundef %54, i32 noundef 0, i32 noundef 1, i32 noundef 63, i32 noundef 2, i32 noundef 1)
  %56 = tail call ptr @fill_dc_scans(ptr noundef %55, i32 noundef 3, i32 noundef 1, i32 noundef 0)
  %57 = tail call ptr @fill_a_scan(ptr noundef %56, i32 noundef 2, i32 noundef 1, i32 noundef 63, i32 noundef 1, i32 noundef 0)
  %58 = tail call ptr @fill_a_scan(ptr noundef %57, i32 noundef 1, i32 noundef 1, i32 noundef 63, i32 noundef 1, i32 noundef 0)
  %59 = tail call ptr @fill_a_scan(ptr noundef %58, i32 noundef 0, i32 noundef 1, i32 noundef 63, i32 noundef 1, i32 noundef 0)
  br label %67

60:                                               ; preds = %45, %41
  %61 = tail call ptr @fill_dc_scans(ptr noundef %42, i32 noundef %3, i32 noundef 0, i32 noundef 1)
  %62 = tail call ptr @fill_scans(ptr noundef %61, i32 noundef %3, i32 noundef 1, i32 noundef 5, i32 noundef 0, i32 noundef 2)
  %63 = tail call ptr @fill_scans(ptr noundef %62, i32 noundef %3, i32 noundef 6, i32 noundef 63, i32 noundef 0, i32 noundef 2)
  %64 = tail call ptr @fill_scans(ptr noundef %63, i32 noundef %3, i32 noundef 1, i32 noundef 63, i32 noundef 2, i32 noundef 1)
  %65 = tail call ptr @fill_dc_scans(ptr noundef %64, i32 noundef %3, i32 noundef 1, i32 noundef 0)
  %66 = tail call ptr @fill_scans(ptr noundef %65, i32 noundef %3, i32 noundef 1, i32 noundef 63, i32 noundef 1, i32 noundef 0)
  br label %67

67:                                               ; preds = %60, %49
  ret void
}

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 76}
!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, !10, i64 36}
!14 = !{!6, !7, i64 0}
!15 = !{!16, !10, i64 40}
!16 = !{!"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, !17, i64 128, !7, i64 136, !10, i64 144, !7, i64 152, !10, i64 160, !10, i64 164}
!17 = !{!"long", !8, i64 0}
!18 = !{!8, !8, i64 0}
!19 = !{!16, !7, i64 0}
!20 = !{!6, !10, i64 80}
!21 = !{!6, !7, i64 504}
!22 = !{!6, !10, i64 512}
!23 = !{!6, !7, i64 8}
!24 = !{!25, !7, i64 0}
!25 = !{!"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, !17, i64 88, !17, i64 96}
!26 = !{!6, !7, i64 248}
!27 = !{!6, !10, i64 240}


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