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

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

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

@_ZN4juce9Component25currentlyFocusedComponentE = external dso_local global ptr, align 8

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce9Component13giveAwayFocusEb(i1 noundef zeroext) #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce9Component10setVisibleEb(ptr noundef nonnull align 8 dereferenceable(197) %0, i1 noundef zeroext %1) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca %"class.juce::WeakReference", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %9 = zext i1 %1 to i8
  store i8 %9, ptr %4, align 1, !tbaa !9
  %10 = load ptr, ptr %3, align 8
  %11 = getelementptr inbounds %"class.juce::Component", ptr %10, i32 0, i32 17
  %12 = load i16, ptr %11, align 8
  %13 = lshr i16 %12, 1
  %14 = and i16 %13, 1
  %15 = trunc i16 %14 to i1
  %16 = zext i1 %15 to i32
  %17 = load i8, ptr %4, align 1, !tbaa !9, !range !11, !noundef !12
  %18 = trunc i8 %17 to i1
  %19 = zext i1 %18 to i32
  %20 = icmp ne i32 %16, %19
  br i1 %20, label %21, label %97

21:                                               ; preds = %2
  br label %22

22:                                               ; preds = %21
  br label %23

23:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %10)
  %24 = load i8, ptr %4, align 1, !tbaa !9, !range !11, !noundef !12
  %25 = trunc i8 %24 to i1
  %26 = getelementptr inbounds %"class.juce::Component", ptr %10, i32 0, i32 17
  %27 = zext i1 %25 to i16
  %28 = load i16, ptr %26, align 8
  %29 = shl i16 %27, 1
  %30 = and i16 %28, -3
  %31 = or i16 %30, %29
  store i16 %31, ptr %26, align 8
  %32 = load i8, ptr %4, align 1, !tbaa !9, !range !11, !noundef !12
  %33 = trunc i8 %32 to i1
  br i1 %33, label %34, label %40

34:                                               ; preds = %23
  invoke void @_ZN4juce9Component7repaintEv(ptr noundef nonnull align 8 dereferenceable(197) %10)
          to label %35 unwind label %36

35:                                               ; preds = %34
  br label %42

36:                                               ; preds = %67, %61, %57, %46, %42, %40, %34
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %6, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %7, align 4
  br label %96

40:                                               ; preds = %23
  invoke void @_ZN4juce9Component13repaintParentEv(ptr noundef nonnull align 8 dereferenceable(197) %10)
          to label %41 unwind label %36

41:                                               ; preds = %40
  br label %42

42:                                               ; preds = %41, %35
  invoke void @_ZNK4juce9Component17sendFakeMouseMoveEv(ptr noundef nonnull align 8 dereferenceable(197) %10)
          to label %43 unwind label %36

43:                                               ; preds = %42
  %44 = load i8, ptr %4, align 1, !tbaa !9, !range !11, !noundef !12
  %45 = trunc i8 %44 to i1
  br i1 %45, label %65, label %46

46:                                               ; preds = %43
  invoke void @_ZN4juce9Component16ComponentHelpers30releaseAllCachedImageResourcesERS0_(ptr noundef nonnull align 8 dereferenceable(197) %10)
          to label %47 unwind label %36

47:                                               ; preds = %46
  %48 = load ptr, ptr @_ZN4juce9Component25currentlyFocusedComponentE, align 8, !tbaa !5
  %49 = icmp eq ptr %48, %10
  br i1 %49, label %53, label %50

50:                                               ; preds = %47
  %51 = load ptr, ptr @_ZN4juce9Component25currentlyFocusedComponentE, align 8, !tbaa !5
  %52 = call noundef zeroext i1 @_ZNK4juce9Component10isParentOfEPKS0_(ptr noundef nonnull align 8 dereferenceable(197) %10, ptr noundef %51) #4
  br i1 %52, label %53, label %64

53:                                               ; preds = %50, %47
  %54 = getelementptr inbounds %"class.juce::Component", ptr %10, i32 0, i32 3
  %55 = load ptr, ptr %54, align 8, !tbaa !13
  %56 = icmp ne ptr %55, null
  br i1 %56, label %57, label %61

57:                                               ; preds = %53
  %58 = getelementptr inbounds %"class.juce::Component", ptr %10, i32 0, i32 3
  %59 = load ptr, ptr %58, align 8, !tbaa !13
  invoke void @_ZN4juce9Component17grabKeyboardFocusEv(ptr noundef nonnull align 8 dereferenceable(197) %59)
          to label %60 unwind label %36

60:                                               ; preds = %57
  br label %63

61:                                               ; preds = %53
  invoke void @_ZN4juce9Component13giveAwayFocusEb(i1 noundef zeroext true)
          to label %62 unwind label %36

62:                                               ; preds = %61
  br label %63

63:                                               ; preds = %62, %60
  br label %64

64:                                               ; preds = %63, %50
  br label %65

65:                                               ; preds = %64, %43
  %66 = call noundef zeroext i1 @_ZNK4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEneEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef null) #4
  br i1 %66, label %67, label %95

67:                                               ; preds = %65
  invoke void @_ZN4juce9Component27sendVisibilityChangeMessageEv(ptr noundef nonnull align 8 dereferenceable(197) %10)
          to label %68 unwind label %36

68:                                               ; preds = %67
  %69 = call noundef zeroext i1 @_ZNK4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEneEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef null) #4
  br i1 %69, label %70, label %94

70:                                               ; preds = %68
  %71 = getelementptr inbounds %"class.juce::Component", ptr %10, i32 0, i32 17
  %72 = load i16, ptr %71, align 8
  %73 = and i16 %72, 1
  %74 = trunc i16 %73 to i1
  br i1 %74, label %75, label %94

75:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %76 = invoke noundef ptr @_ZNK4juce9Component7getPeerEv(ptr noundef nonnull align 8 dereferenceable(197) %10)
          to label %77 unwind label %89

77:                                               ; preds = %75
  store ptr %76, ptr %8, align 8, !tbaa !5
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = icmp ne ptr %78, null
  br i1 %79, label %80, label %93

80:                                               ; preds = %77
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = load i8, ptr %4, align 1, !tbaa !9, !range !11, !noundef !12
  %83 = trunc i8 %82 to i1
  %84 = load ptr, ptr %81, align 8, !tbaa !40
  %85 = getelementptr inbounds ptr, ptr %84, i64 3
  %86 = load ptr, ptr %85, align 8
  invoke void %86(ptr noundef nonnull align 8 dereferenceable(77) %81, i1 noundef zeroext %83)
          to label %87 unwind label %89

87:                                               ; preds = %80
  invoke void @_ZN4juce9Component24internalHierarchyChangedEv(ptr noundef nonnull align 8 dereferenceable(197) %10)
          to label %88 unwind label %89

88:                                               ; preds = %87
  br label %93

89:                                               ; preds = %87, %80, %75
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %6, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %96

93:                                               ; preds = %88, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %94

94:                                               ; preds = %93, %70, %68
  br label %95

95:                                               ; preds = %94, %65
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %97

96:                                               ; preds = %89, %36
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %98

97:                                               ; preds = %95, %2
  ret void

98:                                               ; preds = %96
  %99 = load ptr, ptr %6, align 8
  %100 = load i32, ptr %7, align 4
  %101 = insertvalue { ptr, i32 } poison, ptr %99, 0
  %102 = insertvalue { ptr, i32 } %101, i32 %100, 1
  resume { ptr, i32 } %102
}

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

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

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

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

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

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

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

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

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

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !6, i64 24}
!14 = !{!"_ZTSN4juce9ComponentE", !15, i64 0, !16, i64 8, !16, i64 16, !6, i64 24, !18, i64 32, !21, i64 48, !22, i64 56, !23, i64 64, !6, i64 88, !26, i64 96, !6, i64 104, !27, i64 112, !28, i64 120, !29, i64 128, !30, i64 136, !34, i64 160, !38, 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, !20, i64 8, !20, i64 12}
!19 = !{!"_ZTSN4juce5PointIiEE", !20, i64 0, !20, i64 4}
!20 = !{!"int", !7, i64 0}
!21 = !{!"_ZTSN4juce13ScopedPointerINS_9Component10PositionerEEE", !6, i64 0}
!22 = !{!"_ZTSN4juce13ScopedPointerINS_15AffineTransformEEE", !6, i64 0}
!23 = !{!"_ZTSN4juce5ArrayIPNS_9ComponentENS_20DummyCriticalSectionELi0EEE", !24, i64 0, !20, i64 16}
!24 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_9ComponentENS_20DummyCriticalSectionEEE", !25, i64 0, !20, i64 8}
!25 = !{!"_ZTSN4juce9HeapBlockIPNS_9ComponentELb0EEE", !6, i64 0}
!26 = !{!"_ZTSN4juce11MouseCursorE", !6, i64 0}
!27 = !{!"_ZTSN4juce13ScopedPointerINS_20CachedComponentImageEEE", !6, i64 0}
!28 = !{!"_ZTSN4juce13ScopedPointerINS_9Component17MouseListenerListEEE", !6, i64 0}
!29 = !{!"_ZTSN4juce13ScopedPointerINS_5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EEEEE", !6, i64 0}
!30 = !{!"_ZTSN4juce12ListenerListINS_17ComponentListenerENS_5ArrayIPS1_NS_20DummyCriticalSectionELi0EEEEE", !31, i64 0}
!31 = !{!"_ZTSN4juce5ArrayIPNS_17ComponentListenerENS_20DummyCriticalSectionELi0EEE", !32, i64 0, !20, i64 16}
!32 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_17ComponentListenerENS_20DummyCriticalSectionEEE", !33, i64 0, !20, i64 8}
!33 = !{!"_ZTSN4juce9HeapBlockIPNS_17ComponentListenerELb0EEE", !6, i64 0}
!34 = !{!"_ZTSN4juce13NamedValueSetE", !35, i64 0}
!35 = !{!"_ZTSN4juce5ArrayINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionELi0EEE", !36, i64 0, !20, i64 16}
!36 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionEEE", !37, i64 0, !20, i64 8}
!37 = !{!"_ZTSN4juce9HeapBlockINS_13NamedValueSet10NamedValueELb0EEE", !6, i64 0}
!38 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE6MasterE", !39, i64 0}
!39 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE13SharedPointerEEE", !6, i64 0}
!40 = !{!41, !41, i64 0}
!41 = !{!"vtable pointer", !8, 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::WeakReference" = type { %"class.juce::ReferenceCountedObjectPtr" }
%"class.juce::ReferenceCountedObjectPtr" = type { ptr }

@_ZN4juce9Component25currentlyFocusedComponentE = external dso_local local_unnamed_addr global ptr, align 8

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce9Component13giveAwayFocusEb(i1 noundef zeroext) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce9Component10setVisibleEb(ptr noundef nonnull align 8 dereferenceable(197) %0, i1 noundef zeroext %1) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.juce::WeakReference", align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 192
  %5 = load i16, ptr %4, align 8
  %6 = and i16 %5, 2
  %7 = icmp eq i16 %6, 0
  %.not = xor i1 %7, %1
  br i1 %.not, label %50, label %8

8:                                                ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull %0)
  %9 = load i16, ptr %4, align 8
  %10 = select i1 %1, i16 2, i16 0
  %11 = and i16 %9, -3
  %12 = or disjoint i16 %11, %10
  store i16 %12, ptr %4, align 8
  br i1 %1, label %13, label %16

13:                                               ; preds = %8
  invoke void @_ZN4juce9Component7repaintEv(ptr noundef nonnull align 8 dereferenceable(197) %0)
          to label %17 unwind label %14

14:                                               ; preds = %32, %29, %28, %19, %17, %16, %13
  %15 = landingpad { ptr, i32 }
          cleanup
  br label %49

16:                                               ; preds = %8
  invoke void @_ZN4juce9Component13repaintParentEv(ptr noundef nonnull align 8 dereferenceable(197) %0)
          to label %17 unwind label %14

17:                                               ; preds = %16, %13
  invoke void @_ZNK4juce9Component17sendFakeMouseMoveEv(ptr noundef nonnull align 8 dereferenceable(197) %0)
          to label %18 unwind label %14

18:                                               ; preds = %17
  br i1 %1, label %30, label %19

19:                                               ; preds = %18
  invoke void @_ZN4juce9Component16ComponentHelpers30releaseAllCachedImageResourcesERS0_(ptr noundef nonnull align 8 dereferenceable(197) %0)
          to label %20 unwind label %14

20:                                               ; preds = %19
  %21 = load ptr, ptr @_ZN4juce9Component25currentlyFocusedComponentE, align 8, !tbaa !5
  %22 = icmp eq ptr %21, %0
  br i1 %22, label %25, label %23

23:                                               ; preds = %20
  %24 = call noundef zeroext i1 @_ZNK4juce9Component10isParentOfEPKS0_(ptr noundef nonnull align 8 dereferenceable(197) %0, ptr noundef %21) #4
  br i1 %24, label %25, label %30

25:                                               ; preds = %23, %20
  %26 = getelementptr inbounds i8, ptr %0, i64 24
  %27 = load ptr, ptr %26, align 8, !tbaa !9
  %.not14 = icmp eq ptr %27, null
  br i1 %.not14, label %29, label %28

28:                                               ; preds = %25
  invoke void @_ZN4juce9Component17grabKeyboardFocusEv(ptr noundef nonnull align 8 dereferenceable(197) %27)
          to label %30 unwind label %14

29:                                               ; preds = %25
  invoke void @_ZN4juce9Component13giveAwayFocusEb(i1 noundef zeroext true)
          to label %30 unwind label %14

30:                                               ; preds = %23, %29, %28, %18
  %31 = call noundef zeroext i1 @_ZNK4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEneEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef null) #4
  br i1 %31, label %32, label %48

32:                                               ; preds = %30
  invoke void @_ZN4juce9Component27sendVisibilityChangeMessageEv(ptr noundef nonnull align 8 dereferenceable(197) %0)
          to label %33 unwind label %14

33:                                               ; preds = %32
  %34 = call noundef zeroext i1 @_ZNK4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEneEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef null) #4
  br i1 %34, label %35, label %48

35:                                               ; preds = %33
  %36 = load i16, ptr %4, align 8
  %37 = trunc i16 %36 to i1
  br i1 %37, label %38, label %48

38:                                               ; preds = %35
  %39 = invoke noundef ptr @_ZNK4juce9Component7getPeerEv(ptr noundef nonnull align 8 dereferenceable(197) %0)
          to label %40 unwind label %46

40:                                               ; preds = %38
  %.not15 = icmp eq ptr %39, null
  br i1 %.not15, label %48, label %41

41:                                               ; preds = %40
  %42 = load ptr, ptr %39, align 8, !tbaa !36
  %43 = getelementptr inbounds i8, ptr %42, i64 24
  %44 = load ptr, ptr %43, align 8
  invoke void %44(ptr noundef nonnull align 8 dereferenceable(77) %39, i1 noundef zeroext %1)
          to label %45 unwind label %46

45:                                               ; preds = %41
  invoke void @_ZN4juce9Component24internalHierarchyChangedEv(ptr noundef nonnull align 8 dereferenceable(197) %0)
          to label %48 unwind label %46

46:                                               ; preds = %45, %41, %38
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %49

48:                                               ; preds = %40, %45, %33, %35, %30
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br label %50

49:                                               ; preds = %46, %14
  %.pn = phi { ptr, i32 } [ %47, %46 ], [ %15, %14 ]
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn

50:                                               ; preds = %48, %2
  ret void
}

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

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

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

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 24}
!10 = !{!"_ZTSN4juce9ComponentE", !11, i64 0, !12, i64 8, !12, i64 16, !6, i64 24, !14, i64 32, !17, i64 48, !18, i64 56, !19, i64 64, !6, i64 88, !22, i64 96, !6, i64 104, !23, i64 112, !24, i64 120, !25, i64 128, !26, i64 136, !30, i64 160, !34, i64 184, !7, i64 192, !7, i64 196}
!11 = !{!"_ZTSN4juce13MouseListenerE"}
!12 = !{!"_ZTSN4juce6StringE", !13, i64 0}
!13 = !{!"_ZTSN4juce16CharPointer_UTF8E", !6, i64 0}
!14 = !{!"_ZTSN4juce9RectangleIiEE", !15, i64 0, !16, i64 8, !16, i64 12}
!15 = !{!"_ZTSN4juce5PointIiEE", !16, i64 0, !16, i64 4}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTSN4juce13ScopedPointerINS_9Component10PositionerEEE", !6, i64 0}
!18 = !{!"_ZTSN4juce13ScopedPointerINS_15AffineTransformEEE", !6, 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", !6, i64 0}
!22 = !{!"_ZTSN4juce11MouseCursorE", !6, i64 0}
!23 = !{!"_ZTSN4juce13ScopedPointerINS_20CachedComponentImageEEE", !6, i64 0}
!24 = !{!"_ZTSN4juce13ScopedPointerINS_9Component17MouseListenerListEEE", !6, i64 0}
!25 = !{!"_ZTSN4juce13ScopedPointerINS_5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EEEEE", !6, 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", !6, 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", !6, i64 0}
!34 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE6MasterE", !35, i64 0}
!35 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE13SharedPointerEEE", !6, i64 0}
!36 = !{!37, !37, i64 0}
!37 = !{!"vtable pointer", !8, i64 0}


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