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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.juce::WeakReference" = type { %"class.juce::ReferenceCountedObjectPtr" }
%"class.juce::ReferenceCountedObjectPtr" = type { ptr }
%"class.juce::Component" = type <{ %"class.juce::MouseListener", %"class.juce::String", %"class.juce::String", ptr, %"class.juce::Rectangle", %"class.juce::ScopedPointer", %"class.juce::ScopedPointer.0", %"class.juce::Array", ptr, %"class.juce::MouseCursor", ptr, %"class.juce::ScopedPointer.1", %"class.juce::ScopedPointer.2", %"class.juce::ScopedPointer.3", %"class.juce::ListenerList", %"class.juce::NamedValueSet", %"class.juce::WeakReference<juce::Component>::Master", %union.anon, i8, [3 x i8] }>
%"class.juce::MouseListener" = type { ptr }
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::Rectangle" = type { %"class.juce::Point", i32, i32 }
%"class.juce::Point" = type { i32, i32 }
%"class.juce::ScopedPointer" = type { ptr }
%"class.juce::ScopedPointer.0" = type { ptr }
%"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::MouseCursor" = type { ptr }
%"class.juce::ScopedPointer.1" = type { ptr }
%"class.juce::ScopedPointer.2" = type { ptr }
%"class.juce::ScopedPointer.3" = type { ptr }
%"class.juce::ListenerList" = type { %"class.juce::Array.4" }
%"class.juce::Array.4" = type { %"class.juce::ArrayAllocationBase.5", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.5" = type <{ %"class.juce::HeapBlock.6", i32, [4 x i8] }>
%"class.juce::HeapBlock.6" = type { ptr }
%"class.juce::NamedValueSet" = type { %"class.juce::Array.9" }
%"class.juce::Array.9" = type { %"class.juce::ArrayAllocationBase.10", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.10" = type <{ %"class.juce::HeapBlock.11", i32, [4 x i8] }>
%"class.juce::HeapBlock.11" = type { ptr }
%"class.juce::WeakReference<juce::Component>::Master" = type { %"class.juce::ReferenceCountedObjectPtr" }
%union.anon = type { i32 }

declare i32 @__gxx_personality_v0(...)

; 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 uwtable
declare dso_local void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef, i32 noundef) #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce12ModifierKeys22updateCurrentModifiersEv() #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4juce13ComponentPeer17handleKeyUpOrDownEb(ptr noundef nonnull align 8 dereferenceable(77) %0, i1 noundef zeroext %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.juce::WeakReference", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  %14 = zext i1 %1 to i8
  store i8 %14, ptr %5, align 1, !tbaa !9
  %15 = load ptr, ptr %4, align 8
  call void @_ZN4juce12ModifierKeys22updateCurrentModifiersEv() #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #4
  store i8 0, ptr %6, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %16 = call noundef ptr @_ZN4juce13ComponentPeer20getTargetForKeyPressEv(ptr noundef nonnull align 8 dereferenceable(77) %15)
  store ptr %16, ptr %7, align 8, !tbaa !5
  br label %17

17:                                               ; preds = %96, %2
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = icmp ne ptr %18, null
  br i1 %19, label %21, label %20

20:                                               ; preds = %17
  store i32 2, ptr %8, align 4
  br label %100

21:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %22)
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = load i8, ptr %5, align 1, !tbaa !9, !range !11, !noundef !12
  %25 = trunc i8 %24 to i1
  %26 = load ptr, ptr %23, align 8, !tbaa !13
  %27 = getelementptr inbounds ptr, ptr %26, i64 29
  %28 = load ptr, ptr %27, align 8
  %29 = invoke noundef zeroext i1 %28(ptr noundef nonnull align 8 dereferenceable(197) %23, i1 noundef zeroext %25)
          to label %30 unwind label %37

30:                                               ; preds = %21
  %31 = zext i1 %29 to i8
  store i8 %31, ptr %6, align 1, !tbaa !9
  %32 = load i8, ptr %6, align 1, !tbaa !9, !range !11, !noundef !12
  %33 = trunc i8 %32 to i1
  br i1 %33, label %36, label %34

34:                                               ; preds = %30
  %35 = call noundef zeroext i1 @_ZNK4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEeqEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef null) #4
  br i1 %35, label %36, label %41

36:                                               ; preds = %34, %30
  store i32 2, ptr %8, align 4
  br label %93

37:                                               ; preds = %21
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %10, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %11, align 4
  br label %99

41:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = getelementptr inbounds %"class.juce::Component", ptr %42, i32 0, i32 13
  %44 = call noundef ptr @_ZNK4juce13ScopedPointerINS_5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EEEEcvPS5_Ev(ptr noundef nonnull align 8 dereferenceable(8) %43) #4
  store ptr %44, ptr %12, align 8, !tbaa !5
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %89

47:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %48 = load ptr, ptr %12, align 8, !tbaa !5
  %49 = call noundef i32 @_ZNK4juce5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %48) #4
  store i32 %49, ptr %13, align 4, !tbaa !15
  br label %50

50:                                               ; preds = %85, %47
  %51 = load i32, ptr %13, align 4, !tbaa !15
  %52 = add nsw i32 %51, -1
  store i32 %52, ptr %13, align 4, !tbaa !15
  %53 = icmp sge i32 %52, 0
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  store i32 5, ptr %8, align 4
  br label %86

55:                                               ; preds = %50
  %56 = load ptr, ptr %12, align 8, !tbaa !5
  %57 = load i32, ptr %13, align 4, !tbaa !15
  %58 = invoke noundef ptr @_ZNK4juce5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %56, i32 noundef %57)
          to label %59 unwind label %76

59:                                               ; preds = %55
  %60 = load i8, ptr %5, align 1, !tbaa !9, !range !11, !noundef !12
  %61 = trunc i8 %60 to i1
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = load ptr, ptr %58, align 8, !tbaa !13
  %64 = getelementptr inbounds ptr, ptr %63, i64 3
  %65 = load ptr, ptr %64, align 8
  %66 = invoke noundef zeroext i1 %65(ptr noundef nonnull align 8 dereferenceable(8) %58, i1 noundef zeroext %61, ptr noundef %62)
          to label %67 unwind label %76

67:                                               ; preds = %59
  %68 = zext i1 %66 to i8
  store i8 %68, ptr %6, align 1, !tbaa !9
  %69 = load i8, ptr %6, align 1, !tbaa !9, !range !11, !noundef !12
  %70 = trunc i8 %69 to i1
  br i1 %70, label %73, label %71

71:                                               ; preds = %67
  %72 = call noundef zeroext i1 @_ZNK4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEeqEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef null) #4
  br i1 %72, label %73, label %80

73:                                               ; preds = %71, %67
  %74 = load i8, ptr %6, align 1, !tbaa !9, !range !11, !noundef !12
  %75 = trunc i8 %74 to i1
  store i1 %75, ptr %3, align 1
  store i32 1, ptr %8, align 4
  br label %86

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

80:                                               ; preds = %71
  %81 = load i32, ptr %13, align 4, !tbaa !15
  %82 = load ptr, ptr %12, align 8, !tbaa !5
  %83 = call noundef i32 @_ZNK4juce5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %82) #4
  %84 = invoke noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef %81, i32 noundef %83)
          to label %85 unwind label %76

85:                                               ; preds = %80
  store i32 %84, ptr %13, align 4, !tbaa !15
  br label %50, !llvm.loop !17

86:                                               ; preds = %73, %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  %87 = load i32, ptr %8, align 4
  switch i32 %87, label %90 [
    i32 5, label %88
  ]

88:                                               ; preds = %86
  br label %89

89:                                               ; preds = %88, %41
  store i32 0, ptr %8, align 4
  br label %90

90:                                               ; preds = %89, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  %91 = load i32, ptr %8, align 4
  switch i32 %91, label %93 [
    i32 0, label %92
  ]

92:                                               ; preds = %90
  store i32 0, ptr %8, align 4
  br label %93

93:                                               ; preds = %92, %90, %36
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  %94 = load i32, ptr %8, align 4
  switch i32 %94, label %100 [
    i32 0, label %95
  ]

95:                                               ; preds = %93
  br label %96

96:                                               ; preds = %95
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = call noundef ptr @_ZNK4juce9Component18getParentComponentEv(ptr noundef nonnull align 8 dereferenceable(197) %97) #4
  store ptr %98, ptr %7, align 8, !tbaa !5
  br label %17, !llvm.loop !19

99:                                               ; preds = %76, %37
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #4
  br label %107

100:                                              ; preds = %93, %20
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  %101 = load i32, ptr %8, align 4
  switch i32 %101, label %105 [
    i32 2, label %102
  ]

102:                                              ; preds = %100
  %103 = load i8, ptr %6, align 1, !tbaa !9, !range !11, !noundef !12
  %104 = trunc i8 %103 to i1
  store i1 %104, ptr %3, align 1
  store i32 1, ptr %8, align 4
  br label %105

105:                                              ; preds = %102, %100
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #4
  %106 = load i1, ptr %3, align 1
  ret i1 %106

107:                                              ; preds = %99
  %108 = load ptr, ptr %10, align 8
  %109 = load i32, ptr %11, align 4
  %110 = insertvalue { ptr, i32 } poison, ptr %108, 0
  %111 = insertvalue { ptr, i32 } %110, i32 %109, 1
  resume { ptr, i32 } %111
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 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 = { 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 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.juce::WeakReference" = type { %"class.juce::ReferenceCountedObjectPtr" }
%"class.juce::ReferenceCountedObjectPtr" = type { ptr }

declare i32 @__gxx_personality_v0(...)

; 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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef, i32 noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce12ModifierKeys22updateCurrentModifiersEv() local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4juce13ComponentPeer17handleKeyUpOrDownEb(ptr noundef nonnull align 8 dereferenceable(77) %0, i1 noundef zeroext %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.juce::WeakReference", align 8
  tail call void @_ZN4juce12ModifierKeys22updateCurrentModifiersEv() #4
  %4 = tail call noundef ptr @_ZN4juce13ComponentPeer20getTargetForKeyPressEv(ptr noundef nonnull align 8 dereferenceable(77) %0)
  %.not71 = icmp eq ptr %4, null
  br i1 %.not71, label %.thread52, label %.lr.ph73

.lr.ph73:                                         ; preds = %2, %select.unfold
  %.03672 = phi ptr [ %35, %select.unfold ], [ %4, %2 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull %.03672)
  %5 = load ptr, ptr %.03672, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %5, i64 232
  %7 = load ptr, ptr %6, align 8
  %8 = invoke noundef zeroext i1 %7(ptr noundef nonnull align 8 dereferenceable(197) %.03672, i1 noundef zeroext %1)
          to label %9 unwind label %12

9:                                                ; preds = %.lr.ph73
  br i1 %8, label %.thread58, label %10

10:                                               ; preds = %9
  %11 = call noundef zeroext i1 @_ZNK4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEeqEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef null) #4
  br i1 %11, label %.thread58, label %14

12:                                               ; preds = %.lr.ph73
  %13 = landingpad { ptr, i32 }
          cleanup
  br label %36

14:                                               ; preds = %10
  %15 = getelementptr inbounds i8, ptr %.03672, i64 128
  %16 = call noundef ptr @_ZNK4juce13ScopedPointerINS_5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EEEEcvPS5_Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #4
  %.not46 = icmp eq ptr %16, null
  br i1 %.not46, label %select.unfold, label %17

17:                                               ; preds = %14
  %18 = call noundef i32 @_ZNK4juce5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %16) #4
  %19 = icmp slt i32 %18, 1
  br i1 %19, label %select.unfold, label %.lr.ph

.lr.ph:                                           ; preds = %17, %31
  %.in = phi i32 [ %33, %31 ], [ %18, %17 ]
  %20 = add nsw i32 %.in, -1
  %21 = call noundef ptr @_ZNK4juce5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %16, i32 noundef %20)
  %22 = load ptr, ptr %21, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %22, i64 24
  %24 = load ptr, ptr %23, align 8
  %25 = invoke noundef zeroext i1 %24(ptr noundef nonnull align 8 dereferenceable(8) %21, i1 noundef zeroext %1, ptr noundef nonnull %.03672)
          to label %26 unwind label %29

26:                                               ; preds = %.lr.ph
  br i1 %25, label %37, label %27

27:                                               ; preds = %26
  %28 = call noundef zeroext i1 @_ZNK4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEeqEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef null) #4
  br i1 %28, label %37, label %31

29:                                               ; preds = %.lr.ph
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %36

31:                                               ; preds = %27
  %32 = call noundef i32 @_ZNK4juce5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %16) #4
  %33 = call noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef %20, i32 noundef %32)
  %34 = icmp slt i32 %33, 1
  br i1 %34, label %select.unfold, label %.lr.ph, !llvm.loop !8

select.unfold:                                    ; preds = %31, %17, %14
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  %35 = call noundef ptr @_ZNK4juce9Component18getParentComponentEv(ptr noundef nonnull align 8 dereferenceable(197) %.03672) #4
  %.not = icmp eq ptr %35, null
  br i1 %.not, label %.thread52, label %.lr.ph73, !llvm.loop !10

36:                                               ; preds = %29, %12
  %.pn = phi { ptr, i32 } [ %30, %29 ], [ %13, %12 ]
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn

.thread58:                                        ; preds = %9, %10
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br label %.thread52

37:                                               ; preds = %26, %27
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br label %.thread52

.thread52:                                        ; preds = %select.unfold, %2, %.thread58, %37
  %38 = phi i1 [ %25, %37 ], [ %8, %.thread58 ], [ false, %2 ], [ false, %select.unfold ]
  ret i1 %38
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 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 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}


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