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

; 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::ReferenceCountedObjectPtr.87" = type { ptr }
%"class.juce::AudioProcessorGraph" = type <{ %"class.juce::AudioProcessor", %"class.juce::AsyncUpdater", %"class.juce::ReferenceCountedArray", %"class.juce::OwnedArray.12", i32, [4 x i8], %"class.juce::OwnedArray.17", %"class.juce::Array.22", %"class.juce::ScopedPointer", ptr, %"class.juce::MidiBuffer", i8, [7 x i8] }>
%"class.juce::AudioProcessor" = type { ptr, i32, ptr, %"class.juce::Array", %"class.juce::Component::SafePointer", double, i32, i32, i8, i8, i32, %"class.juce::CriticalSection", %"class.juce::CriticalSection", %"class.juce::OwnedArray", %"class.juce::OwnedArray", %"class.juce::String", %"class.juce::String", i32, i32, %"class.juce::OwnedArray.3" }
%"class.juce::Array" = type { %"class.juce::ArrayAllocationBase", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase" = type <{ %"class.juce::HeapBlock", i32, [4 x i8] }>
%"class.juce::HeapBlock" = type { ptr }
%"class.juce::Component::SafePointer" = type { %"class.juce::WeakReference" }
%"class.juce::WeakReference" = type { %"class.juce::ReferenceCountedObjectPtr" }
%"class.juce::ReferenceCountedObjectPtr" = 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::OwnedArray" = type { %"class.juce::ArrayAllocationBase.0", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.0" = type <{ %"class.juce::HeapBlock.1", i32, [4 x i8] }>
%"class.juce::HeapBlock.1" = type { ptr }
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::OwnedArray.3" = type { %"class.juce::ArrayAllocationBase.4", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.4" = type <{ %"class.juce::HeapBlock.5", i32, [4 x i8] }>
%"class.juce::HeapBlock.5" = type { ptr }
%"class.juce::AsyncUpdater" = type { ptr, %"class.juce::ReferenceCountedObjectPtr.8" }
%"class.juce::ReferenceCountedObjectPtr.8" = type { ptr }
%"class.juce::ReferenceCountedArray" = type { %"class.juce::ArrayAllocationBase.9", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.9" = type <{ %"class.juce::HeapBlock.10", i32, [4 x i8] }>
%"class.juce::HeapBlock.10" = type { ptr }
%"class.juce::OwnedArray.12" = type { %"class.juce::ArrayAllocationBase.13", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.13" = type <{ %"class.juce::HeapBlock.14", i32, [4 x i8] }>
%"class.juce::HeapBlock.14" = type { ptr }
%"class.juce::OwnedArray.17" = type { %"class.juce::ArrayAllocationBase.18", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.18" = type <{ %"class.juce::HeapBlock.19", i32, [4 x i8] }>
%"class.juce::HeapBlock.19" = type { ptr }
%"class.juce::Array.22" = type { %"class.juce::ArrayAllocationBase.23", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.23" = type <{ %"class.juce::HeapBlock.24", i32, [4 x i8] }>
%"class.juce::HeapBlock.24" = type { ptr }
%"class.juce::ScopedPointer" = type { ptr }
%"class.juce::MidiBuffer" = type { %"class.juce::Array.27" }
%"class.juce::Array.27" = type { %"class.juce::ArrayAllocationBase.28", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.28" = type <{ %"class.juce::HeapBlock.29", i32, [4 x i8] }>
%"class.juce::HeapBlock.29" = type { ptr }

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce19AudioProcessorGraph4Node9unprepareEv(ptr noundef nonnull align 8 dereferenceable(57)) #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNK4juce21ReferenceCountedArrayINS_19AudioProcessorGraph4NodeENS_20DummyCriticalSectionEE12getUncheckedEi(ptr dead_on_unwind noalias writable sret(%"class.juce::ReferenceCountedObjectPtr.87") align 8, ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce19AudioProcessorGraph16releaseResourcesEv(ptr noundef nonnull align 8 dereferenceable(417) %0) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.juce::ReferenceCountedObjectPtr.87", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %7 = load ptr, ptr %2, align 8
  %8 = getelementptr inbounds %"class.juce::AudioProcessorGraph", ptr %7, i32 0, i32 11
  store i8 0, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !51
  br label %9

9:                                                ; preds = %20, %1
  %10 = load i32, ptr %3, align 4, !tbaa !51
  %11 = getelementptr inbounds %"class.juce::AudioProcessorGraph", ptr %7, i32 0, i32 2
  %12 = call noundef i32 @_ZNK4juce21ReferenceCountedArrayINS_19AudioProcessorGraph4NodeENS_20DummyCriticalSectionEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %11) #5
  %13 = icmp slt i32 %10, %12
  br i1 %13, label %15, label %14

14:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %27

15:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %16 = getelementptr inbounds %"class.juce::AudioProcessorGraph", ptr %7, i32 0, i32 2
  %17 = load i32, ptr %3, align 4, !tbaa !51
  call void @_ZNK4juce21ReferenceCountedArrayINS_19AudioProcessorGraph4NodeENS_20DummyCriticalSectionEE12getUncheckedEi(ptr dead_on_unwind writable sret(%"class.juce::ReferenceCountedObjectPtr.87") align 8 %4, ptr noundef nonnull align 8 dereferenceable(20) %16, i32 noundef %17) #5
  %18 = call noundef ptr @_ZNK4juce25ReferenceCountedObjectPtrINS_19AudioProcessorGraph4NodeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  invoke void @_ZN4juce19AudioProcessorGraph4Node9unprepareEv(ptr noundef nonnull align 8 dereferenceable(57) %18)
          to label %19 unwind label %23

19:                                               ; preds = %15
  call void @_ZN4juce25ReferenceCountedObjectPtrINS_19AudioProcessorGraph4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %20

20:                                               ; preds = %19
  %21 = load i32, ptr %3, align 4, !tbaa !51
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %3, align 4, !tbaa !51
  br label %9, !llvm.loop !52

23:                                               ; preds = %15
  %24 = landingpad { ptr, i32 }
          cleanup
  %25 = extractvalue { ptr, i32 } %24, 0
  store ptr %25, ptr %5, align 8
  %26 = extractvalue { ptr, i32 } %24, 1
  store i32 %26, ptr %6, align 4
  call void @_ZN4juce25ReferenceCountedObjectPtrINS_19AudioProcessorGraph4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %33

27:                                               ; preds = %14
  %28 = getelementptr inbounds %"class.juce::AudioProcessorGraph", ptr %7, i32 0, i32 8
  %29 = call noundef ptr @_ZNK4juce13ScopedPointerINS_19AudioProcessorGraph32AudioProcessorGraphBufferHelpersEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #5
  call void @_ZN4juce19AudioProcessorGraph32AudioProcessorGraphBufferHelpers7releaseEv(ptr noundef nonnull align 8 dereferenceable(1200) %29)
  %30 = getelementptr inbounds %"class.juce::AudioProcessorGraph", ptr %7, i32 0, i32 6
  call void @_ZN4juce10OwnedArrayINS_10MidiBufferENS_20DummyCriticalSectionEE5clearEb(ptr noundef nonnull align 8 dereferenceable(20) %30, i1 noundef zeroext true)
  %31 = getelementptr inbounds %"class.juce::AudioProcessorGraph", ptr %7, i32 0, i32 9
  store ptr null, ptr %31, align 8, !tbaa !54
  %32 = getelementptr inbounds %"class.juce::AudioProcessorGraph", ptr %7, i32 0, i32 10
  call void @_ZN4juce10MidiBuffer5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #5
  ret void

33:                                               ; preds = %23
  %34 = load ptr, ptr %5, align 8
  %35 = load i32, ptr %6, align 4
  %36 = insertvalue { ptr, i32 } poison, ptr %34, 0
  %37 = insertvalue { ptr, i32 } %36, i32 %35, 1
  resume { ptr, i32 } %37
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce19AudioProcessorGraph32AudioProcessorGraphBufferHelpers7releaseEv(ptr noundef nonnull align 8 dereferenceable(1200)) #4 align 2

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

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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !21, i64 416}
!10 = !{!"_ZTSN4juce19AudioProcessorGraphE", !11, i64 0, !32, i64 256, !34, i64 272, !37, i64 296, !16, i64 320, !40, i64 328, !43, i64 352, !46, i64 376, !6, i64 384, !47, i64 392, !21, i64 416}
!11 = !{!"_ZTSN4juce14AudioProcessorE", !12, i64 8, !6, i64 16, !13, i64 24, !17, i64 48, !20, i64 56, !16, i64 64, !16, i64 68, !21, i64 72, !21, i64 73, !22, i64 76, !23, i64 80, !23, i64 120, !24, i64 160, !24, i64 184, !27, i64 208, !27, i64 216, !16, i64 224, !16, i64 228, !29, i64 232}
!12 = !{!"_ZTSN4juce14AudioProcessor11WrapperTypeE", !7, i64 0}
!13 = !{!"_ZTSN4juce5ArrayIPNS_22AudioProcessorListenerENS_20DummyCriticalSectionELi0EEE", !14, i64 0, !16, i64 16}
!14 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_22AudioProcessorListenerENS_20DummyCriticalSectionEEE", !15, i64 0, !16, i64 8}
!15 = !{!"_ZTSN4juce9HeapBlockIPNS_22AudioProcessorListenerELb0EEE", !6, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTSN4juce9Component11SafePointerINS_20AudioProcessorEditorEEE", !18, i64 0}
!18 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEE", !19, i64 0}
!19 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE13SharedPointerEEE", !6, i64 0}
!20 = !{!"double", !7, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTSN4juce14AudioProcessor19ProcessingPrecisionE", !7, i64 0}
!23 = !{!"_ZTSN4juce15CriticalSectionE", !7, i64 0}
!24 = !{!"_ZTSN4juce10OwnedArrayINS_14AudioProcessor3BusENS_20DummyCriticalSectionEEE", !25, i64 0, !16, i64 16}
!25 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_14AudioProcessor3BusENS_20DummyCriticalSectionEEE", !26, i64 0, !16, i64 8}
!26 = !{!"_ZTSN4juce9HeapBlockIPNS_14AudioProcessor3BusELb0EEE", !6, i64 0}
!27 = !{!"_ZTSN4juce6StringE", !28, i64 0}
!28 = !{!"_ZTSN4juce16CharPointer_UTF8E", !6, i64 0}
!29 = !{!"_ZTSN4juce10OwnedArrayINS_23AudioProcessorParameterENS_20DummyCriticalSectionEEE", !30, i64 0, !16, i64 16}
!30 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_23AudioProcessorParameterENS_20DummyCriticalSectionEEE", !31, i64 0, !16, i64 8}
!31 = !{!"_ZTSN4juce9HeapBlockIPNS_23AudioProcessorParameterELb0EEE", !6, i64 0}
!32 = !{!"_ZTSN4juce12AsyncUpdaterE", !33, i64 8}
!33 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_12AsyncUpdater19AsyncUpdaterMessageEEE", !6, i64 0}
!34 = !{!"_ZTSN4juce21ReferenceCountedArrayINS_19AudioProcessorGraph4NodeENS_20DummyCriticalSectionEEE", !35, i64 0, !16, i64 16}
!35 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_19AudioProcessorGraph4NodeENS_20DummyCriticalSectionEEE", !36, i64 0, !16, i64 8}
!36 = !{!"_ZTSN4juce9HeapBlockIPNS_19AudioProcessorGraph4NodeELb0EEE", !6, i64 0}
!37 = !{!"_ZTSN4juce10OwnedArrayINS_19AudioProcessorGraph10ConnectionENS_20DummyCriticalSectionEEE", !38, i64 0, !16, i64 16}
!38 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_19AudioProcessorGraph10ConnectionENS_20DummyCriticalSectionEEE", !39, i64 0, !16, i64 8}
!39 = !{!"_ZTSN4juce9HeapBlockIPNS_19AudioProcessorGraph10ConnectionELb0EEE", !6, i64 0}
!40 = !{!"_ZTSN4juce10OwnedArrayINS_10MidiBufferENS_20DummyCriticalSectionEEE", !41, i64 0, !16, i64 16}
!41 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_10MidiBufferENS_20DummyCriticalSectionEEE", !42, i64 0, !16, i64 8}
!42 = !{!"_ZTSN4juce9HeapBlockIPNS_10MidiBufferELb0EEE", !6, i64 0}
!43 = !{!"_ZTSN4juce5ArrayIPvNS_20DummyCriticalSectionELi0EEE", !44, i64 0, !16, i64 16}
!44 = !{!"_ZTSN4juce19ArrayAllocationBaseIPvNS_20DummyCriticalSectionEEE", !45, i64 0, !16, i64 8}
!45 = !{!"_ZTSN4juce9HeapBlockIPvLb0EEE", !6, i64 0}
!46 = !{!"_ZTSN4juce13ScopedPointerINS_19AudioProcessorGraph32AudioProcessorGraphBufferHelpersEEE", !6, i64 0}
!47 = !{!"_ZTSN4juce10MidiBufferE", !48, i64 0}
!48 = !{!"_ZTSN4juce5ArrayIhNS_20DummyCriticalSectionELi0EEE", !49, i64 0, !16, i64 16}
!49 = !{!"_ZTSN4juce19ArrayAllocationBaseIhNS_20DummyCriticalSectionEEE", !50, i64 0, !16, i64 8}
!50 = !{!"_ZTSN4juce9HeapBlockIhLb0EEE", !6, i64 0}
!51 = !{!16, !16, i64 0}
!52 = distinct !{!52, !53}
!53 = !{!"llvm.loop.mustprogress"}
!54 = !{!10, !6, i64 384}


; 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::ReferenceCountedObjectPtr.87" = type { ptr }

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce19AudioProcessorGraph4Node9unprepareEv(ptr noundef nonnull align 8 dereferenceable(57)) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNK4juce21ReferenceCountedArrayINS_19AudioProcessorGraph4NodeENS_20DummyCriticalSectionEE12getUncheckedEi(ptr dead_on_unwind noalias writable sret(%"class.juce::ReferenceCountedObjectPtr.87") align 8, ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce19AudioProcessorGraph16releaseResourcesEv(ptr noundef nonnull align 8 dereferenceable(417) %0) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.juce::ReferenceCountedObjectPtr.87", align 8
  %3 = getelementptr inbounds i8, ptr %0, i64 416
  store i8 0, ptr %3, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 272
  %5 = tail call noundef i32 @_ZNK4juce21ReferenceCountedArrayINS_19AudioProcessorGraph4NodeENS_20DummyCriticalSectionEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %4) #5
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %13, %1
  %7 = getelementptr inbounds i8, ptr %0, i64 376
  %8 = call noundef ptr @_ZNK4juce13ScopedPointerINS_19AudioProcessorGraph32AudioProcessorGraphBufferHelpersEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  call void @_ZN4juce19AudioProcessorGraph32AudioProcessorGraphBufferHelpers7releaseEv(ptr noundef nonnull align 8 dereferenceable(1200) %8)
  %9 = getelementptr inbounds i8, ptr %0, i64 328
  call void @_ZN4juce10OwnedArrayINS_10MidiBufferENS_20DummyCriticalSectionEE5clearEb(ptr noundef nonnull align 8 dereferenceable(20) %9, i1 noundef zeroext true)
  %10 = getelementptr inbounds i8, ptr %0, i64 384
  store ptr null, ptr %10, align 8, !tbaa !50
  %11 = getelementptr inbounds i8, ptr %0, i64 392
  call void @_ZN4juce10MidiBuffer5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  ret void

.lr.ph:                                           ; preds = %1, %13
  %.05 = phi i32 [ %14, %13 ], [ 0, %1 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  call void @_ZNK4juce21ReferenceCountedArrayINS_19AudioProcessorGraph4NodeENS_20DummyCriticalSectionEE12getUncheckedEi(ptr dead_on_unwind nonnull writable sret(%"class.juce::ReferenceCountedObjectPtr.87") align 8 %2, ptr noundef nonnull align 8 dereferenceable(20) %4, i32 noundef %.05) #5
  %12 = call noundef ptr @_ZNK4juce25ReferenceCountedObjectPtrINS_19AudioProcessorGraph4NodeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  invoke void @_ZN4juce19AudioProcessorGraph4Node9unprepareEv(ptr noundef nonnull align 8 dereferenceable(57) %12)
          to label %13 unwind label %17

13:                                               ; preds = %.lr.ph
  call void @_ZN4juce25ReferenceCountedObjectPtrINS_19AudioProcessorGraph4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  %14 = add nuw nsw i32 %.05, 1
  %15 = call noundef i32 @_ZNK4juce21ReferenceCountedArrayINS_19AudioProcessorGraph4NodeENS_20DummyCriticalSectionEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %4) #5
  %16 = icmp slt i32 %14, %15
  br i1 %16, label %.lr.ph, label %._crit_edge, !llvm.loop !51

17:                                               ; preds = %.lr.ph
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce25ReferenceCountedObjectPtrINS_19AudioProcessorGraph4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  resume { ptr, i32 } %18
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce19AudioProcessorGraph32AudioProcessorGraphBufferHelpers7releaseEv(ptr noundef nonnull align 8 dereferenceable(1200)) local_unnamed_addr #4 align 2

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

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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !20, i64 416}
!6 = !{!"_ZTSN4juce19AudioProcessorGraphE", !7, i64 0, !31, i64 256, !33, i64 272, !36, i64 296, !15, i64 320, !39, i64 328, !42, i64 352, !45, i64 376, !11, i64 384, !46, i64 392, !20, i64 416}
!7 = !{!"_ZTSN4juce14AudioProcessorE", !8, i64 8, !11, i64 16, !12, i64 24, !16, i64 48, !19, i64 56, !15, i64 64, !15, i64 68, !20, i64 72, !20, i64 73, !21, i64 76, !22, i64 80, !22, i64 120, !23, i64 160, !23, i64 184, !26, i64 208, !26, i64 216, !15, i64 224, !15, i64 228, !28, i64 232}
!8 = !{!"_ZTSN4juce14AudioProcessor11WrapperTypeE", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"_ZTSN4juce5ArrayIPNS_22AudioProcessorListenerENS_20DummyCriticalSectionELi0EEE", !13, i64 0, !15, i64 16}
!13 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_22AudioProcessorListenerENS_20DummyCriticalSectionEEE", !14, i64 0, !15, i64 8}
!14 = !{!"_ZTSN4juce9HeapBlockIPNS_22AudioProcessorListenerELb0EEE", !11, i64 0}
!15 = !{!"int", !9, i64 0}
!16 = !{!"_ZTSN4juce9Component11SafePointerINS_20AudioProcessorEditorEEE", !17, i64 0}
!17 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEE", !18, i64 0}
!18 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE13SharedPointerEEE", !11, i64 0}
!19 = !{!"double", !9, i64 0}
!20 = !{!"bool", !9, i64 0}
!21 = !{!"_ZTSN4juce14AudioProcessor19ProcessingPrecisionE", !9, i64 0}
!22 = !{!"_ZTSN4juce15CriticalSectionE", !9, i64 0}
!23 = !{!"_ZTSN4juce10OwnedArrayINS_14AudioProcessor3BusENS_20DummyCriticalSectionEEE", !24, i64 0, !15, i64 16}
!24 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_14AudioProcessor3BusENS_20DummyCriticalSectionEEE", !25, i64 0, !15, i64 8}
!25 = !{!"_ZTSN4juce9HeapBlockIPNS_14AudioProcessor3BusELb0EEE", !11, i64 0}
!26 = !{!"_ZTSN4juce6StringE", !27, i64 0}
!27 = !{!"_ZTSN4juce16CharPointer_UTF8E", !11, i64 0}
!28 = !{!"_ZTSN4juce10OwnedArrayINS_23AudioProcessorParameterENS_20DummyCriticalSectionEEE", !29, i64 0, !15, i64 16}
!29 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_23AudioProcessorParameterENS_20DummyCriticalSectionEEE", !30, i64 0, !15, i64 8}
!30 = !{!"_ZTSN4juce9HeapBlockIPNS_23AudioProcessorParameterELb0EEE", !11, i64 0}
!31 = !{!"_ZTSN4juce12AsyncUpdaterE", !32, i64 8}
!32 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_12AsyncUpdater19AsyncUpdaterMessageEEE", !11, i64 0}
!33 = !{!"_ZTSN4juce21ReferenceCountedArrayINS_19AudioProcessorGraph4NodeENS_20DummyCriticalSectionEEE", !34, i64 0, !15, i64 16}
!34 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_19AudioProcessorGraph4NodeENS_20DummyCriticalSectionEEE", !35, i64 0, !15, i64 8}
!35 = !{!"_ZTSN4juce9HeapBlockIPNS_19AudioProcessorGraph4NodeELb0EEE", !11, i64 0}
!36 = !{!"_ZTSN4juce10OwnedArrayINS_19AudioProcessorGraph10ConnectionENS_20DummyCriticalSectionEEE", !37, i64 0, !15, i64 16}
!37 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_19AudioProcessorGraph10ConnectionENS_20DummyCriticalSectionEEE", !38, i64 0, !15, i64 8}
!38 = !{!"_ZTSN4juce9HeapBlockIPNS_19AudioProcessorGraph10ConnectionELb0EEE", !11, i64 0}
!39 = !{!"_ZTSN4juce10OwnedArrayINS_10MidiBufferENS_20DummyCriticalSectionEEE", !40, i64 0, !15, i64 16}
!40 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_10MidiBufferENS_20DummyCriticalSectionEEE", !41, i64 0, !15, i64 8}
!41 = !{!"_ZTSN4juce9HeapBlockIPNS_10MidiBufferELb0EEE", !11, i64 0}
!42 = !{!"_ZTSN4juce5ArrayIPvNS_20DummyCriticalSectionELi0EEE", !43, i64 0, !15, i64 16}
!43 = !{!"_ZTSN4juce19ArrayAllocationBaseIPvNS_20DummyCriticalSectionEEE", !44, i64 0, !15, i64 8}
!44 = !{!"_ZTSN4juce9HeapBlockIPvLb0EEE", !11, i64 0}
!45 = !{!"_ZTSN4juce13ScopedPointerINS_19AudioProcessorGraph32AudioProcessorGraphBufferHelpersEEE", !11, i64 0}
!46 = !{!"_ZTSN4juce10MidiBufferE", !47, i64 0}
!47 = !{!"_ZTSN4juce5ArrayIhNS_20DummyCriticalSectionELi0EEE", !48, i64 0, !15, i64 16}
!48 = !{!"_ZTSN4juce19ArrayAllocationBaseIhNS_20DummyCriticalSectionEEE", !49, i64 0, !15, i64 8}
!49 = !{!"_ZTSN4juce9HeapBlockIhLb0EEE", !11, i64 0}
!50 = !{!6, !11, i64 384}
!51 = distinct !{!51, !52}
!52 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass