; LLVM IR from SelfishOlex/MiniAudioO3DE :: MiniAudio/Code/Source/Clients (MiniAudioImplementation)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.ma_spatializer_listener_heap_layout = type { i64, i64 }
%struct.ma_vec3f = type { float, float, float }
%struct.ma_spatializer_listener = type { %struct.ma_spatializer_listener_config, %struct.ma_vec3f, %struct.ma_vec3f, %struct.ma_vec3f, i32, i32, ptr }
%struct.ma_spatializer_listener_config = type { i32, ptr, i32, float, float, float, float, %struct.ma_vec3f }

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

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

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

; 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) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @ma_channel_map_copy_or_default(ptr noundef, i64 noundef, ptr noundef, i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_Z16ma_vec3f_init_3ffff(float noundef, float noundef, float noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_Z12ma_vec3f_neg8ma_vec3f(<2 x float>, float) #5

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL39ma_spatializer_listener_get_heap_layoutPK30ma_spatializer_listener_configP35ma_spatializer_listener_heap_layout(ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local i32 @ma_spatializer_listener_init_preallocated(ptr noundef %0, ptr noundef %1, ptr noundef %2) #6 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %struct.ma_spatializer_listener_heap_layout, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.ma_vec3f, align 4
  %12 = alloca { <2 x float>, float }, align 8
  %13 = alloca %struct.ma_vec3f, align 4
  %14 = alloca { <2 x float>, float }, align 8
  %15 = alloca %struct.ma_vec3f, align 4
  %16 = alloca { <2 x float>, float }, align 8
  %17 = alloca %struct.ma_vec3f, align 4
  %18 = alloca %struct.ma_vec3f, align 4
  %19 = alloca { <2 x float>, float }, align 4
  %20 = alloca { <2 x float>, float }, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #7
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = icmp eq ptr %21, null
  br i1 %22, label %23, label %24

23:                                               ; preds = %3
  store i32 -2, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %108

24:                                               ; preds = %3
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %25, i8 0, i64 104, i1 false)
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = call noundef i32 @_ZL39ma_spatializer_listener_get_heap_layoutPK30ma_spatializer_listener_configP35ma_spatializer_listener_heap_layout(ptr noundef %26, ptr noundef %9)
  store i32 %27, ptr %8, align 4, !tbaa !9
  %28 = load i32, ptr %8, align 4, !tbaa !9
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %30, label %32

30:                                               ; preds = %24
  %31 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %31, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %108

32:                                               ; preds = %24
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.ma_spatializer_listener, ptr %34, i32 0, i32 6
  store ptr %33, ptr %35, align 8, !tbaa !11
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.ma_spatializer_listener_heap_layout, ptr %9, i32 0, i32 0
  %38 = load i64, ptr %37, align 8, !tbaa !18
  call void @llvm.memset.p0.i64(ptr align 1 %36, i8 0, i64 %38, i1 false)
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.ma_spatializer_listener, ptr %40, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %41, ptr align 8 %39, i64 48, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #7
  %42 = call { <2 x float>, float } @_Z16ma_vec3f_init_3ffff(float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  store { <2 x float>, float } %42, ptr %12, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 8 %12, i64 12, i1 false)
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.ma_spatializer_listener, ptr %43, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %44, ptr align 4 %11, i64 12, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #7
  %45 = call { <2 x float>, float } @_Z16ma_vec3f_init_3ffff(float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef -1.000000e+00)
  store { <2 x float>, float } %45, ptr %14, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 8 %14, i64 12, i1 false)
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.ma_spatializer_listener, ptr %46, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %47, ptr align 4 %13, i64 12, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #7
  %48 = call { <2 x float>, float } @_Z16ma_vec3f_init_3ffff(float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  store { <2 x float>, float } %48, ptr %16, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 8 %16, i64 12, i1 false)
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.ma_spatializer_listener, ptr %49, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %50, ptr align 4 %15, i64 12, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #7
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.ma_spatializer_listener, ptr %51, i32 0, i32 4
  store i32 1, ptr %52, align 4, !tbaa !26
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.ma_spatializer_listener, ptr %53, i32 0, i32 0
  %55 = getelementptr inbounds %struct.ma_spatializer_listener_config, ptr %54, i32 0, i32 2
  %56 = load i32, ptr %55, align 8, !tbaa !27
  %57 = icmp eq i32 %56, 1
  br i1 %57, label %58, label %68

58:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 12, ptr %17) #7
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.ma_spatializer_listener, ptr %59, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %60, i64 12, i1 false), !tbaa.struct !25
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %18, i64 12, i1 false)
  %61 = getelementptr inbounds { <2 x float>, float }, ptr %19, i32 0, i32 0
  %62 = load <2 x float>, ptr %61, align 4
  %63 = getelementptr inbounds { <2 x float>, float }, ptr %19, i32 0, i32 1
  %64 = load float, ptr %63, align 4
  %65 = call { <2 x float>, float } @_Z12ma_vec3f_neg8ma_vec3f(<2 x float> %62, float %64)
  store { <2 x float>, float } %65, ptr %20, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 8 %20, i64 12, i1 false)
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.ma_spatializer_listener, ptr %66, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %67, ptr align 4 %17, i64 12, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #7
  br label %68

68:                                               ; preds = %58, %32
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.ma_spatializer_listener_heap_layout, ptr %9, i32 0, i32 1
  %71 = load i64, ptr %70, align 8, !tbaa !28
  %72 = getelementptr inbounds i8, ptr %69, i64 %71
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.ma_spatializer_listener, ptr %73, i32 0, i32 0
  %75 = getelementptr inbounds %struct.ma_spatializer_listener_config, ptr %74, i32 0, i32 1
  store ptr %72, ptr %75, align 8, !tbaa !29
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.ma_spatializer_listener_config, ptr %76, i32 0, i32 1
  %78 = load ptr, ptr %77, align 8, !tbaa !30
  %79 = icmp eq ptr %78, null
  br i1 %79, label %80, label %92

80:                                               ; preds = %68
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.ma_spatializer_listener, ptr %81, i32 0, i32 0
  %83 = getelementptr inbounds %struct.ma_spatializer_listener_config, ptr %82, i32 0, i32 1
  %84 = load ptr, ptr %83, align 8, !tbaa !29
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.ma_spatializer_listener_config, ptr %85, i32 0, i32 0
  %87 = load i32, ptr %86, align 8, !tbaa !31
  %88 = zext i32 %87 to i64
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.ma_spatializer_listener_config, ptr %89, i32 0, i32 0
  %91 = load i32, ptr %90, align 8, !tbaa !31
  call void @_ZL42ma_get_default_channel_map_for_spatializerPhmj(ptr noundef %84, i64 noundef %88, i32 noundef %91)
  br label %107

92:                                               ; preds = %68
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.ma_spatializer_listener, ptr %93, i32 0, i32 0
  %95 = getelementptr inbounds %struct.ma_spatializer_listener_config, ptr %94, i32 0, i32 1
  %96 = load ptr, ptr %95, align 8, !tbaa !29
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.ma_spatializer_listener_config, ptr %97, i32 0, i32 0
  %99 = load i32, ptr %98, align 8, !tbaa !31
  %100 = zext i32 %99 to i64
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.ma_spatializer_listener_config, ptr %101, i32 0, i32 1
  %103 = load ptr, ptr %102, align 8, !tbaa !30
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.ma_spatializer_listener_config, ptr %104, i32 0, i32 0
  %106 = load i32, ptr %105, align 8, !tbaa !31
  call void @ma_channel_map_copy_or_default(ptr noundef %96, i64 noundef %100, ptr noundef %103, i32 noundef %106)
  br label %107

107:                                              ; preds = %92, %80
  store i32 0, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %108

108:                                              ; preds = %107, %30, %23
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  %109 = load i32, ptr %4, align 4
  ret i32 %109
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL42ma_get_default_channel_map_for_spatializerPhmj(ptr noundef, i64 noundef, i32 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 nounwind uwtable "min-legal-vector-width"="64" "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 #6 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTS9ma_result", !7, i64 0}
!11 = !{!12, !6, i64 96}
!12 = !{!"_ZTS23ma_spatializer_listener", !13, i64 0, !17, i64 48, !17, i64 60, !17, i64 72, !14, i64 84, !14, i64 88, !6, i64 96}
!13 = !{!"_ZTS30ma_spatializer_listener_config", !14, i64 0, !6, i64 8, !15, i64 16, !16, i64 20, !16, i64 24, !16, i64 28, !16, i64 32, !17, i64 36}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTS13ma_handedness", !7, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!"_ZTS8ma_vec3f", !16, i64 0, !16, i64 4, !16, i64 8}
!18 = !{!19, !20, i64 0}
!19 = !{!"_ZTS35ma_spatializer_listener_heap_layout", !20, i64 0, !20, i64 8}
!20 = !{!"long", !7, i64 0}
!21 = !{i64 0, i64 4, !22, i64 8, i64 8, !5, i64 16, i64 4, !23, i64 20, i64 4, !24, i64 24, i64 4, !24, i64 28, i64 4, !24, i64 32, i64 4, !24, i64 36, i64 4, !24, i64 40, i64 4, !24, i64 44, i64 4, !24}
!22 = !{!14, !14, i64 0}
!23 = !{!15, !15, i64 0}
!24 = !{!16, !16, i64 0}
!25 = !{i64 0, i64 4, !24, i64 4, i64 4, !24, i64 8, i64 4, !24}
!26 = !{!12, !14, i64 84}
!27 = !{!12, !15, i64 16}
!28 = !{!19, !20, i64 8}
!29 = !{!12, !6, i64 8}
!30 = !{!13, !6, i64 8}
!31 = !{!13, !14, i64 0}


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

%struct.ma_spatializer_listener_heap_layout = type { i64, i64 }

; 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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: mustprogress 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) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @ma_channel_map_copy_or_default(ptr noundef, i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_Z16ma_vec3f_init_3ffff(float noundef, float noundef, float noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_Z12ma_vec3f_neg8ma_vec3f(<2 x float>, float) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL39ma_spatializer_listener_get_heap_layoutPK30ma_spatializer_listener_configP35ma_spatializer_listener_heap_layout(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @ma_spatializer_listener_init_preallocated(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #6 {
  %4 = alloca %struct.ma_spatializer_listener_heap_layout, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  %5 = icmp eq ptr %2, null
  br i1 %5, label %35, label %6

6:                                                ; preds = %3
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(104) %2, i8 0, i64 104, i1 false)
  %7 = call noundef i32 @_ZL39ma_spatializer_listener_get_heap_layoutPK30ma_spatializer_listener_configP35ma_spatializer_listener_heap_layout(ptr noundef %0, ptr noundef nonnull %4)
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %8, label %35

8:                                                ; preds = %6
  %9 = getelementptr inbounds i8, ptr %2, i64 96
  store ptr %1, ptr %9, align 8, !tbaa !5
  %10 = load i64, ptr %4, align 8, !tbaa !15
  call void @llvm.memset.p0.i64(ptr align 1 %1, i8 0, i64 %10, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %0, i64 48, i1 false), !tbaa.struct !18
  %11 = call { <2 x float>, float } @_Z16ma_vec3f_init_3ffff(float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %.fca.0.extract18 = extractvalue { <2 x float>, float } %11, 0
  %.fca.1.extract19 = extractvalue { <2 x float>, float } %11, 1
  %12 = getelementptr inbounds i8, ptr %2, i64 48
  store <2 x float> %.fca.0.extract18, ptr %12, align 8
  %.sroa.423.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 56
  store float %.fca.1.extract19, ptr %.sroa.423.0..sroa_idx, align 8, !tbaa !22
  %13 = call { <2 x float>, float } @_Z16ma_vec3f_init_3ffff(float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef -1.000000e+00)
  %.fca.0.extract12 = extractvalue { <2 x float>, float } %13, 0
  %.fca.1.extract13 = extractvalue { <2 x float>, float } %13, 1
  %14 = getelementptr inbounds i8, ptr %2, i64 60
  store <2 x float> %.fca.0.extract12, ptr %14, align 4
  %.sroa.417.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 68
  store float %.fca.1.extract13, ptr %.sroa.417.0..sroa_idx, align 4, !tbaa !22
  %15 = call { <2 x float>, float } @_Z16ma_vec3f_init_3ffff(float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %.fca.0.extract6 = extractvalue { <2 x float>, float } %15, 0
  %.fca.1.extract7 = extractvalue { <2 x float>, float } %15, 1
  %16 = getelementptr inbounds i8, ptr %2, i64 72
  store <2 x float> %.fca.0.extract6, ptr %16, align 8
  %.sroa.411.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 80
  store float %.fca.1.extract7, ptr %.sroa.411.0..sroa_idx, align 8, !tbaa !22
  %17 = getelementptr inbounds i8, ptr %2, i64 84
  store i32 1, ptr %17, align 4, !tbaa !23
  %18 = getelementptr inbounds i8, ptr %2, i64 16
  %19 = load i32, ptr %18, align 8, !tbaa !24
  %20 = icmp eq i32 %19, 1
  br i1 %20, label %21, label %23

21:                                               ; preds = %8
  %.sroa.03.0.copyload = load <2 x float>, ptr %14, align 4
  %.sroa.24.0.copyload = load float, ptr %.sroa.417.0..sroa_idx, align 4, !tbaa !22
  %22 = call { <2 x float>, float } @_Z12ma_vec3f_neg8ma_vec3f(<2 x float> %.sroa.03.0.copyload, float %.sroa.24.0.copyload)
  %.fca.0.extract = extractvalue { <2 x float>, float } %22, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %22, 1
  store <2 x float> %.fca.0.extract, ptr %14, align 4
  store float %.fca.1.extract, ptr %.sroa.417.0..sroa_idx, align 4, !tbaa !22
  br label %23

23:                                               ; preds = %21, %8
  %24 = getelementptr inbounds i8, ptr %4, i64 8
  %25 = load i64, ptr %24, align 8, !tbaa !25
  %26 = getelementptr inbounds i8, ptr %1, i64 %25
  %27 = getelementptr inbounds i8, ptr %2, i64 8
  store ptr %26, ptr %27, align 8, !tbaa !26
  %28 = getelementptr inbounds i8, ptr %0, i64 8
  %29 = load ptr, ptr %28, align 8, !tbaa !27
  %30 = icmp eq ptr %29, null
  %31 = load i32, ptr %0, align 8, !tbaa !28
  %32 = zext i32 %31 to i64
  br i1 %30, label %33, label %34

33:                                               ; preds = %23
  call void @_ZL42ma_get_default_channel_map_for_spatializerPhmj(ptr noundef %26, i64 noundef %32, i32 noundef %31)
  br label %35

34:                                               ; preds = %23
  call void @ma_channel_map_copy_or_default(ptr noundef %26, i64 noundef %32, ptr noundef nonnull %29, i32 noundef %31)
  br label %35

35:                                               ; preds = %33, %34, %6, %3
  %.0 = phi i32 [ -2, %3 ], [ %7, %6 ], [ 0, %34 ], [ 0, %33 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  ret i32 %.0
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL42ma_get_default_channel_map_for_spatializerPhmj(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 nounwind uwtable "min-legal-vector-width"="64" "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 #6 = { mustprogress uwtable "min-legal-vector-width"="64" "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, !11, i64 96}
!6 = !{!"_ZTS23ma_spatializer_listener", !7, i64 0, !14, i64 48, !14, i64 60, !14, i64 72, !8, i64 84, !8, i64 88, !11, i64 96}
!7 = !{!"_ZTS30ma_spatializer_listener_config", !8, i64 0, !11, i64 8, !12, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !14, i64 36}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"_ZTS13ma_handedness", !9, i64 0}
!13 = !{!"float", !9, i64 0}
!14 = !{!"_ZTS8ma_vec3f", !13, i64 0, !13, i64 4, !13, i64 8}
!15 = !{!16, !17, i64 0}
!16 = !{!"_ZTS35ma_spatializer_listener_heap_layout", !17, i64 0, !17, i64 8}
!17 = !{!"long", !9, i64 0}
!18 = !{i64 0, i64 4, !19, i64 8, i64 8, !20, i64 16, i64 4, !21, i64 20, i64 4, !22, i64 24, i64 4, !22, i64 28, i64 4, !22, i64 32, i64 4, !22, i64 36, i64 4, !22, i64 40, i64 4, !22, i64 44, i64 4, !22}
!19 = !{!8, !8, i64 0}
!20 = !{!11, !11, i64 0}
!21 = !{!12, !12, i64 0}
!22 = !{!13, !13, i64 0}
!23 = !{!6, !8, i64 84}
!24 = !{!6, !12, i64 16}
!25 = !{!16, !17, i64 8}
!26 = !{!6, !11, i64 8}
!27 = !{!7, !11, i64 8}
!28 = !{!7, !8, i64 0}


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