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

; 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"

%"struct.juce::PopupMenu::Item" = type { %"class.juce::String", i32, %"class.juce::ScopedPointer.433", %"class.juce::ScopedPointer.89", %"class.juce::ReferenceCountedObjectPtr.434", %"class.juce::ReferenceCountedObjectPtr.435", ptr, %"class.juce::String", %"class.juce::Colour", i8, i8, i8, i8 }
%"class.juce::ScopedPointer.433" = type { ptr }
%"class.juce::ScopedPointer.89" = type { ptr }
%"class.juce::ReferenceCountedObjectPtr.434" = type { ptr }
%"class.juce::ReferenceCountedObjectPtr.435" = type { ptr }
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::Colour" = type { %"class.juce::PixelARGB" }
%"class.juce::PixelARGB" = type { %union.anon.77 }
%union.anon.77 = type { i32 }

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

; Function Attrs: nounwind
declare void @_ZN4juce6ColourC1Ej(ptr noundef nonnull align 1 dereferenceable(4), i32 noundef) unnamed_addr #0

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN4juce9PopupMenu4ItemC2Ev(ptr noundef nonnull align 8 dereferenceable(72) %0) unnamed_addr #2 align 2 {
  %2 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %3 = load ptr, ptr %2, align 8
  %4 = getelementptr inbounds %"struct.juce::PopupMenu::Item", ptr %3, i32 0, i32 0
  call void @_ZN4juce6StringC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #3
  %5 = getelementptr inbounds %"struct.juce::PopupMenu::Item", ptr %3, i32 0, i32 1
  store i32 0, ptr %5, align 8, !tbaa !9
  %6 = getelementptr inbounds %"struct.juce::PopupMenu::Item", ptr %3, i32 0, i32 2
  call void @_ZN4juce13ScopedPointerINS_9PopupMenuEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #3
  %7 = getelementptr inbounds %"struct.juce::PopupMenu::Item", ptr %3, i32 0, i32 3
  call void @_ZN4juce13ScopedPointerINS_8DrawableEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #3
  %8 = getelementptr inbounds %"struct.juce::PopupMenu::Item", ptr %3, i32 0, i32 4
  call void @_ZN4juce25ReferenceCountedObjectPtrINS_9PopupMenu15CustomComponentEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #3
  %9 = getelementptr inbounds %"struct.juce::PopupMenu::Item", ptr %3, i32 0, i32 5
  call void @_ZN4juce25ReferenceCountedObjectPtrINS_9PopupMenu14CustomCallbackEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #3
  %10 = getelementptr inbounds %"struct.juce::PopupMenu::Item", ptr %3, i32 0, i32 6
  store ptr null, ptr %10, align 8, !tbaa !21
  %11 = getelementptr inbounds %"struct.juce::PopupMenu::Item", ptr %3, i32 0, i32 7
  call void @_ZN4juce6StringC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #3
  %12 = getelementptr inbounds %"struct.juce::PopupMenu::Item", ptr %3, i32 0, i32 8
  call void @_ZN4juce6ColourC1Ej(ptr noundef nonnull align 1 dereferenceable(4) %12, i32 noundef 0) #3
  %13 = getelementptr inbounds %"struct.juce::PopupMenu::Item", ptr %3, i32 0, i32 9
  store i8 1, ptr %13, align 4, !tbaa !22
  %14 = getelementptr inbounds %"struct.juce::PopupMenu::Item", ptr %3, i32 0, i32 10
  store i8 0, ptr %14, align 1, !tbaa !23
  %15 = getelementptr inbounds %"struct.juce::PopupMenu::Item", ptr %3, i32 0, i32 11
  store i8 0, ptr %15, align 2, !tbaa !24
  %16 = getelementptr inbounds %"struct.juce::PopupMenu::Item", ptr %3, i32 0, i32 12
  store i8 0, ptr %16, align 1, !tbaa !25
  ret void
}

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

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

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

attributes #0 = { 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 #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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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, !13, i64 8}
!10 = !{!"_ZTSN4juce9PopupMenu4ItemE", !11, i64 0, !13, i64 8, !14, i64 16, !15, i64 24, !16, i64 32, !17, i64 40, !6, i64 48, !11, i64 56, !18, i64 64, !20, i64 68, !20, i64 69, !20, i64 70, !20, i64 71}
!11 = !{!"_ZTSN4juce6StringE", !12, i64 0}
!12 = !{!"_ZTSN4juce16CharPointer_UTF8E", !6, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSN4juce13ScopedPointerINS_9PopupMenuEEE", !6, i64 0}
!15 = !{!"_ZTSN4juce13ScopedPointerINS_8DrawableEEE", !6, i64 0}
!16 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_9PopupMenu15CustomComponentEEE", !6, i64 0}
!17 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_9PopupMenu14CustomCallbackEEE", !6, i64 0}
!18 = !{!"_ZTSN4juce6ColourE", !19, i64 0}
!19 = !{!"_ZTSN4juce9PixelARGBE", !7, i64 0}
!20 = !{!"bool", !7, i64 0}
!21 = !{!10, !6, i64 48}
!22 = !{!10, !20, i64 68}
!23 = !{!10, !20, i64 69}
!24 = !{!10, !20, i64 70}
!25 = !{!10, !20, i64 71}


; 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: nounwind
declare void @_ZN4juce6StringC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0

; Function Attrs: nounwind
declare void @_ZN4juce6ColourC1Ej(ptr noundef nonnull align 1 dereferenceable(4), i32 noundef) unnamed_addr #0

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN4juce9PopupMenu4ItemC2Ev(ptr noundef nonnull align 8 dereferenceable(72) %0) unnamed_addr #2 align 2 {
  tail call void @_ZN4juce6StringC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #3
  %2 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 0, ptr %2, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %0, i64 16
  tail call void @_ZN4juce13ScopedPointerINS_9PopupMenuEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #3
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @_ZN4juce13ScopedPointerINS_8DrawableEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #3
  %5 = getelementptr inbounds i8, ptr %0, i64 32
  tail call void @_ZN4juce25ReferenceCountedObjectPtrINS_9PopupMenu15CustomComponentEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #3
  %6 = getelementptr inbounds i8, ptr %0, i64 40
  tail call void @_ZN4juce25ReferenceCountedObjectPtrINS_9PopupMenu14CustomCallbackEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #3
  %7 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr null, ptr %7, align 8, !tbaa !20
  %8 = getelementptr inbounds i8, ptr %0, i64 56
  tail call void @_ZN4juce6StringC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #3
  %9 = getelementptr inbounds i8, ptr %0, i64 64
  tail call void @_ZN4juce6ColourC1Ej(ptr noundef nonnull align 1 dereferenceable(4) %9, i32 noundef 0) #3
  %10 = getelementptr inbounds i8, ptr %0, i64 68
  store <4 x i8> <i8 1, i8 0, i8 0, i8 0>, ptr %10, align 4, !tbaa !21
  ret void
}

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

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

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

attributes #0 = { 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 #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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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, !12, i64 8}
!6 = !{!"_ZTSN4juce9PopupMenu4ItemE", !7, i64 0, !12, i64 8, !13, i64 16, !14, i64 24, !15, i64 32, !16, i64 40, !9, i64 48, !7, i64 56, !17, i64 64, !19, i64 68, !19, i64 69, !19, i64 70, !19, i64 71}
!7 = !{!"_ZTSN4juce6StringE", !8, i64 0}
!8 = !{!"_ZTSN4juce16CharPointer_UTF8E", !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"int", !10, i64 0}
!13 = !{!"_ZTSN4juce13ScopedPointerINS_9PopupMenuEEE", !9, i64 0}
!14 = !{!"_ZTSN4juce13ScopedPointerINS_8DrawableEEE", !9, i64 0}
!15 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_9PopupMenu15CustomComponentEEE", !9, i64 0}
!16 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_9PopupMenu14CustomCallbackEEE", !9, i64 0}
!17 = !{!"_ZTSN4juce6ColourE", !18, i64 0}
!18 = !{!"_ZTSN4juce9PixelARGBE", !10, i64 0}
!19 = !{!"bool", !10, i64 0}
!20 = !{!6, !9, i64 48}
!21 = !{!19, !19, i64 0}


; Effective O3 passes: EarlyCSEPass,InstCombinePass,SLPVectorizerPass,SROAPass,TailCallElimPass