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

; 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.juce::AudioBuffer" = type <{ i32, i32, i64, ptr, %"class.juce::HeapBlock.42", [32 x ptr], i8, [7 x i8] }>
%"class.juce::HeapBlock.42" = type { ptr }
%"class.juce::GenericScopedLock" = type { ptr }
%"class.juce::AudioProcessorPlayer" = type { %"class.juce::AudioIODeviceCallback", %"class.juce::MidiInputCallback", ptr, %"class.juce::CriticalSection", double, i32, i8, i8, i32, i32, %"class.juce::HeapBlock.225", %"class.juce::AudioBuffer", %"class.juce::AudioBuffer.226", %"class.juce::MidiBuffer", %"class.juce::MidiMessageCollector" }
%"class.juce::AudioIODeviceCallback" = type { ptr }
%"class.juce::MidiInputCallback" = type { ptr }
%"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 }
%"class.juce::HeapBlock.225" = type { ptr }
%"class.juce::AudioBuffer.226" = type <{ i32, i32, i64, ptr, %"class.juce::HeapBlock.42", [32 x ptr], i8, [7 x i8] }>
%"class.juce::MidiBuffer" = type { %"class.juce::Array.165" }
%"class.juce::Array.165" = type { %"class.juce::ArrayAllocationBase.166", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.166" = type <{ %"class.juce::HeapBlock.167", i32, [4 x i8] }>
%"class.juce::HeapBlock.167" = type { ptr }
%"class.juce::MidiMessageCollector" = type { %"class.juce::MidiKeyboardStateListener", %"class.juce::MidiInputCallback", double, %"class.juce::CriticalSection", %"class.juce::MidiBuffer", double }
%"class.juce::MidiKeyboardStateListener" = type { 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce20AudioProcessorPlayer21audioDeviceIOCallbackEPPKfiPPfii(ptr noundef nonnull align 8 dereferenceable(808) %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"class.juce::AudioBuffer", align 8
  %19 = alloca %"class.juce::GenericScopedLock", align 8
  %20 = alloca %"class.juce::GenericScopedLock", align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  store i32 %4, ptr %11, align 4, !tbaa !9
  store i32 %5, ptr %12, align 4, !tbaa !9
  %25 = load ptr, ptr %7, align 8
  br label %26

26:                                               ; preds = %6
  br label %27

27:                                               ; preds = %26
  %28 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 13
  call void @_ZN4juce10MidiBuffer5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #7
  %29 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 14
  %30 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 13
  %31 = load i32, ptr %12, align 4, !tbaa !9
  call void @_ZN4juce20MidiMessageCollector25removeNextBlockOfMessagesERNS_10MidiBufferEi(ptr noundef nonnull align 8 dereferenceable(96) %29, ptr noundef nonnull align 8 dereferenceable(24) %30, i32 noundef %31)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !9
  %32 = load i32, ptr %9, align 4, !tbaa !9
  %33 = load i32, ptr %11, align 4, !tbaa !9
  %34 = icmp sgt i32 %32, %33
  br i1 %34, label %35, label %106

35:                                               ; preds = %27
  %36 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 11
  %37 = load i32, ptr %9, align 4, !tbaa !9
  %38 = load i32, ptr %11, align 4, !tbaa !9
  %39 = sub nsw i32 %37, %38
  %40 = load i32, ptr %12, align 4, !tbaa !9
  call void @_ZN4juce11AudioBufferIfE7setSizeEiibbb(ptr noundef nonnull align 8 dereferenceable(289) %36, i32 noundef %39, i32 noundef %40, i1 noundef zeroext false, i1 noundef zeroext false, i1 noundef zeroext true) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %69, %35
  %42 = load i32, ptr %14, align 4, !tbaa !9
  %43 = load i32, ptr %11, align 4, !tbaa !9
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %72

46:                                               ; preds = %41
  %47 = load ptr, ptr %10, align 8, !tbaa !5
  %48 = load i32, ptr %14, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds ptr, ptr %47, i64 %49
  %51 = load ptr, ptr %50, align 8, !tbaa !5
  %52 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 10
  %53 = load i32, ptr %13, align 4, !tbaa !9
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce9HeapBlockIPfLb0EEixIiEERS1_T_(ptr noundef nonnull align 8 dereferenceable(8) %52, i32 noundef %53) #7
  store ptr %51, ptr %54, align 8, !tbaa !5
  %55 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 10
  %56 = load i32, ptr %13, align 4, !tbaa !9
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce9HeapBlockIPfLb0EEixIiEERS1_T_(ptr noundef nonnull align 8 dereferenceable(8) %55, i32 noundef %56) #7
  %58 = load ptr, ptr %57, align 8, !tbaa !5
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = load i32, ptr %14, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds ptr, ptr %59, i64 %61
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  %64 = load i32, ptr %12, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = mul i64 4, %65
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %58, ptr align 4 %63, i64 %66, i1 false)
  %67 = load i32, ptr %13, align 4, !tbaa !9
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %13, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %46
  %70 = load i32, ptr %14, align 4, !tbaa !9
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %14, align 4, !tbaa !9
  br label %41, !llvm.loop !11

72:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %73 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %73, ptr %15, align 4, !tbaa !9
  br label %74

74:                                               ; preds = %102, %72
  %75 = load i32, ptr %15, align 4, !tbaa !9
  %76 = load i32, ptr %9, align 4, !tbaa !9
  %77 = icmp slt i32 %75, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %105

79:                                               ; preds = %74
  %80 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 11
  %81 = load i32, ptr %15, align 4, !tbaa !9
  %82 = load i32, ptr %11, align 4, !tbaa !9
  %83 = sub nsw i32 %81, %82
  %84 = call noundef ptr @_ZN4juce11AudioBufferIfE15getWritePointerEi(ptr noundef nonnull align 8 dereferenceable(289) %80, i32 noundef %83) #7
  %85 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 10
  %86 = load i32, ptr %13, align 4, !tbaa !9
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce9HeapBlockIPfLb0EEixIiEERS1_T_(ptr noundef nonnull align 8 dereferenceable(8) %85, i32 noundef %86) #7
  store ptr %84, ptr %87, align 8, !tbaa !5
  %88 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 10
  %89 = load i32, ptr %13, align 4, !tbaa !9
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce9HeapBlockIPfLb0EEixIiEERS1_T_(ptr noundef nonnull align 8 dereferenceable(8) %88, i32 noundef %89) #7
  %91 = load ptr, ptr %90, align 8, !tbaa !5
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = load i32, ptr %15, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds ptr, ptr %92, i64 %94
  %96 = load ptr, ptr %95, align 8, !tbaa !5
  %97 = load i32, ptr %12, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = mul i64 4, %98
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %91, ptr align 4 %96, i64 %99, i1 false)
  %100 = load i32, ptr %13, align 4, !tbaa !9
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %13, align 4, !tbaa !9
  br label %102

102:                                              ; preds = %79
  %103 = load i32, ptr %15, align 4, !tbaa !9
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %15, align 4, !tbaa !9
  br label %74, !llvm.loop !13

105:                                              ; preds = %78
  br label %167

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

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

111:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %138

112:                                              ; preds = %107
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = load i32, ptr %16, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds ptr, ptr %113, i64 %115
  %117 = load ptr, ptr %116, align 8, !tbaa !5
  %118 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 10
  %119 = load i32, ptr %13, align 4, !tbaa !9
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce9HeapBlockIPfLb0EEixIiEERS1_T_(ptr noundef nonnull align 8 dereferenceable(8) %118, i32 noundef %119) #7
  store ptr %117, ptr %120, align 8, !tbaa !5
  %121 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 10
  %122 = load i32, ptr %13, align 4, !tbaa !9
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce9HeapBlockIPfLb0EEixIiEERS1_T_(ptr noundef nonnull align 8 dereferenceable(8) %121, i32 noundef %122) #7
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = load i32, ptr %16, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds ptr, ptr %125, i64 %127
  %129 = load ptr, ptr %128, align 8, !tbaa !5
  %130 = load i32, ptr %12, align 4, !tbaa !9
  %131 = sext i32 %130 to i64
  %132 = mul i64 4, %131
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %124, ptr align 4 %129, i64 %132, i1 false)
  %133 = load i32, ptr %13, align 4, !tbaa !9
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %13, align 4, !tbaa !9
  br label %135

135:                                              ; preds = %112
  %136 = load i32, ptr %16, align 4, !tbaa !9
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %16, align 4, !tbaa !9
  br label %107, !llvm.loop !14

138:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %139 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %139, ptr %17, align 4, !tbaa !9
  br label %140

140:                                              ; preds = %163, %138
  %141 = load i32, ptr %17, align 4, !tbaa !9
  %142 = load i32, ptr %11, align 4, !tbaa !9
  %143 = icmp slt i32 %141, %142
  br i1 %143, label %145, label %144

144:                                              ; preds = %140
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %166

145:                                              ; preds = %140
  %146 = load ptr, ptr %10, align 8, !tbaa !5
  %147 = load i32, ptr %17, align 4, !tbaa !9
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds ptr, ptr %146, i64 %148
  %150 = load ptr, ptr %149, align 8, !tbaa !5
  %151 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 10
  %152 = load i32, ptr %13, align 4, !tbaa !9
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce9HeapBlockIPfLb0EEixIiEERS1_T_(ptr noundef nonnull align 8 dereferenceable(8) %151, i32 noundef %152) #7
  store ptr %150, ptr %153, align 8, !tbaa !5
  %154 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 10
  %155 = load i32, ptr %13, align 4, !tbaa !9
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce9HeapBlockIPfLb0EEixIiEERS1_T_(ptr noundef nonnull align 8 dereferenceable(8) %154, i32 noundef %155) #7
  %157 = load ptr, ptr %156, align 8, !tbaa !5
  %158 = load i32, ptr %12, align 4, !tbaa !9
  %159 = sext i32 %158 to i64
  %160 = mul i64 4, %159
  call void @_ZN4juce7zeromemEPvm(ptr noundef %157, i64 noundef %160) #7
  %161 = load i32, ptr %13, align 4, !tbaa !9
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %13, align 4, !tbaa !9
  br label %163

163:                                              ; preds = %145
  %164 = load i32, ptr %17, align 4, !tbaa !9
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %17, align 4, !tbaa !9
  br label %140, !llvm.loop !15

166:                                              ; preds = %144
  br label %167

167:                                              ; preds = %166, %105
  call void @llvm.lifetime.start.p0(i64 296, ptr %18) #7
  %168 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 10
  %169 = call noundef ptr @_ZNK4juce9HeapBlockIPfLb0EEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %168) #7
  %170 = load i32, ptr %13, align 4, !tbaa !9
  %171 = load i32, ptr %12, align 4, !tbaa !9
  call void @_ZN4juce11AudioBufferIfEC2EPKPfii(ptr noundef nonnull align 8 dereferenceable(289) %18, ptr noundef %169, i32 noundef %170, i32 noundef %171) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %172 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 3
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(40) %172) #7
  %173 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 2
  %174 = load ptr, ptr %173, align 8, !tbaa !16
  %175 = icmp ne ptr %174, null
  br i1 %175, label %176, label %217

176:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %177 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 2
  %178 = load ptr, ptr %177, align 8, !tbaa !16
  %179 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK4juce14AudioProcessor15getCallbackLockEv(ptr noundef nonnull align 8 dereferenceable(256) %178) #7
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(40) %179) #7
  %180 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 2
  %181 = load ptr, ptr %180, align 8, !tbaa !16
  %182 = call noundef zeroext i1 @_ZNK4juce14AudioProcessor11isSuspendedEv(ptr noundef nonnull align 8 dereferenceable(256) %181) #7
  br i1 %182, label %213, label %183

183:                                              ; preds = %176
  %184 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 2
  %185 = load ptr, ptr %184, align 8, !tbaa !16
  %186 = call noundef zeroext i1 @_ZNK4juce14AudioProcessor22isUsingDoublePrecisionEv(ptr noundef nonnull align 8 dereferenceable(256) %185) #7
  br i1 %186, label %187, label %204

187:                                              ; preds = %183
  %188 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 12
  invoke void @_ZN4juce11AudioBufferIdE10makeCopyOfIfEEvRKNS0_IT_EEb(ptr noundef nonnull align 8 dereferenceable(289) %188, ptr noundef nonnull align 8 dereferenceable(289) %18, i1 noundef zeroext true)
          to label %189 unwind label %200

189:                                              ; preds = %187
  %190 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 2
  %191 = load ptr, ptr %190, align 8, !tbaa !16
  %192 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 12
  %193 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 13
  %194 = load ptr, ptr %191, align 8, !tbaa !34
  %195 = getelementptr inbounds ptr, ptr %194, i64 6
  %196 = load ptr, ptr %195, align 8
  invoke void %196(ptr noundef nonnull align 8 dereferenceable(256) %191, ptr noundef nonnull align 8 dereferenceable(289) %192, ptr noundef nonnull align 8 dereferenceable(24) %193)
          to label %197 unwind label %200

197:                                              ; preds = %189
  %198 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 12
  invoke void @_ZN4juce11AudioBufferIfE10makeCopyOfIdEEvRKNS0_IT_EEb(ptr noundef nonnull align 8 dereferenceable(289) %18, ptr noundef nonnull align 8 dereferenceable(289) %198, i1 noundef zeroext true)
          to label %199 unwind label %200

199:                                              ; preds = %197
  br label %212

200:                                              ; preds = %204, %197, %189, %187
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %21, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %22, align 4
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @_ZN4juce11AudioBufferIfED2Ev(ptr noundef nonnull align 8 dereferenceable(289) %18) #7
  call void @llvm.lifetime.end.p0(i64 296, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %240

204:                                              ; preds = %183
  %205 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 2
  %206 = load ptr, ptr %205, align 8, !tbaa !16
  %207 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %25, i32 0, i32 13
  %208 = load ptr, ptr %206, align 8, !tbaa !34
  %209 = getelementptr inbounds ptr, ptr %208, i64 5
  %210 = load ptr, ptr %209, align 8
  invoke void %210(ptr noundef nonnull align 8 dereferenceable(256) %206, ptr noundef nonnull align 8 dereferenceable(289) %18, ptr noundef nonnull align 8 dereferenceable(24) %207)
          to label %211 unwind label %200

211:                                              ; preds = %204
  br label %212

212:                                              ; preds = %211, %199
  store i32 1, ptr %23, align 4
  br label %214

213:                                              ; preds = %176
  store i32 0, ptr %23, align 4
  br label %214

214:                                              ; preds = %213, %212
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  %215 = load i32, ptr %23, align 4
  switch i32 %215, label %218 [
    i32 0, label %216
  ]

216:                                              ; preds = %214
  br label %217

217:                                              ; preds = %216, %167
  store i32 0, ptr %23, align 4
  br label %218

218:                                              ; preds = %217, %214
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  %219 = load i32, ptr %23, align 4
  switch i32 %219, label %237 [
    i32 0, label %220
  ]

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

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

225:                                              ; preds = %221
  store i32 16, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %236

226:                                              ; preds = %221
  %227 = load ptr, ptr %10, align 8, !tbaa !5
  %228 = load i32, ptr %24, align 4, !tbaa !9
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds ptr, ptr %227, i64 %229
  %231 = load ptr, ptr %230, align 8, !tbaa !5
  %232 = load i32, ptr %12, align 4, !tbaa !9
  call void @_ZN4juce21FloatVectorOperations5clearEPfi(ptr noundef %231, i32 noundef %232) #7
  br label %233

233:                                              ; preds = %226
  %234 = load i32, ptr %24, align 4, !tbaa !9
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %24, align 4, !tbaa !9
  br label %221, !llvm.loop !36

236:                                              ; preds = %225
  store i32 0, ptr %23, align 4
  br label %237

237:                                              ; preds = %236, %218
  call void @_ZN4juce11AudioBufferIfED2Ev(ptr noundef nonnull align 8 dereferenceable(289) %18) #7
  call void @llvm.lifetime.end.p0(i64 296, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  %238 = load i32, ptr %23, align 4
  switch i32 %238, label %245 [
    i32 0, label %239
    i32 1, label %239
  ]

239:                                              ; preds = %237, %237
  ret void

240:                                              ; preds = %200
  %241 = load ptr, ptr %21, align 8
  %242 = load i32, ptr %22, align 4
  %243 = insertvalue { ptr, i32 } poison, ptr %241, 0
  %244 = insertvalue { ptr, i32 } %243, i32 %242, 1
  resume { ptr, i32 } %244

245:                                              ; preds = %237
  unreachable
}

; Function Attrs: nounwind
declare void @_ZN4juce10MidiBuffer5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) #4

declare void @_ZN4juce20MidiMessageCollector25removeNextBlockOfMessagesERNS_10MidiBufferEi(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce11AudioBufferIfE7setSizeEiibbb(ptr noundef nonnull align 8 dereferenceable(289), i32 noundef, i32 noundef, i1 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext) #2 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce7zeromemEPvm(ptr noundef, i64 noundef) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce11AudioBufferIfEC2EPKPfii(ptr noundef nonnull align 8 dereferenceable(289), ptr noundef, i32 noundef, i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNK4juce14AudioProcessor15getCallbackLockEv(ptr noundef nonnull align 8 dereferenceable(256)) #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce11AudioBufferIdE10makeCopyOfIfEEvRKNS0_IT_EEb(ptr noundef nonnull align 8 dereferenceable(289), ptr noundef nonnull align 8 dereferenceable(289), i1 noundef zeroext) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce11AudioBufferIfE10makeCopyOfIdEEvRKNS0_IT_EEb(ptr noundef nonnull align 8 dereferenceable(289), ptr noundef nonnull align 8 dereferenceable(289), i1 noundef zeroext) #2 align 2

; Function Attrs: nounwind
declare void @_ZN4juce21FloatVectorOperations5clearEPfi(ptr noundef, i32 noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = !{!17, !6, i64 16}
!17 = !{!"_ZTSN4juce20AudioProcessorPlayerE", !18, i64 0, !19, i64 8, !6, i64 16, !20, i64 24, !21, i64 64, !10, i64 72, !22, i64 76, !22, i64 77, !10, i64 80, !10, i64 84, !23, i64 88, !24, i64 96, !27, i64 392, !28, i64 688, !32, i64 712}
!18 = !{!"_ZTSN4juce21AudioIODeviceCallbackE"}
!19 = !{!"_ZTSN4juce17MidiInputCallbackE"}
!20 = !{!"_ZTSN4juce15CriticalSectionE", !7, i64 0}
!21 = !{!"double", !7, i64 0}
!22 = !{!"bool", !7, i64 0}
!23 = !{!"_ZTSN4juce9HeapBlockIPfLb0EEE", !6, i64 0}
!24 = !{!"_ZTSN4juce11AudioBufferIfEE", !10, i64 0, !10, i64 4, !25, i64 8, !6, i64 16, !26, i64 24, !7, i64 32, !22, i64 288}
!25 = !{!"long", !7, i64 0}
!26 = !{!"_ZTSN4juce9HeapBlockIcLb1EEE", !6, i64 0}
!27 = !{!"_ZTSN4juce11AudioBufferIdEE", !10, i64 0, !10, i64 4, !25, i64 8, !6, i64 16, !26, i64 24, !7, i64 32, !22, i64 288}
!28 = !{!"_ZTSN4juce10MidiBufferE", !29, i64 0}
!29 = !{!"_ZTSN4juce5ArrayIhNS_20DummyCriticalSectionELi0EEE", !30, i64 0, !10, i64 16}
!30 = !{!"_ZTSN4juce19ArrayAllocationBaseIhNS_20DummyCriticalSectionEEE", !31, i64 0, !10, i64 8}
!31 = !{!"_ZTSN4juce9HeapBlockIhLb0EEE", !6, i64 0}
!32 = !{!"_ZTSN4juce20MidiMessageCollectorE", !33, i64 0, !19, i64 8, !21, i64 16, !20, i64 24, !28, i64 64, !21, i64 88}
!33 = !{!"_ZTSN4juce25MidiKeyboardStateListenerE"}
!34 = !{!35, !35, i64 0}
!35 = !{!"vtable pointer", !8, i64 0}
!36 = distinct !{!36, !12}


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

%"class.juce::AudioBuffer" = type <{ i32, i32, i64, ptr, %"class.juce::HeapBlock.42", [32 x ptr], i8, [7 x i8] }>
%"class.juce::HeapBlock.42" = type { ptr }
%"class.juce::GenericScopedLock" = type { ptr }

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce20AudioProcessorPlayer21audioDeviceIOCallbackEPPKfiPPfii(ptr noundef nonnull align 8 dereferenceable(808) %0, ptr nocapture noundef readonly %1, i32 noundef %2, ptr nocapture noundef readonly %3, i32 noundef %4, i32 noundef %5) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca %"class.juce::AudioBuffer", align 8
  %8 = alloca %"class.juce::GenericScopedLock", align 8
  %9 = alloca %"class.juce::GenericScopedLock", align 8
  %10 = getelementptr inbounds i8, ptr %0, i64 688
  tail call void @_ZN4juce10MidiBuffer5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  %11 = getelementptr inbounds i8, ptr %0, i64 712
  tail call void @_ZN4juce20MidiMessageCollector25removeNextBlockOfMessagesERNS_10MidiBufferEi(ptr noundef nonnull align 8 dereferenceable(96) %11, ptr noundef nonnull align 8 dereferenceable(24) %10, i32 noundef %5)
  %12 = icmp sgt i32 %2, %4
  br i1 %12, label %17, label %.preheader79

.preheader79:                                     ; preds = %6
  %13 = icmp sgt i32 %2, 0
  br i1 %13, label %.lr.ph, label %.preheader77

.lr.ph:                                           ; preds = %.preheader79
  %14 = getelementptr inbounds i8, ptr %0, i64 88
  %15 = sext i32 %5 to i64
  %16 = shl nsw i64 %15, 2
  %wide.trip.count = zext nneg i32 %2 to i64
  br label %51

17:                                               ; preds = %6
  %18 = getelementptr inbounds i8, ptr %0, i64 96
  %19 = sub nsw i32 %2, %4
  tail call void @_ZN4juce11AudioBufferIfE7setSizeEiibbb(ptr noundef nonnull align 8 dereferenceable(289) %18, i32 noundef %19, i32 noundef %5, i1 noundef zeroext false, i1 noundef zeroext false, i1 noundef zeroext true) #7
  %20 = icmp sgt i32 %4, 0
  br i1 %20, label %.lr.ph88, label %.lr.ph92

.lr.ph88:                                         ; preds = %17
  %21 = getelementptr inbounds i8, ptr %0, i64 88
  %22 = sext i32 %5 to i64
  %23 = shl nsw i64 %22, 2
  %wide.trip.count112 = zext nneg i32 %4 to i64
  br label %28

.lr.ph92:                                         ; preds = %28, %17
  %.064.lcssa = phi i32 [ 0, %17 ], [ %4, %28 ]
  %24 = getelementptr inbounds i8, ptr %0, i64 88
  %25 = sext i32 %5 to i64
  %26 = shl nsw i64 %25, 2
  %27 = sext i32 %4 to i64
  br label %36

28:                                               ; preds = %.lr.ph88, %28
  %indvars.iv107 = phi i64 [ 0, %.lr.ph88 ], [ %indvars.iv.next108, %28 ]
  %indvars109 = trunc i64 %indvars.iv107 to i32
  %29 = getelementptr inbounds ptr, ptr %3, i64 %indvars.iv107
  %30 = load ptr, ptr %29, align 8, !tbaa !5
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce9HeapBlockIPfLb0EEixIiEERS1_T_(ptr noundef nonnull align 8 dereferenceable(8) %21, i32 noundef %indvars109) #7
  store ptr %30, ptr %31, align 8, !tbaa !5
  %32 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce9HeapBlockIPfLb0EEixIiEERS1_T_(ptr noundef nonnull align 8 dereferenceable(8) %21, i32 noundef %indvars109) #7
  %33 = load ptr, ptr %32, align 8, !tbaa !5
  %34 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv107
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 4 %35, i64 %23, i1 false)
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %exitcond113.not = icmp eq i64 %indvars.iv.next108, %wide.trip.count112
  br i1 %exitcond113.not, label %.lr.ph92, label %28, !llvm.loop !9

36:                                               ; preds = %.lr.ph92, %36
  %indvars.iv114 = phi i64 [ %27, %.lr.ph92 ], [ %indvars.iv.next115, %36 ]
  %.16591 = phi i32 [ %.064.lcssa, %.lr.ph92 ], [ %45, %36 ]
  %37 = trunc i64 %indvars.iv114 to i32
  %38 = sub i32 %37, %4
  %39 = tail call noundef ptr @_ZN4juce11AudioBufferIfE15getWritePointerEi(ptr noundef nonnull align 8 dereferenceable(289) %18, i32 noundef %38) #7
  %40 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce9HeapBlockIPfLb0EEixIiEERS1_T_(ptr noundef nonnull align 8 dereferenceable(8) %24, i32 noundef %.16591) #7
  store ptr %39, ptr %40, align 8, !tbaa !5
  %41 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce9HeapBlockIPfLb0EEixIiEERS1_T_(ptr noundef nonnull align 8 dereferenceable(8) %24, i32 noundef %.16591) #7
  %42 = load ptr, ptr %41, align 8, !tbaa !5
  %43 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv114
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %42, ptr align 4 %44, i64 %26, i1 false)
  %45 = add nuw nsw i32 %.16591, 1
  %indvars.iv.next115 = add nsw i64 %indvars.iv114, 1
  %lftr.wideiv117 = trunc i64 %indvars.iv.next115 to i32
  %exitcond118.not = icmp eq i32 %lftr.wideiv117, %2
  br i1 %exitcond118.not, label %.loopexit76, label %36, !llvm.loop !11

.preheader77:                                     ; preds = %51, %.preheader79
  %.2.lcssa = phi i32 [ 0, %.preheader79 ], [ %2, %51 ]
  %46 = icmp slt i32 %2, %4
  br i1 %46, label %.lr.ph84, label %.loopexit76

.lr.ph84:                                         ; preds = %.preheader77
  %47 = getelementptr inbounds i8, ptr %0, i64 88
  %48 = sext i32 %5 to i64
  %49 = shl nsw i64 %48, 2
  %50 = sext i32 %2 to i64
  br label %59

51:                                               ; preds = %.lr.ph, %51
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %51 ]
  %indvars100 = trunc i64 %indvars.iv to i32
  %52 = getelementptr inbounds ptr, ptr %3, i64 %indvars.iv
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %54 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce9HeapBlockIPfLb0EEixIiEERS1_T_(ptr noundef nonnull align 8 dereferenceable(8) %14, i32 noundef %indvars100) #7
  store ptr %53, ptr %54, align 8, !tbaa !5
  %55 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce9HeapBlockIPfLb0EEixIiEERS1_T_(ptr noundef nonnull align 8 dereferenceable(8) %14, i32 noundef %indvars100) #7
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  %57 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv
  %58 = load ptr, ptr %57, align 8, !tbaa !5
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %56, ptr align 4 %58, i64 %16, i1 false)
  %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 %.preheader77, label %51, !llvm.loop !12

59:                                               ; preds = %.lr.ph84, %59
  %indvars.iv103 = phi i64 [ %50, %.lr.ph84 ], [ %indvars.iv.next104, %59 ]
  %.383 = phi i32 [ %.2.lcssa, %.lr.ph84 ], [ %65, %59 ]
  %60 = getelementptr inbounds ptr, ptr %3, i64 %indvars.iv103
  %61 = load ptr, ptr %60, align 8, !tbaa !5
  %62 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce9HeapBlockIPfLb0EEixIiEERS1_T_(ptr noundef nonnull align 8 dereferenceable(8) %47, i32 noundef %.383) #7
  store ptr %61, ptr %62, align 8, !tbaa !5
  %63 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce9HeapBlockIPfLb0EEixIiEERS1_T_(ptr noundef nonnull align 8 dereferenceable(8) %47, i32 noundef %.383) #7
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  tail call void @_ZN4juce7zeromemEPvm(ptr noundef %64, i64 noundef %49) #7
  %65 = add nuw nsw i32 %.383, 1
  %indvars.iv.next104 = add nsw i64 %indvars.iv103, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next104 to i32
  %exitcond106.not = icmp eq i32 %lftr.wideiv, %4
  br i1 %exitcond106.not, label %.loopexit76, label %59, !llvm.loop !13

.loopexit76:                                      ; preds = %59, %36, %.preheader77
  %.4 = phi i32 [ %.2.lcssa, %.preheader77 ], [ %45, %36 ], [ %65, %59 ]
  call void @llvm.lifetime.start.p0(i64 296, ptr nonnull %7) #7
  %66 = getelementptr inbounds i8, ptr %0, i64 88
  %67 = tail call noundef ptr @_ZNK4juce9HeapBlockIPfLb0EEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %66) #7
  call void @_ZN4juce11AudioBufferIfEC2EPKPfii(ptr noundef nonnull align 8 dereferenceable(289) %7, ptr noundef %67, i32 noundef %.4, i32 noundef %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %68 = getelementptr inbounds i8, ptr %0, i64 24
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(40) %68) #7
  %69 = getelementptr inbounds i8, ptr %0, i64 16
  %70 = load ptr, ptr %69, align 8, !tbaa !14
  %.not = icmp eq ptr %70, null
  br i1 %.not, label %.critedge75, label %71

71:                                               ; preds = %.loopexit76
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %72 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK4juce14AudioProcessor15getCallbackLockEv(ptr noundef nonnull align 8 dereferenceable(256) %70) #7
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(40) %72) #7
  %73 = load ptr, ptr %69, align 8, !tbaa !14
  %74 = call noundef zeroext i1 @_ZNK4juce14AudioProcessor11isSuspendedEv(ptr noundef nonnull align 8 dereferenceable(256) %73) #7
  br i1 %74, label %.critedge, label %75

75:                                               ; preds = %71
  %76 = load ptr, ptr %69, align 8, !tbaa !14
  %77 = call noundef zeroext i1 @_ZNK4juce14AudioProcessor22isUsingDoublePrecisionEv(ptr noundef nonnull align 8 dereferenceable(256) %76) #7
  br i1 %77, label %78, label %87

78:                                               ; preds = %75
  %79 = getelementptr inbounds i8, ptr %0, i64 392
  call void @_ZN4juce11AudioBufferIdE10makeCopyOfIfEEvRKNS0_IT_EEb(ptr noundef nonnull align 8 dereferenceable(289) %79, ptr noundef nonnull align 8 dereferenceable(289) %7, i1 noundef zeroext true)
  %80 = load ptr, ptr %69, align 8, !tbaa !14
  %81 = load ptr, ptr %80, align 8, !tbaa !33
  %82 = getelementptr inbounds i8, ptr %81, i64 48
  %83 = load ptr, ptr %82, align 8
  invoke void %83(ptr noundef nonnull align 8 dereferenceable(256) %80, ptr noundef nonnull align 8 dereferenceable(289) %79, ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %84 unwind label %85

84:                                               ; preds = %78
  call void @_ZN4juce11AudioBufferIfE10makeCopyOfIdEEvRKNS0_IT_EEb(ptr noundef nonnull align 8 dereferenceable(289) %7, ptr noundef nonnull align 8 dereferenceable(289) %79, i1 noundef zeroext true)
  br label %93

85:                                               ; preds = %87, %78
  %86 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @_ZN4juce11AudioBufferIfED2Ev(ptr noundef nonnull align 8 dereferenceable(289) %7) #7
  call void @llvm.lifetime.end.p0(i64 296, ptr nonnull %7) #7
  resume { ptr, i32 } %86

87:                                               ; preds = %75
  %88 = load ptr, ptr %69, align 8, !tbaa !14
  %89 = load ptr, ptr %88, align 8, !tbaa !33
  %90 = getelementptr inbounds i8, ptr %89, i64 40
  %91 = load ptr, ptr %90, align 8
  invoke void %91(ptr noundef nonnull align 8 dereferenceable(256) %88, ptr noundef nonnull align 8 dereferenceable(289) %7, ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %93 unwind label %85

.critedge:                                        ; preds = %71
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %.critedge75

.critedge75:                                      ; preds = %.critedge, %.loopexit76
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  %92 = icmp sgt i32 %4, 0
  br i1 %92, label %.lr.ph95.preheader, label %.loopexit

.lr.ph95.preheader:                               ; preds = %.critedge75
  %wide.trip.count122 = zext nneg i32 %4 to i64
  br label %.lr.ph95

93:                                               ; preds = %87, %84
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %.loopexit

.lr.ph95:                                         ; preds = %.lr.ph95.preheader, %.lr.ph95
  %indvars.iv119 = phi i64 [ 0, %.lr.ph95.preheader ], [ %indvars.iv.next120, %.lr.ph95 ]
  %94 = getelementptr inbounds ptr, ptr %3, i64 %indvars.iv119
  %95 = load ptr, ptr %94, align 8, !tbaa !5
  call void @_ZN4juce21FloatVectorOperations5clearEPfi(ptr noundef %95, i32 noundef %5) #7
  %indvars.iv.next120 = add nuw nsw i64 %indvars.iv119, 1
  %exitcond123.not = icmp eq i64 %indvars.iv.next120, %wide.trip.count122
  br i1 %exitcond123.not, label %.loopexit, label %.lr.ph95, !llvm.loop !35

.loopexit:                                        ; preds = %.lr.ph95, %.critedge75, %93
  call void @_ZN4juce11AudioBufferIfED2Ev(ptr noundef nonnull align 8 dereferenceable(289) %7) #7
  call void @llvm.lifetime.end.p0(i64 296, ptr nonnull %7) #7
  ret void
}

; Function Attrs: nounwind
declare void @_ZN4juce10MidiBuffer5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4

declare void @_ZN4juce20MidiMessageCollector25removeNextBlockOfMessagesERNS_10MidiBufferEi(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce11AudioBufferIfE7setSizeEiibbb(ptr noundef nonnull align 8 dereferenceable(289), i32 noundef, i32 noundef, i1 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce7zeromemEPvm(ptr noundef, i64 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce11AudioBufferIfEC2EPKPfii(ptr noundef nonnull align 8 dereferenceable(289), ptr noundef, i32 noundef, i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNK4juce14AudioProcessor15getCallbackLockEv(ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce11AudioBufferIdE10makeCopyOfIfEEvRKNS0_IT_EEb(ptr noundef nonnull align 8 dereferenceable(289), ptr noundef nonnull align 8 dereferenceable(289), i1 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce11AudioBufferIfE10makeCopyOfIdEEvRKNS0_IT_EEb(ptr noundef nonnull align 8 dereferenceable(289), ptr noundef nonnull align 8 dereferenceable(289), i1 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: nounwind
declare void @_ZN4juce21FloatVectorOperations5clearEPfi(ptr noundef, i32 noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = !{!15, !6, i64 16}
!15 = !{!"_ZTSN4juce20AudioProcessorPlayerE", !16, i64 0, !17, i64 8, !6, i64 16, !18, i64 24, !19, i64 64, !20, i64 72, !21, i64 76, !21, i64 77, !20, i64 80, !20, i64 84, !22, i64 88, !23, i64 96, !26, i64 392, !27, i64 688, !31, i64 712}
!16 = !{!"_ZTSN4juce21AudioIODeviceCallbackE"}
!17 = !{!"_ZTSN4juce17MidiInputCallbackE"}
!18 = !{!"_ZTSN4juce15CriticalSectionE", !7, i64 0}
!19 = !{!"double", !7, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTSN4juce9HeapBlockIPfLb0EEE", !6, i64 0}
!23 = !{!"_ZTSN4juce11AudioBufferIfEE", !20, i64 0, !20, i64 4, !24, i64 8, !6, i64 16, !25, i64 24, !7, i64 32, !21, i64 288}
!24 = !{!"long", !7, i64 0}
!25 = !{!"_ZTSN4juce9HeapBlockIcLb1EEE", !6, i64 0}
!26 = !{!"_ZTSN4juce11AudioBufferIdEE", !20, i64 0, !20, i64 4, !24, i64 8, !6, i64 16, !25, i64 24, !7, i64 32, !21, i64 288}
!27 = !{!"_ZTSN4juce10MidiBufferE", !28, i64 0}
!28 = !{!"_ZTSN4juce5ArrayIhNS_20DummyCriticalSectionELi0EEE", !29, i64 0, !20, i64 16}
!29 = !{!"_ZTSN4juce19ArrayAllocationBaseIhNS_20DummyCriticalSectionEEE", !30, i64 0, !20, i64 8}
!30 = !{!"_ZTSN4juce9HeapBlockIhLb0EEE", !6, i64 0}
!31 = !{!"_ZTSN4juce20MidiMessageCollectorE", !32, i64 0, !17, i64 8, !19, i64 16, !18, i64 24, !27, i64 64, !19, i64 88}
!32 = !{!"_ZTSN4juce25MidiKeyboardStateListenerE"}
!33 = !{!34, !34, i64 0}
!34 = !{!"vtable pointer", !8, i64 0}
!35 = distinct !{!35, !10}


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