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

; 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

; 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 noundef i32 @_ZN6SoLoud6Soloud22setMaxActiveVoiceCountEj(ptr noundef nonnull align 8 dereferenceable(138833) %0, i32 noundef %1) #2 align 2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  %7 = load ptr, ptr %4, align 8
  %8 = load i32, ptr %5, align 4, !tbaa !9
  %9 = icmp eq i32 %8, 0
  br i1 %9, label %13, label %10

10:                                               ; preds = %2
  %11 = load i32, ptr %5, align 4, !tbaa !9
  %12 = icmp uge i32 %11, 1024
  br i1 %12, label %13, label %14

13:                                               ; preds = %10, %2
  store i32 1, ptr %3, align 4
  br label %86

14:                                               ; preds = %10
  call void @_ZN6SoLoud6Soloud23lockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138833) %7)
  %15 = load i32, ptr %5, align 4, !tbaa !9
  %16 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %7, i32 0, i32 7
  store i32 %15, ptr %16, align 8, !tbaa !11
  %17 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %7, i32 0, i32 13
  %18 = load ptr, ptr %17, align 8, !tbaa !18
  %19 = icmp eq ptr %18, null
  br i1 %19, label %21, label %20

20:                                               ; preds = %14
  call void @_ZdaPv(ptr noundef %18) #6
  br label %21

21:                                               ; preds = %20, %14
  %22 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %7, i32 0, i32 15
  %23 = load ptr, ptr %22, align 8, !tbaa !19
  %24 = icmp eq ptr %23, null
  br i1 %24, label %26, label %25

25:                                               ; preds = %21
  call void @_ZdaPv(ptr noundef %23) #6
  br label %26

26:                                               ; preds = %25, %21
  %27 = load i32, ptr %5, align 4, !tbaa !9
  %28 = mul i32 %27, 2
  %29 = zext i32 %28 to i64
  %30 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %29, i64 8)
  %31 = extractvalue { i64, i1 } %30, 1
  %32 = extractvalue { i64, i1 } %30, 0
  %33 = select i1 %31, i64 -1, i64 %32
  %34 = call noalias noundef nonnull ptr @_Znam(i64 noundef %33) #7
  %35 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %7, i32 0, i32 13
  store ptr %34, ptr %35, align 8, !tbaa !18
  %36 = load i32, ptr %5, align 4, !tbaa !9
  %37 = zext i32 %36 to i64
  %38 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %37, i64 8)
  %39 = extractvalue { i64, i1 } %38, 1
  %40 = extractvalue { i64, i1 } %38, 0
  %41 = select i1 %39, i64 -1, i64 %40
  %42 = call noalias noundef nonnull ptr @_Znam(i64 noundef %41) #7
  %43 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %7, i32 0, i32 15
  store ptr %42, ptr %43, align 8, !tbaa !19
  %44 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %7, i32 0, i32 14
  %45 = load i32, ptr %5, align 4, !tbaa !9
  %46 = mul i32 4096, %45
  %47 = mul i32 %46, 2
  %48 = call noundef i32 @_ZN6SoLoud18AlignedFloatBuffer4initEj(ptr noundef nonnull align 8 dereferenceable(20) %44, i32 noundef %47)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %67, %26
  %50 = load i32, ptr %6, align 4, !tbaa !9
  %51 = load i32, ptr %5, align 4, !tbaa !9
  %52 = mul i32 %51, 2
  %53 = icmp ult i32 %50, %52
  br i1 %53, label %54, label %70

54:                                               ; preds = %49
  %55 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %7, i32 0, i32 14
  %56 = getelementptr inbounds %"class.SoLoud::AlignedFloatBuffer", ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !20
  %58 = load i32, ptr %6, align 4, !tbaa !9
  %59 = mul i32 4096, %58
  %60 = zext i32 %59 to i64
  %61 = getelementptr inbounds float, ptr %57, i64 %60
  %62 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %7, i32 0, i32 13
  %63 = load ptr, ptr %62, align 8, !tbaa !18
  %64 = load i32, ptr %6, align 4, !tbaa !9
  %65 = zext i32 %64 to i64
  %66 = getelementptr inbounds ptr, ptr %63, i64 %65
  store ptr %61, ptr %66, align 8, !tbaa !5
  br label %67

67:                                               ; preds = %54
  %68 = load i32, ptr %6, align 4, !tbaa !9
  %69 = add i32 %68, 1
  store i32 %69, ptr %6, align 4, !tbaa !9
  br label %49, !llvm.loop !21

70:                                               ; preds = %49
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %71

71:                                               ; preds = %81, %70
  %72 = load i32, ptr %6, align 4, !tbaa !9
  %73 = load i32, ptr %5, align 4, !tbaa !9
  %74 = icmp ult i32 %72, %73
  br i1 %74, label %75, label %84

75:                                               ; preds = %71
  %76 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %7, i32 0, i32 15
  %77 = load ptr, ptr %76, align 8, !tbaa !19
  %78 = load i32, ptr %6, align 4, !tbaa !9
  %79 = zext i32 %78 to i64
  %80 = getelementptr inbounds ptr, ptr %77, i64 %79
  store ptr null, ptr %80, align 8, !tbaa !5
  br label %81

81:                                               ; preds = %75
  %82 = load i32, ptr %6, align 4, !tbaa !9
  %83 = add i32 %82, 1
  store i32 %83, ptr %6, align 4, !tbaa !9
  br label %71, !llvm.loop !23

84:                                               ; preds = %71
  %85 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %7, i32 0, i32 49
  store i8 1, ptr %85, align 8, !tbaa !24
  call void @_ZN6SoLoud6Soloud25unlockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138833) %7)
  store i32 0, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %86

86:                                               ; preds = %84, %13
  %87 = load i32, ptr %3, align 4
  ret i32 %87
}

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #4

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #5

declare noundef i32 @_ZN6SoLoud18AlignedFloatBuffer4initEj(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) #1

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 = { nobuiltin 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nobuiltin allocsize(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 #6 = { builtin nounwind }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { 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, !10, i64 48}
!12 = !{!"_ZTSN6SoLoud6SoloudE", !6, i64 0, !6, i64 8, !13, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !10, i64 48, !10, i64 52, !14, i64 56, !10, i64 80, !14, i64 88, !6, i64 112, !14, 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, !15, i64 8376, !15, i64 8380, !10, i64 8384, !10, i64 8388, !16, i64 8392, !17, i64 8440, !17, 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, !15, i64 11736, !7, i64 11740, !7, i64 11840, !6, i64 134720, !10, i64 134728, !7, i64 134732, !10, i64 138828, !13, i64 138832}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN6SoLoud18AlignedFloatBufferE", !6, i64 0, !6, i64 8, !10, i64 16}
!15 = !{!"float", !7, i64 0}
!16 = !{!"_ZTSN6SoLoud5FaderE", !15, i64 0, !15, i64 4, !15, i64 8, !17, i64 16, !17, i64 24, !17, i64 32, !15, i64 40, !10, i64 44}
!17 = !{!"double", !7, i64 0}
!18 = !{!12, !6, i64 112}
!19 = !{!12, !6, i64 144}
!20 = !{!12, !6, i64 120}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = !{!12, !13, i64 138832}


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

declare void @_ZN6SoLoud6Soloud23lockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138833)) local_unnamed_addr #0

declare void @_ZN6SoLoud6Soloud25unlockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138833)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN6SoLoud6Soloud22setMaxActiveVoiceCountEj(ptr noundef nonnull align 8 dereferenceable(138833) %0, i32 noundef %1) local_unnamed_addr #1 align 2 {
  %3 = add i32 %1, -1024
  %or.cond = icmp ult i32 %3, -1023
  br i1 %or.cond, label %60, label %4

4:                                                ; preds = %2
  tail call void @_ZN6SoLoud6Soloud23lockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138833) %0)
  %5 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 %1, ptr %5, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 112
  %7 = load ptr, ptr %6, align 8, !tbaa !16
  %8 = icmp eq ptr %7, null
  br i1 %8, label %10, label %9

9:                                                ; preds = %4
  tail call void @_ZdaPv(ptr noundef nonnull %7) #4
  br label %10

10:                                               ; preds = %9, %4
  %11 = getelementptr inbounds i8, ptr %0, i64 144
  %12 = load ptr, ptr %11, align 8, !tbaa !17
  %13 = icmp eq ptr %12, null
  br i1 %13, label %.lr.ph.preheader, label %14

14:                                               ; preds = %10
  tail call void @_ZdaPv(ptr noundef nonnull %12) #4
  br label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %10, %14
  %15 = shl nuw nsw i32 %1, 4
  %16 = zext nneg i32 %15 to i64
  %17 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %16) #5
  store ptr %17, ptr %6, align 8, !tbaa !16
  %18 = shl nuw nsw i32 %1, 3
  %19 = zext nneg i32 %18 to i64
  %20 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %19) #5
  store ptr %20, ptr %11, align 8, !tbaa !17
  %21 = getelementptr inbounds i8, ptr %0, i64 120
  %22 = shl nuw nsw i32 %1, 13
  %23 = tail call noundef i32 @_ZN6SoLoud18AlignedFloatBuffer4initEj(ptr noundef nonnull align 8 dereferenceable(20) %21, i32 noundef %22)
  %24 = shl nuw nsw i32 %1, 1
  %wide.trip.count = zext nneg i32 %24 to i64
  %25 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %wide.trip.count, 2
  %26 = icmp ult i64 %25, 3
  br i1 %26, label %.lr.ph23.preheader.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 2044
  br label %.lr.ph

.lr.ph23.preheader.unr-lcssa:                     ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph23.preheader, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.lr.ph23.preheader.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %.lr.ph23.preheader.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %.lr.ph23.preheader.unr-lcssa ]
  %27 = load ptr, ptr %21, align 8, !tbaa !18
  %.idx.epil = shl nsw i64 %indvars.iv.epil, 14
  %28 = getelementptr inbounds i8, ptr %27, i64 %.idx.epil
  %29 = load ptr, ptr %6, align 8, !tbaa !16
  %30 = getelementptr inbounds ptr, ptr %29, i64 %indvars.iv.epil
  store ptr %28, ptr %30, align 8, !tbaa !19
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.lr.ph23.preheader, label %.lr.ph.epil, !llvm.loop !20

.lr.ph23.preheader:                               ; preds = %.lr.ph.epil, %.lr.ph23.preheader.unr-lcssa
  %wide.trip.count29 = zext nneg i32 %1 to i64
  %31 = add nsw i64 %wide.trip.count29, -1
  %xtraiter31 = and i64 %wide.trip.count29, 3
  %32 = icmp ult i64 %31, 3
  br i1 %32, label %._crit_edge.unr-lcssa, label %.lr.ph23.preheader.new

.lr.ph23.preheader.new:                           ; preds = %.lr.ph23.preheader
  %unroll_iter34 = and i64 %wide.trip.count29, 1020
  br label %.lr.ph23

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %33 = load ptr, ptr %21, align 8, !tbaa !18
  %.idx = shl nsw i64 %indvars.iv, 14
  %34 = getelementptr inbounds i8, ptr %33, i64 %.idx
  %35 = load ptr, ptr %6, align 8, !tbaa !16
  %36 = getelementptr inbounds ptr, ptr %35, i64 %indvars.iv
  store ptr %34, ptr %36, align 8, !tbaa !19
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %37 = load ptr, ptr %21, align 8, !tbaa !18
  %.idx.1 = shl nsw i64 %indvars.iv.next, 14
  %38 = getelementptr inbounds i8, ptr %37, i64 %.idx.1
  %39 = load ptr, ptr %6, align 8, !tbaa !16
  %40 = getelementptr inbounds ptr, ptr %39, i64 %indvars.iv.next
  store ptr %38, ptr %40, align 8, !tbaa !19
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %41 = load ptr, ptr %21, align 8, !tbaa !18
  %.idx.2 = shl nsw i64 %indvars.iv.next.1, 14
  %42 = getelementptr inbounds i8, ptr %41, i64 %.idx.2
  %43 = load ptr, ptr %6, align 8, !tbaa !16
  %44 = getelementptr inbounds ptr, ptr %43, i64 %indvars.iv.next.1
  store ptr %42, ptr %44, align 8, !tbaa !19
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %45 = load ptr, ptr %21, align 8, !tbaa !18
  %.idx.3 = shl nsw i64 %indvars.iv.next.2, 14
  %46 = getelementptr inbounds i8, ptr %45, i64 %.idx.3
  %47 = load ptr, ptr %6, align 8, !tbaa !16
  %48 = getelementptr inbounds ptr, ptr %47, i64 %indvars.iv.next.2
  store ptr %46, ptr %48, align 8, !tbaa !19
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.lr.ph23.preheader.unr-lcssa, label %.lr.ph, !llvm.loop !22

.lr.ph23:                                         ; preds = %.lr.ph23, %.lr.ph23.preheader.new
  %indvars.iv26 = phi i64 [ 0, %.lr.ph23.preheader.new ], [ %indvars.iv.next27.3, %.lr.ph23 ]
  %niter35 = phi i64 [ 0, %.lr.ph23.preheader.new ], [ %niter35.next.3, %.lr.ph23 ]
  %49 = load ptr, ptr %11, align 8, !tbaa !17
  %50 = getelementptr inbounds ptr, ptr %49, i64 %indvars.iv26
  store ptr null, ptr %50, align 8, !tbaa !19
  %indvars.iv.next27 = or disjoint i64 %indvars.iv26, 1
  %51 = load ptr, ptr %11, align 8, !tbaa !17
  %52 = getelementptr inbounds ptr, ptr %51, i64 %indvars.iv.next27
  store ptr null, ptr %52, align 8, !tbaa !19
  %indvars.iv.next27.1 = or disjoint i64 %indvars.iv26, 2
  %53 = load ptr, ptr %11, align 8, !tbaa !17
  %54 = getelementptr inbounds ptr, ptr %53, i64 %indvars.iv.next27.1
  store ptr null, ptr %54, align 8, !tbaa !19
  %indvars.iv.next27.2 = or disjoint i64 %indvars.iv26, 3
  %55 = load ptr, ptr %11, align 8, !tbaa !17
  %56 = getelementptr inbounds ptr, ptr %55, i64 %indvars.iv.next27.2
  store ptr null, ptr %56, align 8, !tbaa !19
  %indvars.iv.next27.3 = add nuw nsw i64 %indvars.iv26, 4
  %niter35.next.3 = add i64 %niter35, 4
  %niter35.ncmp.3 = icmp eq i64 %niter35.next.3, %unroll_iter34
  br i1 %niter35.ncmp.3, label %._crit_edge.unr-lcssa, label %.lr.ph23, !llvm.loop !24

._crit_edge.unr-lcssa:                            ; preds = %.lr.ph23, %.lr.ph23.preheader
  %indvars.iv26.unr = phi i64 [ 0, %.lr.ph23.preheader ], [ %indvars.iv.next27.3, %.lr.ph23 ]
  %lcmp.mod33.not = icmp eq i64 %xtraiter31, 0
  br i1 %lcmp.mod33.not, label %._crit_edge, label %.lr.ph23.epil

.lr.ph23.epil:                                    ; preds = %._crit_edge.unr-lcssa, %.lr.ph23.epil
  %indvars.iv26.epil = phi i64 [ %indvars.iv.next27.epil, %.lr.ph23.epil ], [ %indvars.iv26.unr, %._crit_edge.unr-lcssa ]
  %epil.iter32 = phi i64 [ %epil.iter32.next, %.lr.ph23.epil ], [ 0, %._crit_edge.unr-lcssa ]
  %57 = load ptr, ptr %11, align 8, !tbaa !17
  %58 = getelementptr inbounds ptr, ptr %57, i64 %indvars.iv26.epil
  store ptr null, ptr %58, align 8, !tbaa !19
  %indvars.iv.next27.epil = add nuw nsw i64 %indvars.iv26.epil, 1
  %epil.iter32.next = add i64 %epil.iter32, 1
  %epil.iter32.cmp.not = icmp eq i64 %epil.iter32.next, %xtraiter31
  br i1 %epil.iter32.cmp.not, label %._crit_edge, label %.lr.ph23.epil, !llvm.loop !25

._crit_edge:                                      ; preds = %.lr.ph23.epil, %._crit_edge.unr-lcssa
  %59 = getelementptr inbounds i8, ptr %0, i64 138832
  store i8 1, ptr %59, align 8, !tbaa !26
  tail call void @_ZN6SoLoud6Soloud25unlockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138833) %0)
  br label %60

60:                                               ; preds = %2, %._crit_edge
  %.017 = phi i32 [ 0, %._crit_edge ], [ 1, %2 ]
  ret i32 %.017
}

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #3

declare noundef i32 @_ZN6SoLoud18AlignedFloatBuffer4initEj(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) local_unnamed_addr #0

attributes #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 #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 = { nobuiltin 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 #3 = { nobuiltin allocsize(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 = { builtin nounwind }
attributes #5 = { builtin allocsize(0) }

!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 48}
!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 = !{!6, !7, i64 112}
!17 = !{!6, !7, i64 144}
!18 = !{!6, !7, i64 120}
!19 = !{!7, !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.unroll.disable"}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !21}
!26 = !{!6, !10, i64 138832}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass