; 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::TableListBox" = type <{ %"class.juce::ListBox", %"class.juce::ListBoxModel", %"class.juce::TableHeaderComponent::Listener", ptr, ptr, i32, i8, [3 x i8] }>
%"class.juce::ListBox" = type { %"class.juce::Component.base", %"class.juce::SettableTooltipClient", ptr, %"class.juce::ScopedPointer.286", %"class.juce::ScopedPointer.159", %"class.juce::ScopedPointer.287", i32, i32, i32, i32, i32, i8, i8, i8, i8, %"class.juce::SparseSet" }
%"class.juce::Component.base" = type <{ %"class.juce::MouseListener", %"class.juce::String", %"class.juce::String", ptr, %"class.juce::Rectangle", %"class.juce::ScopedPointer", %"class.juce::ScopedPointer.0", %"class.juce::Array", ptr, %"class.juce::MouseCursor", ptr, %"class.juce::ScopedPointer.1", %"class.juce::ScopedPointer.2", %"class.juce::ScopedPointer.3", %"class.juce::ListenerList", %"class.juce::NamedValueSet", %"class.juce::WeakReference<juce::Component>::Master", %union.anon, i8 }>
%"class.juce::MouseListener" = type { ptr }
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::Rectangle" = type { %"class.juce::Point", i32, i32 }
%"class.juce::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" }
%"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::ScopedPointer.286" = type { ptr }
%"class.juce::ScopedPointer.159" = type { ptr }
%"class.juce::ScopedPointer.287" = type { ptr }
%"class.juce::SparseSet" = type { %"class.juce::Array.288" }
%"class.juce::Array.288" = type { %"class.juce::ArrayAllocationBase.289", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.289" = type <{ %"class.juce::HeapBlock.290", i32, [4 x i8] }>
%"class.juce::HeapBlock.290" = type { ptr }
%"class.juce::ListBoxModel" = type { ptr }
%"class.juce::TableHeaderComponent::Listener" = 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
declare dso_local noundef i32 @_ZNK4juce20TableHeaderComponent13getNumColumnsEb(ptr noundef nonnull align 8 dereferenceable(308), i1 noundef zeroext) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK4juce20TableHeaderComponent18getColumnIdOfIndexEib(ptr noundef nonnull align 8 dereferenceable(308), i32 noundef, i1 noundef zeroext) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce12TableListBox18autoSizeAllColumnsEv(ptr noundef nonnull align 8 dereferenceable(333) %0) #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
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %5

5:                                                ; preds = %17, %1
  %6 = load i32, ptr %3, align 4, !tbaa !9
  %7 = getelementptr inbounds %"class.juce::TableListBox", ptr %4, i32 0, i32 3
  %8 = load ptr, ptr %7, align 8, !tbaa !11
  %9 = call noundef i32 @_ZNK4juce20TableHeaderComponent13getNumColumnsEb(ptr noundef nonnull align 8 dereferenceable(308) %8, i1 noundef zeroext true)
  %10 = icmp slt i32 %6, %9
  br i1 %10, label %12, label %11

11:                                               ; preds = %5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #2
  br label %20

12:                                               ; preds = %5
  %13 = getelementptr inbounds %"class.juce::TableListBox", ptr %4, i32 0, i32 3
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  %15 = load i32, ptr %3, align 4, !tbaa !9
  %16 = call noundef i32 @_ZNK4juce20TableHeaderComponent18getColumnIdOfIndexEib(ptr noundef nonnull align 8 dereferenceable(308) %14, i32 noundef %15, i1 noundef zeroext true)
  call void @_ZN4juce12TableListBox14autoSizeColumnEi(ptr noundef nonnull align 8 dereferenceable(333) %4, i32 noundef %16)
  br label %17

17:                                               ; preds = %12
  %18 = load i32, ptr %3, align 4, !tbaa !9
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr %3, align 4, !tbaa !9
  br label %5, !llvm.loop !51

20:                                               ; preds = %11
  ret void
}

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, !6, i64 312}
!12 = !{!"_ZTSN4juce12TableListBoxE", !13, i64 0, !49, i64 296, !50, i64 304, !6, i64 312, !6, i64 320, !10, i64 328, !44, i64 332}
!13 = !{!"_ZTSN4juce7ListBoxE", !14, i64 0, !39, i64 200, !6, i64 216, !41, i64 224, !42, i64 232, !43, i64 240, !10, i64 248, !10, i64 252, !10, i64 256, !10, i64 260, !10, i64 264, !44, i64 268, !44, i64 269, !44, i64 270, !44, i64 271, !45, i64 272}
!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 = !{!"_ZTSN4juce13ScopedPointerINS_7ListBox12ListViewportEEE", !6, i64 0}
!42 = !{!"_ZTSN4juce13ScopedPointerINS_9ComponentEEE", !6, i64 0}
!43 = !{!"_ZTSN4juce13ScopedPointerINS_13MouseListenerEEE", !6, i64 0}
!44 = !{!"bool", !7, i64 0}
!45 = !{!"_ZTSN4juce9SparseSetIiEE", !46, i64 0}
!46 = !{!"_ZTSN4juce5ArrayIiNS_20DummyCriticalSectionELi0EEE", !47, i64 0, !10, i64 16}
!47 = !{!"_ZTSN4juce19ArrayAllocationBaseIiNS_20DummyCriticalSectionEEE", !48, i64 0, !10, i64 8}
!48 = !{!"_ZTSN4juce9HeapBlockIiLb0EEE", !6, i64 0}
!49 = !{!"_ZTSN4juce12ListBoxModelE"}
!50 = !{!"_ZTSN4juce20TableHeaderComponent8ListenerE"}
!51 = distinct !{!51, !52}
!52 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce12TableListBox14autoSizeColumnEi(ptr noundef nonnull align 8 dereferenceable(333), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce12TableListBox18autoSizeAllColumnsEv(ptr noundef nonnull align 8 dereferenceable(333) %0) local_unnamed_addr #0 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 312
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = tail call noundef i32 @_ZNK4juce20TableHeaderComponent13getNumColumnsEb(ptr noundef nonnull align 8 dereferenceable(308) %3, i1 noundef zeroext true)
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %1
  ret void

.lr.ph:                                           ; preds = %1, %.lr.ph
  %.03 = phi i32 [ %8, %.lr.ph ], [ 0, %1 ]
  %6 = load ptr, ptr %2, align 8, !tbaa !5
  %7 = tail call noundef i32 @_ZNK4juce20TableHeaderComponent18getColumnIdOfIndexEib(ptr noundef nonnull align 8 dereferenceable(308) %6, i32 noundef %.03, i1 noundef zeroext true)
  tail call void @_ZN4juce12TableListBox14autoSizeColumnEi(ptr noundef nonnull align 8 dereferenceable(333) %0, i32 noundef %7)
  %8 = add nuw nsw i32 %.03, 1
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = tail call noundef i32 @_ZNK4juce20TableHeaderComponent13getNumColumnsEb(ptr noundef nonnull align 8 dereferenceable(308) %9, i1 noundef zeroext true)
  %11 = icmp slt i32 %8, %10
  br i1 %11, label %.lr.ph, label %._crit_edge, !llvm.loop !49
}

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, !12, i64 312}
!6 = !{!"_ZTSN4juce12TableListBoxE", !7, i64 0, !47, i64 296, !48, i64 304, !12, i64 312, !12, i64 320, !17, i64 328, !42, i64 332}
!7 = !{!"_ZTSN4juce7ListBoxE", !8, i64 0, !37, i64 200, !12, i64 216, !39, i64 224, !40, i64 232, !41, i64 240, !17, i64 248, !17, i64 252, !17, i64 256, !17, i64 260, !17, i64 264, !42, i64 268, !42, i64 269, !42, i64 270, !42, i64 271, !43, i64 272}
!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 = !{!"_ZTSN4juce13ScopedPointerINS_7ListBox12ListViewportEEE", !12, i64 0}
!40 = !{!"_ZTSN4juce13ScopedPointerINS_9ComponentEEE", !12, i64 0}
!41 = !{!"_ZTSN4juce13ScopedPointerINS_13MouseListenerEEE", !12, i64 0}
!42 = !{!"bool", !13, i64 0}
!43 = !{!"_ZTSN4juce9SparseSetIiEE", !44, i64 0}
!44 = !{!"_ZTSN4juce5ArrayIiNS_20DummyCriticalSectionELi0EEE", !45, i64 0, !17, i64 16}
!45 = !{!"_ZTSN4juce19ArrayAllocationBaseIiNS_20DummyCriticalSectionEEE", !46, i64 0, !17, i64 8}
!46 = !{!"_ZTSN4juce9HeapBlockIiLb0EEE", !12, i64 0}
!47 = !{!"_ZTSN4juce12ListBoxModelE"}
!48 = !{!"_ZTSN4juce20TableHeaderComponent8ListenerE"}
!49 = distinct !{!49, !50}
!50 = !{!"llvm.loop.mustprogress"}


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