; LLVM IR from modlfo/AudioEngine :: AudioEngine/JuceLibraryCode (juce_audio_basics)

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

%"struct.juce::MPENote" = type <{ i16, i8, i8, %"class.juce::MPEValue", %"class.juce::MPEValue", %"class.juce::MPEValue", %"class.juce::MPEValue", %"class.juce::MPEValue", double, i32, [4 x i8] }>
%"class.juce::MPEValue" = type { i32 }
%"class.juce::Array.77" = type { %"class.juce::ArrayAllocationBase.73", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.73" = type <{ %"class.juce::HeapBlock.74", i32, [4 x i8] }>
%"class.juce::HeapBlock.74" = type { ptr }
%"struct.juce::MPEVoiceAgeSorter" = type { i8 }
%"class.juce::MPESynthesiser" = type { %"struct.juce::MPESynthesiserBase.base", %"class.juce::OwnedArray.72", i8, %"class.juce::CriticalSection" }
%"struct.juce::MPESynthesiserBase.base" = type <{ %"class.juce::MPEInstrument::Listener", %"class.juce::ScopedPointer", %"class.juce::CriticalSection", double, i32, i8 }>
%"class.juce::MPEInstrument::Listener" = type { ptr }
%"class.juce::ScopedPointer" = type { ptr }
%"class.juce::OwnedArray.72" = type { %"class.juce::ArrayAllocationBase.73", i32, [4 x i8] }
%"class.juce::CriticalSection" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4juce7MPENote7isValidEv(ptr noundef nonnull align 8 dereferenceable(36)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4juce19MPESynthesiserVoice20isPlayingButReleasedEv(ptr noundef nonnull align 8 dereferenceable(60)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce10OwnedArrayINS_19MPESynthesiserVoiceENS_20DummyCriticalSectionEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4juce10OwnedArrayINS_19MPESynthesiserVoiceENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK4juce14MPESynthesiser16findVoiceToStealENS_7MPENoteE(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef byval(%"struct.juce::MPENote") align 8 %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.juce::Array.77", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %"struct.juce::MPEVoiceAgeSorter", align 1
  %13 = alloca i32, align 4
  %14 = alloca %"struct.juce::MPENote", align 8
  %15 = alloca %"struct.juce::MPENote", align 8
  %16 = alloca %"struct.juce::MPENote", align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca %"struct.juce::MPENote", align 8
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = alloca %"struct.juce::MPENote", align 8
  %27 = alloca %"struct.juce::MPENote", align 8
  %28 = alloca i32, align 4
  %29 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  %30 = load ptr, ptr %4, align 8
  br label %31

31:                                               ; preds = %2
  br label %32

32:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store ptr null, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store ptr null, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #4
  call void @_ZN4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EEC2Ev(ptr noundef nonnull align 8 dereferenceable(20) %7) #4
  %33 = getelementptr inbounds %"class.juce::MPESynthesiser", ptr %30, i32 0, i32 1
  %34 = call noundef i32 @_ZNK4juce10OwnedArrayINS_19MPESynthesiserVoiceENS_20DummyCriticalSectionEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %33) #4
  invoke void @_ZN4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE22ensureStorageAllocatedEi(ptr noundef nonnull align 8 dereferenceable(20) %7, i32 noundef %34)
          to label %35 unwind label %42

35:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %96, %35
  %37 = load i32, ptr %10, align 4, !tbaa !9
  %38 = getelementptr inbounds %"class.juce::MPESynthesiser", ptr %30, i32 0, i32 1
  %39 = call noundef i32 @_ZNK4juce10OwnedArrayINS_19MPESynthesiserVoiceENS_20DummyCriticalSectionEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %38) #4
  %40 = icmp slt i32 %37, %39
  br i1 %40, label %46, label %41

41:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %99

42:                                               ; preds = %32
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %8, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %9, align 4
  br label %265

46:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %47 = getelementptr inbounds %"class.juce::MPESynthesiser", ptr %30, i32 0, i32 1
  %48 = load i32, ptr %10, align 4, !tbaa !9
  %49 = call noundef ptr @_ZNK4juce10OwnedArrayINS_19MPESynthesiserVoiceENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %47, i32 noundef %48) #4
  store ptr %49, ptr %11, align 8, !tbaa !5
  br label %50

50:                                               ; preds = %46
  br label %51

51:                                               ; preds = %50
  br label %52

52:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #4
  %53 = load ptr, ptr %11, align 8, !tbaa !5
  %54 = invoke noundef i32 @_ZN4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE9addSortedINS_17MPEVoiceAgeSorterEEEiRT_S2_(ptr noundef nonnull align 8 dereferenceable(20) %7, ptr noundef nonnull align 1 dereferenceable(1) %12, ptr noundef %53)
          to label %55 unwind label %76

55:                                               ; preds = %52
  %56 = load ptr, ptr %11, align 8, !tbaa !5
  %57 = call noundef zeroext i1 @_ZNK4juce19MPESynthesiserVoice20isPlayingButReleasedEv(ptr noundef nonnull align 8 dereferenceable(60) %56) #4
  br i1 %57, label %95, label %58

58:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %14) #4
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZNK4juce19MPESynthesiserVoice23getCurrentlyPlayingNoteEv(ptr dead_on_unwind writable sret(%"struct.juce::MPENote") align 8 %14, ptr noundef nonnull align 8 dereferenceable(60) %59) #4
  %60 = getelementptr inbounds %"struct.juce::MPENote", ptr %14, i32 0, i32 2
  %61 = load i8, ptr %60, align 1, !tbaa !11
  %62 = zext i8 %61 to i32
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #4
  store i32 %62, ptr %13, align 4, !tbaa !9
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = icmp eq ptr %63, null
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #4
  br i1 %64, label %72, label %65

65:                                               ; preds = %58
  %66 = load i32, ptr %13, align 4, !tbaa !9
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK4juce19MPESynthesiserVoice23getCurrentlyPlayingNoteEv(ptr dead_on_unwind writable sret(%"struct.juce::MPENote") align 8 %15, ptr noundef nonnull align 8 dereferenceable(60) %67) #4
  %68 = getelementptr inbounds %"struct.juce::MPENote", ptr %15, i32 0, i32 2
  %69 = load i8, ptr %68, align 1, !tbaa !11
  %70 = zext i8 %69 to i32
  %71 = icmp slt i32 %66, %70
  br label %72

72:                                               ; preds = %65, %58
  %73 = phi i1 [ true, %58 ], [ %71, %65 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #4
  br i1 %73, label %74, label %80

74:                                               ; preds = %72
  %75 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %75, ptr %5, align 8, !tbaa !5
  br label %80

76:                                               ; preds = %52
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %8, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %265

80:                                               ; preds = %74, %72
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = icmp eq ptr %81, null
  call void @llvm.lifetime.start.p0(i64 40, ptr %16) #4
  br i1 %82, label %90, label %83

83:                                               ; preds = %80
  %84 = load i32, ptr %13, align 4, !tbaa !9
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZNK4juce19MPESynthesiserVoice23getCurrentlyPlayingNoteEv(ptr dead_on_unwind writable sret(%"struct.juce::MPENote") align 8 %16, ptr noundef nonnull align 8 dereferenceable(60) %85) #4
  %86 = getelementptr inbounds %"struct.juce::MPENote", ptr %16, i32 0, i32 2
  %87 = load i8, ptr %86, align 1, !tbaa !11
  %88 = zext i8 %87 to i32
  %89 = icmp sgt i32 %84, %88
  br label %90

90:                                               ; preds = %83, %80
  %91 = phi i1 [ true, %80 ], [ %89, %83 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #4
  br i1 %91, label %92, label %94

92:                                               ; preds = %90
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %93, ptr %6, align 8, !tbaa !5
  br label %94

94:                                               ; preds = %92, %90
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %95

95:                                               ; preds = %94, %55
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %96

96:                                               ; preds = %95
  %97 = load i32, ptr %10, align 4, !tbaa !9
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %10, align 4, !tbaa !9
  br label %36, !llvm.loop !17

99:                                               ; preds = %41
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = icmp eq ptr %100, %101
  br i1 %102, label %103, label %104

103:                                              ; preds = %99
  store ptr null, ptr %6, align 8, !tbaa !5
  br label %104

104:                                              ; preds = %103, %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %105 = call noundef i32 @_ZNK4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %7) #4
  store i32 %105, ptr %17, align 4, !tbaa !9
  %106 = call noundef zeroext i1 @_ZNK4juce7MPENote7isValidEv(ptr noundef nonnull align 8 dereferenceable(36) %1) #4
  br i1 %106, label %107, label %141

107:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %108

108:                                              ; preds = %135, %107
  %109 = load i32, ptr %18, align 4, !tbaa !9
  %110 = load i32, ptr %17, align 4, !tbaa !9
  %111 = icmp slt i32 %109, %110
  br i1 %111, label %113, label %112

112:                                              ; preds = %108
  store i32 9, ptr %19, align 4
  br label %138

113:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %114 = load i32, ptr %18, align 4, !tbaa !9
  %115 = invoke noundef ptr @_ZNK4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %7, i32 noundef %114)
          to label %116 unwind label %127

116:                                              ; preds = %113
  store ptr %115, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %21) #4
  %117 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZNK4juce19MPESynthesiserVoice23getCurrentlyPlayingNoteEv(ptr dead_on_unwind writable sret(%"struct.juce::MPENote") align 8 %21, ptr noundef nonnull align 8 dereferenceable(60) %117) #4
  %118 = getelementptr inbounds %"struct.juce::MPENote", ptr %21, i32 0, i32 2
  %119 = load i8, ptr %118, align 1, !tbaa !11
  %120 = zext i8 %119 to i32
  %121 = getelementptr inbounds %"struct.juce::MPENote", ptr %1, i32 0, i32 2
  %122 = load i8, ptr %121, align 1, !tbaa !11
  %123 = zext i8 %122 to i32
  %124 = icmp eq i32 %120, %123
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #4
  br i1 %124, label %125, label %131

125:                                              ; preds = %116
  %126 = load ptr, ptr %20, align 8, !tbaa !5
  store ptr %126, ptr %3, align 8
  store i32 1, ptr %19, align 4
  br label %132

127:                                              ; preds = %113
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %8, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %264

131:                                              ; preds = %116
  store i32 0, ptr %19, align 4
  br label %132

132:                                              ; preds = %131, %125
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  %133 = load i32, ptr %19, align 4
  switch i32 %133, label %138 [
    i32 0, label %134
  ]

134:                                              ; preds = %132
  br label %135

135:                                              ; preds = %134
  %136 = load i32, ptr %18, align 4, !tbaa !9
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %18, align 4, !tbaa !9
  br label %108, !llvm.loop !19

138:                                              ; preds = %132, %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  %139 = load i32, ptr %19, align 4
  switch i32 %139, label %262 [
    i32 9, label %140
  ]

140:                                              ; preds = %138
  br label %141

141:                                              ; preds = %140, %104
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %142

142:                                              ; preds = %171, %141
  %143 = load i32, ptr %22, align 4, !tbaa !9
  %144 = load i32, ptr %17, align 4, !tbaa !9
  %145 = icmp slt i32 %143, %144
  br i1 %145, label %147, label %146

146:                                              ; preds = %142
  store i32 12, ptr %19, align 4
  br label %174

147:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %148 = load i32, ptr %22, align 4, !tbaa !9
  %149 = invoke noundef ptr @_ZNK4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %7, i32 noundef %148)
          to label %150 unwind label %163

150:                                              ; preds = %147
  store ptr %149, ptr %23, align 8, !tbaa !5
  %151 = load ptr, ptr %23, align 8, !tbaa !5
  %152 = load ptr, ptr %5, align 8, !tbaa !5
  %153 = icmp ne ptr %151, %152
  br i1 %153, label %154, label %167

154:                                              ; preds = %150
  %155 = load ptr, ptr %23, align 8, !tbaa !5
  %156 = load ptr, ptr %6, align 8, !tbaa !5
  %157 = icmp ne ptr %155, %156
  br i1 %157, label %158, label %167

158:                                              ; preds = %154
  %159 = load ptr, ptr %23, align 8, !tbaa !5
  %160 = call noundef zeroext i1 @_ZNK4juce19MPESynthesiserVoice20isPlayingButReleasedEv(ptr noundef nonnull align 8 dereferenceable(60) %159) #4
  br i1 %160, label %161, label %167

161:                                              ; preds = %158
  %162 = load ptr, ptr %23, align 8, !tbaa !5
  store ptr %162, ptr %3, align 8
  store i32 1, ptr %19, align 4
  br label %168

163:                                              ; preds = %147
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %8, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  br label %264

167:                                              ; preds = %158, %154, %150
  store i32 0, ptr %19, align 4
  br label %168

168:                                              ; preds = %167, %161
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  %169 = load i32, ptr %19, align 4
  switch i32 %169, label %174 [
    i32 0, label %170
  ]

170:                                              ; preds = %168
  br label %171

171:                                              ; preds = %170
  %172 = load i32, ptr %22, align 4, !tbaa !9
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr %22, align 4, !tbaa !9
  br label %142, !llvm.loop !20

174:                                              ; preds = %168, %146
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  %175 = load i32, ptr %19, align 4
  switch i32 %175, label %262 [
    i32 12, label %176
  ]

176:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %177

177:                                              ; preds = %215, %176
  %178 = load i32, ptr %24, align 4, !tbaa !9
  %179 = load i32, ptr %17, align 4, !tbaa !9
  %180 = icmp slt i32 %178, %179
  br i1 %180, label %182, label %181

181:                                              ; preds = %177
  store i32 15, ptr %19, align 4
  br label %218

182:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %183 = load i32, ptr %24, align 4, !tbaa !9
  %184 = invoke noundef ptr @_ZNK4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %7, i32 noundef %183)
          to label %185 unwind label %207

185:                                              ; preds = %182
  store ptr %184, ptr %25, align 8, !tbaa !5
  %186 = load ptr, ptr %25, align 8, !tbaa !5
  %187 = load ptr, ptr %5, align 8, !tbaa !5
  %188 = icmp ne ptr %186, %187
  call void @llvm.lifetime.start.p0(i64 40, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %27) #4
  br i1 %188, label %189, label %203

189:                                              ; preds = %185
  %190 = load ptr, ptr %25, align 8, !tbaa !5
  %191 = load ptr, ptr %6, align 8, !tbaa !5
  %192 = icmp ne ptr %190, %191
  br i1 %192, label %193, label %203

193:                                              ; preds = %189
  %194 = load ptr, ptr %25, align 8, !tbaa !5
  call void @_ZNK4juce19MPESynthesiserVoice23getCurrentlyPlayingNoteEv(ptr dead_on_unwind writable sret(%"struct.juce::MPENote") align 8 %26, ptr noundef nonnull align 8 dereferenceable(60) %194) #4
  %195 = getelementptr inbounds %"struct.juce::MPENote", ptr %26, i32 0, i32 9
  %196 = load i32, ptr %195, align 8, !tbaa !21
  %197 = icmp ne i32 %196, 1
  br i1 %197, label %198, label %203

198:                                              ; preds = %193
  %199 = load ptr, ptr %25, align 8, !tbaa !5
  call void @_ZNK4juce19MPESynthesiserVoice23getCurrentlyPlayingNoteEv(ptr dead_on_unwind writable sret(%"struct.juce::MPENote") align 8 %27, ptr noundef nonnull align 8 dereferenceable(60) %199) #4
  %200 = getelementptr inbounds %"struct.juce::MPENote", ptr %27, i32 0, i32 9
  %201 = load i32, ptr %200, align 8, !tbaa !21
  %202 = icmp ne i32 %201, 3
  br label %203

203:                                              ; preds = %198, %193, %189, %185
  %204 = phi i1 [ false, %193 ], [ false, %189 ], [ false, %185 ], [ %202, %198 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %26) #4
  br i1 %204, label %205, label %211

205:                                              ; preds = %203
  %206 = load ptr, ptr %25, align 8, !tbaa !5
  store ptr %206, ptr %3, align 8
  store i32 1, ptr %19, align 4
  br label %212

207:                                              ; preds = %182
  %208 = landingpad { ptr, i32 }
          cleanup
  %209 = extractvalue { ptr, i32 } %208, 0
  store ptr %209, ptr %8, align 8
  %210 = extractvalue { ptr, i32 } %208, 1
  store i32 %210, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  br label %264

211:                                              ; preds = %203
  store i32 0, ptr %19, align 4
  br label %212

212:                                              ; preds = %211, %205
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  %213 = load i32, ptr %19, align 4
  switch i32 %213, label %218 [
    i32 0, label %214
  ]

214:                                              ; preds = %212
  br label %215

215:                                              ; preds = %214
  %216 = load i32, ptr %24, align 4, !tbaa !9
  %217 = add nsw i32 %216, 1
  store i32 %217, ptr %24, align 4, !tbaa !9
  br label %177, !llvm.loop !22

218:                                              ; preds = %212, %181
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  %219 = load i32, ptr %19, align 4
  switch i32 %219, label %262 [
    i32 15, label %220
  ]

220:                                              ; preds = %218
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #4
  store i32 0, ptr %28, align 4, !tbaa !9
  br label %221

221:                                              ; preds = %247, %220
  %222 = load i32, ptr %28, align 4, !tbaa !9
  %223 = load i32, ptr %17, align 4, !tbaa !9
  %224 = icmp slt i32 %222, %223
  br i1 %224, label %226, label %225

225:                                              ; preds = %221
  store i32 18, ptr %19, align 4
  br label %250

226:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  %227 = load i32, ptr %28, align 4, !tbaa !9
  %228 = invoke noundef ptr @_ZNK4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %7, i32 noundef %227)
          to label %229 unwind label %239

229:                                              ; preds = %226
  store ptr %228, ptr %29, align 8, !tbaa !5
  %230 = load ptr, ptr %29, align 8, !tbaa !5
  %231 = load ptr, ptr %5, align 8, !tbaa !5
  %232 = icmp ne ptr %230, %231
  br i1 %232, label %233, label %243

233:                                              ; preds = %229
  %234 = load ptr, ptr %29, align 8, !tbaa !5
  %235 = load ptr, ptr %6, align 8, !tbaa !5
  %236 = icmp ne ptr %234, %235
  br i1 %236, label %237, label %243

237:                                              ; preds = %233
  %238 = load ptr, ptr %29, align 8, !tbaa !5
  store ptr %238, ptr %3, align 8
  store i32 1, ptr %19, align 4
  br label %244

239:                                              ; preds = %226
  %240 = landingpad { ptr, i32 }
          cleanup
  %241 = extractvalue { ptr, i32 } %240, 0
  store ptr %241, ptr %8, align 8
  %242 = extractvalue { ptr, i32 } %240, 1
  store i32 %242, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #4
  br label %264

243:                                              ; preds = %233, %229
  store i32 0, ptr %19, align 4
  br label %244

244:                                              ; preds = %243, %237
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  %245 = load i32, ptr %19, align 4
  switch i32 %245, label %250 [
    i32 0, label %246
  ]

246:                                              ; preds = %244
  br label %247

247:                                              ; preds = %246
  %248 = load i32, ptr %28, align 4, !tbaa !9
  %249 = add nsw i32 %248, 1
  store i32 %249, ptr %28, align 4, !tbaa !9
  br label %221, !llvm.loop !23

250:                                              ; preds = %244, %225
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #4
  %251 = load i32, ptr %19, align 4
  switch i32 %251, label %262 [
    i32 18, label %252
  ]

252:                                              ; preds = %250
  br label %253

253:                                              ; preds = %252
  br label %254

254:                                              ; preds = %253
  br label %255

255:                                              ; preds = %254
  %256 = load ptr, ptr %6, align 8, !tbaa !5
  %257 = icmp ne ptr %256, null
  br i1 %257, label %258, label %260

258:                                              ; preds = %255
  %259 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %259, ptr %3, align 8
  store i32 1, ptr %19, align 4
  br label %262

260:                                              ; preds = %255
  %261 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %261, ptr %3, align 8
  store i32 1, ptr %19, align 4
  br label %262

262:                                              ; preds = %260, %258, %250, %218, %174, %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @_ZN4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EED2Ev(ptr noundef nonnull align 8 dereferenceable(20) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  %263 = load ptr, ptr %3, align 8
  ret ptr %263

264:                                              ; preds = %239, %207, %163, %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %265

265:                                              ; preds = %264, %76, %42
  call void @_ZN4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EED2Ev(ptr noundef nonnull align 8 dereferenceable(20) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %266

266:                                              ; preds = %265
  %267 = load ptr, ptr %8, align 8
  %268 = load i32, ptr %9, align 4
  %269 = insertvalue { ptr, i32 } poison, ptr %267, 0
  %270 = insertvalue { ptr, i32 } %269, i32 %268, 1
  resume { ptr, i32 } %270
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EEC2Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE22ensureStorageAllocatedEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE9addSortedINS_17MPEVoiceAgeSorterEEEiRT_S2_(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK4juce19MPESynthesiserVoice23getCurrentlyPlayingNoteEv(ptr dead_on_unwind noalias writable sret(%"struct.juce::MPENote") align 8, ptr noundef nonnull align 8 dereferenceable(60)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EED2Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { 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 #4 = { 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, !7, i64 3}
!12 = !{!"_ZTSN4juce7MPENoteE", !13, i64 0, !7, i64 2, !7, i64 3, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !15, i64 24, !16, i64 32}
!13 = !{!"short", !7, i64 0}
!14 = !{!"_ZTSN4juce8MPEValueE", !10, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = !{!"_ZTSN4juce7MPENote8KeyStateE", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !18}
!21 = !{!12, !16, i64 32}
!22 = distinct !{!22, !18}
!23 = distinct !{!23, !18}


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

%"struct.juce::MPENote" = type <{ i16, i8, i8, %"class.juce::MPEValue", %"class.juce::MPEValue", %"class.juce::MPEValue", %"class.juce::MPEValue", %"class.juce::MPEValue", double, i32, [4 x i8] }>
%"class.juce::MPEValue" = type { i32 }
%"class.juce::Array.77" = type { %"class.juce::ArrayAllocationBase.73", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.73" = type <{ %"class.juce::HeapBlock.74", i32, [4 x i8] }>
%"class.juce::HeapBlock.74" = type { ptr }
%"struct.juce::MPEVoiceAgeSorter" = type { i8 }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4juce7MPENote7isValidEv(ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4juce19MPESynthesiserVoice20isPlayingButReleasedEv(ptr noundef nonnull align 8 dereferenceable(60)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce10OwnedArrayINS_19MPESynthesiserVoiceENS_20DummyCriticalSectionEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4juce10OwnedArrayINS_19MPESynthesiserVoiceENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK4juce14MPESynthesiser16findVoiceToStealENS_7MPENoteE(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef byval(%"struct.juce::MPENote") align 8 %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.juce::Array.77", align 8
  %4 = alloca %"struct.juce::MPEVoiceAgeSorter", align 1
  %5 = alloca %"struct.juce::MPENote", align 8
  %6 = alloca %"struct.juce::MPENote", align 8
  %7 = alloca %"struct.juce::MPENote", align 8
  %8 = alloca %"struct.juce::MPENote", align 8
  %9 = alloca %"struct.juce::MPENote", align 8
  %10 = alloca %"struct.juce::MPENote", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  call void @_ZN4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EEC2Ev(ptr noundef nonnull align 8 dereferenceable(20) %3) #4
  %11 = getelementptr inbounds i8, ptr %0, i64 72
  %12 = call noundef i32 @_ZNK4juce10OwnedArrayINS_19MPESynthesiserVoiceENS_20DummyCriticalSectionEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %11) #4
  invoke void @_ZN4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE22ensureStorageAllocatedEi(ptr noundef nonnull align 8 dereferenceable(20) %3, i32 noundef %12)
          to label %.preheader138 unwind label %23

.preheader138:                                    ; preds = %2
  %13 = call noundef i32 @_ZNK4juce10OwnedArrayINS_19MPESynthesiserVoiceENS_20DummyCriticalSectionEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %11) #4
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader138
  %15 = getelementptr inbounds i8, ptr %5, i64 3
  %16 = getelementptr inbounds i8, ptr %6, i64 3
  %17 = getelementptr inbounds i8, ptr %7, i64 3
  br label %25

._crit_edge:                                      ; preds = %45, %.preheader138
  %.082.lcssa = phi ptr [ null, %.preheader138 ], [ %.284, %45 ]
  %.078.lcssa = phi ptr [ null, %.preheader138 ], [ %.280, %45 ]
  %18 = icmp eq ptr %.082.lcssa, %.078.lcssa
  %spec.store.select = select i1 %18, ptr null, ptr %.082.lcssa
  %19 = call noundef i32 @_ZNK4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %3) #4
  %20 = call noundef zeroext i1 @_ZNK4juce7MPENote7isValidEv(ptr noundef nonnull align 8 dereferenceable(36) %1) #4
  %.not101148 = icmp sgt i32 %19, 0
  %or.cond162 = and i1 %20, %.not101148
  br i1 %or.cond162, label %.lr.ph150, label %.loopexit

.lr.ph150:                                        ; preds = %._crit_edge
  %21 = getelementptr inbounds i8, ptr %8, i64 3
  %22 = getelementptr inbounds i8, ptr %1, i64 3
  br label %51

23:                                               ; preds = %2
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %73

25:                                               ; preds = %.lr.ph, %45
  %.078146 = phi ptr [ null, %.lr.ph ], [ %.280, %45 ]
  %.082145 = phi ptr [ null, %.lr.ph ], [ %.284, %45 ]
  %.097144 = phi i32 [ 0, %.lr.ph ], [ %46, %45 ]
  %26 = call noundef ptr @_ZNK4juce10OwnedArrayINS_19MPESynthesiserVoiceENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %11, i32 noundef %.097144) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #4
  %27 = invoke noundef i32 @_ZN4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE9addSortedINS_17MPEVoiceAgeSorterEEEiRT_S2_(ptr noundef nonnull align 8 dereferenceable(20) %3, ptr noundef nonnull align 1 dereferenceable(1) %4, ptr noundef %26)
          to label %28 unwind label %37

28:                                               ; preds = %25
  %29 = call noundef zeroext i1 @_ZNK4juce19MPESynthesiserVoice20isPlayingButReleasedEv(ptr noundef nonnull align 8 dereferenceable(60) %26) #4
  br i1 %29, label %45, label %30

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #4
  call void @_ZNK4juce19MPESynthesiserVoice23getCurrentlyPlayingNoteEv(ptr dead_on_unwind nonnull writable sret(%"struct.juce::MPENote") align 8 %5, ptr noundef nonnull align 8 dereferenceable(60) %26) #4
  %31 = load i8, ptr %15, align 1, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #4
  %32 = icmp eq ptr %.078146, null
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #4
  br i1 %32, label %.critedge, label %33

33:                                               ; preds = %30
  call void @_ZNK4juce19MPESynthesiserVoice23getCurrentlyPlayingNoteEv(ptr dead_on_unwind nonnull writable sret(%"struct.juce::MPENote") align 8 %6, ptr noundef nonnull align 8 dereferenceable(60) %.078146) #4
  %34 = load i8, ptr %16, align 1, !tbaa !5
  %35 = icmp ult i8 %31, %34
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #4
  br i1 %35, label %36, label %39

.critedge:                                        ; preds = %30
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #4
  br label %36

36:                                               ; preds = %.critedge, %33
  br label %39

37:                                               ; preds = %25
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  br label %73

39:                                               ; preds = %36, %33
  %.179 = phi ptr [ %26, %36 ], [ %.078146, %33 ]
  %40 = icmp eq ptr %.082145, null
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #4
  br i1 %40, label %.critedge9, label %41

41:                                               ; preds = %39
  call void @_ZNK4juce19MPESynthesiserVoice23getCurrentlyPlayingNoteEv(ptr dead_on_unwind nonnull writable sret(%"struct.juce::MPENote") align 8 %7, ptr noundef nonnull align 8 dereferenceable(60) %.082145) #4
  %42 = load i8, ptr %17, align 1, !tbaa !5
  %43 = icmp ugt i8 %31, %42
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #4
  br i1 %43, label %44, label %45

.critedge9:                                       ; preds = %39
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #4
  br label %44

44:                                               ; preds = %.critedge9, %41
  br label %45

45:                                               ; preds = %41, %44, %28
  %.284 = phi ptr [ %.082145, %28 ], [ %26, %44 ], [ %.082145, %41 ]
  %.280 = phi ptr [ %.078146, %28 ], [ %.179, %44 ], [ %.179, %41 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  %46 = add nuw nsw i32 %.097144, 1
  %47 = call noundef i32 @_ZNK4juce10OwnedArrayINS_19MPESynthesiserVoiceENS_20DummyCriticalSectionEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %11) #4
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %25, label %._crit_edge, !llvm.loop !14

49:                                               ; preds = %51
  %50 = add nuw nsw i32 %.095149, 1
  %exitcond.not = icmp eq i32 %50, %19
  br i1 %exitcond.not, label %.loopexit, label %51, !llvm.loop !16

51:                                               ; preds = %.lr.ph150, %49
  %.095149 = phi i32 [ 0, %.lr.ph150 ], [ %50, %49 ]
  %52 = call noundef ptr @_ZNK4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %3, i32 noundef %.095149)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #4
  call void @_ZNK4juce19MPESynthesiserVoice23getCurrentlyPlayingNoteEv(ptr dead_on_unwind nonnull writable sret(%"struct.juce::MPENote") align 8 %8, ptr noundef nonnull align 8 dereferenceable(60) %52) #4
  %53 = load i8, ptr %21, align 1, !tbaa !5
  %54 = load i8, ptr %22, align 1, !tbaa !5
  %.not = icmp eq i8 %53, %54
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #4
  br i1 %.not, label %.thread, label %49

.loopexit:                                        ; preds = %49, %._crit_edge
  br i1 %.not101148, label %.lr.ph154, label %._crit_edge161

.preheader133:                                    ; preds = %60
  br i1 %.not101148, label %.lr.ph157, label %._crit_edge161

.lr.ph157:                                        ; preds = %.preheader133
  %55 = getelementptr inbounds i8, ptr %9, i64 32
  %56 = getelementptr inbounds i8, ptr %10, i64 32
  br label %62

.lr.ph154:                                        ; preds = %.loopexit, %60
  %.085152 = phi i32 [ %61, %60 ], [ 0, %.loopexit ]
  %57 = call noundef ptr @_ZNK4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %3, i32 noundef %.085152)
  %.not102 = icmp eq ptr %57, %.078.lcssa
  %.not103 = icmp eq ptr %57, %spec.store.select
  %or.cond = select i1 %.not102, i1 true, i1 %.not103
  br i1 %or.cond, label %60, label %58

58:                                               ; preds = %.lr.ph154
  %59 = call noundef zeroext i1 @_ZNK4juce19MPESynthesiserVoice20isPlayingButReleasedEv(ptr noundef nonnull align 8 dereferenceable(60) %57) #4
  br i1 %59, label %.thread, label %60

60:                                               ; preds = %.lr.ph154, %58
  %61 = add nuw nsw i32 %.085152, 1
  %exitcond173.not = icmp eq i32 %61, %19
  br i1 %exitcond173.not, label %.preheader133, label %.lr.ph154, !llvm.loop !17

.preheader:                                       ; preds = %68
  br i1 %.not101148, label %.lr.ph160, label %._crit_edge161

62:                                               ; preds = %.lr.ph157, %68
  %.081156 = phi i32 [ 0, %.lr.ph157 ], [ %69, %68 ]
  %63 = call noundef ptr @_ZNK4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %3, i32 noundef %.081156)
  %.not105 = icmp eq ptr %63, %.078.lcssa
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) #4
  %.not106 = icmp eq ptr %63, %spec.store.select
  %or.cond115 = select i1 %.not105, i1 true, i1 %.not106
  br i1 %or.cond115, label %.critedge11, label %64

64:                                               ; preds = %62
  call void @_ZNK4juce19MPESynthesiserVoice23getCurrentlyPlayingNoteEv(ptr dead_on_unwind nonnull writable sret(%"struct.juce::MPENote") align 8 %9, ptr noundef nonnull align 8 dereferenceable(60) %63) #4
  %65 = load i32, ptr %55, align 8, !tbaa !18
  %.not107 = icmp eq i32 %65, 1
  br i1 %.not107, label %.critedge11, label %66

66:                                               ; preds = %64
  call void @_ZNK4juce19MPESynthesiserVoice23getCurrentlyPlayingNoteEv(ptr dead_on_unwind nonnull writable sret(%"struct.juce::MPENote") align 8 %10, ptr noundef nonnull align 8 dereferenceable(60) %63) #4
  %67 = load i32, ptr %56, align 8, !tbaa !18
  %.not108 = icmp eq i32 %67, 3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #4
  br i1 %.not108, label %68, label %.thread

.critedge11:                                      ; preds = %62, %64
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #4
  br label %68

68:                                               ; preds = %66, %.critedge11
  %69 = add nuw nsw i32 %.081156, 1
  %exitcond174.not = icmp eq i32 %69, %19
  br i1 %exitcond174.not, label %.preheader, label %62, !llvm.loop !19

70:                                               ; preds = %.lr.ph160
  %71 = add nuw nsw i32 %.077159, 1
  %exitcond175.not = icmp eq i32 %71, %19
  br i1 %exitcond175.not, label %._crit_edge161, label %.lr.ph160, !llvm.loop !20

.lr.ph160:                                        ; preds = %.preheader, %70
  %.077159 = phi i32 [ %71, %70 ], [ 0, %.preheader ]
  %72 = call noundef ptr @_ZNK4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %3, i32 noundef %.077159)
  %.not110 = icmp eq ptr %72, %.078.lcssa
  %.not111 = icmp eq ptr %72, %spec.store.select
  %or.cond116 = select i1 %.not110, i1 true, i1 %.not111
  br i1 %or.cond116, label %70, label %.thread

._crit_edge161:                                   ; preds = %70, %.loopexit, %.preheader133, %.preheader
  %.not113 = icmp eq ptr %spec.store.select, null
  %.078.spec.store.select = select i1 %.not113, ptr %.078.lcssa, ptr %spec.store.select
  br label %.thread

.thread:                                          ; preds = %51, %58, %66, %.lr.ph160, %._crit_edge161
  %.13 = phi ptr [ %.078.spec.store.select, %._crit_edge161 ], [ %72, %.lr.ph160 ], [ %63, %66 ], [ %57, %58 ], [ %52, %51 ]
  call void @_ZN4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EED2Ev(ptr noundef nonnull align 8 dereferenceable(20) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  ret ptr %.13

73:                                               ; preds = %37, %23
  %.pn = phi { ptr, i32 } [ %38, %37 ], [ %24, %23 ]
  call void @_ZN4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EED2Ev(ptr noundef nonnull align 8 dereferenceable(20) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EEC2Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE22ensureStorageAllocatedEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE9addSortedINS_17MPEVoiceAgeSorterEEEiRT_S2_(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK4juce19MPESynthesiserVoice23getCurrentlyPlayingNoteEv(ptr dead_on_unwind noalias writable sret(%"struct.juce::MPENote") align 8, ptr noundef nonnull align 8 dereferenceable(60)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce5ArrayIPNS_19MPESynthesiserVoiceENS_20DummyCriticalSectionELi0EED2Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { 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 #4 = { 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, !8, i64 3}
!6 = !{!"_ZTSN4juce7MPENoteE", !7, i64 0, !8, i64 2, !8, i64 3, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !12, i64 24, !13, i64 32}
!7 = !{!"short", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN4juce8MPEValueE", !11, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"double", !8, i64 0}
!13 = !{!"_ZTSN4juce7MPENote8KeyStateE", !8, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = !{!6, !13, i64 32}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}


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