; 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::DocumentWindow" = type { %"class.juce::ResizableWindow", i32, i32, i32, i8, i8, [3 x %"class.juce::ScopedPointer.282"], %"class.juce::Image", %"class.juce::ScopedPointer.159", ptr, %"class.juce::ScopedPointer.360" }
%"class.juce::ResizableWindow" = type { %"class.juce::TopLevelWindow", %"class.juce::ScopedPointer.294", %"class.juce::ScopedPointer.295", %"class.juce::Component::SafePointer", i8, i8, i8, i8, i8, %"class.juce::ComponentDragger", %"class.juce::Rectangle", %"class.juce::ComponentBoundsConstrainer", ptr }
%"class.juce::TopLevelWindow" = type { %"class.juce::Component.base", i8, i8, i8, %"class.juce::ScopedPointer.293" }
%"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::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::ScopedPointer.293" = type { ptr }
%"class.juce::ScopedPointer.294" = type { ptr }
%"class.juce::ScopedPointer.295" = type { ptr }
%"class.juce::Component::SafePointer" = type { %"class.juce::WeakReference" }
%"class.juce::WeakReference" = type { %"class.juce::ReferenceCountedObjectPtr" }
%"class.juce::ComponentDragger" = type { ptr, %"class.juce::Point" }
%"class.juce::Point" = type { i32, i32 }
%"class.juce::Rectangle" = type { %"class.juce::Point", i32, i32 }
%"class.juce::ComponentBoundsConstrainer" = type { ptr, i32, i32, i32, i32, i32, i32, i32, i32, double }
%"class.juce::ScopedPointer.282" = type { ptr }
%"class.juce::Image" = type { %"class.juce::ReferenceCountedObjectPtr.48" }
%"class.juce::ReferenceCountedObjectPtr.48" = type { ptr }
%"class.juce::ScopedPointer.159" = type { ptr }
%"class.juce::ScopedPointer.360" = type { ptr }

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK4juce14DocumentWindow26getDesktopWindowStyleFlagsEv(ptr noundef nonnull align 8 dereferenceable(400) %0) unnamed_addr #1 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %4 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #2
  %5 = call noundef i32 @_ZNK4juce15ResizableWindow26getDesktopWindowStyleFlagsEv(ptr noundef nonnull align 8 dereferenceable(328) %4)
  store i32 %5, ptr %3, align 4, !tbaa !9
  %6 = getelementptr inbounds %"class.juce::DocumentWindow", ptr %4, i32 0, i32 3
  %7 = load i32, ptr %6, align 8, !tbaa !11
  %8 = and i32 %7, 1
  %9 = icmp ne i32 %8, 0
  br i1 %9, label %10, label %13

10:                                               ; preds = %1
  %11 = load i32, ptr %3, align 4, !tbaa !9
  %12 = or i32 %11, 32
  store i32 %12, ptr %3, align 4, !tbaa !9
  br label %13

13:                                               ; preds = %10, %1
  %14 = getelementptr inbounds %"class.juce::DocumentWindow", ptr %4, i32 0, i32 3
  %15 = load i32, ptr %14, align 8, !tbaa !11
  %16 = and i32 %15, 2
  %17 = icmp ne i32 %16, 0
  br i1 %17, label %18, label %21

18:                                               ; preds = %13
  %19 = load i32, ptr %3, align 4, !tbaa !9
  %20 = or i32 %19, 64
  store i32 %20, ptr %3, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %18, %13
  %22 = getelementptr inbounds %"class.juce::DocumentWindow", ptr %4, i32 0, i32 3
  %23 = load i32, ptr %22, align 8, !tbaa !11
  %24 = and i32 %23, 4
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %29

26:                                               ; preds = %21
  %27 = load i32, ptr %3, align 4, !tbaa !9
  %28 = or i32 %27, 128
  store i32 %28, ptr %3, align 4, !tbaa !9
  br label %29

29:                                               ; preds = %26, %21
  %30 = load i32, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #2
  ret i32 %30
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK4juce15ResizableWindow26getDesktopWindowStyleFlagsEv(ptr noundef nonnull align 8 dereferenceable(328)) unnamed_addr #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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, !10, i64 336}
!12 = !{!"_ZTSN4juce14DocumentWindowE", !13, i64 0, !10, i64 328, !10, i64 332, !10, i64 336, !40, i64 340, !40, i64 341, !7, i64 344, !49, i64 368, !51, i64 376, !6, i64 384, !52, i64 392}
!13 = !{!"_ZTSN4juce15ResizableWindowE", !14, i64 0, !42, i64 208, !43, i64 216, !44, i64 224, !40, i64 232, !40, i64 233, !40, i64 234, !40, i64 235, !40, i64 236, !46, i64 240, !19, i64 256, !47, i64 272, !6, i64 320}
!14 = !{!"_ZTSN4juce14TopLevelWindowE", !15, i64 0, !40, i64 197, !40, i64 198, !40, i64 199, !41, i64 200}
!15 = !{!"_ZTSN4juce9ComponentE", !16, i64 0, !17, i64 8, !17, i64 16, !6, i64 24, !19, 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}
!16 = !{!"_ZTSN4juce13MouseListenerE"}
!17 = !{!"_ZTSN4juce6StringE", !18, i64 0}
!18 = !{!"_ZTSN4juce16CharPointer_UTF8E", !6, i64 0}
!19 = !{!"_ZTSN4juce9RectangleIiEE", !20, i64 0, !10, i64 8, !10, i64 12}
!20 = !{!"_ZTSN4juce5PointIiEE", !10, i64 0, !10, i64 4}
!21 = !{!"_ZTSN4juce13ScopedPointerINS_9Component10PositionerEEE", !6, i64 0}
!22 = !{!"_ZTSN4juce13ScopedPointerINS_15AffineTransformEEE", !6, i64 0}
!23 = !{!"_ZTSN4juce5ArrayIPNS_9ComponentENS_20DummyCriticalSectionELi0EEE", !24, i64 0, !10, i64 16}
!24 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_9ComponentENS_20DummyCriticalSectionEEE", !25, i64 0, !10, 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, !10, i64 16}
!32 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_17ComponentListenerENS_20DummyCriticalSectionEEE", !33, i64 0, !10, i64 8}
!33 = !{!"_ZTSN4juce9HeapBlockIPNS_17ComponentListenerELb0EEE", !6, i64 0}
!34 = !{!"_ZTSN4juce13NamedValueSetE", !35, i64 0}
!35 = !{!"_ZTSN4juce5ArrayINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionELi0EEE", !36, i64 0, !10, i64 16}
!36 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionEEE", !37, i64 0, !10, i64 8}
!37 = !{!"_ZTSN4juce9HeapBlockINS_13NamedValueSet10NamedValueELb0EEE", !6, i64 0}
!38 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE6MasterE", !39, i64 0}
!39 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE13SharedPointerEEE", !6, i64 0}
!40 = !{!"bool", !7, i64 0}
!41 = !{!"_ZTSN4juce13ScopedPointerINS_12DropShadowerEEE", !6, i64 0}
!42 = !{!"_ZTSN4juce13ScopedPointerINS_24ResizableCornerComponentEEE", !6, i64 0}
!43 = !{!"_ZTSN4juce13ScopedPointerINS_24ResizableBorderComponentEEE", !6, i64 0}
!44 = !{!"_ZTSN4juce9Component11SafePointerIS0_EE", !45, i64 0}
!45 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEE", !39, i64 0}
!46 = !{!"_ZTSN4juce16ComponentDraggerE", !20, i64 8}
!47 = !{!"_ZTSN4juce26ComponentBoundsConstrainerE", !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !48, i64 40}
!48 = !{!"double", !7, i64 0}
!49 = !{!"_ZTSN4juce5ImageE", !50, i64 0}
!50 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_14ImagePixelDataEEE", !6, i64 0}
!51 = !{!"_ZTSN4juce13ScopedPointerINS_9ComponentEEE", !6, i64 0}
!52 = !{!"_ZTSN4juce13ScopedPointerINS_14DocumentWindow19ButtonListenerProxyEEE", !6, 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"

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK4juce14DocumentWindow26getDesktopWindowStyleFlagsEv(ptr noundef nonnull align 8 dereferenceable(400) %0) unnamed_addr #0 align 2 {
  %2 = tail call noundef i32 @_ZNK4juce15ResizableWindow26getDesktopWindowStyleFlagsEv(ptr noundef nonnull align 8 dereferenceable(328) %0)
  %3 = getelementptr inbounds i8, ptr %0, i64 336
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = shl i32 %4, 5
  %6 = and i32 %5, 224
  %.2 = or i32 %6, %2
  ret i32 %.2
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK4juce15ResizableWindow26getDesktopWindowStyleFlagsEv(ptr noundef nonnull align 8 dereferenceable(328)) unnamed_addr #0 align 2

attributes #0 = { 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" }

!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, !18, i64 336}
!6 = !{!"_ZTSN4juce14DocumentWindowE", !7, i64 0, !18, i64 328, !18, i64 332, !18, i64 336, !38, i64 340, !38, i64 341, !14, i64 344, !47, i64 368, !49, i64 376, !13, i64 384, !50, i64 392}
!7 = !{!"_ZTSN4juce15ResizableWindowE", !8, i64 0, !40, i64 208, !41, i64 216, !42, i64 224, !38, i64 232, !38, i64 233, !38, i64 234, !38, i64 235, !38, i64 236, !44, i64 240, !16, i64 256, !45, i64 272, !13, i64 320}
!8 = !{!"_ZTSN4juce14TopLevelWindowE", !9, i64 0, !38, i64 197, !38, i64 198, !38, i64 199, !39, i64 200}
!9 = !{!"_ZTSN4juce9ComponentE", !10, i64 0, !11, i64 8, !11, i64 16, !13, i64 24, !16, i64 32, !19, i64 48, !20, i64 56, !21, i64 64, !13, i64 88, !24, i64 96, !13, i64 104, !25, i64 112, !26, i64 120, !27, i64 128, !28, i64 136, !32, i64 160, !36, i64 184, !14, i64 192, !14, i64 196}
!10 = !{!"_ZTSN4juce13MouseListenerE"}
!11 = !{!"_ZTSN4juce6StringE", !12, i64 0}
!12 = !{!"_ZTSN4juce16CharPointer_UTF8E", !13, i64 0}
!13 = !{!"any pointer", !14, i64 0}
!14 = !{!"omnipotent char", !15, i64 0}
!15 = !{!"Simple C++ TBAA"}
!16 = !{!"_ZTSN4juce9RectangleIiEE", !17, i64 0, !18, i64 8, !18, i64 12}
!17 = !{!"_ZTSN4juce5PointIiEE", !18, i64 0, !18, i64 4}
!18 = !{!"int", !14, i64 0}
!19 = !{!"_ZTSN4juce13ScopedPointerINS_9Component10PositionerEEE", !13, i64 0}
!20 = !{!"_ZTSN4juce13ScopedPointerINS_15AffineTransformEEE", !13, i64 0}
!21 = !{!"_ZTSN4juce5ArrayIPNS_9ComponentENS_20DummyCriticalSectionELi0EEE", !22, i64 0, !18, i64 16}
!22 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_9ComponentENS_20DummyCriticalSectionEEE", !23, i64 0, !18, i64 8}
!23 = !{!"_ZTSN4juce9HeapBlockIPNS_9ComponentELb0EEE", !13, i64 0}
!24 = !{!"_ZTSN4juce11MouseCursorE", !13, i64 0}
!25 = !{!"_ZTSN4juce13ScopedPointerINS_20CachedComponentImageEEE", !13, i64 0}
!26 = !{!"_ZTSN4juce13ScopedPointerINS_9Component17MouseListenerListEEE", !13, i64 0}
!27 = !{!"_ZTSN4juce13ScopedPointerINS_5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EEEEE", !13, i64 0}
!28 = !{!"_ZTSN4juce12ListenerListINS_17ComponentListenerENS_5ArrayIPS1_NS_20DummyCriticalSectionELi0EEEEE", !29, i64 0}
!29 = !{!"_ZTSN4juce5ArrayIPNS_17ComponentListenerENS_20DummyCriticalSectionELi0EEE", !30, i64 0, !18, i64 16}
!30 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_17ComponentListenerENS_20DummyCriticalSectionEEE", !31, i64 0, !18, i64 8}
!31 = !{!"_ZTSN4juce9HeapBlockIPNS_17ComponentListenerELb0EEE", !13, i64 0}
!32 = !{!"_ZTSN4juce13NamedValueSetE", !33, i64 0}
!33 = !{!"_ZTSN4juce5ArrayINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionELi0EEE", !34, i64 0, !18, i64 16}
!34 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionEEE", !35, i64 0, !18, i64 8}
!35 = !{!"_ZTSN4juce9HeapBlockINS_13NamedValueSet10NamedValueELb0EEE", !13, i64 0}
!36 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE6MasterE", !37, i64 0}
!37 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE13SharedPointerEEE", !13, i64 0}
!38 = !{!"bool", !14, i64 0}
!39 = !{!"_ZTSN4juce13ScopedPointerINS_12DropShadowerEEE", !13, i64 0}
!40 = !{!"_ZTSN4juce13ScopedPointerINS_24ResizableCornerComponentEEE", !13, i64 0}
!41 = !{!"_ZTSN4juce13ScopedPointerINS_24ResizableBorderComponentEEE", !13, i64 0}
!42 = !{!"_ZTSN4juce9Component11SafePointerIS0_EE", !43, i64 0}
!43 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEE", !37, i64 0}
!44 = !{!"_ZTSN4juce16ComponentDraggerE", !17, i64 8}
!45 = !{!"_ZTSN4juce26ComponentBoundsConstrainerE", !18, i64 8, !18, i64 12, !18, i64 16, !18, i64 20, !18, i64 24, !18, i64 28, !18, i64 32, !18, i64 36, !46, i64 40}
!46 = !{!"double", !14, i64 0}
!47 = !{!"_ZTSN4juce5ImageE", !48, i64 0}
!48 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_14ImagePixelDataEEE", !13, i64 0}
!49 = !{!"_ZTSN4juce13ScopedPointerINS_9ComponentEEE", !13, i64 0}
!50 = !{!"_ZTSN4juce13ScopedPointerINS_14DocumentWindow19ButtonListenerProxyEEE", !13, i64 0}


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