; LLVM IR from merpheus-dev/LavaEngine :: src/Utils/soloud/src/core (soloud_core_setters)

; 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.SoLoud::Soloud" = type <{ ptr, ptr, i8, [7 x i8], ptr, i32, i32, %"class.SoLoud::AlignedFloatBuffer", i32, i32, %"class.SoLoud::AlignedFloatBuffer", ptr, ptr, [1024 x ptr], i32, i32, i32, [4 x i8], ptr, i32, i32, float, float, i32, i32, %"class.SoLoud::Fader", double, double, [8 x ptr], [8 x ptr], [8 x float], [256 x float], [256 x float], [256 x float], [3 x float], [3 x float], [3 x float], [3 x float], float, [24 x float], [4 x i8], [1024 x %"class.SoLoud::AudioSourceInstance3dData"], ptr, i32, [1024 x i32], i32, i8, [7 x i8] }>
%"class.SoLoud::AlignedFloatBuffer" = type <{ ptr, ptr, i32, [4 x i8] }>
%"class.SoLoud::Fader" = type { float, float, float, double, double, double, float, i32 }
%"class.SoLoud::AudioSourceInstance3dData" = type <{ [3 x float], [3 x float], float, float, float, i32, float, [4 x i8], ptr, ptr, i32, float, float, [8 x float], i32, i32, [4 x i8] }>
%"class.SoLoud::AudioSourceInstance" = type { ptr, i32, i32, i32, float, [8 x float], float, float, float, float, i32, float, float, double, double, %"class.SoLoud::Fader", %"class.SoLoud::Fader", %"class.SoLoud::Fader", %"class.SoLoud::Fader", %"class.SoLoud::Fader", i32, [8 x float], i32, i32, [8 x ptr], [2 x ptr], i32, i32, i32, double }

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

declare void @_ZN6SoLoud6Soloud23lockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138793)) #1

declare noundef ptr @_ZNK6SoLoud6Soloud32voiceGroupHandleToArray_internalEj(ptr noundef nonnull align 8 dereferenceable(138793), i32 noundef) #1

declare noundef i32 @_ZNK6SoLoud6Soloud27getVoiceFromHandle_internalEj(ptr noundef nonnull align 8 dereferenceable(138793), i32 noundef) #1

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

declare void @_ZN6SoLoud6Soloud25unlockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138793)) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6SoLoud6Soloud14setPanAbsoluteEjffffff(ptr noundef nonnull align 8 dereferenceable(138793) %0, i32 noundef %1, float noundef %2, float noundef %3, float noundef %4, float noundef %5, float noundef %6, float noundef %7) #2 align 2 {
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca ptr, align 8
  %18 = alloca [2 x i32], align 4
  %19 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store i32 %1, ptr %10, align 4, !tbaa !9
  store float %2, ptr %11, align 4, !tbaa !11
  store float %3, ptr %12, align 4, !tbaa !11
  store float %4, ptr %13, align 4, !tbaa !11
  store float %5, ptr %14, align 4, !tbaa !11
  store float %6, ptr %15, align 4, !tbaa !11
  store float %7, ptr %16, align 4, !tbaa !11
  %20 = load ptr, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  store ptr null, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %21 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %21, ptr %18, align 4, !tbaa !9
  %22 = getelementptr inbounds i32, ptr %18, i64 1
  store i32 0, ptr %22, align 4, !tbaa !9
  call void @_ZN6SoLoud6Soloud23lockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138793) %20)
  %23 = load i32, ptr %10, align 4, !tbaa !9
  %24 = call noundef ptr @_ZNK6SoLoud6Soloud32voiceGroupHandleToArray_internalEj(ptr noundef nonnull align 8 dereferenceable(138793) %20, i32 noundef %23)
  store ptr %24, ptr %17, align 8, !tbaa !5
  %25 = load ptr, ptr %17, align 8, !tbaa !5
  %26 = icmp eq ptr %25, null
  br i1 %26, label %27, label %29

27:                                               ; preds = %8
  %28 = getelementptr inbounds [2 x i32], ptr %18, i64 0, i64 0
  store ptr %28, ptr %17, align 8, !tbaa !5
  br label %29

29:                                               ; preds = %27, %8
  br label %30

30:                                               ; preds = %196, %29
  %31 = load ptr, ptr %17, align 8, !tbaa !5
  %32 = load i32, ptr %31, align 4, !tbaa !9
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %34, label %199

34:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  %35 = load ptr, ptr %17, align 8, !tbaa !5
  %36 = load i32, ptr %35, align 4, !tbaa !9
  %37 = call noundef i32 @_ZNK6SoLoud6Soloud27getVoiceFromHandle_internalEj(ptr noundef nonnull align 8 dereferenceable(138793) %20, i32 noundef %36)
  store i32 %37, ptr %19, align 4, !tbaa !9
  %38 = load i32, ptr %19, align 4, !tbaa !9
  %39 = icmp ne i32 %38, -1
  br i1 %39, label %40, label %196

40:                                               ; preds = %34
  %41 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %20, i32 0, i32 13
  %42 = load i32, ptr %19, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [1024 x ptr], ptr %41, i64 0, i64 %43
  %45 = load ptr, ptr %44, align 8, !tbaa !5
  %46 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %45, i32 0, i32 15
  %47 = getelementptr inbounds %"class.SoLoud::Fader", ptr %46, i32 0, i32 7
  store i32 0, ptr %47, align 4, !tbaa !13
  %48 = load float, ptr %11, align 4, !tbaa !11
  %49 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %20, i32 0, i32 13
  %50 = load i32, ptr %19, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [1024 x ptr], ptr %49, i64 0, i64 %51
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %54 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %53, i32 0, i32 5
  %55 = getelementptr inbounds [8 x float], ptr %54, i64 0, i64 0
  store float %48, ptr %55, align 8, !tbaa !11
  %56 = load float, ptr %12, align 4, !tbaa !11
  %57 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %20, i32 0, i32 13
  %58 = load i32, ptr %19, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [1024 x ptr], ptr %57, i64 0, i64 %59
  %61 = load ptr, ptr %60, align 8, !tbaa !5
  %62 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %61, i32 0, i32 5
  %63 = getelementptr inbounds [8 x float], ptr %62, i64 0, i64 1
  store float %56, ptr %63, align 4, !tbaa !11
  %64 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %20, i32 0, i32 13
  %65 = load i32, ptr %19, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [1024 x ptr], ptr %64, i64 0, i64 %66
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  %69 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %68, i32 0, i32 10
  %70 = load i32, ptr %69, align 8, !tbaa !17
  %71 = icmp eq i32 %70, 4
  br i1 %71, label %72, label %89

72:                                               ; preds = %40
  %73 = load float, ptr %13, align 4, !tbaa !11
  %74 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %20, i32 0, i32 13
  %75 = load i32, ptr %19, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [1024 x ptr], ptr %74, i64 0, i64 %76
  %78 = load ptr, ptr %77, align 8, !tbaa !5
  %79 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %78, i32 0, i32 5
  %80 = getelementptr inbounds [8 x float], ptr %79, i64 0, i64 2
  store float %73, ptr %80, align 8, !tbaa !11
  %81 = load float, ptr %14, align 4, !tbaa !11
  %82 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %20, i32 0, i32 13
  %83 = load i32, ptr %19, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [1024 x ptr], ptr %82, i64 0, i64 %84
  %86 = load ptr, ptr %85, align 8, !tbaa !5
  %87 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %86, i32 0, i32 5
  %88 = getelementptr inbounds [8 x float], ptr %87, i64 0, i64 3
  store float %81, ptr %88, align 4, !tbaa !11
  br label %89

89:                                               ; preds = %72, %40
  %90 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %20, i32 0, i32 13
  %91 = load i32, ptr %19, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [1024 x ptr], ptr %90, i64 0, i64 %92
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %94, i32 0, i32 10
  %96 = load i32, ptr %95, align 8, !tbaa !17
  %97 = icmp eq i32 %96, 6
  br i1 %97, label %98, label %131

98:                                               ; preds = %89
  %99 = load float, ptr %15, align 4, !tbaa !11
  %100 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %20, i32 0, i32 13
  %101 = load i32, ptr %19, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [1024 x ptr], ptr %100, i64 0, i64 %102
  %104 = load ptr, ptr %103, align 8, !tbaa !5
  %105 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %104, i32 0, i32 5
  %106 = getelementptr inbounds [8 x float], ptr %105, i64 0, i64 2
  store float %99, ptr %106, align 8, !tbaa !11
  %107 = load float, ptr %16, align 4, !tbaa !11
  %108 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %20, i32 0, i32 13
  %109 = load i32, ptr %19, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [1024 x ptr], ptr %108, i64 0, i64 %110
  %112 = load ptr, ptr %111, align 8, !tbaa !5
  %113 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %112, i32 0, i32 5
  %114 = getelementptr inbounds [8 x float], ptr %113, i64 0, i64 3
  store float %107, ptr %114, align 4, !tbaa !11
  %115 = load float, ptr %13, align 4, !tbaa !11
  %116 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %20, i32 0, i32 13
  %117 = load i32, ptr %19, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [1024 x ptr], ptr %116, i64 0, i64 %118
  %120 = load ptr, ptr %119, align 8, !tbaa !5
  %121 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %120, i32 0, i32 5
  %122 = getelementptr inbounds [8 x float], ptr %121, i64 0, i64 4
  store float %115, ptr %122, align 8, !tbaa !11
  %123 = load float, ptr %14, align 4, !tbaa !11
  %124 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %20, i32 0, i32 13
  %125 = load i32, ptr %19, align 4, !tbaa !9
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [1024 x ptr], ptr %124, i64 0, i64 %126
  %128 = load ptr, ptr %127, align 8, !tbaa !5
  %129 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %128, i32 0, i32 5
  %130 = getelementptr inbounds [8 x float], ptr %129, i64 0, i64 5
  store float %123, ptr %130, align 4, !tbaa !11
  br label %131

131:                                              ; preds = %98, %89
  %132 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %20, i32 0, i32 13
  %133 = load i32, ptr %19, align 4, !tbaa !9
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [1024 x ptr], ptr %132, i64 0, i64 %134
  %136 = load ptr, ptr %135, align 8, !tbaa !5
  %137 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %136, i32 0, i32 10
  %138 = load i32, ptr %137, align 8, !tbaa !17
  %139 = icmp eq i32 %138, 8
  br i1 %139, label %140, label %195

140:                                              ; preds = %131
  %141 = load float, ptr %15, align 4, !tbaa !11
  %142 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %20, i32 0, i32 13
  %143 = load i32, ptr %19, align 4, !tbaa !9
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [1024 x ptr], ptr %142, i64 0, i64 %144
  %146 = load ptr, ptr %145, align 8, !tbaa !5
  %147 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %146, i32 0, i32 5
  %148 = getelementptr inbounds [8 x float], ptr %147, i64 0, i64 2
  store float %141, ptr %148, align 8, !tbaa !11
  %149 = load float, ptr %16, align 4, !tbaa !11
  %150 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %20, i32 0, i32 13
  %151 = load i32, ptr %19, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [1024 x ptr], ptr %150, i64 0, i64 %152
  %154 = load ptr, ptr %153, align 8, !tbaa !5
  %155 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %154, i32 0, i32 5
  %156 = getelementptr inbounds [8 x float], ptr %155, i64 0, i64 3
  store float %149, ptr %156, align 4, !tbaa !11
  %157 = load float, ptr %11, align 4, !tbaa !11
  %158 = load float, ptr %13, align 4, !tbaa !11
  %159 = fadd float %157, %158
  %160 = fmul float %159, 5.000000e-01
  %161 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %20, i32 0, i32 13
  %162 = load i32, ptr %19, align 4, !tbaa !9
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [1024 x ptr], ptr %161, i64 0, i64 %163
  %165 = load ptr, ptr %164, align 8, !tbaa !5
  %166 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %165, i32 0, i32 5
  %167 = getelementptr inbounds [8 x float], ptr %166, i64 0, i64 4
  store float %160, ptr %167, align 8, !tbaa !11
  %168 = load float, ptr %12, align 4, !tbaa !11
  %169 = load float, ptr %14, align 4, !tbaa !11
  %170 = fadd float %168, %169
  %171 = fmul float %170, 5.000000e-01
  %172 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %20, i32 0, i32 13
  %173 = load i32, ptr %19, align 4, !tbaa !9
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [1024 x ptr], ptr %172, i64 0, i64 %174
  %176 = load ptr, ptr %175, align 8, !tbaa !5
  %177 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %176, i32 0, i32 5
  %178 = getelementptr inbounds [8 x float], ptr %177, i64 0, i64 5
  store float %171, ptr %178, align 4, !tbaa !11
  %179 = load float, ptr %13, align 4, !tbaa !11
  %180 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %20, i32 0, i32 13
  %181 = load i32, ptr %19, align 4, !tbaa !9
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [1024 x ptr], ptr %180, i64 0, i64 %182
  %184 = load ptr, ptr %183, align 8, !tbaa !5
  %185 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %184, i32 0, i32 5
  %186 = getelementptr inbounds [8 x float], ptr %185, i64 0, i64 6
  store float %179, ptr %186, align 8, !tbaa !11
  %187 = load float, ptr %14, align 4, !tbaa !11
  %188 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %20, i32 0, i32 13
  %189 = load i32, ptr %19, align 4, !tbaa !9
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [1024 x ptr], ptr %188, i64 0, i64 %190
  %192 = load ptr, ptr %191, align 8, !tbaa !5
  %193 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %192, i32 0, i32 5
  %194 = getelementptr inbounds [8 x float], ptr %193, i64 0, i64 7
  store float %187, ptr %194, align 4, !tbaa !11
  br label %195

195:                                              ; preds = %140, %131
  br label %196

196:                                              ; preds = %195, %34
  %197 = load ptr, ptr %17, align 8, !tbaa !5
  %198 = getelementptr inbounds i32, ptr %197, i32 1
  store ptr %198, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  br label %30, !llvm.loop !18

199:                                              ; preds = %30
  call void @_ZN6SoLoud6Soloud25unlockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138793) %20)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { 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 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !10, i64 148}
!14 = !{!"_ZTSN6SoLoud19AudioSourceInstanceE", !10, i64 8, !10, i64 12, !10, i64 16, !12, i64 20, !7, i64 24, !12, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !10, i64 72, !12, i64 76, !12, i64 80, !15, i64 88, !15, i64 96, !16, i64 104, !16, i64 152, !16, i64 200, !16, i64 248, !16, i64 296, !10, i64 344, !7, i64 348, !10, i64 380, !10, i64 384, !7, i64 392, !7, i64 456, !10, i64 472, !10, i64 476, !10, i64 480, !15, i64 488}
!15 = !{!"double", !7, i64 0}
!16 = !{!"_ZTSN6SoLoud5FaderE", !12, i64 0, !12, i64 4, !12, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !12, i64 40, !10, i64 44}
!17 = !{!14, !10, i64 72}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


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

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

declare void @_ZN6SoLoud6Soloud23lockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138793)) local_unnamed_addr #1

declare noundef ptr @_ZNK6SoLoud6Soloud32voiceGroupHandleToArray_internalEj(ptr noundef nonnull align 8 dereferenceable(138793), i32 noundef) local_unnamed_addr #1

declare noundef i32 @_ZNK6SoLoud6Soloud27getVoiceFromHandle_internalEj(ptr noundef nonnull align 8 dereferenceable(138793), i32 noundef) local_unnamed_addr #1

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

declare void @_ZN6SoLoud6Soloud25unlockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138793)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6SoLoud6Soloud14setPanAbsoluteEjffffff(ptr noundef nonnull align 8 dereferenceable(138793) %0, i32 noundef %1, float noundef %2, float noundef %3, float noundef %4, float noundef %5, float noundef %6, float noundef %7) local_unnamed_addr #2 align 2 {
  %9 = alloca [2 x i32], align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #3
  store i32 %1, ptr %9, align 4, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %9, i64 4
  store i32 0, ptr %10, align 4, !tbaa !5
  tail call void @_ZN6SoLoud6Soloud23lockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138793) %0)
  %11 = tail call noundef ptr @_ZNK6SoLoud6Soloud32voiceGroupHandleToArray_internalEj(ptr noundef nonnull align 8 dereferenceable(138793) %0, i32 noundef %1)
  %12 = icmp eq ptr %11, null
  %spec.select = select i1 %12, ptr %9, ptr %11
  %13 = load i32, ptr %spec.select, align 4, !tbaa !5
  %.not46 = icmp eq i32 %13, 0
  br i1 %.not46, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %8
  %14 = getelementptr inbounds i8, ptr %0, i64 112
  %15 = fadd float %2, %4
  %16 = fmul float %15, 5.000000e-01
  %17 = fadd float %3, %5
  %18 = fmul float %17, 5.000000e-01
  br label %19

19:                                               ; preds = %.lr.ph, %.thread45
  %20 = phi i32 [ %13, %.lr.ph ], [ %39, %.thread45 ]
  %.147 = phi ptr [ %spec.select, %.lr.ph ], [ %38, %.thread45 ]
  %21 = tail call noundef i32 @_ZNK6SoLoud6Soloud27getVoiceFromHandle_internalEj(ptr noundef nonnull align 8 dereferenceable(138793) %0, i32 noundef %20)
  %.not44 = icmp eq i32 %21, -1
  br i1 %.not44, label %.thread45, label %22

22:                                               ; preds = %19
  %23 = sext i32 %21 to i64
  %24 = getelementptr inbounds [1024 x ptr], ptr %14, i64 0, i64 %23
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  %26 = getelementptr inbounds i8, ptr %25, i64 148
  store i32 0, ptr %26, align 4, !tbaa !11
  %27 = getelementptr inbounds i8, ptr %25, i64 24
  store float %2, ptr %27, align 8, !tbaa !16
  %28 = getelementptr inbounds i8, ptr %25, i64 28
  store float %3, ptr %28, align 4, !tbaa !16
  %29 = getelementptr inbounds i8, ptr %25, i64 72
  %30 = load i32, ptr %29, align 8, !tbaa !17
  switch i32 %30, label %.thread45 [
    i32 4, label %.thread45.sink.split
    i32 6, label %.thread45.sink.split.sink.split
    i32 8, label %31
  ]

31:                                               ; preds = %22
  %32 = getelementptr inbounds i8, ptr %25, i64 32
  store float %6, ptr %32, align 8, !tbaa !16
  %33 = getelementptr inbounds i8, ptr %25, i64 36
  store float %7, ptr %33, align 4, !tbaa !16
  br label %.thread45.sink.split.sink.split

.thread45.sink.split.sink.split:                  ; preds = %22, %31
  %.sink54 = phi i64 [ 40, %31 ], [ 32, %22 ]
  %.sink52 = phi float [ %16, %31 ], [ %6, %22 ]
  %.sink51 = phi i64 [ 44, %31 ], [ 36, %22 ]
  %.sink = phi float [ %18, %31 ], [ %7, %22 ]
  %.sink49.ph = phi i64 [ 48, %31 ], [ 40, %22 ]
  %.sink48.ph = phi i64 [ 52, %31 ], [ 44, %22 ]
  %34 = getelementptr inbounds i8, ptr %25, i64 %.sink54
  store float %.sink52, ptr %34, align 8, !tbaa !16
  %35 = getelementptr inbounds i8, ptr %25, i64 %.sink51
  store float %.sink, ptr %35, align 4, !tbaa !16
  br label %.thread45.sink.split

.thread45.sink.split:                             ; preds = %.thread45.sink.split.sink.split, %22
  %.sink49 = phi i64 [ 32, %22 ], [ %.sink49.ph, %.thread45.sink.split.sink.split ]
  %.sink48 = phi i64 [ 36, %22 ], [ %.sink48.ph, %.thread45.sink.split.sink.split ]
  %36 = getelementptr inbounds i8, ptr %25, i64 %.sink49
  store float %4, ptr %36, align 8, !tbaa !16
  %37 = getelementptr inbounds i8, ptr %25, i64 %.sink48
  store float %5, ptr %37, align 4, !tbaa !16
  br label %.thread45

.thread45:                                        ; preds = %.thread45.sink.split, %22, %19
  %38 = getelementptr inbounds i8, ptr %.147, i64 4
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %.not = icmp eq i32 %39, 0
  br i1 %.not, label %._crit_edge, label %19, !llvm.loop !18

._crit_edge:                                      ; preds = %.thread45, %8
  tail call void @_ZN6SoLoud6Soloud25unlockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138793) %0)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #3
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { 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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 148}
!12 = !{!"_ZTSN6SoLoud19AudioSourceInstanceE", !6, i64 8, !6, i64 12, !6, i64 16, !13, i64 20, !7, i64 24, !13, i64 56, !13, i64 60, !13, i64 64, !13, i64 68, !6, i64 72, !13, i64 76, !13, i64 80, !14, i64 88, !14, i64 96, !15, i64 104, !15, i64 152, !15, i64 200, !15, i64 248, !15, i64 296, !6, i64 344, !7, i64 348, !6, i64 380, !6, i64 384, !7, i64 392, !7, i64 456, !6, i64 472, !6, i64 476, !6, i64 480, !14, i64 488}
!13 = !{!"float", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!"_ZTSN6SoLoud5FaderE", !13, i64 0, !13, i64 4, !13, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !13, i64 40, !6, i64 44}
!16 = !{!13, !13, i64 0}
!17 = !{!12, !6, i64 72}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


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