; LLVM IR from NVIDIA/DALI :: dali/core/mm/default_resources.ll (ZN4dali2mm19ReleaseUnusedMemoryEv)

; 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.dali::mm::(anonymous namespace)::DefaultResources" = type { %"class.std::shared_ptr", %"class.std::shared_ptr.0", %"class.std::shared_ptr.6", %"class.std::unique_ptr", i32, %"class.std::mutex" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.0" = type { %"class.std::__shared_ptr.1" }
%"class.std::__shared_ptr.1" = type { ptr, %"class.std::__shared_count" }
%"class.std::shared_ptr.6" = type { %"class.std::__shared_ptr.7" }
%"class.std::__shared_ptr.7" = type { ptr, %"class.std::__shared_count" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.10" }
%"struct.std::_Head_base.10" = type { ptr }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::shared_ptr.3" = type { %"class.std::__shared_ptr.4" }
%"class.std::__shared_ptr.4" = type { ptr, %"class.std::__shared_count" }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt12__shared_ptrIN4dali13cuda_for_dali15memory_resourceINS1_11memory_kind4hostEEELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt12__shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS1_11memory_kind6pinnedEEELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt12__shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS1_11memory_kind6deviceEEELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(104) ptr @_ZN4dali2mm12_GLOBAL__N_116DefaultResources8instanceEv() #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali2mm19ReleaseUnusedMemoryEv() #2 {
  %1 = alloca ptr, align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #3
  %4 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZN4dali2mm12_GLOBAL__N_116DefaultResources8instanceEv()
  %5 = getelementptr inbounds %"struct.dali::mm::(anonymous namespace)::DefaultResources", ptr %4, i32 0, i32 3
  %6 = call noundef ptr @_ZNKSt10unique_ptrIA_St10shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS2_11memory_kind6deviceEEEESt14default_deleteIS8_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #3
  store ptr %6, ptr %1, align 8, !tbaa !5
  %7 = load ptr, ptr %1, align 8, !tbaa !5
  %8 = icmp ne ptr %7, null
  br i1 %8, label %9, label %36

9:                                                ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  store i32 0, ptr %2, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  %10 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZN4dali2mm12_GLOBAL__N_116DefaultResources8instanceEv()
  %11 = getelementptr inbounds %"struct.dali::mm::(anonymous namespace)::DefaultResources", ptr %10, i32 0, i32 4
  %12 = load i32, ptr %11, align 8, !tbaa !11
  store i32 %12, ptr %3, align 4, !tbaa !9
  br label %13

13:                                               ; preds = %32, %9
  %14 = load i32, ptr %2, align 4, !tbaa !9
  %15 = load i32, ptr %3, align 4, !tbaa !9
  %16 = icmp slt i32 %14, %15
  br i1 %16, label %18, label %17

17:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  br label %35

18:                                               ; preds = %13
  %19 = load ptr, ptr %1, align 8, !tbaa !5
  %20 = load i32, ptr %2, align 4, !tbaa !9
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds %"class.std::shared_ptr.3", ptr %19, i64 %21
  %23 = call noundef ptr @_ZNKSt12__shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS1_11memory_kind6deviceEEELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %22) #3
  %24 = icmp eq ptr %23, null
  br i1 %24, label %30, label %25

25:                                               ; preds = %18
  %26 = load ptr, ptr %23, align 8, !tbaa !28
  %27 = getelementptr i8, ptr %26, i64 -80
  %28 = load i64, ptr %27, align 8
  %29 = getelementptr inbounds i8, ptr %23, i64 %28
  br label %30

30:                                               ; preds = %25, %18
  %31 = phi ptr [ %29, %25 ], [ null, %18 ]
  call void @_ZN4dali2mm19ReleaseUnusedMemoryINS_13cuda_for_dali11memory_kind6deviceEEEvPNS2_15memory_resourceIT_EE(ptr noundef %31)
  br label %32

32:                                               ; preds = %30
  %33 = load i32, ptr %2, align 4, !tbaa !9
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %2, align 4, !tbaa !9
  br label %13, !llvm.loop !30

35:                                               ; preds = %17
  br label %36

36:                                               ; preds = %35, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #3
  %37 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZN4dali2mm12_GLOBAL__N_116DefaultResources8instanceEv()
  %38 = getelementptr inbounds %"struct.dali::mm::(anonymous namespace)::DefaultResources", ptr %37, i32 0, i32 1
  %39 = call noundef ptr @_ZNKSt12__shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS1_11memory_kind6pinnedEEELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %38) #3
  %40 = icmp eq ptr %39, null
  br i1 %40, label %46, label %41

41:                                               ; preds = %36
  %42 = load ptr, ptr %39, align 8, !tbaa !28
  %43 = getelementptr i8, ptr %42, i64 -80
  %44 = load i64, ptr %43, align 8
  %45 = getelementptr inbounds i8, ptr %39, i64 %44
  br label %46

46:                                               ; preds = %41, %36
  %47 = phi ptr [ %45, %41 ], [ null, %36 ]
  call void @_ZN4dali2mm19ReleaseUnusedMemoryINS_13cuda_for_dali11memory_kind6pinnedEEEvPNS2_15memory_resourceIT_EE(ptr noundef %47)
  %48 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZN4dali2mm12_GLOBAL__N_116DefaultResources8instanceEv()
  %49 = getelementptr inbounds %"struct.dali::mm::(anonymous namespace)::DefaultResources", ptr %48, i32 0, i32 0
  %50 = call noundef ptr @_ZNKSt12__shared_ptrIN4dali13cuda_for_dali15memory_resourceINS1_11memory_kind4hostEEELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %49) #3
  call void @_ZN4dali2mm19ReleaseUnusedMemoryINS_13cuda_for_dali11memory_kind4hostEEEvPNS2_15memory_resourceIT_EE(ptr noundef %50)
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt10unique_ptrIA_St10shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS2_11memory_kind6deviceEEEESt14default_deleteIS8_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali2mm19ReleaseUnusedMemoryINS_13cuda_for_dali11memory_kind6deviceEEEvPNS2_15memory_resourceIT_EE(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali2mm19ReleaseUnusedMemoryINS_13cuda_for_dali11memory_kind6pinnedEEEvPNS2_15memory_resourceIT_EE(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali2mm19ReleaseUnusedMemoryINS_13cuda_for_dali11memory_kind4hostEEEvPNS2_15memory_resourceIT_EE(ptr noundef) #2

attributes #0 = { mustprogress 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 = { mustprogress 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 #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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 56}
!12 = !{!"_ZTSN4dali2mm12_GLOBAL__N_116DefaultResourcesE", !13, i64 0, !16, i64 16, !18, i64 32, !20, i64 48, !10, i64 56, !26, i64 64}
!13 = !{!"_ZTSSt10shared_ptrIN4dali13cuda_for_dali15memory_resourceINS1_11memory_kind4hostEEEE", !14, i64 0}
!14 = !{!"_ZTSSt12__shared_ptrIN4dali13cuda_for_dali15memory_resourceINS1_11memory_kind4hostEEELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !15, i64 8}
!15 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!16 = !{!"_ZTSSt10shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS1_11memory_kind6pinnedEEEE", !17, i64 0}
!17 = !{!"_ZTSSt12__shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS1_11memory_kind6pinnedEEELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !15, i64 8}
!18 = !{!"_ZTSSt10shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS1_11memory_kind7managedEEEE", !19, i64 0}
!19 = !{!"_ZTSSt12__shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS1_11memory_kind7managedEEELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !15, i64 8}
!20 = !{!"_ZTSSt10unique_ptrIA_St10shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS2_11memory_kind6deviceEEEESt14default_deleteIS8_EE", !21, i64 0}
!21 = !{!"_ZTSSt15__uniq_ptr_dataISt10shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS2_11memory_kind6deviceEEEESt14default_deleteIA_S7_ELb1ELb1EE", !22, i64 0}
!22 = !{!"_ZTSSt15__uniq_ptr_implISt10shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS2_11memory_kind6deviceEEEESt14default_deleteIA_S7_EE", !23, i64 0}
!23 = !{!"_ZTSSt5tupleIJPSt10shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS2_11memory_kind6deviceEEEESt14default_deleteIA_S7_EEE", !24, i64 0}
!24 = !{!"_ZTSSt11_Tuple_implILm0EJPSt10shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS2_11memory_kind6deviceEEEESt14default_deleteIA_S7_EEE", !25, i64 0}
!25 = !{!"_ZTSSt10_Head_baseILm0EPSt10shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS2_11memory_kind6deviceEEEELb0EE", !6, i64 0}
!26 = !{!"_ZTSSt5mutex", !27, i64 0}
!27 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!28 = !{!29, !29, i64 0}
!29 = !{!"vtable pointer", !8, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}


; 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"

%"class.std::shared_ptr.3" = type { %"class.std::__shared_ptr.4" }
%"class.std::__shared_ptr.4" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt12__shared_ptrIN4dali13cuda_for_dali15memory_resourceINS1_11memory_kind4hostEEELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt12__shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS1_11memory_kind6pinnedEEELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt12__shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS1_11memory_kind6deviceEEELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(104) ptr @_ZN4dali2mm12_GLOBAL__N_116DefaultResources8instanceEv() local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali2mm19ReleaseUnusedMemoryEv() local_unnamed_addr #1 {
  %1 = tail call noundef nonnull align 8 dereferenceable(104) ptr @_ZN4dali2mm12_GLOBAL__N_116DefaultResources8instanceEv()
  %2 = getelementptr inbounds i8, ptr %1, i64 48
  %3 = tail call noundef ptr @_ZNKSt10unique_ptrIA_St10shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS2_11memory_kind6deviceEEEESt14default_deleteIS8_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #2
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %.loopexit, label %4

4:                                                ; preds = %0
  %5 = tail call noundef nonnull align 8 dereferenceable(104) ptr @_ZN4dali2mm12_GLOBAL__N_116DefaultResources8instanceEv()
  %6 = getelementptr inbounds i8, ptr %5, i64 56
  %7 = load i32, ptr %6, align 8, !tbaa !5
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph.preheader, label %.loopexit

.lr.ph.preheader:                                 ; preds = %4
  %wide.trip.count = zext nneg i32 %7 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %17
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %17 ]
  %9 = getelementptr inbounds %"class.std::shared_ptr.3", ptr %3, i64 %indvars.iv
  %10 = tail call noundef ptr @_ZNKSt12__shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS1_11memory_kind6deviceEEELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %9) #2
  %11 = icmp eq ptr %10, null
  br i1 %11, label %17, label %12

12:                                               ; preds = %.lr.ph
  %13 = load ptr, ptr %10, align 8, !tbaa !26
  %14 = getelementptr i8, ptr %13, i64 -80
  %15 = load i64, ptr %14, align 8
  %16 = getelementptr inbounds i8, ptr %10, i64 %15
  br label %17

17:                                               ; preds = %12, %.lr.ph
  %18 = phi ptr [ %16, %12 ], [ null, %.lr.ph ]
  tail call void @_ZN4dali2mm19ReleaseUnusedMemoryINS_13cuda_for_dali11memory_kind6deviceEEEvPNS2_15memory_resourceIT_EE(ptr noundef %18)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !28

.loopexit:                                        ; preds = %17, %4, %0
  %19 = tail call noundef nonnull align 8 dereferenceable(104) ptr @_ZN4dali2mm12_GLOBAL__N_116DefaultResources8instanceEv()
  %20 = getelementptr inbounds i8, ptr %19, i64 16
  %21 = tail call noundef ptr @_ZNKSt12__shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS1_11memory_kind6pinnedEEELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %20) #2
  %22 = icmp eq ptr %21, null
  br i1 %22, label %28, label %23

23:                                               ; preds = %.loopexit
  %24 = load ptr, ptr %21, align 8, !tbaa !26
  %25 = getelementptr i8, ptr %24, i64 -80
  %26 = load i64, ptr %25, align 8
  %27 = getelementptr inbounds i8, ptr %21, i64 %26
  br label %28

28:                                               ; preds = %23, %.loopexit
  %29 = phi ptr [ %27, %23 ], [ null, %.loopexit ]
  tail call void @_ZN4dali2mm19ReleaseUnusedMemoryINS_13cuda_for_dali11memory_kind6pinnedEEEvPNS2_15memory_resourceIT_EE(ptr noundef %29)
  %30 = tail call noundef nonnull align 8 dereferenceable(104) ptr @_ZN4dali2mm12_GLOBAL__N_116DefaultResources8instanceEv()
  %31 = tail call noundef ptr @_ZNKSt12__shared_ptrIN4dali13cuda_for_dali15memory_resourceINS1_11memory_kind4hostEEELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %30) #2
  tail call void @_ZN4dali2mm19ReleaseUnusedMemoryINS_13cuda_for_dali11memory_kind4hostEEEvPNS2_15memory_resourceIT_EE(ptr noundef %31)
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt10unique_ptrIA_St10shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS2_11memory_kind6deviceEEEESt14default_deleteIS8_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali2mm19ReleaseUnusedMemoryINS_13cuda_for_dali11memory_kind6deviceEEEvPNS2_15memory_resourceIT_EE(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali2mm19ReleaseUnusedMemoryINS_13cuda_for_dali11memory_kind6pinnedEEEvPNS2_15memory_resourceIT_EE(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali2mm19ReleaseUnusedMemoryINS_13cuda_for_dali11memory_kind4hostEEEvPNS2_15memory_resourceIT_EE(ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress 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 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, !23, i64 56}
!6 = !{!"_ZTSN4dali2mm12_GLOBAL__N_116DefaultResourcesE", !7, i64 0, !13, i64 16, !15, i64 32, !17, i64 48, !23, i64 56, !24, i64 64}
!7 = !{!"_ZTSSt10shared_ptrIN4dali13cuda_for_dali15memory_resourceINS1_11memory_kind4hostEEEE", !8, i64 0}
!8 = !{!"_ZTSSt12__shared_ptrIN4dali13cuda_for_dali15memory_resourceINS1_11memory_kind4hostEEELN9__gnu_cxx12_Lock_policyE2EE", !9, i64 0, !12, i64 8}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !9, i64 0}
!13 = !{!"_ZTSSt10shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS1_11memory_kind6pinnedEEEE", !14, i64 0}
!14 = !{!"_ZTSSt12__shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS1_11memory_kind6pinnedEEELN9__gnu_cxx12_Lock_policyE2EE", !9, i64 0, !12, i64 8}
!15 = !{!"_ZTSSt10shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS1_11memory_kind7managedEEEE", !16, i64 0}
!16 = !{!"_ZTSSt12__shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS1_11memory_kind7managedEEELN9__gnu_cxx12_Lock_policyE2EE", !9, i64 0, !12, i64 8}
!17 = !{!"_ZTSSt10unique_ptrIA_St10shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS2_11memory_kind6deviceEEEESt14default_deleteIS8_EE", !18, i64 0}
!18 = !{!"_ZTSSt15__uniq_ptr_dataISt10shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS2_11memory_kind6deviceEEEESt14default_deleteIA_S7_ELb1ELb1EE", !19, i64 0}
!19 = !{!"_ZTSSt15__uniq_ptr_implISt10shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS2_11memory_kind6deviceEEEESt14default_deleteIA_S7_EE", !20, i64 0}
!20 = !{!"_ZTSSt5tupleIJPSt10shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS2_11memory_kind6deviceEEEESt14default_deleteIA_S7_EEE", !21, i64 0}
!21 = !{!"_ZTSSt11_Tuple_implILm0EJPSt10shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS2_11memory_kind6deviceEEEESt14default_deleteIA_S7_EEE", !22, i64 0}
!22 = !{!"_ZTSSt10_Head_baseILm0EPSt10shared_ptrIN4dali13cuda_for_dali30stream_ordered_memory_resourceINS2_11memory_kind6deviceEEEELb0EE", !9, i64 0}
!23 = !{!"int", !10, i64 0}
!24 = !{!"_ZTSSt5mutex", !25, i64 0}
!25 = !{!"_ZTSSt12__mutex_base", !10, i64 0}
!26 = !{!27, !27, i64 0}
!27 = !{!"vtable pointer", !11, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass