; 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::Value" = type { %"class.juce::ReferenceCountedObjectPtr.177", %"class.juce::ListenerList.178" }
%"class.juce::ReferenceCountedObjectPtr.177" = type { ptr }
%"class.juce::ListenerList.178" = type { %"class.juce::Array.179" }
%"class.juce::Array.179" = type { %"class.juce::ArrayAllocationBase.180", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.180" = type <{ %"class.juce::HeapBlock.181", i32, [4 x i8] }>
%"class.juce::HeapBlock.181" = type { ptr }
%"class.juce::StringRef" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::AudioProcessorValueTreeState" = type <{ %"class.juce::Timer", %"class.juce::ValueTree::Listener", ptr, %"class.juce::ValueTree", ptr, %"class.juce::Identifier", %"class.juce::Identifier", %"class.juce::Identifier", i8, [7 x i8] }>
%"class.juce::Timer" = type { ptr, i32, i32, ptr, ptr }
%"class.juce::ValueTree::Listener" = type { ptr }
%"class.juce::ValueTree" = type { %"class.juce::ReferenceCountedObjectPtr.227", %"class.juce::ListenerList.228" }
%"class.juce::ReferenceCountedObjectPtr.227" = type { ptr }
%"class.juce::ListenerList.228" = type { %"class.juce::Array.229" }
%"class.juce::Array.229" = type { %"class.juce::ArrayAllocationBase.230", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.230" = type <{ %"class.juce::HeapBlock.231", i32, [4 x i8] }>
%"class.juce::HeapBlock.231" = type { ptr }
%"class.juce::Identifier" = type { %"class.juce::String" }
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"struct.juce::AudioProcessorValueTreeState::Parameter" = type <{ %"class.juce::AudioProcessorParameterWithID.base", [4 x i8], %"class.juce::ValueTree::Listener", ptr, %"class.juce::ValueTree", %"class.juce::ListenerList.239", %"class.std::function.234", %"class.std::function.236", %"class.juce::NormalisableRange", float, float, [4 x i8], %"class.juce::Atomic", i8, [7 x i8] }>
%"class.juce::AudioProcessorParameterWithID.base" = type <{ %"class.juce::AudioProcessorParameter.base", [4 x i8], %"class.juce::String", %"class.juce::String", %"class.juce::String", i32 }>
%"class.juce::AudioProcessorParameter.base" = type <{ ptr, ptr, i32 }>
%"class.juce::ListenerList.239" = type { %"class.juce::Array.240" }
%"class.juce::Array.240" = type { %"class.juce::ArrayAllocationBase.241", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.241" = type <{ %"class.juce::HeapBlock.242", i32, [4 x i8] }>
%"class.juce::HeapBlock.242" = type { ptr }
%"class.std::function.234" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.std::function.236" = type { %"class.std::_Function_base", ptr }
%"class.juce::NormalisableRange" = type <{ float, float, float, float, i8, [3 x i8] }>
%"class.juce::Atomic" = type { i32, [4 x i8] }

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

; 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 ptr @_ZN4juce28AudioProcessorValueTreeState9Parameter17getParameterForIDERNS_14AudioProcessorENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4juce28AudioProcessorValueTreeState19getParameterAsValueENS_9StringRefE(ptr dead_on_unwind noalias writable sret(%"class.juce::Value") align 8 %0, ptr noundef nonnull align 8 dereferenceable(113) %1, ptr noundef %2) #3 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.juce::StringRef", align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %10 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %11 = getelementptr inbounds %"class.juce::AudioProcessorValueTreeState", ptr %10, i32 0, i32 2
  %12 = load ptr, ptr %11, align 8, !tbaa !9
  call void @_ZN4juce9StringRefC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %13 = call noundef ptr @_ZN4juce28AudioProcessorValueTreeState9Parameter17getParameterForIDERNS_14AudioProcessorENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(256) %12, ptr noundef %8) #5
  store ptr %13, ptr %7, align 8, !tbaa !5
  %14 = load ptr, ptr %7, align 8, !tbaa !5
  %15 = icmp ne ptr %14, null
  br i1 %15, label %16, label %22

16:                                               ; preds = %3
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  %18 = getelementptr inbounds %"struct.juce::AudioProcessorValueTreeState::Parameter", ptr %17, i32 0, i32 4
  %19 = getelementptr inbounds %"class.juce::AudioProcessorValueTreeState", ptr %10, i32 0, i32 6
  %20 = getelementptr inbounds %"class.juce::AudioProcessorValueTreeState", ptr %10, i32 0, i32 4
  %21 = load ptr, ptr %20, align 8, !tbaa !24
  call void @_ZN4juce9ValueTree18getPropertyAsValueERKNS_10IdentifierEPNS_11UndoManagerE(ptr dead_on_unwind writable sret(%"class.juce::Value") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef %21)
  store i32 1, ptr %9, align 4
  br label %23

22:                                               ; preds = %3
  store i32 0, ptr %9, align 4
  br label %23

23:                                               ; preds = %22, %16
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  %24 = load i32, ptr %9, align 4
  switch i32 %24, label %27 [
    i32 0, label %25
    i32 1, label %26
  ]

25:                                               ; preds = %23
  call void @_ZN4juce5ValueC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %0)
  br label %26

26:                                               ; preds = %25, %23
  ret void

27:                                               ; preds = %23
  unreachable
}

declare void @_ZN4juce9ValueTree18getPropertyAsValueERKNS_10IdentifierEPNS_11UndoManagerE(ptr dead_on_unwind writable sret(%"class.juce::Value") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

declare void @_ZN4juce5ValueC1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4

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 = { "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, !6, i64 40}
!10 = !{!"_ZTSN4juce28AudioProcessorValueTreeStateE", !11, i64 0, !13, i64 32, !6, i64 40, !14, i64 48, !6, i64 80, !20, i64 88, !20, i64 96, !20, i64 104, !23, i64 112}
!11 = !{!"_ZTSN4juce5TimerE", !12, i64 8, !12, i64 12, !6, i64 16, !6, i64 24}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSN4juce9ValueTree8ListenerE"}
!14 = !{!"_ZTSN4juce9ValueTreeE", !15, i64 0, !16, i64 8}
!15 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_9ValueTree12SharedObjectEEE", !6, i64 0}
!16 = !{!"_ZTSN4juce12ListenerListINS_9ValueTree8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEEE", !17, i64 0}
!17 = !{!"_ZTSN4juce5ArrayIPNS_9ValueTree8ListenerENS_20DummyCriticalSectionELi0EEE", !18, i64 0, !12, i64 16}
!18 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_9ValueTree8ListenerENS_20DummyCriticalSectionEEE", !19, i64 0, !12, i64 8}
!19 = !{!"_ZTSN4juce9HeapBlockIPNS_9ValueTree8ListenerELb0EEE", !6, i64 0}
!20 = !{!"_ZTSN4juce10IdentifierE", !21, i64 0}
!21 = !{!"_ZTSN4juce6StringE", !22, i64 0}
!22 = !{!"_ZTSN4juce16CharPointer_UTF8E", !6, i64 0}
!23 = !{!"bool", !7, i64 0}
!24 = !{!10, !6, i64 80}


; 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::Value" = type { %"class.juce::ReferenceCountedObjectPtr.177", %"class.juce::ListenerList.178" }
%"class.juce::ReferenceCountedObjectPtr.177" = type { ptr }
%"class.juce::ListenerList.178" = type { %"class.juce::Array.179" }
%"class.juce::Array.179" = type { %"class.juce::ArrayAllocationBase.180", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.180" = type <{ %"class.juce::HeapBlock.181", i32, [4 x i8] }>
%"class.juce::HeapBlock.181" = type { ptr }
%"class.juce::StringRef" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4juce28AudioProcessorValueTreeState19getParameterAsValueENS_9StringRefE(ptr dead_on_unwind noalias writable sret(%"class.juce::Value") align 8 %0, ptr noundef nonnull align 8 dereferenceable(113) %1, ptr noundef nonnull %2) local_unnamed_addr #2 align 2 {
  %4 = alloca %"class.juce::StringRef", align 8
  %5 = getelementptr inbounds i8, ptr %1, i64 40
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN4juce9StringRefC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %2) #4
  %7 = call noundef ptr @_ZN4juce28AudioProcessorValueTreeState9Parameter17getParameterForIDERNS_14AudioProcessorENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(256) %6, ptr noundef nonnull %4) #4
  %.not.not = icmp eq ptr %7, null
  br i1 %.not.not, label %13, label %8

8:                                                ; preds = %3
  %9 = getelementptr inbounds i8, ptr %7, i64 72
  %10 = getelementptr inbounds i8, ptr %1, i64 96
  %11 = getelementptr inbounds i8, ptr %1, i64 80
  %12 = load ptr, ptr %11, align 8, !tbaa !23
  call void @_ZN4juce9ValueTree18getPropertyAsValueERKNS_10IdentifierEPNS_11UndoManagerE(ptr dead_on_unwind writable sret(%"class.juce::Value") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef %12)
  br label %14

13:                                               ; preds = %3
  call void @_ZN4juce5ValueC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %0)
  br label %14

14:                                               ; preds = %8, %13
  ret void
}

declare void @_ZN4juce9ValueTree18getPropertyAsValueERKNS_10IdentifierEPNS_11UndoManagerE(ptr dead_on_unwind writable sret(%"class.juce::Value") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

declare void @_ZN4juce5ValueC1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3

attributes #0 = { 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 #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 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 = { "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, !11, i64 40}
!6 = !{!"_ZTSN4juce28AudioProcessorValueTreeStateE", !7, i64 0, !12, i64 32, !11, i64 40, !13, i64 48, !11, i64 80, !19, i64 88, !19, i64 96, !19, i64 104, !22, i64 112}
!7 = !{!"_ZTSN4juce5TimerE", !8, i64 8, !8, i64 12, !11, i64 16, !11, i64 24}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"_ZTSN4juce9ValueTree8ListenerE"}
!13 = !{!"_ZTSN4juce9ValueTreeE", !14, i64 0, !15, i64 8}
!14 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_9ValueTree12SharedObjectEEE", !11, i64 0}
!15 = !{!"_ZTSN4juce12ListenerListINS_9ValueTree8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEEE", !16, i64 0}
!16 = !{!"_ZTSN4juce5ArrayIPNS_9ValueTree8ListenerENS_20DummyCriticalSectionELi0EEE", !17, i64 0, !8, i64 16}
!17 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_9ValueTree8ListenerENS_20DummyCriticalSectionEEE", !18, i64 0, !8, i64 8}
!18 = !{!"_ZTSN4juce9HeapBlockIPNS_9ValueTree8ListenerELb0EEE", !11, i64 0}
!19 = !{!"_ZTSN4juce10IdentifierE", !20, i64 0}
!20 = !{!"_ZTSN4juce6StringE", !21, i64 0}
!21 = !{!"_ZTSN4juce16CharPointer_UTF8E", !11, i64 0}
!22 = !{!"bool", !9, i64 0}
!23 = !{!6, !11, i64 80}


; Effective O3 passes: GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass