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

; 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.0" = type { ptr, i64 }
%"class.al::span" = type { ptr, i64 }
%"struct.std::array" = type { [4 x i32] }
%"class.al::span.1" = type { ptr }
%"class.al::span.2" = type { ptr, i64 }
%"class.al::ptr_wrapper" = type { ptr }
%class.anon = type { ptr, ptr, %"class.al::span", <4 x float>, <2 x i64>, <2 x i64> }
%"class.al::ptr_wrapper.3" = type { ptr }
%class.anon.4 = type <{ ptr, ptr, %"class.al::span", i32, [4 x i8] }>

; Function Attrs: mustprogress uwtable
define dso_local void @_Z9Resample_I7LerpTag7SSE2TagEvPKSt7variantIJSt9monostate10CubicState10BsincStateEEN2al4spanIKfLm18446744073709551615EEEjjNSA_IfLm18446744073709551615EEE(ptr noundef %0, ptr %1, i64 %2, i32 noundef %3, i32 noundef %4, ptr noundef byval(%"class.al::span.0") align 8 %5) #0 {
  %7 = alloca %"class.al::span", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca <2 x i64>, align 16
  %12 = alloca <4 x float>, align 16
  %13 = alloca <2 x i64>, align 16
  %14 = alloca %"struct.std::array", align 4
  %15 = alloca %"struct.std::array", align 4
  %16 = alloca %"class.al::span.1", align 8
  %17 = alloca %"class.al::span.1", align 8
  %18 = alloca <2 x i64>, align 16
  %19 = alloca <2 x i64>, align 16
  %20 = alloca %"class.al::span.2", align 8
  %21 = alloca %"class.al::ptr_wrapper", align 8
  %22 = alloca %"class.al::ptr_wrapper", align 8
  %23 = alloca %class.anon, align 16
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca %"class.al::span.0", align 8
  %27 = alloca %"class.al::ptr_wrapper.3", align 8
  %28 = alloca %"class.al::ptr_wrapper.3", align 8
  %29 = alloca %class.anon.4, align 8
  %30 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 0
  store ptr %1, ptr %30, align 8
  %31 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 1
  store i64 %2, ptr %31, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !9
  %32 = load i32, ptr %9, align 4, !tbaa !9
  %33 = icmp ult i32 %32, 65536
  call void @llvm.assume(i1 %33)
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #9
  %34 = load i32, ptr %10, align 4, !tbaa !9
  %35 = mul i32 %34, 4
  %36 = call noundef <2 x i64> @_ZL14_mm_set1_epi32i(i32 noundef %35)
  %37 = shufflevector <2 x i64> %36, <2 x i64> poison, <2 x i32> <i32 0, i32 1>
  %38 = shufflevector <2 x i64> %37, <2 x i64> poison, <2 x i32> <i32 0, i32 1>
  store <2 x i64> %38, ptr %11, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #9
  %39 = call noundef <4 x float> @_ZL11_mm_set1_psf(float noundef 0x3EF0000000000000)
  %40 = shufflevector <4 x float> %39, <4 x float> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
  %41 = shufflevector <4 x float> %40, <4 x float> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
  store <4 x float> %41, ptr %12, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #9
  %42 = call noundef <2 x i64> @_ZL14_mm_set1_epi32i(i32 noundef 65535)
  %43 = shufflevector <2 x i64> %42, <2 x i64> poison, <2 x i32> <i32 0, i32 1>
  %44 = shufflevector <2 x i64> %43, <2 x i64> poison, <2 x i32> <i32 0, i32 1>
  store <2 x i64> %44, ptr %13, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #9
  call void @llvm.memset.p0.i64(ptr align 4 %14, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #9
  call void @llvm.memset.p0.i64(ptr align 4 %15, i8 0, i64 16, i1 false)
  %45 = load i32, ptr %9, align 4, !tbaa !9
  %46 = load i32, ptr %10, align 4, !tbaa !9
  call void @_ZN2al4spanIjLm4EEC2ILm4EEERSt5arrayIjXT_EE(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(16) %15) #9
  call void @_ZN2al4spanIjLm4EEC2ILm4EEERSt5arrayIjXT_EE(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 4 dereferenceable(16) %14) #9
  %47 = getelementptr inbounds %"class.al::span.1", ptr %16, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8
  %49 = getelementptr inbounds %"class.al::span.1", ptr %17, i32 0, i32 0
  %50 = load ptr, ptr %49, align 8
  call void @_Z13InitPosArraysILm4EEvjjjN2al4spanIjXT_EEES2_(i32 noundef 24, i32 noundef %45, i32 noundef %46, ptr %48, ptr %50)
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #9
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm4EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %15, i64 noundef 0) #9
  %52 = load i32, ptr %51, align 4, !tbaa !9
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm4EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %15, i64 noundef 1) #9
  %54 = load i32, ptr %53, align 4, !tbaa !9
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm4EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %15, i64 noundef 2) #9
  %56 = load i32, ptr %55, align 4, !tbaa !9
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm4EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %15, i64 noundef 3) #9
  %58 = load i32, ptr %57, align 4, !tbaa !9
  %59 = call noundef <2 x i64> @_ZL14_mm_setr_epi32iiii(i32 noundef %52, i32 noundef %54, i32 noundef %56, i32 noundef %58)
  %60 = shufflevector <2 x i64> %59, <2 x i64> poison, <2 x i32> <i32 0, i32 1>
  %61 = shufflevector <2 x i64> %60, <2 x i64> poison, <2 x i32> <i32 0, i32 1>
  store <2 x i64> %61, ptr %18, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #9
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm4EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %14, i64 noundef 0) #9
  %63 = load i32, ptr %62, align 4, !tbaa !9
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm4EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %14, i64 noundef 1) #9
  %65 = load i32, ptr %64, align 4, !tbaa !9
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm4EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %14, i64 noundef 2) #9
  %67 = load i32, ptr %66, align 4, !tbaa !9
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm4EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %14, i64 noundef 3) #9
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = call noundef <2 x i64> @_ZL14_mm_setr_epi32iiii(i32 noundef %63, i32 noundef %65, i32 noundef %67, i32 noundef %69)
  %71 = shufflevector <2 x i64> %70, <2 x i64> poison, <2 x i32> <i32 0, i32 1>
  %72 = shufflevector <2 x i64> %71, <2 x i64> poison, <2 x i32> <i32 0, i32 1>
  store <2 x i64> %72, ptr %19, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #9
  %73 = call noundef ptr @_ZNK2al4spanIfLm18446744073709551615EE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #9
  %74 = call noundef i64 @_ZNK2al4spanIfLm18446744073709551615EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #9
  %75 = udiv i64 %74, 4
  call void @_ZN2al4spanIDv4_fLm18446744073709551615EEC2IPS1_EET_m(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef %73, i64 noundef %75)
  %76 = call ptr @_ZNK2al4spanIDv4_fLm18446744073709551615EE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %20) #9
  %77 = getelementptr inbounds %"class.al::ptr_wrapper", ptr %21, i32 0, i32 0
  store ptr %76, ptr %77, align 8
  %78 = call ptr @_ZNK2al4spanIDv4_fLm18446744073709551615EE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %20) #9
  %79 = getelementptr inbounds %"class.al::ptr_wrapper", ptr %22, i32 0, i32 0
  store ptr %78, ptr %79, align 8
  %80 = getelementptr inbounds %class.anon, ptr %23, i32 0, i32 0
  store ptr %19, ptr %80, align 16, !tbaa !5
  %81 = getelementptr inbounds %class.anon, ptr %23, i32 0, i32 1
  store ptr %18, ptr %81, align 8, !tbaa !5
  %82 = getelementptr inbounds %class.anon, ptr %23, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %82, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !12
  %83 = getelementptr inbounds %class.anon, ptr %23, i32 0, i32 3
  %84 = load <4 x float>, ptr %12, align 16, !tbaa !11
  store <4 x float> %84, ptr %83, align 16, !tbaa !11
  %85 = getelementptr inbounds %class.anon, ptr %23, i32 0, i32 4
  %86 = load <2 x i64>, ptr %11, align 16, !tbaa !11
  store <2 x i64> %86, ptr %85, align 16, !tbaa !11
  %87 = getelementptr inbounds %class.anon, ptr %23, i32 0, i32 5
  %88 = load <2 x i64>, ptr %13, align 16, !tbaa !11
  store <2 x i64> %88, ptr %87, align 16, !tbaa !11
  %89 = getelementptr inbounds %"class.al::ptr_wrapper", ptr %21, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8
  %91 = getelementptr inbounds %"class.al::ptr_wrapper", ptr %22, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8
  call void @"_ZSt8generateIN2al11ptr_wrapperIPDv4_fEEZ9Resample_I7LerpTag7SSE2TagEvPKSt7variantIJSt9monostate10CubicState10BsincStateEENS0_4spanIKfLm18446744073709551615EEEjjNSF_IfLm18446744073709551615EEEE3$_0EvT_SK_T0_"(ptr %90, ptr %92, ptr noundef byval(%class.anon) align 16 %23)
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  %93 = call noundef i64 @_ZNK2al4spanIfLm18446744073709551615EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #9
  %94 = and i64 %93, 3
  store i64 %94, ptr %24, align 8, !tbaa !13
  %95 = load i64, ptr %24, align 8, !tbaa !13
  %96 = icmp ne i64 %95, 0
  br i1 %96, label %97, label %122

97:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  %98 = load <2 x i64>, ptr %19, align 16, !tbaa !11
  %99 = call noundef i32 @_ZL17_mm_cvtsi128_si32Dv2_x(<2 x i64> noundef %98)
  %100 = zext i32 %99 to i64
  store i64 %100, ptr %25, align 8, !tbaa !13
  %101 = load <2 x i64>, ptr %18, align 16, !tbaa !11
  %102 = call noundef i32 @_ZL17_mm_cvtsi128_si32Dv2_x(<2 x i64> noundef %101)
  store i32 %102, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #9
  %103 = load i64, ptr %24, align 8, !tbaa !13
  %104 = call { ptr, i64 } @_ZNK2al4spanIfLm18446744073709551615EE4lastEm(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef %103) #9
  %105 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 0
  %106 = extractvalue { ptr, i64 } %104, 0
  store ptr %106, ptr %105, align 8
  %107 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 1
  %108 = extractvalue { ptr, i64 } %104, 1
  store i64 %108, ptr %107, align 8
  %109 = call ptr @_ZNK2al4spanIfLm18446744073709551615EE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %26) #9
  %110 = getelementptr inbounds %"class.al::ptr_wrapper.3", ptr %27, i32 0, i32 0
  store ptr %109, ptr %110, align 8
  %111 = call ptr @_ZNK2al4spanIfLm18446744073709551615EE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %26) #9
  %112 = getelementptr inbounds %"class.al::ptr_wrapper.3", ptr %28, i32 0, i32 0
  store ptr %111, ptr %112, align 8
  %113 = getelementptr inbounds %class.anon.4, ptr %29, i32 0, i32 0
  store ptr %25, ptr %113, align 8, !tbaa !5
  %114 = getelementptr inbounds %class.anon.4, ptr %29, i32 0, i32 1
  store ptr %9, ptr %114, align 8, !tbaa !5
  %115 = getelementptr inbounds %class.anon.4, ptr %29, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %115, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !12
  %116 = getelementptr inbounds %class.anon.4, ptr %29, i32 0, i32 3
  %117 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %117, ptr %116, align 8, !tbaa !15
  %118 = getelementptr inbounds %"class.al::ptr_wrapper.3", ptr %27, i32 0, i32 0
  %119 = load ptr, ptr %118, align 8
  %120 = getelementptr inbounds %"class.al::ptr_wrapper.3", ptr %28, i32 0, i32 0
  %121 = load ptr, ptr %120, align 8
  call void @"_ZSt8generateIN2al11ptr_wrapperIPfEEZ9Resample_I7LerpTag7SSE2TagEvPKSt7variantIJSt9monostate10CubicState10BsincStateEENS0_4spanIKfLm18446744073709551615EEEjjNSE_IfLm18446744073709551615EEEE3$_1EvT_SJ_T0_"(ptr %119, ptr %121, ptr noundef byval(%class.anon.4) align 8 %29)
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  br label %122

122:                                              ; preds = %97, %6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #9
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write)
declare void @llvm.assume(i1 noundef) #1

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

; Function Attrs: alwaysinline mustprogress uwtable
declare hidden noundef <2 x i64> @_ZL14_mm_set1_epi32i(i32 noundef) #3

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <4 x float> @_ZL11_mm_set1_psf(float noundef) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z13InitPosArraysILm4EEvjjjN2al4spanIjXT_EEES2_(i32 noundef, i32 noundef, i32 noundef, ptr, ptr) #6

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <2 x i64> @_ZL14_mm_setr_epi32iiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm4EEixEm(ptr noundef nonnull align 4 dereferenceable(16), i64 noundef) #7 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZSt8generateIN2al11ptr_wrapperIPDv4_fEEZ9Resample_I7LerpTag7SSE2TagEvPKSt7variantIJSt9monostate10CubicState10BsincStateEENS0_4spanIKfLm18446744073709551615EEEjjNSF_IfLm18446744073709551615EEEE3$_0EvT_SK_T0_"(ptr, ptr, ptr noundef byval(%class.anon) align 16) #0

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #8

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL17_mm_cvtsi128_si32Dv2_x(<2 x i64> noundef) #4

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZSt8generateIN2al11ptr_wrapperIPfEEZ9Resample_I7LerpTag7SSE2TagEvPKSt7variantIJSt9monostate10CubicState10BsincStateEENS0_4spanIKfLm18446744073709551615EEEjjNSE_IfLm18446744073709551615EEEE3$_1EvT_SJ_T0_"(ptr, ptr, ptr noundef byval(%class.anon.4) align 8) #6

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="128" "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(inaccessiblemem: write) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "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 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="128" "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 nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #7 = { 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 #8 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #9 = { 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 = !{!7, !7, i64 0}
!12 = !{i64 0, i64 8, !5, i64 8, i64 8, !13}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !10, i64 32}
!16 = !{!"_ZTSZ9Resample_I7LerpTag7SSE2TagEvPKSt7variantIJSt9monostate10CubicState10BsincStateEEN2al4spanIKfLm18446744073709551615EEEjjNSA_IfLm18446744073709551615EEEE3$_1", !6, i64 0, !6, i64 8, !17, i64 16, !10, i64 32}
!17 = !{!"_ZTSN2al4spanIKfLm18446744073709551615EEE", !6, i64 0, !14, i64 8}


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

%"class.al::span.0" = type { ptr, i64 }
%"struct.std::array" = type { [4 x i32] }
%"class.al::span.1" = type { ptr }
%"class.al::span.2" = type { ptr, i64 }
%class.anon = type { ptr, ptr, %"class.al::span", <4 x float>, <2 x i64>, <2 x i64> }
%"class.al::span" = type { ptr, i64 }
%class.anon.4 = type <{ ptr, ptr, %"class.al::span", i32, [4 x i8] }>

; Function Attrs: mustprogress uwtable
define dso_local void @_Z9Resample_I7LerpTag7SSE2TagEvPKSt7variantIJSt9monostate10CubicState10BsincStateEEN2al4spanIKfLm18446744073709551615EEEjjNSA_IfLm18446744073709551615EEE(ptr nocapture noundef readnone %0, ptr %1, i64 %2, i32 noundef %3, i32 noundef %4, ptr noundef byval(%"class.al::span.0") align 8 %5) local_unnamed_addr #0 {
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::array", align 4
  %9 = alloca %"struct.std::array", align 4
  %10 = alloca %"class.al::span.1", align 8
  %11 = alloca %"class.al::span.1", align 8
  %12 = alloca <2 x i64>, align 16
  %13 = alloca <2 x i64>, align 16
  %14 = alloca %"class.al::span.2", align 8
  %15 = alloca %class.anon, align 16
  %16 = alloca i64, align 8
  %17 = alloca %"class.al::span.0", align 8
  %18 = alloca %class.anon.4, align 8
  store i32 %3, ptr %7, align 4, !tbaa !5
  %19 = icmp ult i32 %3, 65536
  tail call void @llvm.assume(i1 %19)
  %20 = shl i32 %4, 2
  %21 = tail call noundef <2 x i64> @_ZL14_mm_set1_epi32i(i32 noundef %20)
  %22 = tail call noundef <4 x float> @_ZL11_mm_set1_psf(float noundef 0x3EF0000000000000)
  %23 = tail call noundef <2 x i64> @_ZL14_mm_set1_epi32i(i32 noundef 65535)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %8, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %9, i8 0, i64 16, i1 false)
  call void @_ZN2al4spanIjLm4EEC2ILm4EEERSt5arrayIjXT_EE(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(16) %9) #8
  call void @_ZN2al4spanIjLm4EEC2ILm4EEERSt5arrayIjXT_EE(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(16) %8) #8
  %24 = load ptr, ptr %10, align 8
  %25 = load ptr, ptr %11, align 8
  call void @_Z13InitPosArraysILm4EEvjjjN2al4spanIjXT_EEES2_(i32 noundef 24, i32 noundef %3, i32 noundef %4, ptr %24, ptr %25)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #8
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm4EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %9, i64 noundef 0) #8
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm4EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %9, i64 noundef 1) #8
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm4EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %9, i64 noundef 2) #8
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm4EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %9, i64 noundef 3) #8
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = call noundef <2 x i64> @_ZL14_mm_setr_epi32iiii(i32 noundef %27, i32 noundef %29, i32 noundef %31, i32 noundef %33)
  store <2 x i64> %34, ptr %12, align 16, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #8
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm4EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %8, i64 noundef 0) #8
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm4EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %8, i64 noundef 1) #8
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm4EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %8, i64 noundef 2) #8
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm4EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %8, i64 noundef 3) #8
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = call noundef <2 x i64> @_ZL14_mm_setr_epi32iiii(i32 noundef %36, i32 noundef %38, i32 noundef %40, i32 noundef %42)
  store <2 x i64> %43, ptr %13, align 16, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #8
  %44 = call noundef ptr @_ZNK2al4spanIfLm18446744073709551615EE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #8
  %45 = call noundef i64 @_ZNK2al4spanIfLm18446744073709551615EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #8
  %46 = lshr i64 %45, 2
  call void @_ZN2al4spanIDv4_fLm18446744073709551615EEC2IPS1_EET_m(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef %44, i64 noundef %46)
  %47 = call ptr @_ZNK2al4spanIDv4_fLm18446744073709551615EE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %14) #8
  %48 = call ptr @_ZNK2al4spanIDv4_fLm18446744073709551615EE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %14) #8
  store ptr %13, ptr %15, align 16, !tbaa !10
  %49 = getelementptr inbounds i8, ptr %15, i64 8
  store ptr %12, ptr %49, align 8, !tbaa !10
  %50 = getelementptr inbounds i8, ptr %15, i64 16
  store ptr %1, ptr %50, align 16, !tbaa !10
  %.sroa.3.0..sroa_idx = getelementptr inbounds i8, ptr %15, i64 24
  store i64 %2, ptr %.sroa.3.0..sroa_idx, align 8, !tbaa !12
  %51 = getelementptr inbounds i8, ptr %15, i64 32
  store <4 x float> %22, ptr %51, align 16, !tbaa !9
  %52 = getelementptr inbounds i8, ptr %15, i64 48
  store <2 x i64> %21, ptr %52, align 16, !tbaa !9
  %53 = getelementptr inbounds i8, ptr %15, i64 64
  store <2 x i64> %23, ptr %53, align 16, !tbaa !9
  call void @"_ZSt8generateIN2al11ptr_wrapperIPDv4_fEEZ9Resample_I7LerpTag7SSE2TagEvPKSt7variantIJSt9monostate10CubicState10BsincStateEENS0_4spanIKfLm18446744073709551615EEEjjNSF_IfLm18446744073709551615EEEE3$_0EvT_SK_T0_"(ptr %47, ptr %48, ptr noundef nonnull byval(%class.anon) align 16 %15)
  %54 = call noundef i64 @_ZNK2al4spanIfLm18446744073709551615EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #8
  %55 = and i64 %54, 3
  %.not = icmp eq i64 %55, 0
  br i1 %.not, label %71, label %56

56:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #8
  %57 = load <2 x i64>, ptr %13, align 16, !tbaa !9
  %58 = call noundef i32 @_ZL17_mm_cvtsi128_si32Dv2_x(<2 x i64> noundef %57)
  %59 = zext i32 %58 to i64
  store i64 %59, ptr %16, align 8, !tbaa !12
  %60 = load <2 x i64>, ptr %12, align 16, !tbaa !9
  %61 = call noundef i32 @_ZL17_mm_cvtsi128_si32Dv2_x(<2 x i64> noundef %60)
  store i32 %61, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #8
  %62 = call { ptr, i64 } @_ZNK2al4spanIfLm18446744073709551615EE4lastEm(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef %55) #8
  %63 = extractvalue { ptr, i64 } %62, 0
  store ptr %63, ptr %17, align 8
  %64 = getelementptr inbounds i8, ptr %17, i64 8
  %65 = extractvalue { ptr, i64 } %62, 1
  store i64 %65, ptr %64, align 8
  %66 = call ptr @_ZNK2al4spanIfLm18446744073709551615EE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %17) #8
  %67 = call ptr @_ZNK2al4spanIfLm18446744073709551615EE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %17) #8
  store ptr %16, ptr %18, align 8, !tbaa !10
  %68 = getelementptr inbounds i8, ptr %18, i64 8
  store ptr %7, ptr %68, align 8, !tbaa !10
  %69 = getelementptr inbounds i8, ptr %18, i64 16
  store ptr %1, ptr %69, align 8, !tbaa !10
  %.sroa.3.0..sroa_idx13 = getelementptr inbounds i8, ptr %18, i64 24
  store i64 %2, ptr %.sroa.3.0..sroa_idx13, align 8, !tbaa !12
  %70 = getelementptr inbounds i8, ptr %18, i64 32
  store i32 %4, ptr %70, align 8, !tbaa !14
  call void @"_ZSt8generateIN2al11ptr_wrapperIPfEEZ9Resample_I7LerpTag7SSE2TagEvPKSt7variantIJSt9monostate10CubicState10BsincStateEENS0_4spanIKfLm18446744073709551615EEEjjNSE_IfLm18446744073709551615EEEE3$_1EvT_SJ_T0_"(ptr %66, ptr %67, ptr noundef nonnull byval(%class.anon.4) align 8 %18)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  br label %71

71:                                               ; preds = %56, %6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  ret void
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write)
declare void @llvm.assume(i1 noundef) #1

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

; Function Attrs: alwaysinline mustprogress uwtable
declare hidden noundef <2 x i64> @_ZL14_mm_set1_epi32i(i32 noundef) local_unnamed_addr #3

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <4 x float> @_ZL11_mm_set1_psf(float noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z13InitPosArraysILm4EEvjjjN2al4spanIjXT_EEES2_(i32 noundef, i32 noundef, i32 noundef, ptr, ptr) local_unnamed_addr #6

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <2 x i64> @_ZL14_mm_setr_epi32iiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm4EEixEm(ptr noundef nonnull align 4 dereferenceable(16), i64 noundef) local_unnamed_addr #7 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZSt8generateIN2al11ptr_wrapperIPDv4_fEEZ9Resample_I7LerpTag7SSE2TagEvPKSt7variantIJSt9monostate10CubicState10BsincStateEENS0_4spanIKfLm18446744073709551615EEEjjNSF_IfLm18446744073709551615EEEE3$_0EvT_SK_T0_"(ptr, ptr, ptr noundef byval(%class.anon) align 16) local_unnamed_addr #0

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL17_mm_cvtsi128_si32Dv2_x(<2 x i64> noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZSt8generateIN2al11ptr_wrapperIPfEEZ9Resample_I7LerpTag7SSE2TagEvPKSt7variantIJSt9monostate10CubicState10BsincStateEENS0_4spanIKfLm18446744073709551615EEEjjNSE_IfLm18446744073709551615EEEE3$_1EvT_SJ_T0_"(ptr, ptr, ptr noundef byval(%class.anon.4) align 8) local_unnamed_addr #6

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="128" "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 nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "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 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="128" "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 nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #7 = { 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 #8 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !6, i64 32}
!15 = !{!"_ZTSZ9Resample_I7LerpTag7SSE2TagEvPKSt7variantIJSt9monostate10CubicState10BsincStateEEN2al4spanIKfLm18446744073709551615EEEjjNSA_IfLm18446744073709551615EEEE3$_1", !11, i64 0, !11, i64 8, !16, i64 16, !6, i64 32}
!16 = !{!"_ZTSN2al4spanIKfLm18446744073709551615EEE", !11, i64 0, !13, i64 8}


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