; 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::Graphics::ScopedSaveState" = 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 }

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 nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce9Component8getWidthEv(ptr noundef nonnull align 8 dereferenceable(197)) #1 align 2

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

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

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

declare void @_ZN4juce8Graphics15ScopedSaveStateC1ERS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN4juce8Graphics15ScopedSaveStateD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

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

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

declare noundef zeroext i1 @_ZN4juce8Graphics16reduceClipRegionEiiii(ptr noundef nonnull align 8 dereferenceable(17), i32 noundef, i32 noundef, i32 noundef, i32 noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce16MenuBarComponent5paintERNS_8GraphicsE(ptr noundef nonnull align 8 dereferenceable(316) %0, ptr noundef nonnull align 8 dereferenceable(17) %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca i32, align 4
  %7 = alloca %"class.juce::Graphics::ScopedSaveState", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %10 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #6
  %11 = getelementptr inbounds %"class.juce::MenuBarComponent", ptr %10, i32 0, i32 9
  %12 = load i32, ptr %11, align 4, !tbaa !9
  %13 = icmp sge i32 %12, 0
  br i1 %13, label %20, label %14

14:                                               ; preds = %2
  %15 = getelementptr inbounds %"class.juce::MenuBarComponent", ptr %10, i32 0, i32 8
  %16 = load i32, ptr %15, align 8, !tbaa !46
  %17 = icmp sge i32 %16, 0
  br i1 %17, label %20, label %18

18:                                               ; preds = %14
  %19 = call noundef zeroext i1 @_ZNK4juce9Component11isMouseOverEb(ptr noundef nonnull align 8 dereferenceable(197) %10, i1 noundef zeroext false)
  br label %20

20:                                               ; preds = %18, %14, %2
  %21 = phi i1 [ true, %14 ], [ true, %2 ], [ %19, %18 ]
  %22 = zext i1 %21 to i8
  store i8 %22, ptr %5, align 1, !tbaa !47
  %23 = call noundef nonnull align 8 dereferenceable(281) ptr @_ZNK4juce9Component14getLookAndFeelEv(ptr noundef nonnull align 8 dereferenceable(197) %10) #6
  %24 = getelementptr inbounds i8, ptr %23, i64 64
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = call noundef i32 @_ZNK4juce9Component8getWidthEv(ptr noundef nonnull align 8 dereferenceable(197) %10) #6
  %27 = call noundef i32 @_ZNK4juce9Component9getHeightEv(ptr noundef nonnull align 8 dereferenceable(197) %10) #6
  %28 = load i8, ptr %5, align 1, !tbaa !47, !range !49, !noundef !50
  %29 = trunc i8 %28 to i1
  %30 = load ptr, ptr %24, align 8, !tbaa !51
  %31 = getelementptr inbounds ptr, ptr %30, i64 9
  %32 = load ptr, ptr %31, align 8
  call void %32(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(17) %25, i32 noundef %26, i32 noundef %27, i1 noundef zeroext %29, ptr noundef nonnull align 8 dereferenceable(316) %10)
  %33 = getelementptr inbounds %"class.juce::MenuBarComponent", ptr %10, i32 0, i32 4
  %34 = load ptr, ptr %33, align 8, !tbaa !53
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %105

36:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !54
  br label %37

37:                                               ; preds = %97, %36
  %38 = load i32, ptr %6, align 4, !tbaa !54
  %39 = getelementptr inbounds %"class.juce::MenuBarComponent", ptr %10, i32 0, i32 5
  %40 = call noundef i32 @_ZNK4juce11StringArray4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %39) #6
  %41 = icmp slt i32 %38, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %104

43:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN4juce8Graphics15ScopedSaveStateC1ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(17) %44)
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds %"class.juce::MenuBarComponent", ptr %10, i32 0, i32 6
  %47 = load i32, ptr %6, align 4, !tbaa !54
  %48 = invoke noundef i32 @_ZNK4juce5ArrayIiNS_20DummyCriticalSectionELi0EEixEi(ptr noundef nonnull align 8 dereferenceable(20) %46, i32 noundef %47)
          to label %49 unwind label %100

49:                                               ; preds = %43
  invoke void @_ZN4juce8Graphics9setOriginEii(ptr noundef nonnull align 8 dereferenceable(17) %45, i32 noundef %48, i32 noundef 0)
          to label %50 unwind label %100

50:                                               ; preds = %49
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = getelementptr inbounds %"class.juce::MenuBarComponent", ptr %10, i32 0, i32 6
  %53 = load i32, ptr %6, align 4, !tbaa !54
  %54 = add nsw i32 %53, 1
  %55 = invoke noundef i32 @_ZNK4juce5ArrayIiNS_20DummyCriticalSectionELi0EEixEi(ptr noundef nonnull align 8 dereferenceable(20) %52, i32 noundef %54)
          to label %56 unwind label %100

56:                                               ; preds = %50
  %57 = getelementptr inbounds %"class.juce::MenuBarComponent", ptr %10, i32 0, i32 6
  %58 = load i32, ptr %6, align 4, !tbaa !54
  %59 = invoke noundef i32 @_ZNK4juce5ArrayIiNS_20DummyCriticalSectionELi0EEixEi(ptr noundef nonnull align 8 dereferenceable(20) %57, i32 noundef %58)
          to label %60 unwind label %100

60:                                               ; preds = %56
  %61 = sub nsw i32 %55, %59
  %62 = call noundef i32 @_ZNK4juce9Component9getHeightEv(ptr noundef nonnull align 8 dereferenceable(197) %10) #6
  %63 = invoke noundef zeroext i1 @_ZN4juce8Graphics16reduceClipRegionEiiii(ptr noundef nonnull align 8 dereferenceable(17) %51, i32 noundef 0, i32 noundef 0, i32 noundef %61, i32 noundef %62)
          to label %64 unwind label %100

64:                                               ; preds = %60
  %65 = call noundef nonnull align 8 dereferenceable(281) ptr @_ZNK4juce9Component14getLookAndFeelEv(ptr noundef nonnull align 8 dereferenceable(197) %10) #6
  %66 = getelementptr inbounds i8, ptr %65, i64 64
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds %"class.juce::MenuBarComponent", ptr %10, i32 0, i32 6
  %69 = load i32, ptr %6, align 4, !tbaa !54
  %70 = add nsw i32 %69, 1
  %71 = invoke noundef i32 @_ZNK4juce5ArrayIiNS_20DummyCriticalSectionELi0EEixEi(ptr noundef nonnull align 8 dereferenceable(20) %68, i32 noundef %70)
          to label %72 unwind label %100

72:                                               ; preds = %64
  %73 = getelementptr inbounds %"class.juce::MenuBarComponent", ptr %10, i32 0, i32 6
  %74 = load i32, ptr %6, align 4, !tbaa !54
  %75 = invoke noundef i32 @_ZNK4juce5ArrayIiNS_20DummyCriticalSectionELi0EEixEi(ptr noundef nonnull align 8 dereferenceable(20) %73, i32 noundef %74)
          to label %76 unwind label %100

76:                                               ; preds = %72
  %77 = sub nsw i32 %71, %75
  %78 = call noundef i32 @_ZNK4juce9Component9getHeightEv(ptr noundef nonnull align 8 dereferenceable(197) %10) #6
  %79 = load i32, ptr %6, align 4, !tbaa !54
  %80 = getelementptr inbounds %"class.juce::MenuBarComponent", ptr %10, i32 0, i32 5
  %81 = load i32, ptr %6, align 4, !tbaa !54
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce11StringArrayixEi(ptr noundef nonnull align 8 dereferenceable(24) %80, i32 noundef %81) #6
  %83 = load i32, ptr %6, align 4, !tbaa !54
  %84 = getelementptr inbounds %"class.juce::MenuBarComponent", ptr %10, i32 0, i32 8
  %85 = load i32, ptr %84, align 8, !tbaa !46
  %86 = icmp eq i32 %83, %85
  %87 = load i32, ptr %6, align 4, !tbaa !54
  %88 = getelementptr inbounds %"class.juce::MenuBarComponent", ptr %10, i32 0, i32 9
  %89 = load i32, ptr %88, align 4, !tbaa !9
  %90 = icmp eq i32 %87, %89
  %91 = load i8, ptr %5, align 1, !tbaa !47, !range !49, !noundef !50
  %92 = trunc i8 %91 to i1
  %93 = load ptr, ptr %66, align 8, !tbaa !51
  %94 = getelementptr inbounds ptr, ptr %93, i64 13
  %95 = load ptr, ptr %94, align 8
  invoke void %95(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef nonnull align 8 dereferenceable(17) %67, i32 noundef %77, i32 noundef %78, i32 noundef %79, ptr noundef nonnull align 8 dereferenceable(8) %82, i1 noundef zeroext %86, i1 noundef zeroext %90, i1 noundef zeroext %92, ptr noundef nonnull align 8 dereferenceable(316) %10)
          to label %96 unwind label %100

96:                                               ; preds = %76
  call void @_ZN4juce8Graphics15ScopedSaveStateD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %6, align 4, !tbaa !54
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %6, align 4, !tbaa !54
  br label %37, !llvm.loop !55

100:                                              ; preds = %76, %72, %64, %60, %56, %50, %49, %43
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %8, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %9, align 4
  call void @_ZN4juce8Graphics15ScopedSaveStateD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  br label %106

104:                                              ; preds = %42
  br label %105

105:                                              ; preds = %104, %20
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  ret void

106:                                              ; preds = %100
  %107 = load ptr, ptr %8, align 8
  %108 = load i32, ptr %9, align 4
  %109 = insertvalue { ptr, i32 } poison, ptr %107, 0
  %110 = insertvalue { ptr, i32 } %109, i32 %108, 1
  resume { ptr, i32 } %110
}

declare void @_ZN4juce8Graphics9setOriginEii(ptr noundef nonnull align 8 dereferenceable(17), i32 noundef, i32 noundef) #3

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

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 = { 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 "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 = { 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 #6 = { 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, !17, i64 308}
!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 = !{!10, !17, i64 304}
!47 = !{!48, !48, i64 0}
!48 = !{!"bool", !7, i64 0}
!49 = !{i8 0, i8 2}
!50 = !{}
!51 = !{!52, !52, i64 0}
!52 = !{!"vtable pointer", !8, i64 0}
!53 = !{!10, !6, i64 240}
!54 = !{!17, !17, i64 0}
!55 = distinct !{!55, !56}
!56 = !{!"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::Graphics::ScopedSaveState" = 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 nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce9Component8getWidthEv(ptr noundef nonnull align 8 dereferenceable(197)) local_unnamed_addr #1 align 2

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

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

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

declare void @_ZN4juce8Graphics15ScopedSaveStateC1ERS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN4juce8Graphics15ScopedSaveStateD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce11StringArray4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5 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 #4

declare noundef zeroext i1 @_ZN4juce8Graphics16reduceClipRegionEiiii(ptr noundef nonnull align 8 dereferenceable(17), i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce16MenuBarComponent5paintERNS_8GraphicsE(ptr noundef nonnull align 8 dereferenceable(316) %0, ptr noundef nonnull align 8 dereferenceable(17) %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.juce::Graphics::ScopedSaveState", align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 308
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, -1
  %7 = getelementptr inbounds i8, ptr %0, i64 304
  %8 = load i32, ptr %7, align 8
  %9 = icmp sgt i32 %8, -1
  %or.cond = select i1 %6, i1 true, i1 %9
  br i1 %or.cond, label %12, label %10

10:                                               ; preds = %2
  %11 = tail call noundef zeroext i1 @_ZNK4juce9Component11isMouseOverEb(ptr noundef nonnull align 8 dereferenceable(197) %0, i1 noundef zeroext false)
  br label %12

12:                                               ; preds = %10, %2
  %13 = phi i1 [ true, %2 ], [ %11, %10 ]
  %14 = tail call noundef nonnull align 8 dereferenceable(281) ptr @_ZNK4juce9Component14getLookAndFeelEv(ptr noundef nonnull align 8 dereferenceable(197) %0) #6
  %15 = getelementptr inbounds i8, ptr %14, i64 64
  %16 = tail call noundef i32 @_ZNK4juce9Component8getWidthEv(ptr noundef nonnull align 8 dereferenceable(197) %0) #6
  %17 = tail call noundef i32 @_ZNK4juce9Component9getHeightEv(ptr noundef nonnull align 8 dereferenceable(197) %0) #6
  %18 = load ptr, ptr %15, align 8, !tbaa !45
  %19 = getelementptr inbounds i8, ptr %18, i64 72
  %20 = load ptr, ptr %19, align 8
  tail call void %20(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(17) %1, i32 noundef %16, i32 noundef %17, i1 noundef zeroext %13, ptr noundef nonnull align 8 dereferenceable(316) %0)
  %21 = getelementptr inbounds i8, ptr %0, i64 240
  %22 = load ptr, ptr %21, align 8, !tbaa !47
  %.not = icmp eq ptr %22, null
  br i1 %.not, label %.loopexit, label %.preheader

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

.lr.ph:                                           ; preds = %.preheader
  %26 = getelementptr inbounds i8, ptr %0, i64 272
  br label %27

27:                                               ; preds = %.lr.ph, %51
  %.022 = phi i32 [ 0, %.lr.ph ], [ %30, %51 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  call void @_ZN4juce8Graphics15ScopedSaveStateC1ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(17) %1)
  %28 = call noundef i32 @_ZNK4juce5ArrayIiNS_20DummyCriticalSectionELi0EEixEi(ptr noundef nonnull align 8 dereferenceable(20) %26, i32 noundef %.022)
  invoke void @_ZN4juce8Graphics9setOriginEii(ptr noundef nonnull align 8 dereferenceable(17) %1, i32 noundef %28, i32 noundef 0)
          to label %29 unwind label %54

29:                                               ; preds = %27
  %30 = add nuw nsw i32 %.022, 1
  %31 = call noundef i32 @_ZNK4juce5ArrayIiNS_20DummyCriticalSectionELi0EEixEi(ptr noundef nonnull align 8 dereferenceable(20) %26, i32 noundef %30)
  %32 = call noundef i32 @_ZNK4juce5ArrayIiNS_20DummyCriticalSectionELi0EEixEi(ptr noundef nonnull align 8 dereferenceable(20) %26, i32 noundef %.022)
  %33 = sub nsw i32 %31, %32
  %34 = call noundef i32 @_ZNK4juce9Component9getHeightEv(ptr noundef nonnull align 8 dereferenceable(197) %0) #6
  %35 = invoke noundef zeroext i1 @_ZN4juce8Graphics16reduceClipRegionEiiii(ptr noundef nonnull align 8 dereferenceable(17) %1, i32 noundef 0, i32 noundef 0, i32 noundef %33, i32 noundef %34)
          to label %36 unwind label %54

36:                                               ; preds = %29
  %37 = call noundef nonnull align 8 dereferenceable(281) ptr @_ZNK4juce9Component14getLookAndFeelEv(ptr noundef nonnull align 8 dereferenceable(197) %0) #6
  %38 = getelementptr inbounds i8, ptr %37, i64 64
  %39 = call noundef i32 @_ZNK4juce5ArrayIiNS_20DummyCriticalSectionELi0EEixEi(ptr noundef nonnull align 8 dereferenceable(20) %26, i32 noundef %30)
  %40 = call noundef i32 @_ZNK4juce5ArrayIiNS_20DummyCriticalSectionELi0EEixEi(ptr noundef nonnull align 8 dereferenceable(20) %26, i32 noundef %.022)
  %41 = sub nsw i32 %39, %40
  %42 = call noundef i32 @_ZNK4juce9Component9getHeightEv(ptr noundef nonnull align 8 dereferenceable(197) %0) #6
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce11StringArrayixEi(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %.022) #6
  %44 = load i32, ptr %7, align 8, !tbaa !48
  %45 = icmp eq i32 %.022, %44
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = icmp eq i32 %.022, %46
  %48 = load ptr, ptr %38, align 8, !tbaa !45
  %49 = getelementptr inbounds i8, ptr %48, i64 104
  %50 = load ptr, ptr %49, align 8
  invoke void %50(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull align 8 dereferenceable(17) %1, i32 noundef %41, i32 noundef %42, i32 noundef %.022, ptr noundef nonnull align 8 dereferenceable(8) %43, i1 noundef zeroext %45, i1 noundef zeroext %47, i1 noundef zeroext %13, ptr noundef nonnull align 8 dereferenceable(316) %0)
          to label %51 unwind label %54

51:                                               ; preds = %36
  call void @_ZN4juce8Graphics15ScopedSaveStateD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  %52 = call noundef i32 @_ZNK4juce11StringArray4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  %53 = icmp slt i32 %30, %52
  br i1 %53, label %27, label %.loopexit, !llvm.loop !49

54:                                               ; preds = %36, %29, %27
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce8Graphics15ScopedSaveStateD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  resume { ptr, i32 } %55

.loopexit:                                        ; preds = %51, %.preheader, %12
  ret void
}

declare void @_ZN4juce8Graphics9setOriginEii(ptr noundef nonnull align 8 dereferenceable(17), i32 noundef, i32 noundef) local_unnamed_addr #3

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

attributes #0 = { mustprogress 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 = { 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 "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 = { 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 #6 = { 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, !16, i64 308}
!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, !46, i64 0}
!46 = !{!"vtable pointer", !13, i64 0}
!47 = !{!6, !11, i64 240}
!48 = !{!6, !16, i64 304}
!49 = distinct !{!49, !50}
!50 = !{!"llvm.loop.mustprogress"}


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