; LLVM IR from Overload-Technologies/Overload :: Dependencies/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, ptr, ptr, i32, i32, %"class.SoLoud::AlignedFloatBuffer", i32, [4 x i8], %"class.SoLoud::AlignedFloatBuffer", ptr, %"class.SoLoud::AlignedFloatBuffer", ptr, [1024 x ptr], i32, i32, i32, i32, 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(138833)) #1

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

declare noundef i32 @_ZNK6SoLoud6Soloud27getVoiceFromHandle_internalEj(ptr noundef nonnull align 8 dereferenceable(138833), 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(138833)) #1

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

19:                                               ; preds = %4
  %20 = getelementptr inbounds [2 x i32], ptr %10, i64 0, i64 0
  store ptr %20, ptr %9, align 8, !tbaa !5
  br label %21

21:                                               ; preds = %19, %4
  br label %22

22:                                               ; preds = %194, %21
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  %24 = load i32, ptr %23, align 4, !tbaa !9
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %197

26:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = load i32, ptr %27, align 4, !tbaa !9
  %29 = call noundef i32 @_ZNK6SoLoud6Soloud27getVoiceFromHandle_internalEj(ptr noundef nonnull align 8 dereferenceable(138833) %12, i32 noundef %28)
  store i32 %29, ptr %11, align 4, !tbaa !9
  %30 = load i32, ptr %11, align 4, !tbaa !9
  %31 = icmp ne i32 %30, -1
  br i1 %31, label %32, label %194

32:                                               ; preds = %26
  %33 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %12, i32 0, i32 16
  %34 = load i32, ptr %11, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [1024 x ptr], ptr %33, i64 0, i64 %35
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  %38 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %37, i32 0, i32 15
  %39 = getelementptr inbounds %"class.SoLoud::Fader", ptr %38, i32 0, i32 7
  store i32 0, ptr %39, align 4, !tbaa !13
  %40 = load float, ptr %7, align 4, !tbaa !11
  %41 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %12, i32 0, i32 16
  %42 = load i32, ptr %11, 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 5
  %47 = getelementptr inbounds [8 x float], ptr %46, i64 0, i64 0
  store float %40, ptr %47, align 8, !tbaa !11
  %48 = load float, ptr %8, align 4, !tbaa !11
  %49 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %12, i32 0, i32 16
  %50 = load i32, ptr %11, 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 1
  store float %48, ptr %55, align 4, !tbaa !11
  %56 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %12, i32 0, i32 16
  %57 = load i32, ptr %11, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [1024 x ptr], ptr %56, i64 0, i64 %58
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  %61 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %60, i32 0, i32 10
  %62 = load i32, ptr %61, align 8, !tbaa !17
  %63 = icmp eq i32 %62, 4
  br i1 %63, label %64, label %81

64:                                               ; preds = %32
  %65 = load float, ptr %7, align 4, !tbaa !11
  %66 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %12, i32 0, i32 16
  %67 = load i32, ptr %11, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [1024 x ptr], ptr %66, i64 0, i64 %68
  %70 = load ptr, ptr %69, align 8, !tbaa !5
  %71 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %70, i32 0, i32 5
  %72 = getelementptr inbounds [8 x float], ptr %71, i64 0, i64 2
  store float %65, ptr %72, align 8, !tbaa !11
  %73 = load float, ptr %8, align 4, !tbaa !11
  %74 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %12, i32 0, i32 16
  %75 = load i32, ptr %11, 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 3
  store float %73, ptr %80, align 4, !tbaa !11
  br label %81

81:                                               ; preds = %64, %32
  %82 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %12, i32 0, i32 16
  %83 = load i32, ptr %11, 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 10
  %88 = load i32, ptr %87, align 8, !tbaa !17
  %89 = icmp eq i32 %88, 6
  br i1 %89, label %90, label %129

90:                                               ; preds = %81
  %91 = load float, ptr %7, align 4, !tbaa !11
  %92 = load float, ptr %8, align 4, !tbaa !11
  %93 = fadd float %91, %92
  %94 = fmul float %93, 5.000000e-01
  %95 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %12, i32 0, i32 16
  %96 = load i32, ptr %11, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [1024 x ptr], ptr %95, i64 0, i64 %97
  %99 = load ptr, ptr %98, align 8, !tbaa !5
  %100 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %99, i32 0, i32 5
  %101 = getelementptr inbounds [8 x float], ptr %100, i64 0, i64 2
  store float %94, ptr %101, align 8, !tbaa !11
  %102 = load float, ptr %7, align 4, !tbaa !11
  %103 = load float, ptr %8, align 4, !tbaa !11
  %104 = fadd float %102, %103
  %105 = fmul float %104, 5.000000e-01
  %106 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %12, i32 0, i32 16
  %107 = load i32, ptr %11, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [1024 x ptr], ptr %106, i64 0, i64 %108
  %110 = load ptr, ptr %109, align 8, !tbaa !5
  %111 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %110, i32 0, i32 5
  %112 = getelementptr inbounds [8 x float], ptr %111, i64 0, i64 3
  store float %105, ptr %112, align 4, !tbaa !11
  %113 = load float, ptr %7, align 4, !tbaa !11
  %114 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %12, i32 0, i32 16
  %115 = load i32, ptr %11, align 4, !tbaa !9
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [1024 x ptr], ptr %114, i64 0, i64 %116
  %118 = load ptr, ptr %117, align 8, !tbaa !5
  %119 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %118, i32 0, i32 5
  %120 = getelementptr inbounds [8 x float], ptr %119, i64 0, i64 4
  store float %113, ptr %120, align 8, !tbaa !11
  %121 = load float, ptr %8, align 4, !tbaa !11
  %122 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %12, i32 0, i32 16
  %123 = load i32, ptr %11, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [1024 x ptr], ptr %122, i64 0, i64 %124
  %126 = load ptr, ptr %125, align 8, !tbaa !5
  %127 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %126, i32 0, i32 5
  %128 = getelementptr inbounds [8 x float], ptr %127, i64 0, i64 5
  store float %121, ptr %128, align 4, !tbaa !11
  br label %129

129:                                              ; preds = %90, %81
  %130 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %12, i32 0, i32 16
  %131 = load i32, ptr %11, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [1024 x ptr], ptr %130, i64 0, i64 %132
  %134 = load ptr, ptr %133, align 8, !tbaa !5
  %135 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %134, i32 0, i32 10
  %136 = load i32, ptr %135, align 8, !tbaa !17
  %137 = icmp eq i32 %136, 8
  br i1 %137, label %138, label %193

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

193:                                              ; preds = %138, %129
  br label %194

194:                                              ; preds = %193, %26
  %195 = load ptr, ptr %9, align 8, !tbaa !5
  %196 = getelementptr inbounds i32, ptr %195, i32 1
  store ptr %196, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %22, !llvm.loop !18

197:                                              ; preds = %22
  call void @_ZN6SoLoud6Soloud25unlockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138833) %12)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #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(138833)) local_unnamed_addr #1

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

declare noundef i32 @_ZNK6SoLoud6Soloud27getVoiceFromHandle_internalEj(ptr noundef nonnull align 8 dereferenceable(138833), 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(138833)) local_unnamed_addr #1

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

.lr.ph:                                           ; preds = %4
  %10 = getelementptr inbounds i8, ptr %0, i64 152
  %11 = fadd float %2, %3
  %12 = fmul float %11, 5.000000e-01
  br label %13

13:                                               ; preds = %.lr.ph, %.thread47
  %14 = phi i32 [ %9, %.lr.ph ], [ %33, %.thread47 ]
  %.149 = phi ptr [ %spec.select, %.lr.ph ], [ %32, %.thread47 ]
  %15 = tail call noundef i32 @_ZNK6SoLoud6Soloud27getVoiceFromHandle_internalEj(ptr noundef nonnull align 8 dereferenceable(138833) %0, i32 noundef %14)
  %.not46 = icmp eq i32 %15, -1
  br i1 %.not46, label %.thread47, label %16

16:                                               ; preds = %13
  %17 = sext i32 %15 to i64
  %18 = getelementptr inbounds [1024 x ptr], ptr %10, i64 0, i64 %17
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  %20 = getelementptr inbounds i8, ptr %19, i64 148
  store i32 0, ptr %20, align 4, !tbaa !11
  %21 = getelementptr inbounds i8, ptr %19, i64 24
  store float %2, ptr %21, align 8, !tbaa !16
  %22 = getelementptr inbounds i8, ptr %19, i64 28
  store float %3, ptr %22, align 4, !tbaa !16
  %23 = getelementptr inbounds i8, ptr %19, i64 72
  %24 = load i32, ptr %23, align 8, !tbaa !17
  switch i32 %24, label %.thread47 [
    i32 4, label %.thread47.sink.split
    i32 6, label %.thread47.sink.split.sink.split
    i32 8, label %25
  ]

25:                                               ; preds = %16
  %26 = getelementptr inbounds i8, ptr %19, i64 32
  store float %12, ptr %26, align 8, !tbaa !16
  %27 = getelementptr inbounds i8, ptr %19, i64 36
  store float %12, ptr %27, align 4, !tbaa !16
  br label %.thread47.sink.split.sink.split

.thread47.sink.split.sink.split:                  ; preds = %16, %25
  %.sink56 = phi i64 [ 40, %25 ], [ 32, %16 ]
  %.sink54 = phi float [ %2, %25 ], [ %12, %16 ]
  %.sink53 = phi i64 [ 44, %25 ], [ 36, %16 ]
  %.sink = phi float [ %3, %25 ], [ %12, %16 ]
  %.sink51.ph = phi i64 [ 48, %25 ], [ 40, %16 ]
  %.sink50.ph = phi i64 [ 52, %25 ], [ 44, %16 ]
  %28 = getelementptr inbounds i8, ptr %19, i64 %.sink56
  store float %.sink54, ptr %28, align 8, !tbaa !16
  %29 = getelementptr inbounds i8, ptr %19, i64 %.sink53
  store float %.sink, ptr %29, align 4, !tbaa !16
  br label %.thread47.sink.split

.thread47.sink.split:                             ; preds = %.thread47.sink.split.sink.split, %16
  %.sink51 = phi i64 [ 32, %16 ], [ %.sink51.ph, %.thread47.sink.split.sink.split ]
  %.sink50 = phi i64 [ 36, %16 ], [ %.sink50.ph, %.thread47.sink.split.sink.split ]
  %30 = getelementptr inbounds i8, ptr %19, i64 %.sink51
  store float %2, ptr %30, align 8, !tbaa !16
  %31 = getelementptr inbounds i8, ptr %19, i64 %.sink50
  store float %3, ptr %31, align 4, !tbaa !16
  br label %.thread47

.thread47:                                        ; preds = %.thread47.sink.split, %16, %13
  %32 = getelementptr inbounds i8, ptr %.149, i64 4
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %.not = icmp eq i32 %33, 0
  br i1 %.not, label %._crit_edge, label %13, !llvm.loop !18

._crit_edge:                                      ; preds = %.thread47, %4
  tail call void @_ZN6SoLoud6Soloud25unlockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138833) %0)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #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,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass