; LLVM IR from Overload-Technologies/Overload :: Dependencies/soloud/src/core (soloud_core_voiceops)

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

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [118 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [24 x i8], align 1
@__PRETTY_FUNCTION__._ZN6SoLoud6Soloud20setVoicePan_internalEjf = external hidden unnamed_addr constant [63 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6SoLoud6Soloud20setVoicePan_internalEjf(ptr noundef nonnull align 8 dereferenceable(138833) %0, i32 noundef %1, float noundef %2) #1 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store float %2, ptr %6, align 4, !tbaa !11
  %9 = load ptr, ptr %4, align 8
  %10 = load i32, ptr %5, align 4, !tbaa !9
  %11 = icmp ult i32 %10, 1024
  br i1 %11, label %12, label %13

12:                                               ; preds = %3
  br label %15

13:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 71, ptr noundef @__PRETTY_FUNCTION__._ZN6SoLoud6Soloud20setVoicePan_internalEjf) #5
  unreachable

14:                                               ; No predecessors!
  br label %15

15:                                               ; preds = %14, %12
  %16 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %9, i32 0, i32 2
  %17 = load i8, ptr %16, align 8, !tbaa !13, !range !19, !noundef !20
  %18 = trunc i8 %17 to i1
  br i1 %18, label %19, label %20

19:                                               ; preds = %15
  br label %22

20:                                               ; preds = %15
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 72, ptr noundef @__PRETTY_FUNCTION__._ZN6SoLoud6Soloud20setVoicePan_internalEjf) #5
  unreachable

21:                                               ; No predecessors!
  br label %22

22:                                               ; preds = %21, %19
  %23 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %9, i32 0, i32 16
  %24 = load i32, ptr %5, align 4, !tbaa !9
  %25 = zext i32 %24 to i64
  %26 = getelementptr inbounds [1024 x ptr], ptr %23, i64 0, i64 %25
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %193

29:                                               ; preds = %22
  %30 = load float, ptr %6, align 4, !tbaa !11
  %31 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %9, i32 0, i32 16
  %32 = load i32, ptr %5, align 4, !tbaa !9
  %33 = zext i32 %32 to i64
  %34 = getelementptr inbounds [1024 x ptr], ptr %31, i64 0, i64 %33
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  %36 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %35, i32 0, i32 4
  store float %30, ptr %36, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %37 = load float, ptr %6, align 4, !tbaa !11
  %38 = fadd float %37, 1.000000e+00
  %39 = fpext float %38 to double
  %40 = fmul double %39, 0x400921FB54442D18
  %41 = fdiv double %40, 4.000000e+00
  %42 = call double @cos(double noundef %41) #6
  %43 = fptrunc double %42 to float
  store float %43, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %44 = load float, ptr %6, align 4, !tbaa !11
  %45 = fadd float %44, 1.000000e+00
  %46 = fpext float %45 to double
  %47 = fmul double %46, 0x400921FB54442D18
  %48 = fdiv double %47, 4.000000e+00
  %49 = call double @sin(double noundef %48) #6
  %50 = fptrunc double %49 to float
  store float %50, ptr %8, align 4, !tbaa !11
  %51 = load float, ptr %7, align 4, !tbaa !11
  %52 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %9, i32 0, i32 16
  %53 = load i32, ptr %5, align 4, !tbaa !9
  %54 = zext i32 %53 to i64
  %55 = getelementptr inbounds [1024 x ptr], ptr %52, i64 0, i64 %54
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  %57 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %56, i32 0, i32 5
  %58 = getelementptr inbounds [8 x float], ptr %57, i64 0, i64 0
  store float %51, ptr %58, align 8, !tbaa !11
  %59 = load float, ptr %8, align 4, !tbaa !11
  %60 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %9, i32 0, i32 16
  %61 = load i32, ptr %5, align 4, !tbaa !9
  %62 = zext i32 %61 to i64
  %63 = getelementptr inbounds [1024 x ptr], ptr %60, i64 0, i64 %62
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  %65 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %64, i32 0, i32 5
  %66 = getelementptr inbounds [8 x float], ptr %65, i64 0, i64 1
  store float %59, ptr %66, align 4, !tbaa !11
  %67 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %9, i32 0, i32 16
  %68 = load i32, ptr %5, align 4, !tbaa !9
  %69 = zext i32 %68 to i64
  %70 = getelementptr inbounds [1024 x ptr], ptr %67, i64 0, i64 %69
  %71 = load ptr, ptr %70, align 8, !tbaa !5
  %72 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %71, i32 0, i32 10
  %73 = load i32, ptr %72, align 8, !tbaa !23
  %74 = icmp eq i32 %73, 4
  br i1 %74, label %75, label %92

75:                                               ; preds = %29
  %76 = load float, ptr %7, align 4, !tbaa !11
  %77 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %9, i32 0, i32 16
  %78 = load i32, ptr %5, align 4, !tbaa !9
  %79 = zext i32 %78 to i64
  %80 = getelementptr inbounds [1024 x ptr], ptr %77, i64 0, i64 %79
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  %82 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %81, i32 0, i32 5
  %83 = getelementptr inbounds [8 x float], ptr %82, i64 0, i64 2
  store float %76, ptr %83, align 8, !tbaa !11
  %84 = load float, ptr %8, align 4, !tbaa !11
  %85 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %9, i32 0, i32 16
  %86 = load i32, ptr %5, align 4, !tbaa !9
  %87 = zext i32 %86 to i64
  %88 = getelementptr inbounds [1024 x ptr], ptr %85, i64 0, i64 %87
  %89 = load ptr, ptr %88, align 8, !tbaa !5
  %90 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %89, i32 0, i32 5
  %91 = getelementptr inbounds [8 x float], ptr %90, i64 0, i64 3
  store float %84, ptr %91, align 4, !tbaa !11
  br label %92

92:                                               ; preds = %75, %29
  %93 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %9, i32 0, i32 16
  %94 = load i32, ptr %5, align 4, !tbaa !9
  %95 = zext i32 %94 to i64
  %96 = getelementptr inbounds [1024 x ptr], ptr %93, i64 0, i64 %95
  %97 = load ptr, ptr %96, align 8, !tbaa !5
  %98 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %97, i32 0, i32 10
  %99 = load i32, ptr %98, align 8, !tbaa !23
  %100 = icmp eq i32 %99, 6
  br i1 %100, label %101, label %134

101:                                              ; preds = %92
  %102 = call noundef float @_ZSt4sqrtf(float noundef 2.000000e+00)
  %103 = fdiv float 1.000000e+00, %102
  %104 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %9, i32 0, i32 16
  %105 = load i32, ptr %5, align 4, !tbaa !9
  %106 = zext i32 %105 to i64
  %107 = getelementptr inbounds [1024 x ptr], ptr %104, i64 0, i64 %106
  %108 = load ptr, ptr %107, align 8, !tbaa !5
  %109 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %108, i32 0, i32 5
  %110 = getelementptr inbounds [8 x float], ptr %109, i64 0, i64 2
  store float %103, ptr %110, align 8, !tbaa !11
  %111 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %9, i32 0, i32 16
  %112 = load i32, ptr %5, align 4, !tbaa !9
  %113 = zext i32 %112 to i64
  %114 = getelementptr inbounds [1024 x ptr], ptr %111, i64 0, i64 %113
  %115 = load ptr, ptr %114, align 8, !tbaa !5
  %116 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %115, i32 0, i32 5
  %117 = getelementptr inbounds [8 x float], ptr %116, i64 0, i64 3
  store float 1.000000e+00, ptr %117, align 4, !tbaa !11
  %118 = load float, ptr %7, align 4, !tbaa !11
  %119 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %9, i32 0, i32 16
  %120 = load i32, ptr %5, align 4, !tbaa !9
  %121 = zext i32 %120 to i64
  %122 = getelementptr inbounds [1024 x ptr], ptr %119, i64 0, i64 %121
  %123 = load ptr, ptr %122, align 8, !tbaa !5
  %124 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %123, i32 0, i32 5
  %125 = getelementptr inbounds [8 x float], ptr %124, i64 0, i64 4
  store float %118, ptr %125, align 8, !tbaa !11
  %126 = load float, ptr %8, align 4, !tbaa !11
  %127 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %9, i32 0, i32 16
  %128 = load i32, ptr %5, align 4, !tbaa !9
  %129 = zext i32 %128 to i64
  %130 = getelementptr inbounds [1024 x ptr], ptr %127, i64 0, i64 %129
  %131 = load ptr, ptr %130, align 8, !tbaa !5
  %132 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %131, i32 0, i32 5
  %133 = getelementptr inbounds [8 x float], ptr %132, i64 0, i64 5
  store float %126, ptr %133, align 4, !tbaa !11
  br label %134

134:                                              ; preds = %101, %92
  %135 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %9, i32 0, i32 16
  %136 = load i32, ptr %5, align 4, !tbaa !9
  %137 = zext i32 %136 to i64
  %138 = getelementptr inbounds [1024 x ptr], ptr %135, i64 0, i64 %137
  %139 = load ptr, ptr %138, align 8, !tbaa !5
  %140 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %139, i32 0, i32 10
  %141 = load i32, ptr %140, align 8, !tbaa !23
  %142 = icmp eq i32 %141, 8
  br i1 %142, label %143, label %192

143:                                              ; preds = %134
  %144 = call noundef float @_ZSt4sqrtf(float noundef 2.000000e+00)
  %145 = fdiv float 1.000000e+00, %144
  %146 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %9, i32 0, i32 16
  %147 = load i32, ptr %5, align 4, !tbaa !9
  %148 = zext i32 %147 to i64
  %149 = getelementptr inbounds [1024 x ptr], ptr %146, i64 0, i64 %148
  %150 = load ptr, ptr %149, align 8, !tbaa !5
  %151 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %150, i32 0, i32 5
  %152 = getelementptr inbounds [8 x float], ptr %151, i64 0, i64 2
  store float %145, ptr %152, align 8, !tbaa !11
  %153 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %9, i32 0, i32 16
  %154 = load i32, ptr %5, align 4, !tbaa !9
  %155 = zext i32 %154 to i64
  %156 = getelementptr inbounds [1024 x ptr], ptr %153, i64 0, i64 %155
  %157 = load ptr, ptr %156, align 8, !tbaa !5
  %158 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %157, i32 0, i32 5
  %159 = getelementptr inbounds [8 x float], ptr %158, i64 0, i64 3
  store float 1.000000e+00, ptr %159, align 4, !tbaa !11
  %160 = load float, ptr %7, align 4, !tbaa !11
  %161 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %9, i32 0, i32 16
  %162 = load i32, ptr %5, align 4, !tbaa !9
  %163 = zext 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 %8, align 4, !tbaa !11
  %169 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %9, i32 0, i32 16
  %170 = load i32, ptr %5, align 4, !tbaa !9
  %171 = zext i32 %170 to i64
  %172 = getelementptr inbounds [1024 x ptr], ptr %169, i64 0, i64 %171
  %173 = load ptr, ptr %172, align 8, !tbaa !5
  %174 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %173, i32 0, i32 5
  %175 = getelementptr inbounds [8 x float], ptr %174, i64 0, i64 5
  store float %168, ptr %175, align 4, !tbaa !11
  %176 = load float, ptr %7, align 4, !tbaa !11
  %177 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %9, i32 0, i32 16
  %178 = load i32, ptr %5, align 4, !tbaa !9
  %179 = zext i32 %178 to i64
  %180 = getelementptr inbounds [1024 x ptr], ptr %177, i64 0, i64 %179
  %181 = load ptr, ptr %180, align 8, !tbaa !5
  %182 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %181, i32 0, i32 5
  %183 = getelementptr inbounds [8 x float], ptr %182, i64 0, i64 6
  store float %176, ptr %183, align 8, !tbaa !11
  %184 = load float, ptr %8, align 4, !tbaa !11
  %185 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %9, i32 0, i32 16
  %186 = load i32, ptr %5, align 4, !tbaa !9
  %187 = zext i32 %186 to i64
  %188 = getelementptr inbounds [1024 x ptr], ptr %185, i64 0, i64 %187
  %189 = load ptr, ptr %188, align 8, !tbaa !5
  %190 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance", ptr %189, i32 0, i32 5
  %191 = getelementptr inbounds [8 x float], ptr %190, i64 0, i64 7
  store float %184, ptr %191, align 4, !tbaa !11
  br label %192

192:                                              ; preds = %143, %134
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %193

193:                                              ; preds = %192, %22
  ret void
}

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

; Function Attrs: nounwind
declare double @cos(double noundef) #3

; Function Attrs: nounwind
declare double @sin(double noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) #4

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

attributes #0 = { noreturn nounwind "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 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind "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 = { inlinehint 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 = { noreturn nounwind }
attributes #6 = { 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, !15, i64 16}
!14 = !{!"_ZTSN6SoLoud6SoloudE", !6, i64 0, !6, i64 8, !15, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !10, i64 48, !10, i64 52, !16, i64 56, !10, i64 80, !16, i64 88, !6, i64 112, !16, i64 120, !6, i64 144, !7, i64 152, !10, i64 8344, !10, i64 8348, !10, i64 8352, !10, i64 8356, !6, i64 8360, !10, i64 8368, !10, i64 8372, !12, i64 8376, !12, i64 8380, !10, i64 8384, !10, i64 8388, !17, i64 8392, !18, i64 8440, !18, i64 8448, !7, i64 8456, !7, i64 8520, !7, i64 8584, !7, i64 8616, !7, i64 9640, !7, i64 10664, !7, i64 11688, !7, i64 11700, !7, i64 11712, !7, i64 11724, !12, i64 11736, !7, i64 11740, !7, i64 11840, !6, i64 134720, !10, i64 134728, !7, i64 134732, !10, i64 138828, !15, i64 138832}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSN6SoLoud18AlignedFloatBufferE", !6, i64 0, !6, i64 8, !10, i64 16}
!17 = !{!"_ZTSN6SoLoud5FaderE", !12, i64 0, !12, i64 4, !12, i64 8, !18, i64 16, !18, i64 24, !18, i64 32, !12, i64 40, !10, i64 44}
!18 = !{!"double", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!22, !12, i64 20}
!22 = !{!"_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, !18, i64 88, !18, i64 96, !17, i64 104, !17, i64 152, !17, i64 200, !17, i64 248, !17, 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, !18, i64 488}
!23 = !{!22, !10, i64 72}


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

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [118 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [24 x i8], align 1
@__PRETTY_FUNCTION__._ZN6SoLoud6Soloud20setVoicePan_internalEjf = external hidden unnamed_addr constant [63 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN6SoLoud6Soloud20setVoicePan_internalEjf(ptr nocapture noundef nonnull readonly align 8 dereferenceable(138833) %0, i32 noundef %1, float noundef %2) local_unnamed_addr #1 align 2 {
  %4 = icmp ult i32 %1, 1024
  br i1 %4, label %6, label %5

5:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 71, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6SoLoud6Soloud20setVoicePan_internalEjf) #4
  unreachable

6:                                                ; preds = %3
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = load i8, ptr %7, align 8, !tbaa !5, !range !16, !noundef !17
  %9 = trunc nuw i8 %8 to i1
  br i1 %9, label %11, label %10

10:                                               ; preds = %6
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 72, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6SoLoud6Soloud20setVoicePan_internalEjf) #4
  unreachable

11:                                               ; preds = %6
  %12 = getelementptr inbounds i8, ptr %0, i64 152
  %13 = zext nneg i32 %1 to i64
  %14 = getelementptr inbounds [1024 x ptr], ptr %12, i64 0, i64 %13
  %15 = load ptr, ptr %14, align 8, !tbaa !18
  %.not = icmp eq ptr %15, null
  br i1 %.not, label %54, label %16

16:                                               ; preds = %11
  %17 = getelementptr inbounds i8, ptr %15, i64 20
  store float %2, ptr %17, align 4, !tbaa !19
  %18 = fadd float %2, 1.000000e+00
  %19 = fpext float %18 to double
  %20 = fmul double %19, 0x400921FB54442D18
  %21 = fmul double %20, 2.500000e-01
  %22 = tail call double @cos(double noundef %21) #5
  %23 = fptrunc double %22 to float
  %24 = tail call double @sin(double noundef %21) #5
  %25 = fptrunc double %24 to float
  %26 = load ptr, ptr %14, align 8, !tbaa !18
  %27 = getelementptr inbounds i8, ptr %26, i64 24
  store float %23, ptr %27, align 8, !tbaa !21
  %28 = getelementptr inbounds i8, ptr %26, i64 28
  store float %25, ptr %28, align 4, !tbaa !21
  %29 = getelementptr inbounds i8, ptr %26, i64 72
  %30 = load i32, ptr %29, align 8, !tbaa !22
  switch i32 %30, label %41 [
    i32 4, label %.thread34
    i32 6, label %33
  ]

.thread34:                                        ; preds = %16
  %31 = getelementptr inbounds i8, ptr %26, i64 32
  store float %23, ptr %31, align 8, !tbaa !21
  %32 = getelementptr inbounds i8, ptr %26, i64 36
  br label %.sink.split

33:                                               ; preds = %16
  %34 = tail call noundef float @_ZSt4sqrtf(float noundef 2.000000e+00)
  %35 = fdiv float 1.000000e+00, %34
  %36 = load ptr, ptr %14, align 8, !tbaa !18
  %37 = getelementptr inbounds i8, ptr %36, i64 32
  store float %35, ptr %37, align 8, !tbaa !21
  %38 = getelementptr inbounds i8, ptr %36, i64 36
  store float 1.000000e+00, ptr %38, align 4, !tbaa !21
  %39 = getelementptr inbounds i8, ptr %36, i64 40
  store float %23, ptr %39, align 8, !tbaa !21
  %40 = getelementptr inbounds i8, ptr %36, i64 44
  store float %25, ptr %40, align 4, !tbaa !21
  %.phi.trans.insert = getelementptr inbounds i8, ptr %36, i64 72
  %.pre = load i32, ptr %.phi.trans.insert, align 8, !tbaa !22
  br label %41

41:                                               ; preds = %16, %33
  %42 = phi i32 [ %30, %16 ], [ %.pre, %33 ]
  %43 = icmp eq i32 %42, 8
  br i1 %43, label %44, label %54

44:                                               ; preds = %41
  %45 = tail call noundef float @_ZSt4sqrtf(float noundef 2.000000e+00)
  %46 = fdiv float 1.000000e+00, %45
  %47 = load ptr, ptr %14, align 8, !tbaa !18
  %48 = getelementptr inbounds i8, ptr %47, i64 32
  store float %46, ptr %48, align 8, !tbaa !21
  %49 = getelementptr inbounds i8, ptr %47, i64 36
  store float 1.000000e+00, ptr %49, align 4, !tbaa !21
  %50 = getelementptr inbounds i8, ptr %47, i64 40
  store float %23, ptr %50, align 8, !tbaa !21
  %51 = getelementptr inbounds i8, ptr %47, i64 44
  store float %25, ptr %51, align 4, !tbaa !21
  %52 = getelementptr inbounds i8, ptr %47, i64 48
  store float %23, ptr %52, align 8, !tbaa !21
  %53 = getelementptr inbounds i8, ptr %47, i64 52
  br label %.sink.split

.sink.split:                                      ; preds = %44, %.thread34
  %.sink = phi ptr [ %32, %.thread34 ], [ %53, %44 ]
  store float %25, ptr %.sink, align 4, !tbaa !21
  br label %54

54:                                               ; preds = %.sink.split, %41, %11
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) local_unnamed_addr #3

attributes #0 = { noreturn nounwind "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 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 = { mustprogress nofree nounwind willreturn memory(write) "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 = { inlinehint 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 = { noreturn nounwind }
attributes #5 = { 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, !10, i64 16}
!6 = !{!"_ZTSN6SoLoud6SoloudE", !7, i64 0, !7, i64 8, !10, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !11, i64 48, !11, i64 52, !12, i64 56, !11, i64 80, !12, i64 88, !7, i64 112, !12, i64 120, !7, i64 144, !8, i64 152, !11, i64 8344, !11, i64 8348, !11, i64 8352, !11, i64 8356, !7, i64 8360, !11, i64 8368, !11, i64 8372, !13, i64 8376, !13, i64 8380, !11, i64 8384, !11, i64 8388, !14, i64 8392, !15, i64 8440, !15, i64 8448, !8, i64 8456, !8, i64 8520, !8, i64 8584, !8, i64 8616, !8, i64 9640, !8, i64 10664, !8, i64 11688, !8, i64 11700, !8, i64 11712, !8, i64 11724, !13, i64 11736, !8, i64 11740, !8, i64 11840, !7, i64 134720, !11, i64 134728, !8, i64 134732, !11, i64 138828, !10, i64 138832}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"_ZTSN6SoLoud18AlignedFloatBufferE", !7, i64 0, !7, i64 8, !11, i64 16}
!13 = !{!"float", !8, i64 0}
!14 = !{!"_ZTSN6SoLoud5FaderE", !13, i64 0, !13, i64 4, !13, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !13, i64 40, !11, i64 44}
!15 = !{!"double", !8, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!7, !7, i64 0}
!19 = !{!20, !13, i64 20}
!20 = !{!"_ZTSN6SoLoud19AudioSourceInstanceE", !11, i64 8, !11, i64 12, !11, i64 16, !13, i64 20, !8, i64 24, !13, i64 56, !13, i64 60, !13, i64 64, !13, i64 68, !11, i64 72, !13, i64 76, !13, i64 80, !15, i64 88, !15, i64 96, !14, i64 104, !14, i64 152, !14, i64 200, !14, i64 248, !14, i64 296, !11, i64 344, !8, i64 348, !11, i64 380, !11, i64 384, !8, i64 392, !8, i64 456, !11, i64 472, !11, i64 476, !11, i64 480, !15, i64 488}
!21 = !{!13, !13, i64 0}
!22 = !{!20, !11, i64 72}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass