; LLVM IR from Try/Tempest :: Engine/thirdparty/openal-soft/alc (alu)

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

%"class.al::span.125" = type { ptr, i64 }
%class.FPUCtl = type <{ i32, i8, [3 x i8] }>
%"class.al::ptr_wrapper" = type { ptr }
%"class.al::ptr_wrapper.126" = type { ptr }
%"class.al::span.122" = type { ptr, i64 }
%"class.al::ptr_wrapper.127" = type { ptr }
%struct.DeviceBase = type { %"struct.std::atomic", i8, i32, i32, i32, i8, i8, i32, float, i8, i8, i8, %"class.std::__cxx11::basic_string", %"class.std::bitset.9", i8, i32, i8, float, %class.NfcFilter, %"struct.std::atomic.13", %"struct.std::atomic.15", %"class.std::chrono::duration", %"struct.std::array.16", %"struct.std::array.16", [8 x i8], %"struct.std::array.18", %"struct.std::array.19", %"struct.std::array.20", %"struct.std::array.21", %"struct.std::array.22", %"class.std::vector", %struct.MixParams, %"struct.std::array.25", %struct.RealMixParams, %"class.std::unique_ptr", %"class.al::intrusive_ptr", i32, %"class.std::unique_ptr.30", %"class.std::unique_ptr.38", %"class.std::unique_ptr.46", { i64, i64 }, %"class.std::unique_ptr.54", %"class.std::unique_ptr.62", float, i32, %"struct.std::atomic.13", %"class.al::atomic_unique_ptr", [8 x i8] }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i8 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::bitset.9" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { i64 }
%class.NfcFilter = type { %struct.NfcFilter1, %struct.NfcFilter2, %struct.NfcFilter3, %struct.NfcFilter4 }
%struct.NfcFilter1 = type { float, float, float, float, %"struct.std::array.10" }
%"struct.std::array.10" = type { [1 x float] }
%struct.NfcFilter2 = type { float, float, float, float, float, float, %"struct.std::array.11" }
%"struct.std::array.11" = type { [2 x float] }
%struct.NfcFilter3 = type { float, float, float, float, float, float, float, float, %"struct.std::array.12" }
%"struct.std::array.12" = type { [3 x float] }
%struct.NfcFilter4 = type { float, float, float, float, float, float, float, float, float, float, %"struct.std::array.0" }
%"struct.std::array.0" = type { [4 x float] }
%"struct.std::atomic.15" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }
%"struct.std::array.16" = type { [16 x %"struct.std::array.17"] }
%"struct.std::array.17" = type { [16 x float] }
%"struct.std::array.18" = type { [20480 x float] }
%"struct.std::array.19" = type { [1328 x float] }
%"struct.std::array.20" = type { [1024 x float] }
%"struct.std::array.21" = type { [1088 x float] }
%"struct.std::array.22" = type { [1152 x %"struct.std::array.11"] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::array<float, 1024>, al::allocator<std::array<float, 1024>, 16>>::_Vector_impl" }
%"struct.std::_Vector_base<std::array<float, 1024>, al::allocator<std::array<float, 1024>, 16>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::array<float, 1024>, al::allocator<std::array<float, 1024>, 16>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::array<float, 1024>, al::allocator<std::array<float, 1024>, 16>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.MixParams = type { %"struct.std::array.23", %"class.al::span.24" }
%"struct.std::array.23" = type { [16 x %struct.BFChannelConfig] }
%struct.BFChannelConfig = type { float, i32 }
%"class.al::span.24" = type { ptr, i64 }
%"struct.std::array.25" = type { [4 x i32] }
%struct.RealMixParams = type { %"class.al::span.26", %"struct.std::array.27", %"class.al::span.24" }
%"class.al::span.26" = type { ptr, i64 }
%"struct.std::array.27" = type { [36 x i8] }
%"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.29" }
%"struct.std::_Head_base.29" = type { ptr }
%"class.al::intrusive_ptr" = type { ptr }
%"class.std::unique_ptr.30" = type { %"struct.std::__uniq_ptr_data.31" }
%"struct.std::__uniq_ptr_data.31" = type { %"class.std::__uniq_ptr_impl.32" }
%"class.std::__uniq_ptr_impl.32" = type { %"class.std::tuple.33" }
%"class.std::tuple.33" = type { %"struct.std::_Tuple_impl.34" }
%"struct.std::_Tuple_impl.34" = type { %"struct.std::_Head_base.37" }
%"struct.std::_Head_base.37" = type { ptr }
%"class.std::unique_ptr.38" = type { %"struct.std::__uniq_ptr_data.39" }
%"struct.std::__uniq_ptr_data.39" = type { %"class.std::__uniq_ptr_impl.40" }
%"class.std::__uniq_ptr_impl.40" = type { %"class.std::tuple.41" }
%"class.std::tuple.41" = type { %"struct.std::_Tuple_impl.42" }
%"struct.std::_Tuple_impl.42" = type { %"struct.std::_Head_base.45" }
%"struct.std::_Head_base.45" = type { ptr }
%"class.std::unique_ptr.46" = type { %"struct.std::__uniq_ptr_data.47" }
%"struct.std::__uniq_ptr_data.47" = type { %"class.std::__uniq_ptr_impl.48" }
%"class.std::__uniq_ptr_impl.48" = type { %"class.std::tuple.49" }
%"class.std::tuple.49" = type { %"struct.std::_Tuple_impl.50" }
%"struct.std::_Tuple_impl.50" = type { %"struct.std::_Head_base.53" }
%"struct.std::_Head_base.53" = type { ptr }
%"class.std::unique_ptr.54" = type { %"struct.std::__uniq_ptr_data.55" }
%"struct.std::__uniq_ptr_data.55" = type { %"class.std::__uniq_ptr_impl.56" }
%"class.std::__uniq_ptr_impl.56" = type { %"class.std::tuple.57" }
%"class.std::tuple.57" = type { %"struct.std::_Tuple_impl.58" }
%"struct.std::_Tuple_impl.58" = type { %"struct.std::_Head_base.61" }
%"struct.std::_Head_base.61" = type { ptr }
%"class.std::unique_ptr.62" = type { %"struct.std::__uniq_ptr_data.63" }
%"struct.std::__uniq_ptr_data.63" = type { %"class.std::__uniq_ptr_impl.64" }
%"class.std::__uniq_ptr_impl.64" = type { %"class.std::tuple.65" }
%"class.std::tuple.65" = type { %"struct.std::_Tuple_impl.66" }
%"struct.std::_Tuple_impl.66" = type { %"struct.std::_Head_base.69" }
%"struct.std::_Head_base.69" = type { ptr }
%"struct.std::atomic.13" = type { %"struct.std::__atomic_base.14" }
%"struct.std::__atomic_base.14" = type { i32 }
%"class.al::atomic_unique_ptr" = type { %"struct.std::atomic.70" }
%"struct.std::atomic.70" = type { %"struct.std::__atomic_base.71" }
%"struct.std::__atomic_base.71" = type { ptr }

declare i32 @__gxx_personality_v0(...)

; 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: mustprogress uwtable
declare dso_local noundef i32 @_ZN10DeviceBase13renderSamplesEj(ptr noundef nonnull align 16 dereferenceable(107576), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10DeviceBase13renderSamplesEN2al4spanIPfLm18446744073709551615EEEj(ptr noundef nonnull align 16 dereferenceable(107576) %0, ptr %1, i64 %2, i32 noundef %3) #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.al::span.125", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %class.FPUCtl, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.al::ptr_wrapper", align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.al::ptr_wrapper.126", align 8
  %18 = alloca %"class.al::ptr_wrapper.126", align 8
  %19 = alloca ptr, align 8
  %20 = alloca %"class.al::span.122", align 8
  %21 = alloca %"class.al::span.122", align 8
  %22 = alloca %"class.al::ptr_wrapper.127", align 8
  %23 = alloca %"class.al::ptr_wrapper.127", align 8
  %24 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 0
  store ptr %1, ptr %24, align 8
  %25 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 1
  store i64 %2, ptr %25, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %3, ptr %7, align 4, !tbaa !9
  %26 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @_ZN6FPUCtlC2Ev(ptr noundef nonnull align 4 dereferenceable(5) %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %27

27:                                               ; preds = %97, %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = load i32, ptr %9, align 4, !tbaa !9
  %30 = sub i32 %28, %29
  store i32 %30, ptr %10, align 4, !tbaa !9
  %31 = load i32, ptr %10, align 4, !tbaa !9
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %34, label %33

33:                                               ; preds = %27
  store i32 3, ptr %11, align 4
  br label %95

34:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %35 = load i32, ptr %10, align 4, !tbaa !9
  %36 = invoke noundef i32 @_ZN10DeviceBase13renderSamplesEj(ptr noundef nonnull align 16 dereferenceable(107576) %26, i32 noundef %35)
          to label %37 unwind label %51

37:                                               ; preds = %34
  store i32 %36, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %38 = getelementptr inbounds %struct.DeviceBase, ptr %26, i32 0, i32 33
  %39 = getelementptr inbounds %struct.RealMixParams, ptr %38, i32 0, i32 2
  %40 = call ptr @_ZNK2al4spanISt5arrayIfLm1024EELm18446744073709551615EE6cbeginEv(ptr noundef nonnull align 8 dereferenceable(16) %39) #4
  %41 = getelementptr inbounds %"class.al::ptr_wrapper", ptr %15, i32 0, i32 0
  store ptr %40, ptr %41, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  store ptr %5, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %42 = load ptr, ptr %16, align 8, !tbaa !5
  %43 = call ptr @_ZNK2al4spanIPfLm18446744073709551615EE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %42) #4
  %44 = getelementptr inbounds %"class.al::ptr_wrapper.126", ptr %17, i32 0, i32 0
  store ptr %43, ptr %44, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %45 = load ptr, ptr %16, align 8, !tbaa !5
  %46 = call ptr @_ZNK2al4spanIPfLm18446744073709551615EE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %45) #4
  %47 = getelementptr inbounds %"class.al::ptr_wrapper.126", ptr %18, i32 0, i32 0
  store ptr %46, ptr %47, align 8
  br label %48

48:                                               ; preds = %80, %37
  %49 = call noundef zeroext i1 @_ZN2alneERKNS_11ptr_wrapperIPPfEES5_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #4
  br i1 %49, label %55, label %50

50:                                               ; preds = %48
  store i32 4, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  br label %91

51:                                               ; preds = %34
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %13, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %14, align 4
  br label %98

55:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK2al11ptr_wrapperIPPfEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #4
  %57 = load ptr, ptr %56, align 8, !tbaa !5
  store ptr %57, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #4
  %58 = load ptr, ptr %19, align 8, !tbaa !5
  %59 = load i32, ptr %7, align 4, !tbaa !9
  %60 = zext i32 %59 to i64
  invoke void @_ZN2al4spanIfLm18446744073709551615EEC2IPfEET_m(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef %58, i64 noundef %60)
          to label %61 unwind label %82

61:                                               ; preds = %55
  %62 = load i32, ptr %9, align 4, !tbaa !9
  %63 = zext i32 %62 to i64
  %64 = call { ptr, i64 } @_ZNK2al4spanIfLm18446744073709551615EE7subspanEmm(ptr noundef nonnull align 8 dereferenceable(16) %21, i64 noundef %63, i64 noundef -1) #4
  %65 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 0
  %66 = extractvalue { ptr, i64 } %64, 0
  store ptr %66, ptr %65, align 8
  %67 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 1
  %68 = extractvalue { ptr, i64 } %64, 1
  store i64 %68, ptr %67, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #4
  %69 = call noundef ptr @_ZNK2al11ptr_wrapperIPKSt5arrayIfLm1024EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #4
  %70 = call noundef ptr @_ZNKSt5arrayIfLm1024EE6cbeginEv(ptr noundef nonnull align 4 dereferenceable(4096) %69) #4
  %71 = load i32, ptr %12, align 4, !tbaa !9
  %72 = call ptr @_ZNK2al4spanIfLm18446744073709551615EE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %20) #4
  %73 = getelementptr inbounds %"class.al::ptr_wrapper.127", ptr %22, i32 0, i32 0
  store ptr %72, ptr %73, align 8
  %74 = getelementptr inbounds %"class.al::ptr_wrapper.127", ptr %22, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8
  %76 = invoke ptr @_ZSt6copy_nIPKfjN2al11ptr_wrapperIPfEEET1_T_T0_S6_(ptr noundef %70, i32 noundef %71, ptr %75)
          to label %77 unwind label %86

77:                                               ; preds = %61
  %78 = getelementptr inbounds %"class.al::ptr_wrapper.127", ptr %23, i32 0, i32 0
  store ptr %76, ptr %78, align 8
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN2al11ptr_wrapperIPKSt5arrayIfLm1024EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  br label %80

80:                                               ; preds = %77
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN2al11ptr_wrapperIPPfEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #4
  br label %48

82:                                               ; preds = %55
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %13, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #4
  br label %90

86:                                               ; preds = %61
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %13, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %14, align 4
  br label %90

90:                                               ; preds = %86, %82
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %98

91:                                               ; preds = %50
  %92 = load i32, ptr %12, align 4, !tbaa !9
  %93 = load i32, ptr %9, align 4, !tbaa !9
  %94 = add i32 %93, %92
  store i32 %94, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  store i32 0, ptr %11, align 4
  br label %95

95:                                               ; preds = %91, %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %96 = load i32, ptr %11, align 4
  switch i32 %96, label %105 [
    i32 0, label %97
    i32 3, label %99
  ]

97:                                               ; preds = %95
  br label %27, !llvm.loop !11

98:                                               ; preds = %90, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @_ZN6FPUCtlD2Ev(ptr noundef nonnull align 4 dereferenceable(5) %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %100

99:                                               ; preds = %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @_ZN6FPUCtlD2Ev(ptr noundef nonnull align 4 dereferenceable(5) %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  ret void

100:                                              ; preds = %98
  %101 = load ptr, ptr %13, align 8
  %102 = load i32, ptr %14, align 4
  %103 = insertvalue { ptr, i32 } poison, ptr %101, 0
  %104 = insertvalue { ptr, i32 } %103, i32 %102, 1
  resume { ptr, i32 } %104

105:                                              ; preds = %95
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6FPUCtlC2Ev(ptr noundef nonnull align 4 dereferenceable(5)) unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN2alneERKNS_11ptr_wrapperIPPfEES5_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2al4spanIfLm18446744073709551615EEC2IPfEET_m(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i64 } @_ZNK2al4spanIfLm18446744073709551615EE7subspanEmm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i64 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt6copy_nIPKfjN2al11ptr_wrapperIPfEEET1_T_T0_S6_(ptr noundef, i32 noundef, ptr) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt5arrayIfLm1024EE6cbeginEv(ptr noundef nonnull align 4 dereferenceable(4096)) #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6FPUCtlD2Ev(ptr noundef nonnull align 4 dereferenceable(5)) unnamed_addr #2 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { inlinehint 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 #4 = { 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 = distinct !{!11, !12}
!12 = !{!"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.al::span.125" = type { ptr, i64 }
%class.FPUCtl = type <{ i32, i8, [3 x i8] }>
%"class.al::ptr_wrapper" = type { ptr }
%"class.al::ptr_wrapper.126" = type { ptr }
%"class.al::span.122" = type { ptr, i64 }

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN10DeviceBase13renderSamplesEj(ptr noundef nonnull align 16 dereferenceable(107576), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10DeviceBase13renderSamplesEN2al4spanIPfLm18446744073709551615EEEj(ptr noundef nonnull align 16 dereferenceable(107576) %0, ptr %1, i64 %2, i32 noundef %3) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.al::span.125", align 8
  %6 = alloca %class.FPUCtl, align 4
  %7 = alloca %"class.al::ptr_wrapper", align 8
  %8 = alloca %"class.al::ptr_wrapper.126", align 8
  %9 = alloca %"class.al::ptr_wrapper.126", align 8
  %10 = alloca %"class.al::span.122", align 8
  %11 = alloca %"class.al::span.122", align 8
  store ptr %1, ptr %5, align 8
  %12 = getelementptr inbounds i8, ptr %5, i64 8
  store i64 %2, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  call void @_ZN6FPUCtlC2Ev(ptr noundef nonnull align 4 dereferenceable(5) %6) #4
  %.not24 = icmp eq i32 %3, 0
  br i1 %.not24, label %._crit_edge28, label %.lr.ph27

.lr.ph27:                                         ; preds = %4
  %13 = getelementptr inbounds i8, ptr %0, i64 107456
  %14 = zext i32 %3 to i64
  %15 = getelementptr inbounds i8, ptr %10, i64 8
  br label %16

16:                                               ; preds = %.lr.ph27, %._crit_edge
  %.025 = phi i32 [ 0, %.lr.ph27 ], [ %43, %._crit_edge ]
  %17 = sub i32 %3, %.025
  %18 = invoke noundef i32 @_ZN10DeviceBase13renderSamplesEj(ptr noundef nonnull align 16 dereferenceable(107576) %0, i32 noundef %17)
          to label %19 unwind label %25

19:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %20 = call ptr @_ZNK2al4spanISt5arrayIfLm1024EELm18446744073709551615EE6cbeginEv(ptr noundef nonnull align 8 dereferenceable(16) %13) #4
  store ptr %20, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %21 = call ptr @_ZNK2al4spanIPfLm18446744073709551615EE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #4
  store ptr %21, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %22 = call ptr @_ZNK2al4spanIPfLm18446744073709551615EE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #4
  store ptr %22, ptr %9, align 8
  %23 = call noundef zeroext i1 @_ZN2alneERKNS_11ptr_wrapperIPPfEES5_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  br i1 %23, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %19
  %24 = zext i32 %.025 to i64
  br label %27

25:                                               ; preds = %16
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %44

27:                                               ; preds = %.lr.ph, %37
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK2al11ptr_wrapperIPPfEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  %29 = load ptr, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #4
  call void @_ZN2al4spanIfLm18446744073709551615EEC2IPfEET_m(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %29, i64 noundef %14)
  %30 = call { ptr, i64 } @_ZNK2al4spanIfLm18446744073709551615EE7subspanEmm(ptr noundef nonnull align 8 dereferenceable(16) %11, i64 noundef %24, i64 noundef -1) #4
  %31 = extractvalue { ptr, i64 } %30, 0
  store ptr %31, ptr %10, align 8
  %32 = extractvalue { ptr, i64 } %30, 1
  store i64 %32, ptr %15, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #4
  %33 = call noundef ptr @_ZNK2al11ptr_wrapperIPKSt5arrayIfLm1024EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %34 = call noundef ptr @_ZNKSt5arrayIfLm1024EE6cbeginEv(ptr noundef nonnull align 4 dereferenceable(4096) %33) #4
  %35 = call ptr @_ZNK2al4spanIfLm18446744073709551615EE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #4
  %36 = invoke ptr @_ZSt6copy_nIPKfjN2al11ptr_wrapperIPfEEET1_T_T0_S6_(ptr noundef %34, i32 noundef %18, ptr %35)
          to label %37 unwind label %41

37:                                               ; preds = %27
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN2al11ptr_wrapperIPKSt5arrayIfLm1024EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #4
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN2al11ptr_wrapperIPPfEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  %40 = call noundef zeroext i1 @_ZN2alneERKNS_11ptr_wrapperIPPfEES5_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  br i1 %40, label %27, label %._crit_edge

41:                                               ; preds = %27
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br label %44

._crit_edge:                                      ; preds = %37, %19
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  %43 = add i32 %18, %.025
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  %.not = icmp eq i32 %43, %3
  br i1 %.not, label %._crit_edge28, label %16

44:                                               ; preds = %41, %25
  %.pn = phi { ptr, i32 } [ %42, %41 ], [ %26, %25 ]
  call void @_ZN6FPUCtlD2Ev(ptr noundef nonnull align 4 dereferenceable(5) %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  resume { ptr, i32 } %.pn

._crit_edge28:                                    ; preds = %._crit_edge, %4
  call void @_ZN6FPUCtlD2Ev(ptr noundef nonnull align 4 dereferenceable(5) %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6FPUCtlC2Ev(ptr noundef nonnull align 4 dereferenceable(5)) unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN2alneERKNS_11ptr_wrapperIPPfEES5_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2al4spanIfLm18446744073709551615EEC2IPfEET_m(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i64 } @_ZNK2al4spanIfLm18446744073709551615EE7subspanEmm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt6copy_nIPKfjN2al11ptr_wrapperIPfEEET1_T_T0_S6_(ptr noundef, i32 noundef, ptr) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt5arrayIfLm1024EE6cbeginEv(ptr noundef nonnull align 4 dereferenceable(4096)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6FPUCtlD2Ev(ptr noundef nonnull align 4 dereferenceable(5)) unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { inlinehint 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 #4 = { 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"}


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