; 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::Array.142" = type { %"class.juce::ArrayAllocationBase.127", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.127" = type <{ %"class.juce::HeapBlock.128", i32, [4 x i8] }>
%"class.juce::HeapBlock.128" = type { ptr }
%"class.juce::GenericScopedLock" = type { ptr }
%"struct.juce::PluginSorter" = type { i32, i32 }
%"class.juce::KnownPluginList" = type { %"class.juce::ChangeBroadcaster", %"class.juce::OwnedArray.126", %"class.juce::StringArray", %"class.juce::ScopedPointer.136", %"class.juce::CriticalSection", %"class.juce::CriticalSection" }
%"class.juce::ChangeBroadcaster" = type { ptr, %"class.juce::ChangeBroadcaster::ChangeBroadcasterCallback", %"class.juce::ListenerList.120" }
%"class.juce::ChangeBroadcaster::ChangeBroadcasterCallback" = type { %"class.juce::AsyncUpdater", ptr }
%"class.juce::AsyncUpdater" = type { ptr, %"class.juce::ReferenceCountedObjectPtr.8" }
%"class.juce::ReferenceCountedObjectPtr.8" = type { ptr }
%"class.juce::ListenerList.120" = type { %"class.juce::Array.121" }
%"class.juce::Array.121" = type { %"class.juce::ArrayAllocationBase.122", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.122" = type <{ %"class.juce::HeapBlock.123", i32, [4 x i8] }>
%"class.juce::HeapBlock.123" = type { ptr }
%"class.juce::OwnedArray.126" = type { %"class.juce::ArrayAllocationBase.127", i32, [4 x i8] }
%"class.juce::StringArray" = type { %"class.juce::Array.131" }
%"class.juce::Array.131" = type { %"class.juce::ArrayAllocationBase.132", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.132" = type <{ %"class.juce::HeapBlock.133", i32, [4 x i8] }>
%"class.juce::HeapBlock.133" = type { ptr }
%"class.juce::ScopedPointer.136" = 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 }
%"struct.juce::KnownPluginList::PluginTree" = type { %"class.juce::String", %"class.juce::OwnedArray.144", %"class.juce::Array.149" }
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::OwnedArray.144" = type { %"class.juce::ArrayAllocationBase.145", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.145" = type <{ %"class.juce::HeapBlock.146", i32, [4 x i8] }>
%"class.juce::HeapBlock.146" = type { ptr }
%"class.juce::Array.149" = type { %"class.juce::ArrayAllocationBase.150", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.150" = type <{ %"class.juce::HeapBlock.151", i32, [4 x i8] }>
%"class.juce::HeapBlock.151" = 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: 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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #1

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

; 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 #3 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK4juce15KnownPluginList10createTreeENS0_10SortMethodE(ptr noundef nonnull align 8 dereferenceable(192) %0, i32 noundef %1) #5 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.juce::Array.142", align 8
  %6 = alloca %"class.juce::GenericScopedLock", align 8
  %7 = alloca %"struct.juce::PluginSorter", align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %14 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #6
  call void @_ZN4juce5ArrayIPNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EEC2Ev(ptr noundef nonnull align 8 dereferenceable(20) %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %15 = getelementptr inbounds %"class.juce::KnownPluginList", ptr %14, i32 0, i32 5
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(40) %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %16 = load i32, ptr %4, align 4, !tbaa !9
  call void @_ZN4juce12PluginSorterC2ENS_15KnownPluginList10SortMethodEb(ptr noundef nonnull align 4 dereferenceable(8) %7, i32 noundef %16, i1 noundef zeroext true) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !11
  br label %17

17:                                               ; preds = %29, %2
  %18 = load i32, ptr %8, align 4, !tbaa !11
  %19 = getelementptr inbounds %"class.juce::KnownPluginList", ptr %14, i32 0, i32 1
  %20 = call noundef i32 @_ZNK4juce10OwnedArrayINS_17PluginDescriptionENS_20DummyCriticalSectionEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %19) #6
  %21 = icmp slt i32 %18, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %36

23:                                               ; preds = %17
  %24 = getelementptr inbounds %"class.juce::KnownPluginList", ptr %14, i32 0, i32 1
  %25 = load i32, ptr %8, align 4, !tbaa !11
  %26 = call noundef ptr @_ZNK4juce10OwnedArrayINS_17PluginDescriptionENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %24, i32 noundef %25) #6
  %27 = invoke noundef i32 @_ZN4juce5ArrayIPNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EE9addSortedINS_12PluginSorterEEEiRT_S2_(ptr noundef nonnull align 8 dereferenceable(20) %5, ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef %26)
          to label %28 unwind label %32

28:                                               ; preds = %23
  br label %29

29:                                               ; preds = %28
  %30 = load i32, ptr %8, align 4, !tbaa !11
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %8, align 4, !tbaa !11
  br label %17, !llvm.loop !13

32:                                               ; preds = %23
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %9, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %86

36:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %37 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 56) #7
          to label %38 unwind label %51

38:                                               ; preds = %36
  call void @llvm.memset.p0.i64(ptr align 16 %37, i8 0, i64 56, i1 false)
  call void @_ZN4juce15KnownPluginList10PluginTreeC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %37) #6
  store ptr %37, ptr %11, align 8, !tbaa !5
  %39 = load i32, ptr %4, align 4, !tbaa !9
  %40 = icmp eq i32 %39, 2
  br i1 %40, label %47, label %41

41:                                               ; preds = %38
  %42 = load i32, ptr %4, align 4, !tbaa !9
  %43 = icmp eq i32 %42, 3
  br i1 %43, label %47, label %44

44:                                               ; preds = %41
  %45 = load i32, ptr %4, align 4, !tbaa !9
  %46 = icmp eq i32 %45, 4
  br i1 %46, label %47, label %55

47:                                               ; preds = %44, %41, %38
  %48 = load ptr, ptr %11, align 8, !tbaa !5
  %49 = load i32, ptr %4, align 4, !tbaa !9
  invoke void @_ZN4juce15PluginTreeUtils19buildTreeByCategoryERNS_15KnownPluginList10PluginTreeERKNS_5ArrayIPNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EEENS1_10SortMethodE(ptr noundef nonnull align 8 dereferenceable(56) %48, ptr noundef nonnull align 8 dereferenceable(20) %5, i32 noundef %49)
          to label %50 unwind label %51

50:                                               ; preds = %47
  br label %83

51:                                               ; preds = %58, %47, %36
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %9, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %10, align 4
  br label %85

55:                                               ; preds = %44
  %56 = load i32, ptr %4, align 4, !tbaa !9
  %57 = icmp eq i32 %56, 5
  br i1 %57, label %58, label %61

58:                                               ; preds = %55
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZN4juce15PluginTreeUtils17buildTreeByFolderERNS_15KnownPluginList10PluginTreeERKNS_5ArrayIPNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EEE(ptr noundef nonnull align 8 dereferenceable(56) %59, ptr noundef nonnull align 8 dereferenceable(20) %5)
          to label %60 unwind label %51

60:                                               ; preds = %58
  br label %82

61:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !11
  br label %62

62:                                               ; preds = %74, %61
  %63 = load i32, ptr %12, align 4, !tbaa !11
  %64 = call noundef i32 @_ZNK4juce5ArrayIPNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %5) #6
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %81

67:                                               ; preds = %62
  %68 = load ptr, ptr %11, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.juce::KnownPluginList::PluginTree", ptr %68, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %70 = load i32, ptr %12, align 4, !tbaa !11
  %71 = invoke noundef ptr @_ZNK4juce5ArrayIPNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %5, i32 noundef %70)
          to label %72 unwind label %77

72:                                               ; preds = %67
  store ptr %71, ptr %13, align 8, !tbaa !5
  invoke void @_ZN4juce5ArrayIPKNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EE3addEOS3_(ptr noundef nonnull align 8 dereferenceable(20) %69, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %73 unwind label %77

73:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %74

74:                                               ; preds = %73
  %75 = load i32, ptr %12, align 4, !tbaa !11
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %12, align 4, !tbaa !11
  br label %62, !llvm.loop !15

77:                                               ; preds = %72, %67
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %9, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %85

81:                                               ; preds = %66
  br label %82

82:                                               ; preds = %81, %60
  br label %83

83:                                               ; preds = %82, %50
  %84 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @_ZN4juce5ArrayIPNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EED2Ev(ptr noundef nonnull align 8 dereferenceable(20) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  ret ptr %84

85:                                               ; preds = %77, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %86

86:                                               ; preds = %85, %32
  call void @_ZN4juce5ArrayIPNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EED2Ev(ptr noundef nonnull align 8 dereferenceable(20) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  br label %87

87:                                               ; preds = %86
  %88 = load ptr, ptr %9, align 8
  %89 = load i32, ptr %10, align 4
  %90 = insertvalue { ptr, i32 } poison, ptr %88, 0
  %91 = insertvalue { ptr, i32 } %90, i32 %89, 1
  resume { ptr, i32 } %91
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4juce5ArrayIPNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EE9addSortedINS_12PluginSorterEEEiRT_S2_(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef) #5 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce15PluginTreeUtils17buildTreeByFolderERNS_15KnownPluginList10PluginTreeERKNS_5ArrayIPNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EEE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(20)) #5 align 2

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 #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 = { 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 #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }

!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 = !{!"_ZTSN4juce15KnownPluginList10SortMethodE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; 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::Array.142" = type { %"class.juce::ArrayAllocationBase.127", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.127" = type <{ %"class.juce::HeapBlock.128", i32, [4 x i8] }>
%"class.juce::HeapBlock.128" = type { ptr }
%"class.juce::GenericScopedLock" = type { ptr }
%"struct.juce::PluginSorter" = type { i32, i32 }

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

; 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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #1

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

; 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 #3 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull ptr @_ZNK4juce15KnownPluginList10createTreeENS0_10SortMethodE(ptr noundef nonnull align 8 dereferenceable(192) %0, i32 noundef %1) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.juce::Array.142", align 8
  %4 = alloca %"class.juce::GenericScopedLock", align 8
  %5 = alloca %"struct.juce::PluginSorter", align 4
  %6 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  call void @_ZN4juce5ArrayIPNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EEC2Ev(ptr noundef nonnull align 8 dereferenceable(20) %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %7 = getelementptr inbounds i8, ptr %0, i64 152
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(40) %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  call void @_ZN4juce12PluginSorterC2ENS_15KnownPluginList10SortMethodEb(ptr noundef nonnull align 4 dereferenceable(8) %5, i32 noundef %1, i1 noundef zeroext true) #6
  %8 = getelementptr inbounds i8, ptr %0, i64 56
  %9 = call noundef i32 @_ZNK4juce10OwnedArrayINS_17PluginDescriptionENS_20DummyCriticalSectionEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %8) #6
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %14, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  %11 = invoke noalias noundef nonnull dereferenceable(56) ptr @_Znwm(i64 noundef 56) #7
          to label %20 unwind label %25

.lr.ph:                                           ; preds = %2, %14
  %.02129 = phi i32 [ %15, %14 ], [ 0, %2 ]
  %12 = call noundef ptr @_ZNK4juce10OwnedArrayINS_17PluginDescriptionENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %8, i32 noundef %.02129) #6
  %13 = invoke noundef i32 @_ZN4juce5ArrayIPNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EE9addSortedINS_12PluginSorterEEEiRT_S2_(ptr noundef nonnull align 8 dereferenceable(20) %3, ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef %12)
          to label %14 unwind label %18

14:                                               ; preds = %.lr.ph
  %15 = add nuw nsw i32 %.02129, 1
  %16 = call noundef i32 @_ZNK4juce10OwnedArrayINS_17PluginDescriptionENS_20DummyCriticalSectionEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %8) #6
  %17 = icmp slt i32 %15, %16
  br i1 %17, label %.lr.ph, label %._crit_edge, !llvm.loop !5

18:                                               ; preds = %.lr.ph
  %19 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %36

20:                                               ; preds = %._crit_edge
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(56) %11, i8 0, i64 56, i1 false)
  call void @_ZN4juce15KnownPluginList10PluginTreeC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #6
  switch i32 %1, label %.preheader [
    i32 4, label %24
    i32 3, label %24
    i32 2, label %24
    i32 5, label %27
  ]

.preheader:                                       ; preds = %20
  %21 = call noundef i32 @_ZNK4juce5ArrayIPNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %3) #6
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.lr.ph31, label %.loopexit

.lr.ph31:                                         ; preds = %.preheader
  %23 = getelementptr inbounds i8, ptr %11, i64 32
  br label %28

24:                                               ; preds = %20, %20, %20
  invoke void @_ZN4juce15PluginTreeUtils19buildTreeByCategoryERNS_15KnownPluginList10PluginTreeERKNS_5ArrayIPNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EEENS1_10SortMethodE(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull align 8 dereferenceable(20) %3, i32 noundef %1)
          to label %.loopexit unwind label %25

25:                                               ; preds = %27, %24, %._crit_edge
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %36

27:                                               ; preds = %20
  invoke void @_ZN4juce15PluginTreeUtils17buildTreeByFolderERNS_15KnownPluginList10PluginTreeERKNS_5ArrayIPNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EEE(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull align 8 dereferenceable(20) %3)
          to label %.loopexit unwind label %25

28:                                               ; preds = %.lr.ph31, %30
  %.030 = phi i32 [ 0, %.lr.ph31 ], [ %31, %30 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %29 = call noundef ptr @_ZNK4juce5ArrayIPNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %3, i32 noundef %.030)
  store ptr %29, ptr %6, align 8, !tbaa !7
  invoke void @_ZN4juce5ArrayIPKNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EE3addEOS3_(ptr noundef nonnull align 8 dereferenceable(20) %23, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %30 unwind label %34

30:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %31 = add nuw nsw i32 %.030, 1
  %32 = call noundef i32 @_ZNK4juce5ArrayIPNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %3) #6
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %28, label %.loopexit, !llvm.loop !11

34:                                               ; preds = %28
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %36

.loopexit:                                        ; preds = %30, %.preheader, %27, %24
  call void @_ZN4juce5ArrayIPNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EED2Ev(ptr noundef nonnull align 8 dereferenceable(20) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  ret ptr %11

36:                                               ; preds = %25, %34, %18
  %.pn27 = phi { ptr, i32 } [ %19, %18 ], [ %26, %25 ], [ %35, %34 ]
  call void @_ZN4juce5ArrayIPNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EED2Ev(ptr noundef nonnull align 8 dereferenceable(20) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn27
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4juce5ArrayIPNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EE9addSortedINS_12PluginSorterEEEiRT_S2_(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef) local_unnamed_addr #5 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce15PluginTreeUtils17buildTreeByFolderERNS_15KnownPluginList10PluginTreeERKNS_5ArrayIPNS_17PluginDescriptionENS_20DummyCriticalSectionELi0EEE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #5 align 2

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 #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 = { 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 #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }

!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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = distinct !{!11, !6}


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