; LLVM IR from Try/Tempest :: Engine/thirdparty/openal-soft/core (converter)

; 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.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.1" }
%"struct.std::_Head_base.1" = type { ptr }
%"class.al::ptr_wrapper" = type { ptr }
%class.FPUCtl = type <{ i32, i8, [3 x i8] }>
%class.anon = type { i8 }
%struct.SampleConverter = type { i8, i8, i32, i32, i32, i32, i32, %"class.std::variant", ptr, [8 x i8], %"struct.std::array", %"struct.std::array", %"struct.al::FlexArray" }
%"class.std::variant" = type { %"struct.std::__detail::__variant::_Variant_base.base", [7 x i8] }
%"struct.std::__detail::__variant::_Variant_base.base" = type { %"struct.std::__detail::__variant::_Move_assign_base.base" }
%"struct.std::__detail::__variant::_Move_assign_base.base" = type { %"struct.std::__detail::__variant::_Copy_assign_base.base" }
%"struct.std::__detail::__variant::_Copy_assign_base.base" = type { %"struct.std::__detail::__variant::_Move_ctor_base.base" }
%"struct.std::__detail::__variant::_Move_ctor_base.base" = type { %"struct.std::__detail::__variant::_Copy_ctor_base.base" }
%"struct.std::__detail::__variant::_Copy_ctor_base.base" = type { %"struct.std::__detail::__variant::_Variant_storage.base" }
%"struct.std::__detail::__variant::_Variant_storage.base" = type <{ %"union.std::__detail::__variant::_Variadic_union", i8 }>
%"union.std::__detail::__variant::_Variadic_union" = type { %"union.std::__detail::__variant::_Variadic_union.2" }
%"union.std::__detail::__variant::_Variadic_union.2" = type { %"union.std::__detail::__variant::_Variadic_union.4" }
%"union.std::__detail::__variant::_Variadic_union.4" = type { %"struct.std::__detail::__variant::_Uninitialized.5" }
%"struct.std::__detail::__variant::_Uninitialized.5" = type { %struct.BsincState }
%struct.BsincState = type { float, i32, i32, %"class.al::span.6" }
%"class.al::span.6" = type { ptr, i64 }
%"struct.std::array" = type { [1024 x float] }
%"struct.al::FlexArray" = type { %"struct.al::FlexArrayStorage" }
%"struct.al::FlexArrayStorage" = type { %"class.al::span.8" }
%"class.al::span.8" = type { ptr, i64 }
%"struct.SampleConverter::ChanSamples" = type { %"struct.std::array.9" }
%"struct.std::array.9" = type { [48 x float] }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15SampleConverter6CreateE10DevFmtTypeS0_mjj9Resampler(ptr dead_on_unwind noalias writable sret(%"class.std::unique_ptr") align 8 %0, i8 noundef zeroext %1, i8 noundef zeroext %2, i64 noundef %3, i32 noundef %4, i32 noundef %5, i8 noundef zeroext %6) #0 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i8, align 1
  %15 = alloca i1, align 1
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca %"class.al::ptr_wrapper", align 8
  %20 = alloca %"class.al::ptr_wrapper", align 8
  %21 = alloca ptr, align 8
  %22 = alloca float, align 4
  %23 = alloca %class.FPUCtl, align 4
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca %class.anon, align 1
  store ptr %0, ptr %8, align 8
  store i8 %1, ptr %9, align 1, !tbaa !5
  store i8 %2, ptr %10, align 1, !tbaa !5
  store i64 %3, ptr %11, align 8, !tbaa !9
  store i32 %4, ptr %12, align 4, !tbaa !11
  store i32 %5, ptr %13, align 4, !tbaa !11
  store i8 %6, ptr %14, align 1, !tbaa !13
  %30 = load i64, ptr %11, align 8, !tbaa !9
  %31 = icmp ult i64 %30, 1
  br i1 %31, label %38, label %32

32:                                               ; preds = %7
  %33 = load i32, ptr %12, align 4, !tbaa !11
  %34 = icmp ult i32 %33, 1
  br i1 %34, label %38, label %35

35:                                               ; preds = %32
  %36 = load i32, ptr %13, align 4, !tbaa !11
  %37 = icmp ult i32 %36, 1
  br i1 %37, label %38, label %39

38:                                               ; preds = %35, %32, %7
  call void @_ZNSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEC2IS2_vEEDn(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr null) #7
  br label %143

39:                                               ; preds = %35
  store i1 false, ptr %15, align 1
  %40 = load i64, ptr %11, align 8, !tbaa !9
  %41 = call noundef ptr @_ZN15SampleConverternwEm8FamCount(i64 noundef 8288, i64 noundef %40)
  %42 = load i64, ptr %11, align 8, !tbaa !9
  invoke void @_ZN15SampleConverterC2Em(ptr noundef nonnull align 16 dereferenceable(8288) %41, i64 noundef %42)
          to label %43 unwind label %73

43:                                               ; preds = %39
  call void @_ZNSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEC2IS2_vEEPS0_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %41) #7
  %44 = load i8, ptr %9, align 1, !tbaa !5
  %45 = call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %46 = getelementptr inbounds %struct.SampleConverter, ptr %45, i32 0, i32 0
  store i8 %44, ptr %46, align 16, !tbaa !15
  %47 = load i8, ptr %10, align 1, !tbaa !5
  %48 = call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %49 = getelementptr inbounds %struct.SampleConverter, ptr %48, i32 0, i32 1
  store i8 %47, ptr %49, align 1, !tbaa !29
  %50 = load i8, ptr %9, align 1, !tbaa !5
  %51 = call noundef i32 @_Z15BytesFromDevFmt10DevFmtType(i8 noundef zeroext %50) #7
  %52 = call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %53 = getelementptr inbounds %struct.SampleConverter, ptr %52, i32 0, i32 2
  store i32 %51, ptr %53, align 4, !tbaa !30
  %54 = load i8, ptr %10, align 1, !tbaa !5
  %55 = call noundef i32 @_Z15BytesFromDevFmt10DevFmtType(i8 noundef zeroext %54) #7
  %56 = call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %57 = getelementptr inbounds %struct.SampleConverter, ptr %56, i32 0, i32 3
  store i32 %55, ptr %57, align 8, !tbaa !31
  %58 = call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %59 = getelementptr inbounds %struct.SampleConverter, ptr %58, i32 0, i32 4
  store i32 48, ptr %59, align 4, !tbaa !32
  %60 = call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %61 = getelementptr inbounds %struct.SampleConverter, ptr %60, i32 0, i32 5
  store i32 0, ptr %61, align 16, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %62 = call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %63 = getelementptr inbounds %struct.SampleConverter, ptr %62, i32 0, i32 12
  store ptr %63, ptr %18, align 8, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %64 = load ptr, ptr %18, align 8, !tbaa !34
  %65 = call ptr @_ZN2al9FlexArrayIN15SampleConverter11ChanSamplesELm16EE5beginEv(ptr noundef nonnull align 16 dereferenceable(16) %64) #7
  %66 = getelementptr inbounds %"class.al::ptr_wrapper", ptr %19, i32 0, i32 0
  store ptr %65, ptr %66, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %67 = load ptr, ptr %18, align 8, !tbaa !34
  %68 = call ptr @_ZN2al9FlexArrayIN15SampleConverter11ChanSamplesELm16EE3endEv(ptr noundef nonnull align 16 dereferenceable(16) %67) #7
  %69 = getelementptr inbounds %"class.al::ptr_wrapper", ptr %20, i32 0, i32 0
  store ptr %68, ptr %69, align 8
  br label %70

70:                                               ; preds = %82, %43
  %71 = call noundef zeroext i1 @_ZN2alneERKNS_11ptr_wrapperIPN15SampleConverter11ChanSamplesEEES6_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  br i1 %71, label %77, label %72

72:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %88

73:                                               ; preds = %39
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %16, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %17, align 4
  call void @_ZN15SampleConverterdlEPv8FamCount(ptr noundef %41, i64 noundef %40) #7
  br label %144

77:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %78 = call noundef nonnull align 16 dereferenceable(192) ptr @_ZNK2al11ptr_wrapperIPN15SampleConverter11ChanSamplesEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  store ptr %78, ptr %21, align 8, !tbaa !34
  %79 = load ptr, ptr %21, align 8, !tbaa !34
  %80 = getelementptr inbounds %"struct.SampleConverter::ChanSamples", ptr %79, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store float 0.000000e+00, ptr %22, align 4, !tbaa !35
  invoke void @_ZNSt5arrayIfLm48EE4fillERKf(ptr noundef nonnull align 4 dereferenceable(192) %80, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %81 unwind label %84

81:                                               ; preds = %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %82

82:                                               ; preds = %81
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN2al11ptr_wrapperIPN15SampleConverter11ChanSamplesEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  br label %70

84:                                               ; preds = %77
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %16, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %142

88:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  call void @_ZN6FPUCtlC2Ev(ptr noundef nonnull align 4 dereferenceable(5) %23) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %89 = load i32, ptr %12, align 4, !tbaa !11
  %90 = uitofp i32 %89 to double
  %91 = fmul double %90, 6.553600e+04
  %92 = load i32, ptr %13, align 4, !tbaa !11
  %93 = uitofp i32 %92 to double
  %94 = fdiv double %91, %93
  %95 = call double @llvm.round.f64(double %94)
  store double %95, ptr %25, align 8, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  store double 6.553600e+05, ptr %26, align 8, !tbaa !37
  %96 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %97 unwind label %114

97:                                               ; preds = %88
  %98 = load double, ptr %96, align 8, !tbaa !37
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  store double %98, ptr %24, align 8, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %99 = load double, ptr %24, align 8, !tbaa !37
  %100 = fptoui double %99 to i32
  store i32 %100, ptr %27, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  store i32 1, ptr %28, align 4, !tbaa !11
  %101 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %27, ptr noundef nonnull align 4 dereferenceable(4) %28)
          to label %102 unwind label %118

102:                                              ; preds = %97
  %103 = load i32, ptr %101, align 4, !tbaa !11
  %104 = call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %105 = getelementptr inbounds %struct.SampleConverter, ptr %104, i32 0, i32 6
  store i32 %103, ptr %105, align 4, !tbaa !39
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  %106 = call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %107 = getelementptr inbounds %struct.SampleConverter, ptr %106, i32 0, i32 6
  %108 = load i32, ptr %107, align 4, !tbaa !39
  %109 = icmp eq i32 %108, 65536
  br i1 %109, label %110, label %122

110:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #7
  %111 = call noundef ptr @"_ZZN15SampleConverter6CreateE10DevFmtTypeS0_mjj9ResamplerENK3$_0cvPFvPKSt7variantIJSt9monostate10CubicState10BsincStateEEN2al4spanIKfLm18446744073709551615EEEjjNSB_IfLm18446744073709551615EEEEEv"(ptr noundef nonnull align 1 dereferenceable(1) %29) #7
  %112 = call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %113 = getelementptr inbounds %struct.SampleConverter, ptr %112, i32 0, i32 8
  store ptr %111, ptr %113, align 16, !tbaa !40
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #7
  br label %137

114:                                              ; preds = %88
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %16, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %139

118:                                              ; preds = %97
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %16, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %139

122:                                              ; preds = %102
  %123 = load i8, ptr %14, align 1, !tbaa !13
  %124 = call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %125 = getelementptr inbounds %struct.SampleConverter, ptr %124, i32 0, i32 6
  %126 = load i32, ptr %125, align 4, !tbaa !39
  %127 = call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %128 = getelementptr inbounds %struct.SampleConverter, ptr %127, i32 0, i32 7
  %129 = invoke noundef ptr @_Z16PrepareResampler9ResamplerjPSt7variantIJSt9monostate10CubicState10BsincStateEE(i8 noundef zeroext %123, i32 noundef %126, ptr noundef %128)
          to label %130 unwind label %133

130:                                              ; preds = %122
  %131 = call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %132 = getelementptr inbounds %struct.SampleConverter, ptr %131, i32 0, i32 8
  store ptr %129, ptr %132, align 16, !tbaa !40
  br label %137

133:                                              ; preds = %122
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %16, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %17, align 4
  br label %139

137:                                              ; preds = %130, %110
  store i1 true, ptr %15, align 1
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @_ZN6FPUCtlD2Ev(ptr noundef nonnull align 4 dereferenceable(5) %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  %138 = load i1, ptr %15, align 1
  br i1 %138, label %141, label %140

139:                                              ; preds = %133, %118, %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @_ZN6FPUCtlD2Ev(ptr noundef nonnull align 4 dereferenceable(5) %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %142

140:                                              ; preds = %137
  call void @_ZNSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  br label %141

141:                                              ; preds = %140, %137
  br label %143

142:                                              ; preds = %139, %84
  call void @_ZNSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  br label %144

143:                                              ; preds = %141, %38
  ret void

144:                                              ; preds = %142, %73
  %145 = load ptr, ptr %16, align 8
  %146 = load i32, ptr %17, align 4
  %147 = insertvalue { ptr, i32 } poison, ptr %145, 0
  %148 = insertvalue { ptr, i32 } %147, i32 %146, 1
  resume { ptr, i32 } %148
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN15SampleConverternwEm8FamCount(i64 noundef, i64 noundef) #0 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15SampleConverterdlEPv8FamCount(ptr noundef, i64 noundef) #1 align 2

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

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

; Function Attrs: nounwind
declare noundef i32 @_Z15BytesFromDevFmt10DevFmtType(i8 noundef zeroext) #2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5arrayIfLm48EE4fillERKf(ptr noundef nonnull align 4 dereferenceable(192), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.round.f64(double) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @"_ZZN15SampleConverter6CreateE10DevFmtTypeS0_mjj9ResamplerENK3$_0cvPFvPKSt7variantIJSt9monostate10CubicState10BsincStateEEN2al4spanIKfLm18446744073709551615EEEjjNSB_IfLm18446744073709551615EEEEEv"(ptr noundef nonnull align 1 dereferenceable(1)) #4 align 2

declare noundef ptr @_Z16PrepareResampler9ResamplerjPSt7variantIJSt9monostate10CubicState10BsincStateEE(i8 noundef zeroext, i32 noundef, ptr noundef) #6

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

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

attributes #0 = { 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 #1 = { 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 #2 = { nounwind "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { "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 #7 = { 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 = !{!"_ZTS10DevFmtType", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTS9Resampler", !7, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"_ZTS15SampleConverter", !6, i64 0, !6, i64 1, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !17, i64 24, !24, i64 64, !25, i64 80, !25, i64 4176, !26, i64 8272}
!17 = !{!"_ZTSSt7variantIJSt9monostate10CubicState10BsincStateEE", !18, i64 0}
!18 = !{!"_ZTSNSt8__detail9__variant13_Variant_baseIJSt9monostate10CubicState10BsincStateEEE", !19, i64 0}
!19 = !{!"_ZTSNSt8__detail9__variant17_Move_assign_baseILb1EJSt9monostate10CubicState10BsincStateEEE", !20, i64 0}
!20 = !{!"_ZTSNSt8__detail9__variant17_Copy_assign_baseILb1EJSt9monostate10CubicState10BsincStateEEE", !21, i64 0}
!21 = !{!"_ZTSNSt8__detail9__variant15_Move_ctor_baseILb1EJSt9monostate10CubicState10BsincStateEEE", !22, i64 0}
!22 = !{!"_ZTSNSt8__detail9__variant15_Copy_ctor_baseILb1EJSt9monostate10CubicState10BsincStateEEE", !23, i64 0}
!23 = !{!"_ZTSNSt8__detail9__variant16_Variant_storageILb1EJSt9monostate10CubicState10BsincStateEEE", !7, i64 0, !7, i64 32}
!24 = !{!"any pointer", !7, i64 0}
!25 = !{!"_ZTSSt5arrayIfLm1024EE", !7, i64 0}
!26 = !{!"_ZTSN2al9FlexArrayIN15SampleConverter11ChanSamplesELm16EEE", !27, i64 0}
!27 = !{!"_ZTSN2al16FlexArrayStorageIN15SampleConverter11ChanSamplesELm16ELb1EEE", !28, i64 0}
!28 = !{!"_ZTSN2al4spanIN15SampleConverter11ChanSamplesELm18446744073709551615EEE", !24, i64 0, !10, i64 8}
!29 = !{!16, !6, i64 1}
!30 = !{!16, !12, i64 4}
!31 = !{!16, !12, i64 8}
!32 = !{!16, !12, i64 12}
!33 = !{!16, !12, i64 16}
!34 = !{!24, !24, i64 0}
!35 = !{!36, !36, i64 0}
!36 = !{!"float", !7, i64 0}
!37 = !{!38, !38, i64 0}
!38 = !{!"double", !7, i64 0}
!39 = !{!16, !12, i64 20}
!40 = !{!16, !24, i64 64}


; 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::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.1" }
%"struct.std::_Head_base.1" = type { ptr }
%"class.al::ptr_wrapper" = type { ptr }
%class.FPUCtl = type <{ i32, i8, [3 x i8] }>
%class.anon = type { i8 }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15SampleConverter6CreateE10DevFmtTypeS0_mjj9Resampler(ptr dead_on_unwind noalias writable sret(%"class.std::unique_ptr") align 8 %0, i8 noundef zeroext %1, i8 noundef zeroext %2, i64 noundef %3, i32 noundef %4, i32 noundef %5, i8 noundef zeroext %6) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca %"class.al::ptr_wrapper", align 8
  %9 = alloca %"class.al::ptr_wrapper", align 8
  %10 = alloca float, align 4
  %11 = alloca %class.FPUCtl, align 4
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %class.anon, align 1
  %17 = icmp eq i64 %3, 0
  %18 = icmp eq i32 %4, 0
  %or.cond = or i1 %17, %18
  %19 = icmp eq i32 %5, 0
  %or.cond3 = or i1 %or.cond, %19
  br i1 %or.cond3, label %20, label %21

20:                                               ; preds = %7
  tail call void @_ZNSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEC2IS2_vEEDn(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr null) #7
  br label %81

21:                                               ; preds = %7
  %22 = tail call noundef ptr @_ZN15SampleConverternwEm8FamCount(i64 noundef 8288, i64 noundef %3)
  tail call void @_ZN15SampleConverterC2Em(ptr noundef nonnull align 16 dereferenceable(8288) %22, i64 noundef %3)
  tail call void @_ZNSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEC2IS2_vEEPS0_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %22) #7
  %23 = tail call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  store i8 %1, ptr %23, align 16, !tbaa !5
  %24 = tail call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %25 = getelementptr inbounds i8, ptr %24, i64 1
  store i8 %2, ptr %25, align 1, !tbaa !24
  %26 = tail call noundef i32 @_Z15BytesFromDevFmt10DevFmtType(i8 noundef zeroext %1) #7
  %27 = tail call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %28 = getelementptr inbounds i8, ptr %27, i64 4
  store i32 %26, ptr %28, align 4, !tbaa !25
  %29 = tail call noundef i32 @_Z15BytesFromDevFmt10DevFmtType(i8 noundef zeroext %2) #7
  %30 = tail call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %31 = getelementptr inbounds i8, ptr %30, i64 8
  store i32 %29, ptr %31, align 8, !tbaa !26
  %32 = tail call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %33 = getelementptr inbounds i8, ptr %32, i64 12
  store i32 48, ptr %33, align 4, !tbaa !27
  %34 = tail call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %35 = getelementptr inbounds i8, ptr %34, i64 16
  store i32 0, ptr %35, align 16, !tbaa !28
  %36 = tail call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %37 = getelementptr inbounds i8, ptr %36, i64 8272
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %38 = tail call ptr @_ZN2al9FlexArrayIN15SampleConverter11ChanSamplesELm16EE5beginEv(ptr noundef nonnull align 16 dereferenceable(16) %37) #7
  store ptr %38, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %39 = tail call ptr @_ZN2al9FlexArrayIN15SampleConverter11ChanSamplesELm16EE3endEv(ptr noundef nonnull align 16 dereferenceable(16) %37) #7
  store ptr %39, ptr %9, align 8
  %40 = call noundef zeroext i1 @_ZN2alneERKNS_11ptr_wrapperIPN15SampleConverter11ChanSamplesEEES6_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  br i1 %40, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %58, %21
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  call void @_ZN6FPUCtlC2Ev(ptr noundef nonnull align 4 dereferenceable(5) %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %41 = uitofp i32 %4 to double
  %42 = fmul double %41, 6.553600e+04
  %43 = uitofp i32 %5 to double
  %44 = fdiv double %42, %43
  %45 = call double @llvm.round.f64(double %44)
  store double %45, ptr %12, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  store double 6.553600e+05, ptr %13, align 8, !tbaa !29
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %47 = load double, ptr %46, align 8, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  %48 = fptoui double %47 to i32
  store i32 %48, ptr %14, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #7
  store i32 1, ptr %15, align 4, !tbaa !31
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %50 = load i32, ptr %49, align 4, !tbaa !31
  %51 = call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %52 = getelementptr inbounds i8, ptr %51, i64 20
  store i32 %50, ptr %52, align 4, !tbaa !32
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  %53 = call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %54 = getelementptr inbounds i8, ptr %53, i64 20
  %55 = load i32, ptr %54, align 4, !tbaa !32
  %56 = icmp eq i32 %55, 65536
  br i1 %56, label %63, label %67

.lr.ph:                                           ; preds = %21, %58
  %57 = call noundef nonnull align 16 dereferenceable(192) ptr @_ZNK2al11ptr_wrapperIPN15SampleConverter11ChanSamplesEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  store float 0.000000e+00, ptr %10, align 4, !tbaa !33
  invoke void @_ZNSt5arrayIfLm48EE4fillERKf(ptr noundef nonnull align 4 dereferenceable(192) %57, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %58 unwind label %61

58:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN2al11ptr_wrapperIPN15SampleConverter11ChanSamplesEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %60 = call noundef zeroext i1 @_ZN2alneERKNS_11ptr_wrapperIPN15SampleConverter11ChanSamplesEEES6_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  br i1 %60, label %.lr.ph, label %._crit_edge

61:                                               ; preds = %.lr.ph
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %80

63:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #7
  %64 = call noundef ptr @"_ZZN15SampleConverter6CreateE10DevFmtTypeS0_mjj9ResamplerENK3$_0cvPFvPKSt7variantIJSt9monostate10CubicState10BsincStateEEN2al4spanIKfLm18446744073709551615EEEjjNSB_IfLm18446744073709551615EEEEEv"(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  %65 = call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %66 = getelementptr inbounds i8, ptr %65, i64 64
  store ptr %64, ptr %66, align 16, !tbaa !35
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #7
  br label %79

67:                                               ; preds = %._crit_edge
  %68 = call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %69 = getelementptr inbounds i8, ptr %68, i64 20
  %70 = load i32, ptr %69, align 4, !tbaa !32
  %71 = call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %72 = getelementptr inbounds i8, ptr %71, i64 24
  %73 = invoke noundef ptr @_Z16PrepareResampler9ResamplerjPSt7variantIJSt9monostate10CubicState10BsincStateEE(i8 noundef zeroext %6, i32 noundef %70, ptr noundef nonnull %72)
          to label %74 unwind label %77

74:                                               ; preds = %67
  %75 = call noundef ptr @_ZNKSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  %76 = getelementptr inbounds i8, ptr %75, i64 64
  store ptr %73, ptr %76, align 16, !tbaa !35
  br label %79

77:                                               ; preds = %67
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6FPUCtlD2Ev(ptr noundef nonnull align 4 dereferenceable(5) %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br label %80

79:                                               ; preds = %74, %63
  call void @_ZN6FPUCtlD2Ev(ptr noundef nonnull align 4 dereferenceable(5) %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br label %81

80:                                               ; preds = %77, %61
  %.pn = phi { ptr, i32 } [ %62, %61 ], [ %78, %77 ]
  call void @_ZNSt10unique_ptrI15SampleConverterSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  resume { ptr, i32 } %.pn

81:                                               ; preds = %79, %20
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN15SampleConverternwEm8FamCount(i64 noundef, i64 noundef) local_unnamed_addr #0 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nounwind
declare noundef i32 @_Z15BytesFromDevFmt10DevFmtType(i8 noundef zeroext) local_unnamed_addr #2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5arrayIfLm48EE4fillERKf(ptr noundef nonnull align 4 dereferenceable(192), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.round.f64(double) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @"_ZZN15SampleConverter6CreateE10DevFmtTypeS0_mjj9ResamplerENK3$_0cvPFvPKSt7variantIJSt9monostate10CubicState10BsincStateEEN2al4spanIKfLm18446744073709551615EEEjjNSB_IfLm18446744073709551615EEEEEv"(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #4 align 2

declare noundef ptr @_Z16PrepareResampler9ResamplerjPSt7variantIJSt9monostate10CubicState10BsincStateEE(i8 noundef zeroext, i32 noundef, ptr noundef) local_unnamed_addr #6

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

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

attributes #0 = { 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 #1 = { 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 #2 = { nounwind "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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint 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 #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { "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 #7 = { 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, !7, i64 0}
!6 = !{!"_ZTS15SampleConverter", !7, i64 0, !7, i64 1, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !11, i64 24, !18, i64 64, !19, i64 80, !19, i64 4176, !20, i64 8272}
!7 = !{!"_ZTS10DevFmtType", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTSSt7variantIJSt9monostate10CubicState10BsincStateEE", !12, i64 0}
!12 = !{!"_ZTSNSt8__detail9__variant13_Variant_baseIJSt9monostate10CubicState10BsincStateEEE", !13, i64 0}
!13 = !{!"_ZTSNSt8__detail9__variant17_Move_assign_baseILb1EJSt9monostate10CubicState10BsincStateEEE", !14, i64 0}
!14 = !{!"_ZTSNSt8__detail9__variant17_Copy_assign_baseILb1EJSt9monostate10CubicState10BsincStateEEE", !15, i64 0}
!15 = !{!"_ZTSNSt8__detail9__variant15_Move_ctor_baseILb1EJSt9monostate10CubicState10BsincStateEEE", !16, i64 0}
!16 = !{!"_ZTSNSt8__detail9__variant15_Copy_ctor_baseILb1EJSt9monostate10CubicState10BsincStateEEE", !17, i64 0}
!17 = !{!"_ZTSNSt8__detail9__variant16_Variant_storageILb1EJSt9monostate10CubicState10BsincStateEEE", !8, i64 0, !8, i64 32}
!18 = !{!"any pointer", !8, i64 0}
!19 = !{!"_ZTSSt5arrayIfLm1024EE", !8, i64 0}
!20 = !{!"_ZTSN2al9FlexArrayIN15SampleConverter11ChanSamplesELm16EEE", !21, i64 0}
!21 = !{!"_ZTSN2al16FlexArrayStorageIN15SampleConverter11ChanSamplesELm16ELb1EEE", !22, i64 0}
!22 = !{!"_ZTSN2al4spanIN15SampleConverter11ChanSamplesELm18446744073709551615EEE", !18, i64 0, !23, i64 8}
!23 = !{!"long", !8, i64 0}
!24 = !{!6, !7, i64 1}
!25 = !{!6, !10, i64 4}
!26 = !{!6, !10, i64 8}
!27 = !{!6, !10, i64 12}
!28 = !{!6, !10, i64 16}
!29 = !{!30, !30, i64 0}
!30 = !{!"double", !8, i64 0}
!31 = !{!10, !10, i64 0}
!32 = !{!6, !10, i64 20}
!33 = !{!34, !34, i64 0}
!34 = !{!"float", !8, i64 0}
!35 = !{!6, !18, i64 64}


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