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

; 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::Image" = type { %"class.juce::ReferenceCountedObjectPtr.48" }
%"class.juce::ReferenceCountedObjectPtr.48" = type { ptr }
%"class.juce::Colour" = type { %"class.juce::PixelARGB" }
%"class.juce::PixelARGB" = type { %union.anon.77 }
%union.anon.77 = type { i32 }
%"class.juce::ImageButton" = type { %"class.juce::Button.base", i8, i8, i8, %"class.juce::Rectangle", %"class.juce::Image", %"class.juce::Image", %"class.juce::Image", float, float, float, %"class.juce::Colour", %"class.juce::Colour", %"class.juce::Colour" }
%"class.juce::Button.base" = type <{ %"class.juce::Component.base", [3 x i8], %"class.juce::SettableTooltipClient", %"class.juce::Array.104", %"class.juce::WeakReference", %"class.juce::String", %"class.juce::ListenerList.109", %"class.juce::ScopedPointer.115", i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, %"class.juce::Value", i8, i8, i8, i8, i8, i8, 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::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::SettableTooltipClient" = type { %"class.juce::TooltipClient", %"class.juce::String" }
%"class.juce::TooltipClient" = type { ptr }
%"class.juce::Array.104" = type { %"class.juce::ArrayAllocationBase.105", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.105" = type <{ %"class.juce::HeapBlock.106", i32, [4 x i8] }>
%"class.juce::HeapBlock.106" = type { ptr }
%"class.juce::WeakReference" = type { %"class.juce::ReferenceCountedObjectPtr" }
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::ListenerList.109" = type { %"class.juce::Array.110" }
%"class.juce::Array.110" = type { %"class.juce::ArrayAllocationBase.111", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.111" = type <{ %"class.juce::HeapBlock.112", i32, [4 x i8] }>
%"class.juce::HeapBlock.112" = type { ptr }
%"class.juce::ScopedPointer.115" = type { ptr }
%"class.juce::Value" = type { %"class.juce::ReferenceCountedObjectPtr.116", %"class.juce::ListenerList.117" }
%"class.juce::ReferenceCountedObjectPtr.116" = type { ptr }
%"class.juce::ListenerList.117" = type { %"class.juce::Array.118" }
%"class.juce::Array.118" = type { %"class.juce::ArrayAllocationBase.119", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.119" = type <{ %"class.juce::HeapBlock.120", i32, [4 x i8] }>
%"class.juce::HeapBlock.120" = type { ptr }
%"class.juce::Rectangle" = type { %"class.juce::Point", i32, i32 }
%"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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce9RectangleIiE8getWidthEv(ptr noundef nonnull align 4 dereferenceable(16)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce9RectangleIiE9getHeightEv(ptr noundef nonnull align 4 dereferenceable(16)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce9RectangleIiE4getXEv(ptr noundef nonnull align 4 dereferenceable(16)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce9RectangleIiE4getYEv(ptr noundef nonnull align 4 dereferenceable(16)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4juce9RectangleIiE7isEmptyEv(ptr noundef nonnull align 4 dereferenceable(16)) #3 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4juce11ImageButton15getCurrentImageEv(ptr dead_on_unwind noalias writable sret(%"class.juce::Image") align 8, ptr noundef nonnull align 8 dereferenceable(448)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4juce11ImageButton7hitTestEii(ptr noundef nonnull align 8 dereferenceable(448) %0, i32 noundef %1, i32 noundef %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.juce::Image", align 8
  %9 = alloca %"class.juce::Colour", align 1
  %10 = alloca i1, align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i1, align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  %14 = load ptr, ptr %5, align 8
  %15 = load i32, ptr %6, align 4, !tbaa !9
  %16 = load i32, ptr %7, align 4, !tbaa !9
  %17 = call noundef zeroext i1 @_ZN4juce9Component7hitTestEii(ptr noundef nonnull align 8 dereferenceable(197) %14, i32 noundef %15, i32 noundef %16)
  br i1 %17, label %19, label %18

18:                                               ; preds = %3
  store i1 false, ptr %4, align 1
  br label %73

19:                                               ; preds = %3
  %20 = getelementptr inbounds %"class.juce::ImageButton", ptr %14, i32 0, i32 3
  %21 = load i8, ptr %20, align 1, !tbaa !11
  %22 = zext i8 %21 to i32
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %24, label %25

24:                                               ; preds = %19
  store i1 true, ptr %4, align 1
  br label %73

25:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @_ZNK4juce11ImageButton15getCurrentImageEv(ptr dead_on_unwind writable sret(%"class.juce::Image") align 8 %8, ptr noundef nonnull align 8 dereferenceable(448) %14)
  %26 = call noundef zeroext i1 @_ZNK4juce5Image6isNullEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  store i1 false, ptr %10, align 1
  store i1 false, ptr %13, align 1
  br i1 %26, label %58, label %27

27:                                               ; preds = %25
  %28 = getelementptr inbounds %"class.juce::ImageButton", ptr %14, i32 0, i32 4
  %29 = call noundef zeroext i1 @_ZNK4juce9RectangleIiE7isEmptyEv(ptr noundef nonnull align 4 dereferenceable(16) %28) #6
  br i1 %29, label %56, label %30

30:                                               ; preds = %27
  %31 = getelementptr inbounds %"class.juce::ImageButton", ptr %14, i32 0, i32 3
  %32 = load i8, ptr %31, align 1, !tbaa !11
  %33 = zext i8 %32 to i32
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i1 true, ptr %10, align 1
  %34 = load i32, ptr %6, align 4, !tbaa !9
  %35 = getelementptr inbounds %"class.juce::ImageButton", ptr %14, i32 0, i32 4
  %36 = call noundef i32 @_ZNK4juce9RectangleIiE4getXEv(ptr noundef nonnull align 4 dereferenceable(16) %35) #6
  %37 = sub nsw i32 %34, %36
  %38 = call noundef i32 @_ZNK4juce5Image8getWidthEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %39 = mul nsw i32 %37, %38
  %40 = getelementptr inbounds %"class.juce::ImageButton", ptr %14, i32 0, i32 4
  %41 = call noundef i32 @_ZNK4juce9RectangleIiE8getWidthEv(ptr noundef nonnull align 4 dereferenceable(16) %40) #6
  %42 = sdiv i32 %39, %41
  %43 = load i32, ptr %7, align 4, !tbaa !9
  %44 = getelementptr inbounds %"class.juce::ImageButton", ptr %14, i32 0, i32 4
  %45 = call noundef i32 @_ZNK4juce9RectangleIiE4getYEv(ptr noundef nonnull align 4 dereferenceable(16) %44) #6
  %46 = sub nsw i32 %43, %45
  %47 = call noundef i32 @_ZNK4juce5Image9getHeightEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %48 = mul nsw i32 %46, %47
  %49 = getelementptr inbounds %"class.juce::ImageButton", ptr %14, i32 0, i32 4
  %50 = call noundef i32 @_ZNK4juce9RectangleIiE9getHeightEv(ptr noundef nonnull align 4 dereferenceable(16) %49) #6
  %51 = sdiv i32 %48, %50
  invoke void @_ZNK4juce5Image10getPixelAtEii(ptr dead_on_unwind writable sret(%"class.juce::Colour") align 1 %9, ptr noundef nonnull align 8 dereferenceable(8) %8, i32 noundef %42, i32 noundef %51)
          to label %52 unwind label %66

52:                                               ; preds = %30
  store i1 true, ptr %13, align 1
  %53 = call noundef zeroext i8 @_ZNK4juce6Colour8getAlphaEv(ptr noundef nonnull align 1 dereferenceable(4) %9) #6
  %54 = zext i8 %53 to i32
  %55 = icmp slt i32 %33, %54
  br label %56

56:                                               ; preds = %52, %27
  %57 = phi i1 [ false, %27 ], [ %55, %52 ]
  br label %58

58:                                               ; preds = %56, %25
  %59 = phi i1 [ true, %25 ], [ %57, %56 ]
  store i1 %59, ptr %4, align 1
  %60 = load i1, ptr %13, align 1
  br i1 %60, label %61, label %62

61:                                               ; preds = %58
  call void @_ZN4juce6ColourD1Ev(ptr noundef nonnull align 1 dereferenceable(4) %9) #6
  br label %62

62:                                               ; preds = %61, %58
  %63 = load i1, ptr %10, align 1
  br i1 %63, label %64, label %65

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

65:                                               ; preds = %64, %62
  call void @_ZN4juce5ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %73

66:                                               ; preds = %30
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %11, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %12, align 4
  %70 = load i1, ptr %10, align 1
  br i1 %70, label %71, label %72

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

72:                                               ; preds = %71, %66
  call void @_ZN4juce5ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %75

73:                                               ; preds = %65, %24, %18
  %74 = load i1, ptr %4, align 1
  ret i1 %74

75:                                               ; preds = %72
  %76 = load ptr, ptr %11, align 8
  %77 = load i32, ptr %12, align 4
  %78 = insertvalue { ptr, i32 } poison, ptr %76, 0
  %79 = insertvalue { ptr, i32 } %78, i32 %77, 1
  resume { ptr, i32 } %79
}

declare void @_ZNK4juce5Image10getPixelAtEii(ptr dead_on_unwind writable sret(%"class.juce::Colour") align 1, ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, i32 noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNK4juce6Colour8getAlphaEv(ptr noundef nonnull align 1 dereferenceable(4)) #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 "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 = { "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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !7, i64 377}
!12 = !{!"_ZTSN4juce11ImageButtonE", !13, i64 0, !57, i64 375, !57, i64 376, !7, i64 377, !18, i64 380, !58, i64 400, !58, i64 408, !58, i64 416, !60, i64 424, !60, i64 428, !60, i64 432, !61, i64 436, !61, i64 440, !61, i64 444}
!13 = !{!"_ZTSN4juce6ButtonE", !14, i64 0, !39, i64 200, !41, i64 216, !44, i64 240, !16, i64 248, !45, i64 256, !49, i64 280, !10, i64 288, !10, i64 292, !6, i64 296, !10, i64 304, !10, i64 308, !10, i64 312, !10, i64 316, !10, i64 320, !10, i64 324, !50, i64 328, !50, i64 332, !51, i64 336, !57, i64 368, !57, i64 369, !57, i64 370, !57, i64 371, !57, i64 372, !57, i64 373, !57, i64 374}
!14 = !{!"_ZTSN4juce9ComponentE", !15, i64 0, !16, i64 8, !16, i64 16, !6, i64 24, !18, i64 32, !20, i64 48, !21, i64 56, !22, i64 64, !6, i64 88, !25, i64 96, !6, i64 104, !26, i64 112, !27, i64 120, !28, i64 128, !29, i64 136, !33, i64 160, !37, i64 184, !7, i64 192, !7, i64 196}
!15 = !{!"_ZTSN4juce13MouseListenerE"}
!16 = !{!"_ZTSN4juce6StringE", !17, i64 0}
!17 = !{!"_ZTSN4juce16CharPointer_UTF8E", !6, i64 0}
!18 = !{!"_ZTSN4juce9RectangleIiEE", !19, i64 0, !10, i64 8, !10, i64 12}
!19 = !{!"_ZTSN4juce5PointIiEE", !10, i64 0, !10, i64 4}
!20 = !{!"_ZTSN4juce13ScopedPointerINS_9Component10PositionerEEE", !6, i64 0}
!21 = !{!"_ZTSN4juce13ScopedPointerINS_15AffineTransformEEE", !6, i64 0}
!22 = !{!"_ZTSN4juce5ArrayIPNS_9ComponentENS_20DummyCriticalSectionELi0EEE", !23, i64 0, !10, i64 16}
!23 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_9ComponentENS_20DummyCriticalSectionEEE", !24, i64 0, !10, i64 8}
!24 = !{!"_ZTSN4juce9HeapBlockIPNS_9ComponentELb0EEE", !6, i64 0}
!25 = !{!"_ZTSN4juce11MouseCursorE", !6, i64 0}
!26 = !{!"_ZTSN4juce13ScopedPointerINS_20CachedComponentImageEEE", !6, i64 0}
!27 = !{!"_ZTSN4juce13ScopedPointerINS_9Component17MouseListenerListEEE", !6, i64 0}
!28 = !{!"_ZTSN4juce13ScopedPointerINS_5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EEEEE", !6, i64 0}
!29 = !{!"_ZTSN4juce12ListenerListINS_17ComponentListenerENS_5ArrayIPS1_NS_20DummyCriticalSectionELi0EEEEE", !30, i64 0}
!30 = !{!"_ZTSN4juce5ArrayIPNS_17ComponentListenerENS_20DummyCriticalSectionELi0EEE", !31, i64 0, !10, i64 16}
!31 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_17ComponentListenerENS_20DummyCriticalSectionEEE", !32, i64 0, !10, i64 8}
!32 = !{!"_ZTSN4juce9HeapBlockIPNS_17ComponentListenerELb0EEE", !6, i64 0}
!33 = !{!"_ZTSN4juce13NamedValueSetE", !34, i64 0}
!34 = !{!"_ZTSN4juce5ArrayINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionELi0EEE", !35, i64 0, !10, i64 16}
!35 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionEEE", !36, i64 0, !10, i64 8}
!36 = !{!"_ZTSN4juce9HeapBlockINS_13NamedValueSet10NamedValueELb0EEE", !6, i64 0}
!37 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE6MasterE", !38, i64 0}
!38 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE13SharedPointerEEE", !6, i64 0}
!39 = !{!"_ZTSN4juce21SettableTooltipClientE", !40, i64 0, !16, i64 8}
!40 = !{!"_ZTSN4juce13TooltipClientE"}
!41 = !{!"_ZTSN4juce5ArrayINS_8KeyPressENS_20DummyCriticalSectionELi0EEE", !42, i64 0, !10, i64 16}
!42 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_8KeyPressENS_20DummyCriticalSectionEEE", !43, i64 0, !10, i64 8}
!43 = !{!"_ZTSN4juce9HeapBlockINS_8KeyPressELb0EEE", !6, i64 0}
!44 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEE", !38, i64 0}
!45 = !{!"_ZTSN4juce12ListenerListINS_6Button8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEEE", !46, i64 0}
!46 = !{!"_ZTSN4juce5ArrayIPNS_6Button8ListenerENS_20DummyCriticalSectionELi0EEE", !47, i64 0, !10, i64 16}
!47 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_6Button8ListenerENS_20DummyCriticalSectionEEE", !48, i64 0, !10, i64 8}
!48 = !{!"_ZTSN4juce9HeapBlockIPNS_6Button8ListenerELb0EEE", !6, i64 0}
!49 = !{!"_ZTSN4juce13ScopedPointerINS_6Button14CallbackHelperEEE", !6, i64 0}
!50 = !{!"_ZTSN4juce6Button11ButtonStateE", !7, i64 0}
!51 = !{!"_ZTSN4juce5ValueE", !52, i64 0, !53, i64 8}
!52 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_5Value11ValueSourceEEE", !6, i64 0}
!53 = !{!"_ZTSN4juce12ListenerListINS_5Value8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEEE", !54, i64 0}
!54 = !{!"_ZTSN4juce5ArrayIPNS_5Value8ListenerENS_20DummyCriticalSectionELi0EEE", !55, i64 0, !10, i64 16}
!55 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_5Value8ListenerENS_20DummyCriticalSectionEEE", !56, i64 0, !10, i64 8}
!56 = !{!"_ZTSN4juce9HeapBlockIPNS_5Value8ListenerELb0EEE", !6, i64 0}
!57 = !{!"bool", !7, i64 0}
!58 = !{!"_ZTSN4juce5ImageE", !59, i64 0}
!59 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_14ImagePixelDataEEE", !6, i64 0}
!60 = !{!"float", !7, i64 0}
!61 = !{!"_ZTSN4juce6ColourE", !62, i64 0}
!62 = !{!"_ZTSN4juce9PixelARGBE", !7, i64 0}


; 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::Image" = type { %"class.juce::ReferenceCountedObjectPtr.48" }
%"class.juce::ReferenceCountedObjectPtr.48" = type { ptr }
%"class.juce::Colour" = type { %"class.juce::PixelARGB" }
%"class.juce::PixelARGB" = type { %union.anon.77 }
%union.anon.77 = type { i32 }

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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce9RectangleIiE8getWidthEv(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce9RectangleIiE9getHeightEv(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce9RectangleIiE4getXEv(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce9RectangleIiE4getYEv(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4juce9RectangleIiE7isEmptyEv(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: nounwind
declare noundef i32 @_ZNK4juce5Image9getHeightEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: nounwind
declare noundef i32 @_ZNK4juce5Image8getWidthEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4juce11ImageButton15getCurrentImageEv(ptr dead_on_unwind noalias writable sret(%"class.juce::Image") align 8, ptr noundef nonnull align 8 dereferenceable(448)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4juce11ImageButton7hitTestEii(ptr noundef nonnull align 8 dereferenceable(448) %0, i32 noundef %1, i32 noundef %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.juce::Image", align 8
  %5 = alloca %"class.juce::Colour", align 1
  %6 = tail call noundef zeroext i1 @_ZN4juce9Component7hitTestEii(ptr noundef nonnull align 8 dereferenceable(197) %0, i32 noundef %1, i32 noundef %2)
  br i1 %6, label %7, label %36

7:                                                ; preds = %3
  %8 = getelementptr inbounds i8, ptr %0, i64 377
  %9 = load i8, ptr %8, align 1, !tbaa !5
  %10 = icmp eq i8 %9, 0
  br i1 %10, label %36, label %11

11:                                               ; preds = %7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @_ZNK4juce11ImageButton15getCurrentImageEv(ptr dead_on_unwind nonnull writable sret(%"class.juce::Image") align 8 %4, ptr noundef nonnull align 8 dereferenceable(448) %0)
  %12 = call noundef zeroext i1 @_ZNK4juce5Image6isNullEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %12, label %.critedge, label %13

13:                                               ; preds = %11
  %14 = getelementptr inbounds i8, ptr %0, i64 380
  %15 = call noundef zeroext i1 @_ZNK4juce9RectangleIiE7isEmptyEv(ptr noundef nonnull align 4 dereferenceable(16) %14) #6
  br i1 %15, label %.critedge, label %16

16:                                               ; preds = %13
  %17 = load i8, ptr %8, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  %18 = call noundef i32 @_ZNK4juce9RectangleIiE4getXEv(ptr noundef nonnull align 4 dereferenceable(16) %14) #6
  %19 = sub nsw i32 %1, %18
  %20 = call noundef i32 @_ZNK4juce5Image8getWidthEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %21 = mul nsw i32 %19, %20
  %22 = call noundef i32 @_ZNK4juce9RectangleIiE8getWidthEv(ptr noundef nonnull align 4 dereferenceable(16) %14) #6
  %23 = sdiv i32 %21, %22
  %24 = call noundef i32 @_ZNK4juce9RectangleIiE4getYEv(ptr noundef nonnull align 4 dereferenceable(16) %14) #6
  %25 = sub nsw i32 %2, %24
  %26 = call noundef i32 @_ZNK4juce5Image9getHeightEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %27 = mul nsw i32 %25, %26
  %28 = call noundef i32 @_ZNK4juce9RectangleIiE9getHeightEv(ptr noundef nonnull align 4 dereferenceable(16) %14) #6
  %29 = sdiv i32 %27, %28
  invoke void @_ZNK4juce5Image10getPixelAtEii(ptr dead_on_unwind nonnull writable sret(%"class.juce::Colour") align 1 %5, ptr noundef nonnull align 8 dereferenceable(8) %4, i32 noundef %23, i32 noundef %29)
          to label %30 unwind label %34

30:                                               ; preds = %16
  %31 = call noundef zeroext i8 @_ZNK4juce6Colour8getAlphaEv(ptr noundef nonnull align 1 dereferenceable(4) %5) #6
  %32 = icmp ult i8 %17, %31
  call void @_ZN4juce6ColourD1Ev(ptr noundef nonnull align 1 dereferenceable(4) %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  br label %.critedge

.critedge:                                        ; preds = %13, %11, %30
  %33 = phi i1 [ %32, %30 ], [ false, %13 ], [ true, %11 ]
  call void @_ZN4juce5ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %36

34:                                               ; preds = %16
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @_ZN4juce5ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  resume { ptr, i32 } %35

36:                                               ; preds = %7, %3, %.critedge
  %.010 = phi i1 [ %33, %.critedge ], [ false, %3 ], [ true, %7 ]
  ret i1 %.010
}

declare void @_ZNK4juce5Image10getPixelAtEii(ptr dead_on_unwind writable sret(%"class.juce::Colour") align 1, ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNK4juce6Colour8getAlphaEv(ptr noundef nonnull align 1 dereferenceable(4)) local_unnamed_addr #3 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 "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 = { "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, !13, i64 377}
!6 = !{!"_ZTSN4juce11ImageButtonE", !7, i64 0, !55, i64 375, !55, i64 376, !13, i64 377, !15, i64 380, !56, i64 400, !56, i64 408, !56, i64 416, !58, i64 424, !58, i64 428, !58, i64 432, !59, i64 436, !59, i64 440, !59, i64 444}
!7 = !{!"_ZTSN4juce6ButtonE", !8, i64 0, !37, i64 200, !39, i64 216, !42, i64 240, !10, i64 248, !43, i64 256, !47, i64 280, !17, i64 288, !17, i64 292, !12, i64 296, !17, i64 304, !17, i64 308, !17, i64 312, !17, i64 316, !17, i64 320, !17, i64 324, !48, i64 328, !48, i64 332, !49, i64 336, !55, i64 368, !55, i64 369, !55, i64 370, !55, i64 371, !55, i64 372, !55, i64 373, !55, i64 374}
!8 = !{!"_ZTSN4juce9ComponentE", !9, i64 0, !10, i64 8, !10, i64 16, !12, i64 24, !15, i64 32, !18, i64 48, !19, i64 56, !20, i64 64, !12, i64 88, !23, i64 96, !12, i64 104, !24, i64 112, !25, i64 120, !26, i64 128, !27, i64 136, !31, i64 160, !35, i64 184, !13, i64 192, !13, i64 196}
!9 = !{!"_ZTSN4juce13MouseListenerE"}
!10 = !{!"_ZTSN4juce6StringE", !11, i64 0}
!11 = !{!"_ZTSN4juce16CharPointer_UTF8E", !12, i64 0}
!12 = !{!"any pointer", !13, i64 0}
!13 = !{!"omnipotent char", !14, i64 0}
!14 = !{!"Simple C++ TBAA"}
!15 = !{!"_ZTSN4juce9RectangleIiEE", !16, i64 0, !17, i64 8, !17, i64 12}
!16 = !{!"_ZTSN4juce5PointIiEE", !17, i64 0, !17, i64 4}
!17 = !{!"int", !13, i64 0}
!18 = !{!"_ZTSN4juce13ScopedPointerINS_9Component10PositionerEEE", !12, i64 0}
!19 = !{!"_ZTSN4juce13ScopedPointerINS_15AffineTransformEEE", !12, 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", !12, i64 0}
!23 = !{!"_ZTSN4juce11MouseCursorE", !12, i64 0}
!24 = !{!"_ZTSN4juce13ScopedPointerINS_20CachedComponentImageEEE", !12, i64 0}
!25 = !{!"_ZTSN4juce13ScopedPointerINS_9Component17MouseListenerListEEE", !12, i64 0}
!26 = !{!"_ZTSN4juce13ScopedPointerINS_5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EEEEE", !12, 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", !12, 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", !12, i64 0}
!35 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE6MasterE", !36, i64 0}
!36 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE13SharedPointerEEE", !12, i64 0}
!37 = !{!"_ZTSN4juce21SettableTooltipClientE", !38, i64 0, !10, i64 8}
!38 = !{!"_ZTSN4juce13TooltipClientE"}
!39 = !{!"_ZTSN4juce5ArrayINS_8KeyPressENS_20DummyCriticalSectionELi0EEE", !40, i64 0, !17, i64 16}
!40 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_8KeyPressENS_20DummyCriticalSectionEEE", !41, i64 0, !17, i64 8}
!41 = !{!"_ZTSN4juce9HeapBlockINS_8KeyPressELb0EEE", !12, i64 0}
!42 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEE", !36, i64 0}
!43 = !{!"_ZTSN4juce12ListenerListINS_6Button8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEEE", !44, i64 0}
!44 = !{!"_ZTSN4juce5ArrayIPNS_6Button8ListenerENS_20DummyCriticalSectionELi0EEE", !45, i64 0, !17, i64 16}
!45 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_6Button8ListenerENS_20DummyCriticalSectionEEE", !46, i64 0, !17, i64 8}
!46 = !{!"_ZTSN4juce9HeapBlockIPNS_6Button8ListenerELb0EEE", !12, i64 0}
!47 = !{!"_ZTSN4juce13ScopedPointerINS_6Button14CallbackHelperEEE", !12, i64 0}
!48 = !{!"_ZTSN4juce6Button11ButtonStateE", !13, i64 0}
!49 = !{!"_ZTSN4juce5ValueE", !50, i64 0, !51, i64 8}
!50 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_5Value11ValueSourceEEE", !12, i64 0}
!51 = !{!"_ZTSN4juce12ListenerListINS_5Value8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEEE", !52, i64 0}
!52 = !{!"_ZTSN4juce5ArrayIPNS_5Value8ListenerENS_20DummyCriticalSectionELi0EEE", !53, i64 0, !17, i64 16}
!53 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_5Value8ListenerENS_20DummyCriticalSectionEEE", !54, i64 0, !17, i64 8}
!54 = !{!"_ZTSN4juce9HeapBlockIPNS_5Value8ListenerELb0EEE", !12, i64 0}
!55 = !{!"bool", !13, i64 0}
!56 = !{!"_ZTSN4juce5ImageE", !57, i64 0}
!57 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_14ImagePixelDataEEE", !12, i64 0}
!58 = !{!"float", !13, i64 0}
!59 = !{!"_ZTSN4juce6ColourE", !60, i64 0}
!60 = !{!"_ZTSN4juce9PixelARGBE", !13, i64 0}


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