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

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

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; 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
define dso_local void @_ZN9NfcFilter8process1EN2al4spanIKfLm18446744073709551615EEENS1_IfLm18446744073709551615EEE(ptr noundef nonnull align 4 dereferenceable(152) %0, ptr %1, i64 %2, ptr %3, i64 %4) #2 align 2 {
  %6 = alloca %"class.al::span", align 8
  %7 = alloca %"class.al::span.3", align 8
  %8 = alloca ptr, align 8
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca %class.anon, align 8
  %14 = alloca %"class.al::ptr_wrapper.4", align 8
  %15 = alloca %"class.al::ptr_wrapper.4", align 8
  %16 = alloca %"class.al::ptr_wrapper", align 8
  %17 = alloca %class.anon, align 8
  %18 = alloca %"class.al::ptr_wrapper", align 8
  %19 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 0
  store ptr %1, ptr %19, align 8
  %20 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 1
  store i64 %2, ptr %20, align 8
  %21 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 0
  store ptr %3, ptr %21, align 8
  %22 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 1
  store i64 %4, ptr %22, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  %23 = load ptr, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %24 = getelementptr inbounds %class.NfcFilter, ptr %23, i32 0, i32 0
  %25 = getelementptr inbounds %struct.NfcFilter1, ptr %24, i32 0, i32 1
  %26 = load float, ptr %25, align 4, !tbaa !9
  store float %26, ptr %9, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %27 = getelementptr inbounds %class.NfcFilter, ptr %23, i32 0, i32 0
  %28 = getelementptr inbounds %struct.NfcFilter1, ptr %27, i32 0, i32 2
  %29 = load float, ptr %28, align 4, !tbaa !21
  store float %29, ptr %10, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %30 = getelementptr inbounds %class.NfcFilter, ptr %23, i32 0, i32 0
  %31 = getelementptr inbounds %struct.NfcFilter1, ptr %30, i32 0, i32 3
  %32 = load float, ptr %31, align 4, !tbaa !22
  store float %32, ptr %11, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %33 = getelementptr inbounds %class.NfcFilter, ptr %23, i32 0, i32 0
  %34 = getelementptr inbounds %struct.NfcFilter1, ptr %33, i32 0, i32 4
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIfLm1EEixEm(ptr noundef nonnull align 4 dereferenceable(4) %34, i64 noundef 0) #4
  %36 = load float, ptr %35, align 4, !tbaa !20
  store float %36, ptr %12, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #4
  %37 = getelementptr inbounds %class.anon, ptr %13, i32 0, i32 0
  %38 = load float, ptr %9, align 4, !tbaa !20
  store float %38, ptr %37, align 8, !tbaa !23
  %39 = getelementptr inbounds %class.anon, ptr %13, i32 0, i32 1
  %40 = load float, ptr %10, align 4, !tbaa !20
  store float %40, ptr %39, align 4, !tbaa !25
  %41 = getelementptr inbounds %class.anon, ptr %13, i32 0, i32 2
  %42 = load float, ptr %11, align 4, !tbaa !20
  store float %42, ptr %41, align 8, !tbaa !26
  %43 = getelementptr inbounds %class.anon, ptr %13, i32 0, i32 3
  store ptr %12, ptr %43, align 8, !tbaa !5
  %44 = call ptr @_ZNK2al4spanIKfLm18446744073709551615EE6cbeginEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #4
  %45 = getelementptr inbounds %"class.al::ptr_wrapper.4", ptr %14, i32 0, i32 0
  store ptr %44, ptr %45, align 8
  %46 = call ptr @_ZNK2al4spanIKfLm18446744073709551615EE4cendEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #4
  %47 = getelementptr inbounds %"class.al::ptr_wrapper.4", ptr %15, i32 0, i32 0
  store ptr %46, ptr %47, align 8
  %48 = call ptr @_ZNK2al4spanIfLm18446744073709551615EE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #4
  %49 = getelementptr inbounds %"class.al::ptr_wrapper", ptr %16, i32 0, i32 0
  store ptr %48, ptr %49, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %13, i64 24, i1 false), !tbaa.struct !27
  %50 = getelementptr inbounds %"class.al::ptr_wrapper.4", ptr %14, i32 0, i32 0
  %51 = load ptr, ptr %50, align 8
  %52 = getelementptr inbounds %"class.al::ptr_wrapper.4", ptr %15, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8
  %54 = getelementptr inbounds %"class.al::ptr_wrapper", ptr %16, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8
  %56 = call ptr @"_ZSt9transformIN2al11ptr_wrapperIPKfEENS1_IPfEEZN9NfcFilter8process1ENS0_4spanIS2_Lm18446744073709551615EEENS8_IfLm18446744073709551615EEEE3$_0ET0_T_SD_SC_T1_"(ptr %51, ptr %53, ptr %55, ptr noundef byval(%class.anon) align 8 %17)
  %57 = getelementptr inbounds %"class.al::ptr_wrapper", ptr %18, i32 0, i32 0
  store ptr %56, ptr %57, align 8
  %58 = load float, ptr %12, align 4, !tbaa !20
  %59 = getelementptr inbounds %class.NfcFilter, ptr %23, i32 0, i32 0
  %60 = getelementptr inbounds %struct.NfcFilter1, ptr %59, i32 0, i32 4
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIfLm1EEixEm(ptr noundef nonnull align 4 dereferenceable(4) %60, i64 noundef 0) #4
  store float %58, ptr %61, align 4, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden ptr @"_ZSt9transformIN2al11ptr_wrapperIPKfEENS1_IPfEEZN9NfcFilter8process1ENS0_4spanIS2_Lm18446744073709551615EEENS8_IfLm18446744073709551615EEEE3$_0ET0_T_SD_SC_T1_"(ptr, ptr, ptr, ptr noundef byval(%class.anon) align 8) #3

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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, !12, i64 4}
!10 = !{!"_ZTS9NfcFilter", !11, i64 0, !14, i64 20, !16, i64 52, !18, i64 96}
!11 = !{!"_ZTS10NfcFilter1", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !13, i64 16}
!12 = !{!"float", !7, i64 0}
!13 = !{!"_ZTSSt5arrayIfLm1EE", !7, i64 0}
!14 = !{!"_ZTS10NfcFilter2", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !15, i64 24}
!15 = !{!"_ZTSSt5arrayIfLm2EE", !7, i64 0}
!16 = !{!"_ZTS10NfcFilter3", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !17, i64 32}
!17 = !{!"_ZTSSt5arrayIfLm3EE", !7, i64 0}
!18 = !{!"_ZTS10NfcFilter4", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !19, i64 40}
!19 = !{!"_ZTSSt5arrayIfLm4EE", !7, i64 0}
!20 = !{!12, !12, i64 0}
!21 = !{!10, !12, i64 8}
!22 = !{!10, !12, i64 12}
!23 = !{!24, !12, i64 0}
!24 = !{!"_ZTSZN9NfcFilter8process1EN2al4spanIKfLm18446744073709551615EEENS1_IfLm18446744073709551615EEEE3$_0", !12, i64 0, !12, i64 4, !12, i64 8, !6, i64 16}
!25 = !{!24, !12, i64 4}
!26 = !{!24, !12, i64 8}
!27 = !{i64 0, i64 4, !20, i64 4, i64 4, !20, i64 8, i64 4, !20, i64 16, i64 8, !5}


; 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" = type { ptr, i64 }
%"class.al::span.3" = type { ptr, i64 }
%class.anon = type { float, float, float, ptr }

; 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 nounwind uwtable
define dso_local void @_ZN9NfcFilter8process1EN2al4spanIKfLm18446744073709551615EEENS1_IfLm18446744073709551615EEE(ptr noundef nonnull align 4 dereferenceable(152) %0, ptr %1, i64 %2, ptr %3, i64 %4) local_unnamed_addr #1 align 2 {
  %6 = alloca %"class.al::span", align 8
  %7 = alloca %"class.al::span.3", align 8
  %8 = alloca float, align 4
  %9 = alloca %class.anon, align 8
  store ptr %1, ptr %6, align 8
  %10 = getelementptr inbounds i8, ptr %6, i64 8
  store i64 %2, ptr %10, align 8
  store ptr %3, ptr %7, align 8
  %11 = getelementptr inbounds i8, ptr %7, i64 8
  store i64 %4, ptr %11, align 8
  %12 = getelementptr inbounds i8, ptr %0, i64 4
  %13 = getelementptr inbounds i8, ptr %0, i64 12
  %14 = load float, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #2
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  %16 = load <2 x float>, ptr %12, align 4, !tbaa !18
  %17 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIfLm1EEixEm(ptr noundef nonnull align 4 dereferenceable(4) %15, i64 noundef 0) #2
  %18 = load float, ptr %17, align 4, !tbaa !18
  store float %18, ptr %8, align 4, !tbaa !18
  %19 = call ptr @_ZNK2al4spanIKfLm18446744073709551615EE6cbeginEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #2
  %20 = call ptr @_ZNK2al4spanIKfLm18446744073709551615EE4cendEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #2
  %21 = call ptr @_ZNK2al4spanIfLm18446744073709551615EE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #2
  store <2 x float> %16, ptr %9, align 8, !tbaa !18
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  store float %14, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !18
  %.sroa.65.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 16
  store ptr %8, ptr %.sroa.65.0..sroa_idx, align 8, !tbaa !19
  %22 = call ptr @"_ZSt9transformIN2al11ptr_wrapperIPKfEENS1_IPfEEZN9NfcFilter8process1ENS0_4spanIS2_Lm18446744073709551615EEENS8_IfLm18446744073709551615EEEE3$_0ET0_T_SD_SC_T1_"(ptr %19, ptr %20, ptr %21, ptr noundef nonnull byval(%class.anon) align 8 %9)
  %23 = load float, ptr %8, align 4, !tbaa !18
  %24 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIfLm1EEixEm(ptr noundef nonnull align 4 dereferenceable(4) %15, i64 noundef 0) #2
  store float %23, ptr %24, align 4, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #2
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden ptr @"_ZSt9transformIN2al11ptr_wrapperIPKfEENS1_IPfEEZN9NfcFilter8process1ENS0_4spanIS2_Lm18446744073709551615EEENS8_IfLm18446744073709551615EEEE3$_0ET0_T_SD_SC_T1_"(ptr, ptr, ptr, ptr noundef byval(%class.anon) align 8) local_unnamed_addr #1

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

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

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

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

!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, !8, i64 12}
!6 = !{!"_ZTS9NfcFilter", !7, i64 0, !12, i64 20, !14, i64 52, !16, i64 96}
!7 = !{!"_ZTS10NfcFilter1", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12, !11, i64 16}
!8 = !{!"float", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSSt5arrayIfLm1EE", !9, i64 0}
!12 = !{!"_ZTS10NfcFilter2", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12, !8, i64 16, !8, i64 20, !13, i64 24}
!13 = !{!"_ZTSSt5arrayIfLm2EE", !9, i64 0}
!14 = !{!"_ZTS10NfcFilter3", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12, !8, i64 16, !8, i64 20, !8, i64 24, !8, i64 28, !15, i64 32}
!15 = !{!"_ZTSSt5arrayIfLm3EE", !9, i64 0}
!16 = !{!"_ZTS10NfcFilter4", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12, !8, i64 16, !8, i64 20, !8, i64 24, !8, i64 28, !8, i64 32, !8, i64 36, !17, i64 40}
!17 = !{!"_ZTSSt5arrayIfLm4EE", !9, i64 0}
!18 = !{!8, !8, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"any pointer", !9, i64 0}


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