; LLVM IR from modlfo/AudioEngine :: AudioEngine/JuceLibraryCode/modules/juce_graphics/image_formats/jpglib (workspace)

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

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

13:                                               ; preds = %2
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %14, i32 0, i32 10
  %16 = load i32, ptr %15, align 4, !tbaa !12
  %17 = icmp eq i32 %16, 3
  br i1 %17, label %18, label %26

18:                                               ; preds = %13
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %19, i32 0, i32 9
  %21 = load i32, ptr %20, align 8, !tbaa !16
  %22 = icmp eq i32 %21, 3
  br i1 %22, label %23, label %26

23:                                               ; preds = %18
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.jpeg_transform_info, ptr %24, i32 0, i32 3
  store i32 1, ptr %25, align 8, !tbaa !17
  br label %32

26:                                               ; preds = %18, %13, %2
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %27, i32 0, i32 9
  %29 = load i32, ptr %28, align 8, !tbaa !16
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.jpeg_transform_info, ptr %30, i32 0, i32 3
  store i32 %29, ptr %31, align 8, !tbaa !17
  br label %32

32:                                               ; preds = %26, %23
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.jpeg_transform_info, ptr %33, i32 0, i32 0
  %35 = load i32, ptr %34, align 8, !tbaa !18
  switch i32 %35, label %165 [
    i32 0, label %36
    i32 1, label %36
    i32 2, label %37
    i32 6, label %37
    i32 3, label %101
    i32 4, label %101
    i32 5, label %101
    i32 7, label %101
  ]

36:                                               ; preds = %32, %32
  br label %165

37:                                               ; preds = %32, %32
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %38, i32 0, i32 1
  %40 = load ptr, ptr %39, align 8, !tbaa !19
  %41 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %40, i32 0, i32 0
  %42 = load ptr, ptr %41, align 8, !tbaa !20
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.jpeg_transform_info, ptr %44, i32 0, i32 3
  %46 = load i32, ptr %45, align 8, !tbaa !17
  %47 = sext i32 %46 to i64
  %48 = mul i64 8, %47
  %49 = call ptr %42(ptr noundef %43, i32 noundef 1, i64 noundef %48)
  store ptr %49, ptr %5, align 8, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !23
  br label %50

50:                                               ; preds = %97, %37
  %51 = load i32, ptr %7, align 4, !tbaa !23
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.jpeg_transform_info, ptr %52, i32 0, i32 3
  %54 = load i32, ptr %53, align 8, !tbaa !17
  %55 = icmp slt i32 %51, %54
  br i1 %55, label %56, label %100

56:                                               ; preds = %50
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %57, i32 0, i32 44
  %59 = load ptr, ptr %58, align 8, !tbaa !24
  %60 = load i32, ptr %7, align 4, !tbaa !23
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds %struct.jpeg_component_info, ptr %59, i64 %61
  store ptr %62, ptr %6, align 8, !tbaa !5
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %63, i32 0, i32 1
  %65 = load ptr, ptr %64, align 8, !tbaa !19
  %66 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %65, i32 0, i32 5
  %67 = load ptr, ptr %66, align 8, !tbaa !25
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.jpeg_component_info, ptr %69, i32 0, i32 7
  %71 = load i32, ptr %70, align 4, !tbaa !26
  %72 = zext i32 %71 to i64
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.jpeg_component_info, ptr %73, i32 0, i32 2
  %75 = load i32, ptr %74, align 8, !tbaa !28
  %76 = sext i32 %75 to i64
  %77 = call i64 @jround_up(i64 noundef %72, i64 noundef %76)
  %78 = trunc i64 %77 to i32
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.jpeg_component_info, ptr %79, i32 0, i32 8
  %81 = load i32, ptr %80, align 8, !tbaa !29
  %82 = zext i32 %81 to i64
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.jpeg_component_info, ptr %83, i32 0, i32 3
  %85 = load i32, ptr %84, align 4, !tbaa !30
  %86 = sext i32 %85 to i64
  %87 = call i64 @jround_up(i64 noundef %82, i64 noundef %86)
  %88 = trunc i64 %87 to i32
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.jpeg_component_info, ptr %89, i32 0, i32 3
  %91 = load i32, ptr %90, align 4, !tbaa !30
  %92 = call ptr %67(ptr noundef %68, i32 noundef 1, i8 noundef zeroext 0, i32 noundef %78, i32 noundef %88, i32 noundef %91)
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = load i32, ptr %7, align 4, !tbaa !23
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds ptr, ptr %93, i64 %95
  store ptr %92, ptr %96, align 8, !tbaa !5
  br label %97

97:                                               ; preds = %56
  %98 = load i32, ptr %7, align 4, !tbaa !23
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %7, align 4, !tbaa !23
  br label %50, !llvm.loop !31

100:                                              ; preds = %50
  br label %165

101:                                              ; preds = %32, %32, %32, %32
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %102, i32 0, i32 1
  %104 = load ptr, ptr %103, align 8, !tbaa !19
  %105 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !20
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.jpeg_transform_info, ptr %108, i32 0, i32 3
  %110 = load i32, ptr %109, align 8, !tbaa !17
  %111 = sext i32 %110 to i64
  %112 = mul i64 8, %111
  %113 = call ptr %106(ptr noundef %107, i32 noundef 1, i64 noundef %112)
  store ptr %113, ptr %5, align 8, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !23
  br label %114

114:                                              ; preds = %161, %101
  %115 = load i32, ptr %7, align 4, !tbaa !23
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.jpeg_transform_info, ptr %116, i32 0, i32 3
  %118 = load i32, ptr %117, align 8, !tbaa !17
  %119 = icmp slt i32 %115, %118
  br i1 %119, label %120, label %164

120:                                              ; preds = %114
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %121, i32 0, i32 44
  %123 = load ptr, ptr %122, align 8, !tbaa !24
  %124 = load i32, ptr %7, align 4, !tbaa !23
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds %struct.jpeg_component_info, ptr %123, i64 %125
  store ptr %126, ptr %6, align 8, !tbaa !5
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.jpeg_decompress_struct, ptr %127, i32 0, i32 1
  %129 = load ptr, ptr %128, align 8, !tbaa !19
  %130 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %129, i32 0, i32 5
  %131 = load ptr, ptr %130, align 8, !tbaa !25
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.jpeg_component_info, ptr %133, i32 0, i32 8
  %135 = load i32, ptr %134, align 8, !tbaa !29
  %136 = zext i32 %135 to i64
  %137 = load ptr, ptr %6, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.jpeg_component_info, ptr %137, i32 0, i32 3
  %139 = load i32, ptr %138, align 4, !tbaa !30
  %140 = sext i32 %139 to i64
  %141 = call i64 @jround_up(i64 noundef %136, i64 noundef %140)
  %142 = trunc i64 %141 to i32
  %143 = load ptr, ptr %6, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.jpeg_component_info, ptr %143, i32 0, i32 7
  %145 = load i32, ptr %144, align 4, !tbaa !26
  %146 = zext i32 %145 to i64
  %147 = load ptr, ptr %6, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.jpeg_component_info, ptr %147, i32 0, i32 2
  %149 = load i32, ptr %148, align 8, !tbaa !28
  %150 = sext i32 %149 to i64
  %151 = call i64 @jround_up(i64 noundef %146, i64 noundef %150)
  %152 = trunc i64 %151 to i32
  %153 = load ptr, ptr %6, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.jpeg_component_info, ptr %153, i32 0, i32 2
  %155 = load i32, ptr %154, align 8, !tbaa !28
  %156 = call ptr %131(ptr noundef %132, i32 noundef 1, i8 noundef zeroext 0, i32 noundef %142, i32 noundef %152, i32 noundef %155)
  %157 = load ptr, ptr %5, align 8, !tbaa !5
  %158 = load i32, ptr %7, align 4, !tbaa !23
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds ptr, ptr %157, i64 %159
  store ptr %156, ptr %160, align 8, !tbaa !5
  br label %161

161:                                              ; preds = %120
  %162 = load i32, ptr %7, align 4, !tbaa !23
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %7, align 4, !tbaa !23
  br label %114, !llvm.loop !33

164:                                              ; preds = %114
  br label %165

165:                                              ; preds = %164, %100, %36, %32
  %166 = load ptr, ptr %5, align 8, !tbaa !5
  %167 = load ptr, ptr %4, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.jpeg_transform_info, ptr %167, i32 0, i32 4
  store ptr %166, ptr %168, align 8, !tbaa !34
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  ret void
}

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

declare i64 @jround_up(i64 noundef, i64 noundef) #2

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 5}
!10 = !{!"", !11, i64 0, !7, i64 4, !7, i64 5, !11, i64 8, !6, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !11, i64 60}
!13 = !{!"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 314, !7, i64 330, !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, !7, i64 362, !6, i64 368, !11, i64 376, !11, i64 380, !11, i64 384, !11, i64 388, !6, i64 392, !11, i64 400, !7, i64 408, !11, i64 440, !11, i64 444, !11, i64 448, !7, i64 452, !11, i64 492, !11, i64 496, !11, i64 500, !11, i64 504, !11, i64 508, !6, i64 512, !6, i64 520, !6, i64 528, !6, i64 536, !6, i64 544, !6, i64 552, !6, i64 560, !6, i64 568, !6, i64 576, !6, i64 584, !6, i64 592}
!14 = !{!"double", !7, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = !{!13, !11, i64 56}
!17 = !{!10, !11, i64 8}
!18 = !{!10, !11, i64 0}
!19 = !{!13, !6, i64 8}
!20 = !{!21, !6, i64 0}
!21 = !{!"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, !22, i64 88, !22, i64 96}
!22 = !{!"long", !7, i64 0}
!23 = !{!11, !11, i64 0}
!24 = !{!13, !6, i64 288}
!25 = !{!21, !6, i64 40}
!26 = !{!27, !11, i64 28}
!27 = !{!"", !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, !7, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !6, i64 80, !6, i64 88}
!28 = !{!27, !11, i64 8}
!29 = !{!27, !11, i64 32}
!30 = !{!27, !11, i64 12}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}
!34 = !{!10, !6, i64 16}


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

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

; Function Attrs: nounwind uwtable
define dso_local void @jtransform_request_workspace(ptr noundef %0, ptr nocapture noundef %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %1, i64 5
  %4 = load i8, ptr %3, align 1, !tbaa !5
  %.not = icmp eq i8 %4, 0
  br i1 %.not, label %15, label %5

5:                                                ; preds = %2
  %6 = getelementptr inbounds i8, ptr %0, i64 60
  %7 = load i32, ptr %6, align 4, !tbaa !11
  %8 = icmp eq i32 %7, 3
  br i1 %8, label %9, label %15

9:                                                ; preds = %5
  %10 = getelementptr inbounds i8, ptr %0, i64 56
  %11 = load i32, ptr %10, align 8, !tbaa !15
  %12 = icmp eq i32 %11, 3
  br i1 %12, label %13, label %15

13:                                               ; preds = %9
  %14 = getelementptr inbounds i8, ptr %1, i64 8
  store i32 1, ptr %14, align 8, !tbaa !16
  br label %21

15:                                               ; preds = %9, %5, %2
  %16 = getelementptr inbounds i8, ptr %0, i64 56
  %17 = load i32, ptr %16, align 8, !tbaa !15
  %18 = getelementptr inbounds i8, ptr %1, i64 8
  store i32 %17, ptr %18, align 8, !tbaa !16
  %19 = sext i32 %17 to i64
  %20 = shl nsw i64 %19, 3
  br label %21

21:                                               ; preds = %15, %13
  %22 = phi i64 [ %20, %15 ], [ 8, %13 ]
  %23 = load i32, ptr %1, align 8, !tbaa !17
  switch i32 %23, label %.loopexit [
    i32 7, label %61
    i32 5, label %61
    i32 2, label %24
    i32 6, label %24
    i32 3, label %61
    i32 4, label %61
  ]

24:                                               ; preds = %21, %21
  %25 = getelementptr inbounds i8, ptr %0, i64 8
  %26 = load ptr, ptr %25, align 8, !tbaa !18
  %27 = load ptr, ptr %26, align 8, !tbaa !19
  %28 = getelementptr inbounds i8, ptr %1, i64 8
  %29 = tail call ptr %27(ptr noundef nonnull %0, i32 noundef 1, i64 noundef %22) #2
  %30 = load i32, ptr %28, align 8, !tbaa !16
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %24
  %32 = getelementptr inbounds i8, ptr %0, i64 288
  br label %33

33:                                               ; preds = %.lr.ph, %33
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %33 ]
  %34 = load ptr, ptr %32, align 8, !tbaa !22
  %35 = getelementptr inbounds %struct.jpeg_component_info, ptr %34, i64 %indvars.iv
  %36 = load ptr, ptr %25, align 8, !tbaa !18
  %37 = getelementptr inbounds i8, ptr %36, i64 40
  %38 = load ptr, ptr %37, align 8, !tbaa !23
  %39 = getelementptr inbounds i8, ptr %35, i64 28
  %40 = load i32, ptr %39, align 4, !tbaa !24
  %41 = zext i32 %40 to i64
  %42 = getelementptr inbounds i8, ptr %35, i64 8
  %43 = load i32, ptr %42, align 8, !tbaa !26
  %44 = sext i32 %43 to i64
  %45 = tail call i64 @jround_up(i64 noundef %41, i64 noundef %44) #2
  %46 = trunc i64 %45 to i32
  %47 = getelementptr inbounds i8, ptr %35, i64 32
  %48 = load i32, ptr %47, align 8, !tbaa !27
  %49 = zext i32 %48 to i64
  %50 = getelementptr inbounds i8, ptr %35, i64 12
  %51 = load i32, ptr %50, align 4, !tbaa !28
  %52 = sext i32 %51 to i64
  %53 = tail call i64 @jround_up(i64 noundef %49, i64 noundef %52) #2
  %54 = trunc i64 %53 to i32
  %55 = load i32, ptr %50, align 4, !tbaa !28
  %56 = tail call ptr %38(ptr noundef nonnull %0, i32 noundef 1, i8 noundef zeroext 0, i32 noundef %46, i32 noundef %54, i32 noundef %55) #2
  %57 = getelementptr inbounds ptr, ptr %29, i64 %indvars.iv
  store ptr %56, ptr %57, align 8, !tbaa !29
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %58 = load i32, ptr %28, align 8, !tbaa !16
  %59 = sext i32 %58 to i64
  %60 = icmp slt i64 %indvars.iv.next, %59
  br i1 %60, label %33, label %.loopexit, !llvm.loop !30

61:                                               ; preds = %21, %21, %21, %21
  %62 = getelementptr inbounds i8, ptr %0, i64 8
  %63 = load ptr, ptr %62, align 8, !tbaa !18
  %64 = load ptr, ptr %63, align 8, !tbaa !19
  %65 = getelementptr inbounds i8, ptr %1, i64 8
  %66 = tail call ptr %64(ptr noundef nonnull %0, i32 noundef 1, i64 noundef %22) #2
  %67 = load i32, ptr %65, align 8, !tbaa !16
  %68 = icmp sgt i32 %67, 0
  br i1 %68, label %.lr.ph46, label %.loopexit

.lr.ph46:                                         ; preds = %61
  %69 = getelementptr inbounds i8, ptr %0, i64 288
  br label %70

70:                                               ; preds = %.lr.ph46, %70
  %indvars.iv49 = phi i64 [ 0, %.lr.ph46 ], [ %indvars.iv.next50, %70 ]
  %71 = load ptr, ptr %69, align 8, !tbaa !22
  %72 = getelementptr inbounds %struct.jpeg_component_info, ptr %71, i64 %indvars.iv49
  %73 = load ptr, ptr %62, align 8, !tbaa !18
  %74 = getelementptr inbounds i8, ptr %73, i64 40
  %75 = load ptr, ptr %74, align 8, !tbaa !23
  %76 = getelementptr inbounds i8, ptr %72, i64 32
  %77 = load i32, ptr %76, align 8, !tbaa !27
  %78 = zext i32 %77 to i64
  %79 = getelementptr inbounds i8, ptr %72, i64 12
  %80 = load i32, ptr %79, align 4, !tbaa !28
  %81 = sext i32 %80 to i64
  %82 = tail call i64 @jround_up(i64 noundef %78, i64 noundef %81) #2
  %83 = trunc i64 %82 to i32
  %84 = getelementptr inbounds i8, ptr %72, i64 28
  %85 = load i32, ptr %84, align 4, !tbaa !24
  %86 = zext i32 %85 to i64
  %87 = getelementptr inbounds i8, ptr %72, i64 8
  %88 = load i32, ptr %87, align 8, !tbaa !26
  %89 = sext i32 %88 to i64
  %90 = tail call i64 @jround_up(i64 noundef %86, i64 noundef %89) #2
  %91 = trunc i64 %90 to i32
  %92 = load i32, ptr %87, align 8, !tbaa !26
  %93 = tail call ptr %75(ptr noundef nonnull %0, i32 noundef 1, i8 noundef zeroext 0, i32 noundef %83, i32 noundef %91, i32 noundef %92) #2
  %94 = getelementptr inbounds ptr, ptr %66, i64 %indvars.iv49
  store ptr %93, ptr %94, align 8, !tbaa !29
  %indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 1
  %95 = load i32, ptr %65, align 8, !tbaa !16
  %96 = sext i32 %95 to i64
  %97 = icmp slt i64 %indvars.iv.next50, %96
  br i1 %97, label %70, label %.loopexit, !llvm.loop !32

.loopexit:                                        ; preds = %33, %70, %24, %61, %21
  %.042 = phi ptr [ null, %21 ], [ %66, %61 ], [ %29, %24 ], [ %66, %70 ], [ %29, %33 ]
  %98 = getelementptr inbounds i8, ptr %1, i64 16
  store ptr %.042, ptr %98, align 8, !tbaa !33
  ret void
}

declare i64 @jround_up(i64 noundef, i64 noundef) local_unnamed_addr #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 = { "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 5}
!6 = !{!"", !7, i64 0, !8, i64 4, !8, i64 5, !7, i64 8, !10, i64 16}
!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 60}
!12 = !{!"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 314, !8, i64 330, !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, !8, i64 362, !10, i64 368, !7, i64 376, !7, i64 380, !7, i64 384, !7, i64 388, !10, i64 392, !7, i64 400, !8, i64 408, !7, i64 440, !7, i64 444, !7, i64 448, !8, i64 452, !7, i64 492, !7, i64 496, !7, i64 500, !7, i64 504, !7, i64 508, !10, i64 512, !10, i64 520, !10, i64 528, !10, i64 536, !10, i64 544, !10, i64 552, !10, i64 560, !10, i64 568, !10, i64 576, !10, i64 584, !10, i64 592}
!13 = !{!"double", !8, i64 0}
!14 = !{!"short", !8, i64 0}
!15 = !{!12, !7, i64 56}
!16 = !{!6, !7, i64 8}
!17 = !{!6, !7, i64 0}
!18 = !{!12, !10, i64 8}
!19 = !{!20, !10, i64 0}
!20 = !{!"jpeg_memory_mgr", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !21, i64 88, !21, i64 96}
!21 = !{!"long", !8, i64 0}
!22 = !{!12, !10, i64 288}
!23 = !{!20, !10, i64 40}
!24 = !{!25, !7, i64 28}
!25 = !{!"", !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, !8, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !10, i64 80, !10, i64 88}
!26 = !{!25, !7, i64 8}
!27 = !{!25, !7, i64 32}
!28 = !{!25, !7, i64 12}
!29 = !{!10, !10, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = !{!6, !10, i64 16}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass