; 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::PopupMenu" = type { %"class.juce::OwnedArray.239", %"class.juce::WeakReference.37" }
%"class.juce::OwnedArray.239" = type { %"class.juce::ArrayAllocationBase.240", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.240" = type <{ %"class.juce::HeapBlock.241", i32, [4 x i8] }>
%"class.juce::HeapBlock.241" = type { ptr }
%"class.juce::WeakReference.37" = type { %"class.juce::ReferenceCountedObjectPtr.38" }
%"class.juce::ReferenceCountedObjectPtr.38" = type { ptr }
%"class.juce::MenuBarComponent" = type <{ %"class.juce::Component.base", [3 x i8], %"class.juce::MenuBarModel::Listener", %"class.juce::Timer", ptr, %"class.juce::StringArray", %"class.juce::Array.288", %"class.juce::Point", i32, i32, i32, [4 x i8] }>
%"class.juce::Component.base" = 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 }>
%"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::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" }
%"class.juce::ReferenceCountedObjectPtr" = type { ptr }
%union.anon = type { i32 }
%"class.juce::MenuBarModel::Listener" = type { ptr }
%"class.juce::Timer" = type { ptr, i32, i32, ptr, ptr }
%"class.juce::StringArray" = type { %"class.juce::Array.150" }
%"class.juce::Array.150" = type { %"class.juce::ArrayAllocationBase.151", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.151" = type <{ %"class.juce::HeapBlock.152", i32, [4 x i8] }>
%"class.juce::HeapBlock.152" = type { ptr }
%"class.juce::Array.288" = type { %"class.juce::ArrayAllocationBase.289", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.289" = type <{ %"class.juce::HeapBlock.290", i32, [4 x i8] }>
%"class.juce::HeapBlock.290" = type { ptr }
%"class.juce::Point" = type { i32, i32 }
%"struct.juce::ApplicationCommandTarget::InvocationInfo" = type <{ i32, i32, i32, [4 x i8], ptr, %"class.juce::KeyPress", i8, [3 x i8], i32, [4 x i8] }>
%"class.juce::KeyPress" = type { i32, %"class.juce::ModifierKeys", i32 }
%"class.juce::ModifierKeys" = 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: nounwind
declare void @_ZN4juce5Timer10startTimerEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #1

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

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce11StringArrayixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce16MenuBarComponent17setItemUnderMouseEi(ptr noundef nonnull align 8 dereferenceable(316), i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce16MenuBarComponent18menuCommandInvokedEPNS_12MenuBarModelERKNS_24ApplicationCommandTarget14InvocationInfoE(ptr noundef nonnull align 8 dereferenceable(316) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(44) %2) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.juce::PopupMenu", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %12 = load ptr, ptr %4, align 8
  %13 = getelementptr inbounds %"class.juce::MenuBarComponent", ptr %12, i32 0, i32 4
  %14 = load ptr, ptr %13, align 8, !tbaa !9
  %15 = icmp eq ptr %14, null
  br i1 %15, label %22, label %16

16:                                               ; preds = %3
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = getelementptr inbounds %"struct.juce::ApplicationCommandTarget::InvocationInfo", ptr %17, i32 0, i32 1
  %19 = load i32, ptr %18, align 4, !tbaa !46
  %20 = and i32 %19, 32
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %22, label %23

22:                                               ; preds = %16, %3
  br label %61

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

24:                                               ; preds = %57, %23
  %25 = load i32, ptr %7, align 4, !tbaa !53
  %26 = getelementptr inbounds %"class.juce::MenuBarComponent", ptr %12, i32 0, i32 5
  %27 = call noundef i32 @_ZNK4juce11StringArray4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #4
  %28 = icmp slt i32 %25, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %24
  store i32 2, ptr %8, align 4
  br label %60

30:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #4
  %31 = getelementptr inbounds %"class.juce::MenuBarComponent", ptr %12, i32 0, i32 4
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = load i32, ptr %7, align 4, !tbaa !53
  %34 = getelementptr inbounds %"class.juce::MenuBarComponent", ptr %12, i32 0, i32 5
  %35 = load i32, ptr %7, align 4, !tbaa !53
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce11StringArrayixEi(ptr noundef nonnull align 8 dereferenceable(24) %34, i32 noundef %35) #4
  %37 = load ptr, ptr %32, align 8, !tbaa !54
  %38 = getelementptr inbounds ptr, ptr %37, i64 4
  %39 = load ptr, ptr %38, align 8
  call void %39(ptr dead_on_unwind writable sret(%"class.juce::PopupMenu") align 8 %9, ptr noundef nonnull align 8 dereferenceable(56) %32, i32 noundef %33, ptr noundef nonnull align 8 dereferenceable(8) %36)
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.juce::ApplicationCommandTarget::InvocationInfo", ptr %40, i32 0, i32 0
  %42 = load i32, ptr %41, align 8, !tbaa !56
  %43 = invoke noundef zeroext i1 @_ZNK4juce9PopupMenu19containsCommandItemEi(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef %42)
          to label %44 unwind label %49

44:                                               ; preds = %30
  br i1 %43, label %45, label %53

45:                                               ; preds = %44
  %46 = load i32, ptr %7, align 4, !tbaa !53
  invoke void @_ZN4juce16MenuBarComponent17setItemUnderMouseEi(ptr noundef nonnull align 8 dereferenceable(316) %12, i32 noundef %46)
          to label %47 unwind label %49

47:                                               ; preds = %45
  %48 = getelementptr inbounds i8, ptr %12, i64 208
  call void @_ZN4juce5Timer10startTimerEi(ptr noundef nonnull align 8 dereferenceable(32) %48, i32 noundef 200) #4
  store i32 2, ptr %8, align 4
  br label %54

49:                                               ; preds = %45, %30
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %10, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %11, align 4
  call void @_ZN4juce9PopupMenuD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %62

53:                                               ; preds = %44
  store i32 0, ptr %8, align 4
  br label %54

54:                                               ; preds = %53, %47
  call void @_ZN4juce9PopupMenuD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #4
  %55 = load i32, ptr %8, align 4
  switch i32 %55, label %60 [
    i32 0, label %56
  ]

56:                                               ; preds = %54
  br label %57

57:                                               ; preds = %56
  %58 = load i32, ptr %7, align 4, !tbaa !53
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %7, align 4, !tbaa !53
  br label %24, !llvm.loop !57

60:                                               ; preds = %54, %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %61

61:                                               ; preds = %60, %22
  ret void

62:                                               ; preds = %49
  %63 = load ptr, ptr %10, align 8
  %64 = load i32, ptr %11, align 4
  %65 = insertvalue { ptr, i32 } poison, ptr %63, 0
  %66 = insertvalue { ptr, i32 } %65, i32 %64, 1
  resume { ptr, i32 } %66
}

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

declare void @_ZN4juce9PopupMenuD1Ev(ptr)

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 240}
!10 = !{!"_ZTSN4juce16MenuBarComponentE", !11, i64 0, !37, i64 200, !38, i64 208, !6, i64 240, !39, i64 248, !43, i64 272, !16, i64 296, !17, i64 304, !17, i64 308, !17, i64 312}
!11 = !{!"_ZTSN4juce9ComponentE", !12, i64 0, !13, i64 8, !13, i64 16, !6, i64 24, !15, i64 32, !18, i64 48, !19, i64 56, !20, i64 64, !6, i64 88, !23, i64 96, !6, i64 104, !24, i64 112, !25, i64 120, !26, i64 128, !27, i64 136, !31, i64 160, !35, i64 184, !7, i64 192, !7, i64 196}
!12 = !{!"_ZTSN4juce13MouseListenerE"}
!13 = !{!"_ZTSN4juce6StringE", !14, i64 0}
!14 = !{!"_ZTSN4juce16CharPointer_UTF8E", !6, i64 0}
!15 = !{!"_ZTSN4juce9RectangleIiEE", !16, i64 0, !17, i64 8, !17, i64 12}
!16 = !{!"_ZTSN4juce5PointIiEE", !17, i64 0, !17, i64 4}
!17 = !{!"int", !7, i64 0}
!18 = !{!"_ZTSN4juce13ScopedPointerINS_9Component10PositionerEEE", !6, i64 0}
!19 = !{!"_ZTSN4juce13ScopedPointerINS_15AffineTransformEEE", !6, i64 0}
!20 = !{!"_ZTSN4juce5ArrayIPNS_9ComponentENS_20DummyCriticalSectionELi0EEE", !21, i64 0, !17, i64 16}
!21 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_9ComponentENS_20DummyCriticalSectionEEE", !22, i64 0, !17, i64 8}
!22 = !{!"_ZTSN4juce9HeapBlockIPNS_9ComponentELb0EEE", !6, i64 0}
!23 = !{!"_ZTSN4juce11MouseCursorE", !6, i64 0}
!24 = !{!"_ZTSN4juce13ScopedPointerINS_20CachedComponentImageEEE", !6, i64 0}
!25 = !{!"_ZTSN4juce13ScopedPointerINS_9Component17MouseListenerListEEE", !6, i64 0}
!26 = !{!"_ZTSN4juce13ScopedPointerINS_5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EEEEE", !6, i64 0}
!27 = !{!"_ZTSN4juce12ListenerListINS_17ComponentListenerENS_5ArrayIPS1_NS_20DummyCriticalSectionELi0EEEEE", !28, i64 0}
!28 = !{!"_ZTSN4juce5ArrayIPNS_17ComponentListenerENS_20DummyCriticalSectionELi0EEE", !29, i64 0, !17, i64 16}
!29 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_17ComponentListenerENS_20DummyCriticalSectionEEE", !30, i64 0, !17, i64 8}
!30 = !{!"_ZTSN4juce9HeapBlockIPNS_17ComponentListenerELb0EEE", !6, i64 0}
!31 = !{!"_ZTSN4juce13NamedValueSetE", !32, i64 0}
!32 = !{!"_ZTSN4juce5ArrayINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionELi0EEE", !33, i64 0, !17, i64 16}
!33 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionEEE", !34, i64 0, !17, i64 8}
!34 = !{!"_ZTSN4juce9HeapBlockINS_13NamedValueSet10NamedValueELb0EEE", !6, i64 0}
!35 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE6MasterE", !36, i64 0}
!36 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE13SharedPointerEEE", !6, i64 0}
!37 = !{!"_ZTSN4juce12MenuBarModel8ListenerE"}
!38 = !{!"_ZTSN4juce5TimerE", !17, i64 8, !17, i64 12, !6, i64 16, !6, i64 24}
!39 = !{!"_ZTSN4juce11StringArrayE", !40, i64 0}
!40 = !{!"_ZTSN4juce5ArrayINS_6StringENS_20DummyCriticalSectionELi0EEE", !41, i64 0, !17, i64 16}
!41 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_6StringENS_20DummyCriticalSectionEEE", !42, i64 0, !17, i64 8}
!42 = !{!"_ZTSN4juce9HeapBlockINS_6StringELb0EEE", !6, i64 0}
!43 = !{!"_ZTSN4juce5ArrayIiNS_20DummyCriticalSectionELi0EEE", !44, i64 0, !17, i64 16}
!44 = !{!"_ZTSN4juce19ArrayAllocationBaseIiNS_20DummyCriticalSectionEEE", !45, i64 0, !17, i64 8}
!45 = !{!"_ZTSN4juce9HeapBlockIiLb0EEE", !6, i64 0}
!46 = !{!47, !17, i64 4}
!47 = !{!"_ZTSN4juce24ApplicationCommandTarget14InvocationInfoE", !17, i64 0, !17, i64 4, !48, i64 8, !6, i64 16, !49, i64 24, !52, i64 36, !17, i64 40}
!48 = !{!"_ZTSN4juce24ApplicationCommandTarget14InvocationInfo16InvocationMethodE", !7, i64 0}
!49 = !{!"_ZTSN4juce8KeyPressE", !17, i64 0, !50, i64 4, !51, i64 8}
!50 = !{!"_ZTSN4juce12ModifierKeysE", !17, i64 0}
!51 = !{!"wchar_t", !7, i64 0}
!52 = !{!"bool", !7, i64 0}
!53 = !{!17, !17, i64 0}
!54 = !{!55, !55, i64 0}
!55 = !{!"vtable pointer", !8, i64 0}
!56 = !{!47, !17, i64 0}
!57 = distinct !{!57, !58}
!58 = !{!"llvm.loop.mustprogress"}


; 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::PopupMenu" = type { %"class.juce::OwnedArray.239", %"class.juce::WeakReference.37" }
%"class.juce::OwnedArray.239" = type { %"class.juce::ArrayAllocationBase.240", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.240" = type <{ %"class.juce::HeapBlock.241", i32, [4 x i8] }>
%"class.juce::HeapBlock.241" = type { ptr }
%"class.juce::WeakReference.37" = type { %"class.juce::ReferenceCountedObjectPtr.38" }
%"class.juce::ReferenceCountedObjectPtr.38" = 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: nounwind
declare void @_ZN4juce5Timer10startTimerEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce11StringArrayixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce16MenuBarComponent17setItemUnderMouseEi(ptr noundef nonnull align 8 dereferenceable(316), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce16MenuBarComponent18menuCommandInvokedEPNS_12MenuBarModelERKNS_24ApplicationCommandTarget14InvocationInfoE(ptr noundef nonnull align 8 dereferenceable(316) %0, ptr nocapture noundef readnone %1, ptr nocapture noundef nonnull readonly align 8 dereferenceable(44) %2) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.juce::PopupMenu", align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 240
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = icmp eq ptr %6, null
  br i1 %7, label %.loopexit, label %8

8:                                                ; preds = %3
  %9 = getelementptr inbounds i8, ptr %2, i64 4
  %10 = load i32, ptr %9, align 4, !tbaa !45
  %11 = and i32 %10, 32
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %8
  %12 = getelementptr inbounds i8, ptr %0, i64 248
  %13 = tail call noundef i32 @_ZNK4juce11StringArray4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader, %27
  %.014 = phi i32 [ %28, %27 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #4
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce11StringArrayixEi(ptr noundef nonnull align 8 dereferenceable(24) %12, i32 noundef %.014) #4
  %17 = load ptr, ptr %15, align 8, !tbaa !52
  %18 = getelementptr inbounds i8, ptr %17, i64 32
  %19 = load ptr, ptr %18, align 8
  call void %19(ptr dead_on_unwind nonnull writable sret(%"class.juce::PopupMenu") align 8 %4, ptr noundef nonnull align 8 dereferenceable(56) %15, i32 noundef %.014, ptr noundef nonnull align 8 dereferenceable(8) %16)
  %20 = load i32, ptr %2, align 8, !tbaa !54
  %21 = invoke noundef zeroext i1 @_ZNK4juce9PopupMenu19containsCommandItemEi(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %20)
          to label %22 unwind label %.loopexit11

22:                                               ; preds = %.lr.ph
  br i1 %21, label %23, label %27

23:                                               ; preds = %22
  invoke void @_ZN4juce16MenuBarComponent17setItemUnderMouseEi(ptr noundef nonnull align 8 dereferenceable(316) %0, i32 noundef %.014)
          to label %24 unwind label %.loopexit.split-lp

24:                                               ; preds = %23
  %25 = getelementptr inbounds i8, ptr %0, i64 208
  call void @_ZN4juce5Timer10startTimerEi(ptr noundef nonnull align 8 dereferenceable(32) %25, i32 noundef 200) #4
  call void @_ZN4juce9PopupMenuD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  br label %.loopexit

.loopexit11:                                      ; preds = %.lr.ph
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %26

.loopexit.split-lp:                               ; preds = %23
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %26

26:                                               ; preds = %.loopexit.split-lp, %.loopexit11
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit11 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN4juce9PopupMenuD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  resume { ptr, i32 } %lpad.phi

27:                                               ; preds = %22
  call void @_ZN4juce9PopupMenuD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  %28 = add nuw nsw i32 %.014, 1
  %29 = call noundef i32 @_ZNK4juce11StringArray4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %.lr.ph, label %.loopexit, !llvm.loop !55

.loopexit:                                        ; preds = %27, %.preheader, %24, %3, %8
  ret void
}

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

declare void @_ZN4juce9PopupMenuD1Ev(ptr) local_unnamed_addr

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 240}
!6 = !{!"_ZTSN4juce16MenuBarComponentE", !7, i64 0, !36, i64 200, !37, i64 208, !11, i64 240, !38, i64 248, !42, i64 272, !15, i64 296, !16, i64 304, !16, i64 308, !16, i64 312}
!7 = !{!"_ZTSN4juce9ComponentE", !8, i64 0, !9, i64 8, !9, i64 16, !11, i64 24, !14, i64 32, !17, i64 48, !18, i64 56, !19, i64 64, !11, i64 88, !22, i64 96, !11, i64 104, !23, i64 112, !24, i64 120, !25, i64 128, !26, i64 136, !30, i64 160, !34, i64 184, !12, i64 192, !12, i64 196}
!8 = !{!"_ZTSN4juce13MouseListenerE"}
!9 = !{!"_ZTSN4juce6StringE", !10, i64 0}
!10 = !{!"_ZTSN4juce16CharPointer_UTF8E", !11, i64 0}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"_ZTSN4juce9RectangleIiEE", !15, i64 0, !16, i64 8, !16, i64 12}
!15 = !{!"_ZTSN4juce5PointIiEE", !16, i64 0, !16, i64 4}
!16 = !{!"int", !12, i64 0}
!17 = !{!"_ZTSN4juce13ScopedPointerINS_9Component10PositionerEEE", !11, i64 0}
!18 = !{!"_ZTSN4juce13ScopedPointerINS_15AffineTransformEEE", !11, i64 0}
!19 = !{!"_ZTSN4juce5ArrayIPNS_9ComponentENS_20DummyCriticalSectionELi0EEE", !20, i64 0, !16, i64 16}
!20 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_9ComponentENS_20DummyCriticalSectionEEE", !21, i64 0, !16, i64 8}
!21 = !{!"_ZTSN4juce9HeapBlockIPNS_9ComponentELb0EEE", !11, i64 0}
!22 = !{!"_ZTSN4juce11MouseCursorE", !11, i64 0}
!23 = !{!"_ZTSN4juce13ScopedPointerINS_20CachedComponentImageEEE", !11, i64 0}
!24 = !{!"_ZTSN4juce13ScopedPointerINS_9Component17MouseListenerListEEE", !11, i64 0}
!25 = !{!"_ZTSN4juce13ScopedPointerINS_5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EEEEE", !11, i64 0}
!26 = !{!"_ZTSN4juce12ListenerListINS_17ComponentListenerENS_5ArrayIPS1_NS_20DummyCriticalSectionELi0EEEEE", !27, i64 0}
!27 = !{!"_ZTSN4juce5ArrayIPNS_17ComponentListenerENS_20DummyCriticalSectionELi0EEE", !28, i64 0, !16, i64 16}
!28 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_17ComponentListenerENS_20DummyCriticalSectionEEE", !29, i64 0, !16, i64 8}
!29 = !{!"_ZTSN4juce9HeapBlockIPNS_17ComponentListenerELb0EEE", !11, i64 0}
!30 = !{!"_ZTSN4juce13NamedValueSetE", !31, i64 0}
!31 = !{!"_ZTSN4juce5ArrayINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionELi0EEE", !32, i64 0, !16, i64 16}
!32 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionEEE", !33, i64 0, !16, i64 8}
!33 = !{!"_ZTSN4juce9HeapBlockINS_13NamedValueSet10NamedValueELb0EEE", !11, i64 0}
!34 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE6MasterE", !35, i64 0}
!35 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE13SharedPointerEEE", !11, i64 0}
!36 = !{!"_ZTSN4juce12MenuBarModel8ListenerE"}
!37 = !{!"_ZTSN4juce5TimerE", !16, i64 8, !16, i64 12, !11, i64 16, !11, i64 24}
!38 = !{!"_ZTSN4juce11StringArrayE", !39, i64 0}
!39 = !{!"_ZTSN4juce5ArrayINS_6StringENS_20DummyCriticalSectionELi0EEE", !40, i64 0, !16, i64 16}
!40 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_6StringENS_20DummyCriticalSectionEEE", !41, i64 0, !16, i64 8}
!41 = !{!"_ZTSN4juce9HeapBlockINS_6StringELb0EEE", !11, i64 0}
!42 = !{!"_ZTSN4juce5ArrayIiNS_20DummyCriticalSectionELi0EEE", !43, i64 0, !16, i64 16}
!43 = !{!"_ZTSN4juce19ArrayAllocationBaseIiNS_20DummyCriticalSectionEEE", !44, i64 0, !16, i64 8}
!44 = !{!"_ZTSN4juce9HeapBlockIiLb0EEE", !11, i64 0}
!45 = !{!46, !16, i64 4}
!46 = !{!"_ZTSN4juce24ApplicationCommandTarget14InvocationInfoE", !16, i64 0, !16, i64 4, !47, i64 8, !11, i64 16, !48, i64 24, !51, i64 36, !16, i64 40}
!47 = !{!"_ZTSN4juce24ApplicationCommandTarget14InvocationInfo16InvocationMethodE", !12, i64 0}
!48 = !{!"_ZTSN4juce8KeyPressE", !16, i64 0, !49, i64 4, !50, i64 8}
!49 = !{!"_ZTSN4juce12ModifierKeysE", !16, i64 0}
!50 = !{!"wchar_t", !12, i64 0}
!51 = !{!"bool", !12, i64 0}
!52 = !{!53, !53, i64 0}
!53 = !{!"vtable pointer", !13, i64 0}
!54 = !{!46, !16, i64 0}
!55 = distinct !{!55, !56}
!56 = !{!"llvm.loop.mustprogress"}


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