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

; 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_destination_mgr = type { ptr, i64, ptr, ptr, ptr }
%struct.my_mem_destination_mgr = type { %struct.jpeg_destination_mgr, ptr, ptr, ptr, ptr, 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_mem_dest_internal(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %10 = load ptr, ptr %6, align 8, !tbaa !5
  %11 = icmp eq ptr %10, null
  br i1 %11, label %15, label %12

12:                                               ; preds = %4
  %13 = load ptr, ptr %7, align 8, !tbaa !5
  %14 = icmp eq ptr %13, null
  br i1 %14, label %15, label %26

15:                                               ; preds = %12, %4
  %16 = load ptr, ptr %5, 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 !11
  %19 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %18, i32 0, i32 5
  store i32 23, ptr %19, align 8, !tbaa !15
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %20, i32 0, i32 0
  %22 = load ptr, ptr %21, align 8, !tbaa !11
  %23 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %22, i32 0, i32 0
  %24 = load ptr, ptr %23, align 8, !tbaa !18
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  call void %24(ptr noundef %25)
  br label %26

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

31:                                               ; preds = %26
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %32, i32 0, i32 1
  %34 = load ptr, ptr %33, align 8, !tbaa !20
  %35 = getelementptr inbounds %struct.jpeg_memory_mgr, ptr %34, i32 0, i32 0
  %36 = load ptr, ptr %35, align 8, !tbaa !21
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = load i32, ptr %8, align 4, !tbaa !9
  %39 = call ptr %36(ptr noundef %37, i32 noundef %38, i64 noundef 80)
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %40, i32 0, i32 6
  store ptr %39, ptr %41, align 8, !tbaa !19
  br label %61

42:                                               ; preds = %26
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %43, i32 0, i32 6
  %45 = load ptr, ptr %44, align 8, !tbaa !19
  %46 = getelementptr inbounds %struct.jpeg_destination_mgr, ptr %45, i32 0, i32 2
  %47 = load ptr, ptr %46, align 8, !tbaa !23
  %48 = icmp ne ptr %47, @init_mem_destination
  br i1 %48, label %49, label %60

49:                                               ; preds = %42
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %50, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8, !tbaa !11
  %53 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %52, i32 0, i32 5
  store i32 23, ptr %53, align 8, !tbaa !15
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %54, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8, !tbaa !11
  %57 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %56, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8, !tbaa !18
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  call void %58(ptr noundef %59)
  br label %60

60:                                               ; preds = %49, %42
  br label %61

61:                                               ; preds = %60, %31
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %62, i32 0, i32 6
  %64 = load ptr, ptr %63, align 8, !tbaa !19
  store ptr %64, ptr %9, align 8, !tbaa !5
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.my_mem_destination_mgr, ptr %65, i32 0, i32 0
  %67 = getelementptr inbounds %struct.jpeg_destination_mgr, ptr %66, i32 0, i32 2
  store ptr @init_mem_destination, ptr %67, align 8, !tbaa !25
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.my_mem_destination_mgr, ptr %68, i32 0, i32 0
  %70 = getelementptr inbounds %struct.jpeg_destination_mgr, ptr %69, i32 0, i32 3
  store ptr @empty_mem_output_buffer, ptr %70, align 8, !tbaa !27
  %71 = load ptr, ptr %9, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.my_mem_destination_mgr, ptr %71, i32 0, i32 0
  %73 = getelementptr inbounds %struct.jpeg_destination_mgr, ptr %72, i32 0, i32 4
  store ptr @term_mem_destination, ptr %73, align 8, !tbaa !28
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.my_mem_destination_mgr, ptr %75, i32 0, i32 1
  store ptr %74, ptr %76, align 8, !tbaa !29
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.my_mem_destination_mgr, ptr %78, i32 0, i32 2
  store ptr %77, ptr %79, align 8, !tbaa !30
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.my_mem_destination_mgr, ptr %80, i32 0, i32 3
  store ptr null, ptr %81, align 8, !tbaa !31
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = load ptr, ptr %82, align 8, !tbaa !5
  %84 = icmp eq ptr %83, null
  br i1 %84, label %89, label %85

85:                                               ; preds = %61
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = load i64, ptr %86, align 8, !tbaa !32
  %88 = icmp eq i64 %87, 0
  br i1 %88, label %89, label %116

89:                                               ; preds = %85, %61
  %90 = call noalias ptr @malloc(i64 noundef 4096) #4
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %90, ptr %91, align 8, !tbaa !5
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.my_mem_destination_mgr, ptr %92, i32 0, i32 3
  store ptr %90, ptr %93, align 8, !tbaa !31
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.my_mem_destination_mgr, ptr %94, i32 0, i32 3
  %96 = load ptr, ptr %95, align 8, !tbaa !31
  %97 = icmp eq ptr %96, null
  br i1 %97, label %98, label %114

98:                                               ; preds = %89
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !11
  %102 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %101, i32 0, i32 5
  store i32 54, ptr %102, align 8, !tbaa !15
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %103, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8, !tbaa !11
  %106 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %105, i32 0, i32 6
  %107 = getelementptr inbounds [8 x i32], ptr %106, i64 0, i64 0
  store i32 10, ptr %107, align 4, !tbaa !33
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.jpeg_compress_struct, ptr %108, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8, !tbaa !11
  %111 = getelementptr inbounds %struct.jpeg_error_mgr, ptr %110, i32 0, i32 0
  %112 = load ptr, ptr %111, align 8, !tbaa !18
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  call void %112(ptr noundef %113)
  br label %114

114:                                              ; preds = %98, %89
  %115 = load ptr, ptr %7, align 8, !tbaa !5
  store i64 4096, ptr %115, align 8, !tbaa !32
  br label %116

116:                                              ; preds = %114, %85
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = load ptr, ptr %117, align 8, !tbaa !5
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.my_mem_destination_mgr, ptr %119, i32 0, i32 4
  store ptr %118, ptr %120, align 8, !tbaa !34
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.my_mem_destination_mgr, ptr %121, i32 0, i32 0
  %123 = getelementptr inbounds %struct.jpeg_destination_mgr, ptr %122, i32 0, i32 0
  store ptr %118, ptr %123, align 8, !tbaa !35
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  %125 = load i64, ptr %124, align 8, !tbaa !32
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.my_mem_destination_mgr, ptr %126, i32 0, i32 5
  store i64 %125, ptr %127, align 8, !tbaa !36
  %128 = load ptr, ptr %9, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.my_mem_destination_mgr, ptr %128, i32 0, i32 0
  %130 = getelementptr inbounds %struct.jpeg_destination_mgr, ptr %129, i32 0, i32 1
  store i64 %125, ptr %130, align 8, !tbaa !37
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  ret void
}

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

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

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

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 allocsize(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 #3 = { nounwind }
attributes #4 = { nounwind allocsize(0) }

!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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"jpeg_compress_struct", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !10, i64 36, !6, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !13, i64 64, !10, i64 72, !10, i64 76, !10, i64 80, !6, i64 88, !7, i64 96, !7, i64 128, !7, i64 160, !7, i64 192, !7, i64 208, !7, i64 224, !10, i64 240, !6, 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, !7, i64 292, !7, i64 293, !7, i64 294, !14, i64 296, !14, i64 298, !10, i64 300, !10, i64 304, !10, i64 308, !10, i64 312, !10, i64 316, !10, i64 320, !10, i64 324, !7, i64 328, !10, i64 360, !10, i64 364, !10, i64 368, !7, i64 372, !10, i64 412, !10, i64 416, !10, i64 420, !10, 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, !10, i64 512}
!13 = !{!"double", !7, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!16, !10, i64 40}
!16 = !{!"jpeg_error_mgr", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !7, i64 44, !10, i64 124, !17, i64 128, !6, i64 136, !10, i64 144, !6, i64 152, !10, i64 160, !10, i64 164}
!17 = !{!"long", !7, i64 0}
!18 = !{!16, !6, i64 0}
!19 = !{!12, !6, i64 40}
!20 = !{!12, !6, i64 8}
!21 = !{!22, !6, i64 0}
!22 = !{!"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}
!23 = !{!24, !6, i64 16}
!24 = !{!"jpeg_destination_mgr", !6, i64 0, !17, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!25 = !{!26, !6, i64 16}
!26 = !{!"", !24, i64 0, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !17, i64 72}
!27 = !{!26, !6, i64 24}
!28 = !{!26, !6, i64 32}
!29 = !{!26, !6, i64 40}
!30 = !{!26, !6, i64 48}
!31 = !{!26, !6, i64 56}
!32 = !{!17, !17, i64 0}
!33 = !{!7, !7, i64 0}
!34 = !{!26, !6, i64 64}
!35 = !{!26, !6, i64 0}
!36 = !{!26, !17, i64 72}
!37 = !{!26, !17, i64 8}


; 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_mem_dest_internal(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = icmp eq ptr %1, null
  %6 = icmp eq ptr %2, null
  %or.cond = or i1 %5, %6
  br i1 %or.cond, label %7, label %11

7:                                                ; preds = %4
  %8 = load ptr, ptr %0, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %8, i64 40
  store i32 23, ptr %9, align 8, !tbaa !13
  %10 = load ptr, ptr %8, align 8, !tbaa !16
  tail call void %10(ptr noundef nonnull %0) #2
  br label %11

11:                                               ; preds = %4, %7
  %12 = getelementptr inbounds i8, ptr %0, i64 40
  %13 = load ptr, ptr %12, align 8, !tbaa !17
  %14 = icmp eq ptr %13, null
  br i1 %14, label %15, label %20

15:                                               ; preds = %11
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  %17 = load ptr, ptr %16, align 8, !tbaa !18
  %18 = load ptr, ptr %17, align 8, !tbaa !19
  %19 = tail call ptr %18(ptr noundef nonnull %0, i32 noundef %3, i64 noundef 80) #2
  store ptr %19, ptr %12, align 8, !tbaa !17
  br label %27

20:                                               ; preds = %11
  %21 = getelementptr inbounds i8, ptr %13, i64 16
  %22 = load ptr, ptr %21, align 8, !tbaa !21
  %.not = icmp eq ptr %22, @init_mem_destination
  br i1 %.not, label %27, label %23

23:                                               ; preds = %20
  %24 = load ptr, ptr %0, align 8, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %24, i64 40
  store i32 23, ptr %25, align 8, !tbaa !13
  %26 = load ptr, ptr %24, align 8, !tbaa !16
  tail call void %26(ptr noundef nonnull %0) #2
  %.pre = load ptr, ptr %12, align 8, !tbaa !17
  br label %27

27:                                               ; preds = %20, %23, %15
  %28 = phi ptr [ %13, %20 ], [ %.pre, %23 ], [ %19, %15 ]
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  store ptr @init_mem_destination, ptr %29, align 8, !tbaa !23
  %30 = getelementptr inbounds i8, ptr %28, i64 24
  store ptr @empty_mem_output_buffer, ptr %30, align 8, !tbaa !25
  %31 = getelementptr inbounds i8, ptr %28, i64 32
  store ptr @term_mem_destination, ptr %31, align 8, !tbaa !26
  %32 = getelementptr inbounds i8, ptr %28, i64 40
  store ptr %1, ptr %32, align 8, !tbaa !27
  %33 = getelementptr inbounds i8, ptr %28, i64 48
  store ptr %2, ptr %33, align 8, !tbaa !28
  %34 = getelementptr inbounds i8, ptr %28, i64 56
  store ptr null, ptr %34, align 8, !tbaa !29
  %35 = load ptr, ptr %1, align 8, !tbaa !30
  %36 = icmp eq ptr %35, null
  br i1 %36, label %40, label %37

37:                                               ; preds = %27
  %38 = load i64, ptr %2, align 8, !tbaa !31
  %39 = icmp eq i64 %38, 0
  br i1 %39, label %40, label %50

40:                                               ; preds = %37, %27
  %41 = tail call noalias dereferenceable_or_null(4096) ptr @malloc(i64 noundef 4096) #3
  store ptr %41, ptr %1, align 8, !tbaa !30
  store ptr %41, ptr %34, align 8, !tbaa !29
  %42 = icmp eq ptr %41, null
  br i1 %42, label %43, label %49

43:                                               ; preds = %40
  %44 = load ptr, ptr %0, align 8, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %44, i64 40
  store i32 54, ptr %45, align 8, !tbaa !13
  %46 = getelementptr inbounds i8, ptr %44, i64 44
  store i32 10, ptr %46, align 4, !tbaa !32
  %47 = load ptr, ptr %0, align 8, !tbaa !5
  %48 = load ptr, ptr %47, align 8, !tbaa !16
  tail call void %48(ptr noundef nonnull %0) #2
  br label %49

49:                                               ; preds = %43, %40
  store i64 4096, ptr %2, align 8, !tbaa !31
  %.pre39 = load ptr, ptr %1, align 8, !tbaa !30
  br label %50

50:                                               ; preds = %49, %37
  %51 = phi i64 [ 4096, %49 ], [ %38, %37 ]
  %52 = phi ptr [ %.pre39, %49 ], [ %35, %37 ]
  %53 = getelementptr inbounds i8, ptr %28, i64 64
  store ptr %52, ptr %53, align 8, !tbaa !33
  store ptr %52, ptr %28, align 8, !tbaa !34
  %54 = getelementptr inbounds i8, ptr %28, i64 72
  store i64 %51, ptr %54, align 8, !tbaa !35
  %55 = getelementptr inbounds i8, ptr %28, i64 8
  store i64 %51, ptr %55, align 8, !tbaa !36
  ret void
}

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 }
attributes #3 = { nounwind allocsize(0) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!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 = !{!14, !10, i64 40}
!14 = !{!"jpeg_error_mgr", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !8, i64 44, !10, i64 124, !15, i64 128, !7, i64 136, !10, i64 144, !7, i64 152, !10, i64 160, !10, i64 164}
!15 = !{!"long", !8, i64 0}
!16 = !{!14, !7, i64 0}
!17 = !{!6, !7, i64 40}
!18 = !{!6, !7, i64 8}
!19 = !{!20, !7, i64 0}
!20 = !{!"jpeg_memory_mgr", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !15, i64 88, !15, i64 96}
!21 = !{!22, !7, i64 16}
!22 = !{!"jpeg_destination_mgr", !7, i64 0, !15, i64 8, !7, i64 16, !7, i64 24, !7, i64 32}
!23 = !{!24, !7, i64 16}
!24 = !{!"", !22, i64 0, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !15, i64 72}
!25 = !{!24, !7, i64 24}
!26 = !{!24, !7, i64 32}
!27 = !{!24, !7, i64 40}
!28 = !{!24, !7, i64 48}
!29 = !{!24, !7, i64 56}
!30 = !{!7, !7, i64 0}
!31 = !{!15, !15, i64 0}
!32 = !{!8, !8, i64 0}
!33 = !{!24, !7, i64 64}
!34 = !{!24, !7, i64 0}
!35 = !{!24, !15, i64 72}
!36 = !{!24, !15, i64 8}


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