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

; 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: mustprogress uwtable
define dso_local noundef i32 @_ZN6SoLoud6Soloud16createVoiceGroupEv(ptr noundef nonnull align 8 dereferenceable(138833) %0) #0 align 2 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %8 = load ptr, ptr %3, align 8
  call void @_ZN6SoLoud6Soloud23lockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138833) %8)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %9

9:                                                ; preds = %55, %1
  %10 = load i32, ptr %4, align 4, !tbaa !9
  %11 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %8, i32 0, i32 46
  %12 = load i32, ptr %11, align 8, !tbaa !11
  %13 = icmp ult i32 %10, %12
  br i1 %13, label %14, label %58

14:                                               ; preds = %9
  %15 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %8, i32 0, i32 45
  %16 = load ptr, ptr %15, align 8, !tbaa !18
  %17 = load i32, ptr %4, align 4, !tbaa !9
  %18 = zext i32 %17 to i64
  %19 = getelementptr inbounds ptr, ptr %16, i64 %18
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %21 = icmp eq ptr %20, null
  br i1 %21, label %22, label %54

22:                                               ; preds = %14
  %23 = call noalias noundef nonnull ptr @_Znam(i64 noundef 68) #7
  %24 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %8, i32 0, i32 45
  %25 = load ptr, ptr %24, align 8, !tbaa !18
  %26 = load i32, ptr %4, align 4, !tbaa !9
  %27 = zext i32 %26 to i64
  %28 = getelementptr inbounds ptr, ptr %25, i64 %27
  store ptr %23, ptr %28, align 8, !tbaa !5
  %29 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %8, i32 0, i32 45
  %30 = load ptr, ptr %29, align 8, !tbaa !18
  %31 = load i32, ptr %4, align 4, !tbaa !9
  %32 = zext i32 %31 to i64
  %33 = getelementptr inbounds ptr, ptr %30, i64 %32
  %34 = load ptr, ptr %33, align 8, !tbaa !5
  %35 = icmp eq ptr %34, null
  br i1 %35, label %36, label %37

36:                                               ; preds = %22
  call void @_ZN6SoLoud6Soloud25unlockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138833) %8)
  store i32 0, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %162

37:                                               ; preds = %22
  %38 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %8, i32 0, i32 45
  %39 = load ptr, ptr %38, align 8, !tbaa !18
  %40 = load i32, ptr %4, align 4, !tbaa !9
  %41 = zext i32 %40 to i64
  %42 = getelementptr inbounds ptr, ptr %39, i64 %41
  %43 = load ptr, ptr %42, align 8, !tbaa !5
  %44 = getelementptr inbounds i32, ptr %43, i64 0
  store i32 16, ptr %44, align 4, !tbaa !9
  %45 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %8, i32 0, i32 45
  %46 = load ptr, ptr %45, align 8, !tbaa !18
  %47 = load i32, ptr %4, align 4, !tbaa !9
  %48 = zext i32 %47 to i64
  %49 = getelementptr inbounds ptr, ptr %46, i64 %48
  %50 = load ptr, ptr %49, align 8, !tbaa !5
  %51 = getelementptr inbounds i32, ptr %50, i64 1
  store i32 0, ptr %51, align 4, !tbaa !9
  call void @_ZN6SoLoud6Soloud25unlockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138833) %8)
  %52 = load i32, ptr %4, align 4, !tbaa !9
  %53 = or i32 -4096, %52
  store i32 %53, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %162

54:                                               ; preds = %14
  br label %55

55:                                               ; preds = %54
  %56 = load i32, ptr %4, align 4, !tbaa !9
  %57 = add i32 %56, 1
  store i32 %57, ptr %4, align 4, !tbaa !9
  br label %9, !llvm.loop !19

58:                                               ; preds = %9
  %59 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %8, i32 0, i32 46
  %60 = load i32, ptr %59, align 8, !tbaa !11
  %61 = icmp eq i32 %60, 4096
  br i1 %61, label %62, label %63

62:                                               ; preds = %58
  call void @_ZN6SoLoud6Soloud25unlockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138833) %8)
  store i32 0, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %162

63:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %64 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %8, i32 0, i32 46
  %65 = load i32, ptr %64, align 8, !tbaa !11
  store i32 %65, ptr %6, align 4, !tbaa !9
  %66 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %8, i32 0, i32 46
  %67 = load i32, ptr %66, align 8, !tbaa !11
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %71

69:                                               ; preds = %63
  %70 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %8, i32 0, i32 46
  store i32 4, ptr %70, align 8, !tbaa !11
  br label %71

71:                                               ; preds = %69, %63
  %72 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %8, i32 0, i32 46
  %73 = load i32, ptr %72, align 8, !tbaa !11
  %74 = mul i32 %73, 2
  store i32 %74, ptr %72, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %75 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %8, i32 0, i32 46
  %76 = load i32, ptr %75, align 8, !tbaa !11
  %77 = zext i32 %76 to i64
  %78 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %77, i64 8)
  %79 = extractvalue { i64, i1 } %78, 1
  %80 = extractvalue { i64, i1 } %78, 0
  %81 = select i1 %79, i64 -1, i64 %80
  %82 = call noalias noundef nonnull ptr @_Znam(i64 noundef %81) #7
  store ptr %82, ptr %7, align 8, !tbaa !5
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = icmp eq ptr %83, null
  br i1 %84, label %85, label %88

85:                                               ; preds = %71
  %86 = load i32, ptr %6, align 4, !tbaa !9
  %87 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %8, i32 0, i32 46
  store i32 %86, ptr %87, align 8, !tbaa !11
  call void @_ZN6SoLoud6Soloud25unlockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138833) %8)
  store i32 0, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %161

88:                                               ; preds = %71
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %89

89:                                               ; preds = %104, %88
  %90 = load i32, ptr %4, align 4, !tbaa !9
  %91 = load i32, ptr %6, align 4, !tbaa !9
  %92 = icmp ult i32 %90, %91
  br i1 %92, label %93, label %107

93:                                               ; preds = %89
  %94 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %8, i32 0, i32 45
  %95 = load ptr, ptr %94, align 8, !tbaa !18
  %96 = load i32, ptr %4, align 4, !tbaa !9
  %97 = zext i32 %96 to i64
  %98 = getelementptr inbounds ptr, ptr %95, i64 %97
  %99 = load ptr, ptr %98, align 8, !tbaa !5
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = load i32, ptr %4, align 4, !tbaa !9
  %102 = zext i32 %101 to i64
  %103 = getelementptr inbounds ptr, ptr %100, i64 %102
  store ptr %99, ptr %103, align 8, !tbaa !5
  br label %104

104:                                              ; preds = %93
  %105 = load i32, ptr %4, align 4, !tbaa !9
  %106 = add i32 %105, 1
  store i32 %106, ptr %4, align 4, !tbaa !9
  br label %89, !llvm.loop !21

107:                                              ; preds = %89
  br label %108

108:                                              ; preds = %118, %107
  %109 = load i32, ptr %4, align 4, !tbaa !9
  %110 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %8, i32 0, i32 46
  %111 = load i32, ptr %110, align 8, !tbaa !11
  %112 = icmp ult i32 %109, %111
  br i1 %112, label %113, label %121

113:                                              ; preds = %108
  %114 = load ptr, ptr %7, align 8, !tbaa !5
  %115 = load i32, ptr %4, align 4, !tbaa !9
  %116 = zext i32 %115 to i64
  %117 = getelementptr inbounds ptr, ptr %114, i64 %116
  store ptr null, ptr %117, align 8, !tbaa !5
  br label %118

118:                                              ; preds = %113
  %119 = load i32, ptr %4, align 4, !tbaa !9
  %120 = add i32 %119, 1
  store i32 %120, ptr %4, align 4, !tbaa !9
  br label %108, !llvm.loop !22

121:                                              ; preds = %108
  %122 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %8, i32 0, i32 45
  %123 = load ptr, ptr %122, align 8, !tbaa !18
  %124 = icmp eq ptr %123, null
  br i1 %124, label %126, label %125

125:                                              ; preds = %121
  call void @_ZdaPv(ptr noundef %123) #8
  br label %126

126:                                              ; preds = %125, %121
  %127 = load ptr, ptr %7, align 8, !tbaa !5
  %128 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %8, i32 0, i32 45
  store ptr %127, ptr %128, align 8, !tbaa !18
  %129 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %129, ptr %4, align 4, !tbaa !9
  %130 = call noalias noundef nonnull ptr @_Znam(i64 noundef 68) #7
  %131 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %8, i32 0, i32 45
  %132 = load ptr, ptr %131, align 8, !tbaa !18
  %133 = load i32, ptr %4, align 4, !tbaa !9
  %134 = zext i32 %133 to i64
  %135 = getelementptr inbounds ptr, ptr %132, i64 %134
  store ptr %130, ptr %135, align 8, !tbaa !5
  %136 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %8, i32 0, i32 45
  %137 = load ptr, ptr %136, align 8, !tbaa !18
  %138 = load i32, ptr %4, align 4, !tbaa !9
  %139 = zext i32 %138 to i64
  %140 = getelementptr inbounds ptr, ptr %137, i64 %139
  %141 = load ptr, ptr %140, align 8, !tbaa !5
  %142 = icmp eq ptr %141, null
  br i1 %142, label %143, label %144

143:                                              ; preds = %126
  call void @_ZN6SoLoud6Soloud25unlockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138833) %8)
  store i32 0, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %161

144:                                              ; preds = %126
  %145 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %8, i32 0, i32 45
  %146 = load ptr, ptr %145, align 8, !tbaa !18
  %147 = load i32, ptr %4, align 4, !tbaa !9
  %148 = zext i32 %147 to i64
  %149 = getelementptr inbounds ptr, ptr %146, i64 %148
  %150 = load ptr, ptr %149, align 8, !tbaa !5
  %151 = getelementptr inbounds i32, ptr %150, i64 0
  store i32 16, ptr %151, align 4, !tbaa !9
  %152 = getelementptr inbounds %"class.SoLoud::Soloud", ptr %8, i32 0, i32 45
  %153 = load ptr, ptr %152, align 8, !tbaa !18
  %154 = load i32, ptr %4, align 4, !tbaa !9
  %155 = zext i32 %154 to i64
  %156 = getelementptr inbounds ptr, ptr %153, i64 %155
  %157 = load ptr, ptr %156, align 8, !tbaa !5
  %158 = getelementptr inbounds i32, ptr %157, i64 1
  store i32 0, ptr %158, align 4, !tbaa !9
  call void @_ZN6SoLoud6Soloud25unlockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138833) %8)
  %159 = load i32, ptr %4, align 4, !tbaa !9
  %160 = or i32 -4096, %159
  store i32 %160, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %161

161:                                              ; preds = %144, %143, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %162

162:                                              ; preds = %161, %62, %37, %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  %163 = load i32, ptr %2, align 4
  ret i32 %163
}

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.start.p0(i64 immarg, ptr nocapture) #2

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

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

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

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

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

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { builtin 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 134728}
!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 134720}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = distinct !{!22, !20}


; 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 uwtable
define dso_local noundef range(i32 -4096, 1) i32 @_ZN6SoLoud6Soloud16createVoiceGroupEv(ptr noundef nonnull align 8 dereferenceable(138833) %0) local_unnamed_addr #0 align 2 {
  tail call void @_ZN6SoLoud6Soloud23lockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138833) %0)
  %2 = getelementptr inbounds i8, ptr %0, i64 134728
  %3 = load i32, ptr %2, align 8, !tbaa !5
  %.not = icmp eq i32 %3, 0
  br i1 %.not, label %._crit_edge.thread, label %.lr.ph

.lr.ph:                                           ; preds = %1
  %4 = getelementptr inbounds i8, ptr %0, i64 134720
  %5 = load ptr, ptr %4, align 8, !tbaa !16
  %wide.trip.count = zext i32 %3 to i64
  br label %6

6:                                                ; preds = %.lr.ph, %22
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %22 ]
  %7 = getelementptr inbounds ptr, ptr %5, i64 %indvars.iv
  %8 = load ptr, ptr %7, align 8, !tbaa !17
  %9 = icmp eq ptr %8, null
  br i1 %9, label %10, label %22

10:                                               ; preds = %6
  %11 = getelementptr inbounds ptr, ptr %5, i64 %indvars.iv
  %12 = tail call noalias noundef nonnull dereferenceable(68) ptr @_Znam(i64 noundef 68) #5
  store ptr %12, ptr %11, align 8, !tbaa !17
  %13 = load ptr, ptr %4, align 8, !tbaa !16
  %14 = getelementptr inbounds ptr, ptr %13, i64 %indvars.iv
  %15 = load ptr, ptr %14, align 8, !tbaa !17
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %18

17:                                               ; preds = %10
  tail call void @_ZN6SoLoud6Soloud25unlockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138833) %0)
  br label %75

18:                                               ; preds = %10
  %19 = trunc nuw i64 %indvars.iv to i32
  store i32 16, ptr %15, align 4, !tbaa !18
  %20 = getelementptr inbounds i8, ptr %15, i64 4
  store i32 0, ptr %20, align 4, !tbaa !18
  tail call void @_ZN6SoLoud6Soloud25unlockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138833) %0)
  %21 = or i32 %19, -4096
  br label %75

22:                                               ; preds = %6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %6, !llvm.loop !19

._crit_edge:                                      ; preds = %22
  switch i32 %3, label %24 [
    i32 4096, label %23
    i32 0, label %._crit_edge.thread
  ]

23:                                               ; preds = %._crit_edge
  tail call void @_ZN6SoLoud6Soloud25unlockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138833) %0)
  br label %75

._crit_edge.thread:                               ; preds = %1, %._crit_edge
  br label %24

24:                                               ; preds = %._crit_edge, %._crit_edge.thread
  %25 = phi i32 [ %3, %._crit_edge ], [ 4, %._crit_edge.thread ]
  %26 = shl i32 %25, 1
  store i32 %26, ptr %2, align 8, !tbaa !5
  %27 = zext i32 %26 to i64
  %28 = shl nuw nsw i64 %27, 3
  %29 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %28) #5
  br i1 %.not, label %.preheader, label %.lr.ph46

.lr.ph46:                                         ; preds = %24
  %30 = ptrtoint ptr %29 to i64
  %31 = getelementptr inbounds i8, ptr %0, i64 134720
  %32 = load ptr, ptr %31, align 8, !tbaa !16
  %wide.trip.count59 = zext i32 %3 to i64
  %min.iters.check = icmp ult i32 %3, 6
  %33 = ptrtoint ptr %32 to i64
  %34 = sub i64 %30, %33
  %diff.check = icmp ult i64 %34, 32
  %or.cond = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph46
  %indvars.iv56.ph = phi i64 [ 0, %.lr.ph46 ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %wide.trip.count59, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv56.prol = phi i64 [ %indvars.iv.next57.prol, %scalar.ph.prol ], [ %indvars.iv56.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %35 = getelementptr inbounds ptr, ptr %32, i64 %indvars.iv56.prol
  %36 = load ptr, ptr %35, align 8, !tbaa !17
  %37 = getelementptr inbounds ptr, ptr %29, i64 %indvars.iv56.prol
  store ptr %36, ptr %37, align 8, !tbaa !17
  %indvars.iv.next57.prol = add nuw nsw i64 %indvars.iv56.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !21

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv56.unr = phi i64 [ %indvars.iv56.ph, %scalar.ph.preheader ], [ %indvars.iv.next57.prol, %scalar.ph.prol ]
  %38 = sub nsw i64 %indvars.iv56.ph, %wide.trip.count59
  %39 = icmp ugt i64 %38, -4
  br i1 %39, label %.preheader, label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph46
  %n.vec = and i64 %wide.trip.count59, 4294967292
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %40 = getelementptr inbounds ptr, ptr %32, i64 %index
  %41 = getelementptr inbounds i8, ptr %40, i64 16
  %wide.load = load <2 x ptr>, ptr %40, align 8, !tbaa !17
  %wide.load68 = load <2 x ptr>, ptr %41, align 8, !tbaa !17
  %42 = getelementptr inbounds ptr, ptr %29, i64 %index
  %43 = getelementptr inbounds i8, ptr %42, i64 16
  store <2 x ptr> %wide.load, ptr %42, align 8, !tbaa !17
  store <2 x ptr> %wide.load68, ptr %43, align 8, !tbaa !17
  %index.next = add nuw i64 %index, 4
  %44 = icmp eq i64 %index.next, %n.vec
  br i1 %44, label %middle.block, label %vector.body, !llvm.loop !23

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count59
  br i1 %cmp.n, label %.preheader, label %scalar.ph.preheader

.preheader:                                       ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %24
  %45 = icmp ult i32 %3, %26
  br i1 %45, label %.lr.ph49.preheader, label %._crit_edge50

.lr.ph49.preheader:                               ; preds = %.preheader
  %46 = zext i32 %3 to i64
  %47 = shl nuw nsw i64 %46, 3
  %scevgep = getelementptr i8, ptr %29, i64 %47
  %48 = xor i32 %3, -1
  %49 = add i32 %26, %48
  %50 = zext i32 %49 to i64
  %51 = shl nuw nsw i64 %50, 3
  %52 = add nuw nsw i64 %51, 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %scevgep, i8 0, i64 %52, i1 false), !tbaa !17
  br label %._crit_edge50

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv56 = phi i64 [ %indvars.iv.next57.3, %scalar.ph ], [ %indvars.iv56.unr, %scalar.ph.prol.loopexit ]
  %53 = getelementptr inbounds ptr, ptr %32, i64 %indvars.iv56
  %54 = load ptr, ptr %53, align 8, !tbaa !17
  %55 = getelementptr inbounds ptr, ptr %29, i64 %indvars.iv56
  store ptr %54, ptr %55, align 8, !tbaa !17
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %56 = getelementptr inbounds ptr, ptr %32, i64 %indvars.iv.next57
  %57 = load ptr, ptr %56, align 8, !tbaa !17
  %58 = getelementptr inbounds ptr, ptr %29, i64 %indvars.iv.next57
  store ptr %57, ptr %58, align 8, !tbaa !17
  %indvars.iv.next57.1 = add nuw nsw i64 %indvars.iv56, 2
  %59 = getelementptr inbounds ptr, ptr %32, i64 %indvars.iv.next57.1
  %60 = load ptr, ptr %59, align 8, !tbaa !17
  %61 = getelementptr inbounds ptr, ptr %29, i64 %indvars.iv.next57.1
  store ptr %60, ptr %61, align 8, !tbaa !17
  %indvars.iv.next57.2 = add nuw nsw i64 %indvars.iv56, 3
  %62 = getelementptr inbounds ptr, ptr %32, i64 %indvars.iv.next57.2
  %63 = load ptr, ptr %62, align 8, !tbaa !17
  %64 = getelementptr inbounds ptr, ptr %29, i64 %indvars.iv.next57.2
  store ptr %63, ptr %64, align 8, !tbaa !17
  %indvars.iv.next57.3 = add nuw nsw i64 %indvars.iv56, 4
  %exitcond60.not.3 = icmp eq i64 %indvars.iv.next57.3, %wide.trip.count59
  br i1 %exitcond60.not.3, label %.preheader, label %scalar.ph, !llvm.loop !26

._crit_edge50:                                    ; preds = %.lr.ph49.preheader, %.preheader
  %65 = getelementptr inbounds i8, ptr %0, i64 134720
  %66 = load ptr, ptr %65, align 8, !tbaa !16
  %67 = icmp eq ptr %66, null
  br i1 %67, label %69, label %68

68:                                               ; preds = %._crit_edge50
  tail call void @_ZdaPv(ptr noundef nonnull %66) #6
  br label %69

69:                                               ; preds = %68, %._crit_edge50
  store ptr %29, ptr %65, align 8, !tbaa !16
  %70 = tail call noalias noundef nonnull dereferenceable(68) ptr @_Znam(i64 noundef 68) #5
  %71 = zext i32 %3 to i64
  %72 = getelementptr inbounds ptr, ptr %29, i64 %71
  store ptr %70, ptr %72, align 8, !tbaa !17
  store i32 16, ptr %70, align 4, !tbaa !18
  %73 = getelementptr inbounds i8, ptr %70, i64 4
  store i32 0, ptr %73, align 4, !tbaa !18
  tail call void @_ZN6SoLoud6Soloud25unlockAudioMutex_internalEv(ptr noundef nonnull align 8 dereferenceable(138833) %0)
  %74 = or i32 %3, -4096
  br label %75

75:                                               ; preds = %69, %23, %18, %17
  %.1 = phi i32 [ 0, %17 ], [ %21, %18 ], [ 0, %23 ], [ %74, %69 ]
  ret i32 %.1
}

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

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

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

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

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

attributes #0 = { 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 #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 = { 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 #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 nounwind willreturn memory(argmem: write) }
attributes #5 = { builtin allocsize(0) }
attributes #6 = { builtin nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 134728}
!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 134720}
!17 = !{!7, !7, i64 0}
!18 = !{!11, !11, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.unroll.disable"}
!23 = distinct !{!23, !20, !24, !25}
!24 = !{!"llvm.loop.isvectorized", i32 1}
!25 = !{!"llvm.loop.unroll.runtime.disable"}
!26 = distinct !{!26, !20, !24}


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