; 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::TreeViewItem" = type <{ ptr, ptr, ptr, %"class.juce::OwnedArray.338", i32, i32, i32, i32, i32, i32, i8, [7 x i8] }>
%"class.juce::OwnedArray.338" = type { %"class.juce::ArrayAllocationBase.339", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.339" = type <{ %"class.juce::HeapBlock.340", i32, [4 x i8] }>
%"class.juce::HeapBlock.340" = type { ptr }
%"class.juce::TreeView" = type <{ %"class.juce::Component.base", [3 x i8], %"class.juce::SettableTooltipClient", %"class.juce::FileDragAndDropTarget", %"class.juce::DragAndDropTarget", %"class.juce::ScopedPointer.283", %"class.juce::CriticalSection", ptr, %"class.juce::ScopedPointer.284", %"class.juce::ScopedPointer.285", i32, i8, i8, i8, i8, i8, [7 x 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::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::FileDragAndDropTarget" = type { ptr }
%"class.juce::DragAndDropTarget" = type { ptr }
%"class.juce::ScopedPointer.283" = type { ptr }
%"class.juce::CriticalSection" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.juce::ScopedPointer.284" = type { ptr }
%"class.juce::ScopedPointer.285" = 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 nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce12TreeViewItem10getNumRowsEv(ptr noundef nonnull align 8 dereferenceable(73)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_ZNK4juce12TreeViewItem18getRowNumberInTreeEv(ptr noundef nonnull align 8 dereferenceable(73) %0) #1 align 2 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %6 = load ptr, ptr %3, align 8
  %7 = getelementptr inbounds %"class.juce::TreeViewItem", ptr %6, i32 0, i32 2
  %8 = load ptr, ptr %7, align 8, !tbaa !9
  %9 = icmp ne ptr %8, null
  br i1 %9, label %10, label %64

10:                                               ; preds = %1
  %11 = getelementptr inbounds %"class.juce::TreeViewItem", ptr %6, i32 0, i32 1
  %12 = load ptr, ptr %11, align 8, !tbaa !16
  %13 = icmp ne ptr %12, null
  br i1 %13, label %14, label %64

14:                                               ; preds = %10
  %15 = getelementptr inbounds %"class.juce::TreeViewItem", ptr %6, i32 0, i32 2
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  %17 = call noundef zeroext i1 @_ZNK4juce12TreeViewItem6isOpenEv(ptr noundef nonnull align 8 dereferenceable(73) %16) #3
  br i1 %17, label %22, label %18

18:                                               ; preds = %14
  %19 = getelementptr inbounds %"class.juce::TreeViewItem", ptr %6, i32 0, i32 2
  %20 = load ptr, ptr %19, align 8, !tbaa !9
  %21 = call noundef i32 @_ZNK4juce12TreeViewItem18getRowNumberInTreeEv(ptr noundef nonnull align 8 dereferenceable(73) %20) #3
  store i32 %21, ptr %2, align 4
  br label %65

22:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  %23 = getelementptr inbounds %"class.juce::TreeViewItem", ptr %6, i32 0, i32 2
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = call noundef i32 @_ZNK4juce12TreeViewItem18getRowNumberInTreeEv(ptr noundef nonnull align 8 dereferenceable(73) %24) #3
  %26 = add nsw i32 1, %25
  store i32 %26, ptr %4, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %27 = getelementptr inbounds %"class.juce::TreeViewItem", ptr %6, i32 0, i32 2
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  %29 = getelementptr inbounds %"class.juce::TreeViewItem", ptr %28, i32 0, i32 3
  %30 = call noundef i32 @_ZNK4juce10OwnedArrayINS_12TreeViewItemENS_20DummyCriticalSectionEE7indexOfEPKS1_(ptr noundef nonnull align 8 dereferenceable(20) %29, ptr noundef %6) #3
  store i32 %30, ptr %5, align 4, !tbaa !17
  br label %31

31:                                               ; preds = %22
  br label %32

32:                                               ; preds = %31
  br label %33

33:                                               ; preds = %32
  br label %34

34:                                               ; preds = %38, %33
  %35 = load i32, ptr %5, align 4, !tbaa !17
  %36 = add nsw i32 %35, -1
  store i32 %36, ptr %5, align 4, !tbaa !17
  %37 = icmp sge i32 %36, 0
  br i1 %37, label %38, label %47

38:                                               ; preds = %34
  %39 = getelementptr inbounds %"class.juce::TreeViewItem", ptr %6, i32 0, i32 2
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  %41 = getelementptr inbounds %"class.juce::TreeViewItem", ptr %40, i32 0, i32 3
  %42 = load i32, ptr %5, align 4, !tbaa !17
  %43 = call noundef ptr @_ZNK4juce10OwnedArrayINS_12TreeViewItemENS_20DummyCriticalSectionEEixEi(ptr noundef nonnull align 8 dereferenceable(20) %41, i32 noundef %42) #3
  %44 = call noundef i32 @_ZNK4juce12TreeViewItem10getNumRowsEv(ptr noundef nonnull align 8 dereferenceable(73) %43) #3
  %45 = load i32, ptr %4, align 4, !tbaa !17
  %46 = add nsw i32 %45, %44
  store i32 %46, ptr %4, align 4, !tbaa !17
  br label %34, !llvm.loop !18

47:                                               ; preds = %34
  %48 = getelementptr inbounds %"class.juce::TreeViewItem", ptr %6, i32 0, i32 2
  %49 = load ptr, ptr %48, align 8, !tbaa !9
  %50 = getelementptr inbounds %"class.juce::TreeViewItem", ptr %49, i32 0, i32 2
  %51 = load ptr, ptr %50, align 8, !tbaa !9
  %52 = icmp eq ptr %51, null
  br i1 %52, label %53, label %62

53:                                               ; preds = %47
  %54 = getelementptr inbounds %"class.juce::TreeViewItem", ptr %6, i32 0, i32 1
  %55 = load ptr, ptr %54, align 8, !tbaa !16
  %56 = getelementptr inbounds %"class.juce::TreeView", ptr %55, i32 0, i32 13
  %57 = load i8, ptr %56, align 2, !tbaa !20, !range !55, !noundef !56
  %58 = trunc i8 %57 to i1
  br i1 %58, label %62, label %59

59:                                               ; preds = %53
  %60 = load i32, ptr %4, align 4, !tbaa !17
  %61 = add nsw i32 %60, -1
  store i32 %61, ptr %4, align 4, !tbaa !17
  br label %62

62:                                               ; preds = %59, %53, %47
  %63 = load i32, ptr %4, align 4, !tbaa !17
  store i32 %63, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  br label %65

64:                                               ; preds = %10, %1
  store i32 0, ptr %2, align 4
  br label %65

65:                                               ; preds = %64, %62, %18
  %66 = load i32, ptr %2, align 4
  ret i32 %66
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4juce10OwnedArrayINS_12TreeViewItemENS_20DummyCriticalSectionEEixEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce10OwnedArrayINS_12TreeViewItemENS_20DummyCriticalSectionEE7indexOfEPKS1_(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef) #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 #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, !6, i64 16}
!10 = !{!"_ZTSN4juce12TreeViewItemE", !6, i64 8, !6, i64 16, !11, i64 24, !14, i64 48, !14, i64 52, !14, i64 56, !14, i64 60, !14, i64 64, !14, i64 68, !15, i64 72, !15, i64 72, !15, i64 72, !15, i64 72, !15, i64 72, !15, i64 72, !14, i64 72}
!11 = !{!"_ZTSN4juce10OwnedArrayINS_12TreeViewItemENS_20DummyCriticalSectionEEE", !12, i64 0, !14, i64 16}
!12 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_12TreeViewItemENS_20DummyCriticalSectionEEE", !13, i64 0, !14, i64 8}
!13 = !{!"_ZTSN4juce9HeapBlockIPNS_12TreeViewItemELb0EEE", !6, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!10, !6, i64 8}
!17 = !{!14, !14, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!21, !15, i64 310}
!21 = !{!"_ZTSN4juce8TreeViewE", !22, i64 0, !47, i64 200, !49, i64 216, !50, i64 224, !51, i64 232, !52, i64 240, !6, i64 280, !53, i64 288, !54, i64 296, !14, i64 304, !15, i64 308, !15, i64 309, !15, i64 310, !15, i64 311, !15, i64 312}
!22 = !{!"_ZTSN4juce9ComponentE", !23, i64 0, !24, i64 8, !24, i64 16, !6, i64 24, !26, i64 32, !28, i64 48, !29, i64 56, !30, i64 64, !6, i64 88, !33, i64 96, !6, i64 104, !34, i64 112, !35, i64 120, !36, i64 128, !37, i64 136, !41, i64 160, !45, i64 184, !7, i64 192, !7, i64 196}
!23 = !{!"_ZTSN4juce13MouseListenerE"}
!24 = !{!"_ZTSN4juce6StringE", !25, i64 0}
!25 = !{!"_ZTSN4juce16CharPointer_UTF8E", !6, i64 0}
!26 = !{!"_ZTSN4juce9RectangleIiEE", !27, i64 0, !14, i64 8, !14, i64 12}
!27 = !{!"_ZTSN4juce5PointIiEE", !14, i64 0, !14, i64 4}
!28 = !{!"_ZTSN4juce13ScopedPointerINS_9Component10PositionerEEE", !6, i64 0}
!29 = !{!"_ZTSN4juce13ScopedPointerINS_15AffineTransformEEE", !6, i64 0}
!30 = !{!"_ZTSN4juce5ArrayIPNS_9ComponentENS_20DummyCriticalSectionELi0EEE", !31, i64 0, !14, i64 16}
!31 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_9ComponentENS_20DummyCriticalSectionEEE", !32, i64 0, !14, i64 8}
!32 = !{!"_ZTSN4juce9HeapBlockIPNS_9ComponentELb0EEE", !6, i64 0}
!33 = !{!"_ZTSN4juce11MouseCursorE", !6, i64 0}
!34 = !{!"_ZTSN4juce13ScopedPointerINS_20CachedComponentImageEEE", !6, i64 0}
!35 = !{!"_ZTSN4juce13ScopedPointerINS_9Component17MouseListenerListEEE", !6, i64 0}
!36 = !{!"_ZTSN4juce13ScopedPointerINS_5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EEEEE", !6, i64 0}
!37 = !{!"_ZTSN4juce12ListenerListINS_17ComponentListenerENS_5ArrayIPS1_NS_20DummyCriticalSectionELi0EEEEE", !38, i64 0}
!38 = !{!"_ZTSN4juce5ArrayIPNS_17ComponentListenerENS_20DummyCriticalSectionELi0EEE", !39, i64 0, !14, i64 16}
!39 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_17ComponentListenerENS_20DummyCriticalSectionEEE", !40, i64 0, !14, i64 8}
!40 = !{!"_ZTSN4juce9HeapBlockIPNS_17ComponentListenerELb0EEE", !6, i64 0}
!41 = !{!"_ZTSN4juce13NamedValueSetE", !42, i64 0}
!42 = !{!"_ZTSN4juce5ArrayINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionELi0EEE", !43, i64 0, !14, i64 16}
!43 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionEEE", !44, i64 0, !14, i64 8}
!44 = !{!"_ZTSN4juce9HeapBlockINS_13NamedValueSet10NamedValueELb0EEE", !6, i64 0}
!45 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE6MasterE", !46, i64 0}
!46 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE13SharedPointerEEE", !6, i64 0}
!47 = !{!"_ZTSN4juce21SettableTooltipClientE", !48, i64 0, !24, i64 8}
!48 = !{!"_ZTSN4juce13TooltipClientE"}
!49 = !{!"_ZTSN4juce21FileDragAndDropTargetE"}
!50 = !{!"_ZTSN4juce17DragAndDropTargetE"}
!51 = !{!"_ZTSN4juce13ScopedPointerINS_8TreeView12TreeViewportEEE", !6, i64 0}
!52 = !{!"_ZTSN4juce15CriticalSectionE", !7, i64 0}
!53 = !{!"_ZTSN4juce13ScopedPointerINS_8TreeView20InsertPointHighlightEEE", !6, i64 0}
!54 = !{!"_ZTSN4juce13ScopedPointerINS_8TreeView20TargetGroupHighlightEEE", !6, i64 0}
!55 = !{i8 0, i8 2}
!56 = !{}


; 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 nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce12TreeViewItem10getNumRowsEv(ptr noundef nonnull align 8 dereferenceable(73)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_ZNK4juce12TreeViewItem18getRowNumberInTreeEv(ptr noundef nonnull align 8 dereferenceable(73) %0) local_unnamed_addr #0 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 16
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %.not14 = icmp eq ptr %3, null
  br i1 %.not14, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %1, %tailrecurse
  %4 = phi ptr [ %12, %tailrecurse ], [ %3, %1 ]
  %5 = phi ptr [ %11, %tailrecurse ], [ %2, %1 ]
  %.tr15 = phi ptr [ %10, %tailrecurse ], [ %0, %1 ]
  %6 = getelementptr inbounds i8, ptr %.tr15, i64 8
  %7 = load ptr, ptr %6, align 8, !tbaa !15
  %.not10 = icmp eq ptr %7, null
  br i1 %.not10, label %.loopexit, label %8

8:                                                ; preds = %.lr.ph
  %9 = tail call noundef zeroext i1 @_ZNK4juce12TreeViewItem6isOpenEv(ptr noundef nonnull align 8 dereferenceable(73) %4) #2
  br i1 %9, label %13, label %tailrecurse

tailrecurse:                                      ; preds = %8
  %10 = load ptr, ptr %5, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %10, i64 16
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %.not = icmp eq ptr %12, null
  br i1 %.not, label %.loopexit, label %.lr.ph

13:                                               ; preds = %8
  %14 = getelementptr inbounds i8, ptr %.tr15, i64 8
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = tail call noundef i32 @_ZNK4juce12TreeViewItem18getRowNumberInTreeEv(ptr noundef nonnull align 8 dereferenceable(73) %15) #2
  %17 = add nsw i32 %16, 1
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %18, i64 24
  %20 = tail call noundef i32 @_ZNK4juce10OwnedArrayINS_12TreeViewItemENS_20DummyCriticalSectionEE7indexOfEPKS1_(ptr noundef nonnull align 8 dereferenceable(20) %19, ptr noundef nonnull %.tr15) #2
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph18, label %._crit_edge

.lr.ph18:                                         ; preds = %13, %.lr.ph18
  %.017 = phi i32 [ %22, %.lr.ph18 ], [ %20, %13 ]
  %.0616 = phi i32 [ %27, %.lr.ph18 ], [ %17, %13 ]
  %22 = add nsw i32 %.017, -1
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %23, i64 24
  %25 = tail call noundef ptr @_ZNK4juce10OwnedArrayINS_12TreeViewItemENS_20DummyCriticalSectionEEixEi(ptr noundef nonnull align 8 dereferenceable(20) %24, i32 noundef %22) #2
  %26 = tail call noundef i32 @_ZNK4juce12TreeViewItem10getNumRowsEv(ptr noundef nonnull align 8 dereferenceable(73) %25) #2
  %27 = add nsw i32 %26, %.0616
  %28 = icmp ugt i32 %.017, 1
  br i1 %28, label %.lr.ph18, label %._crit_edge, !llvm.loop !16

._crit_edge:                                      ; preds = %.lr.ph18, %13
  %.06.lcssa = phi i32 [ %17, %13 ], [ %27, %.lr.ph18 ]
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  %31 = load ptr, ptr %30, align 8, !tbaa !5
  %32 = icmp eq ptr %31, null
  br i1 %32, label %33, label %.loopexit

33:                                               ; preds = %._crit_edge
  %34 = load ptr, ptr %14, align 8, !tbaa !15
  %35 = getelementptr inbounds i8, ptr %34, i64 310
  %36 = load i8, ptr %35, align 2, !tbaa !18, !range !53, !noundef !54
  %37 = xor i8 %36, 1
  %38 = zext nneg i8 %37 to i32
  %spec.select = sub i32 %.06.lcssa, %38
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph, %tailrecurse, %1, %33, %._crit_edge
  %.07 = phi i32 [ %.06.lcssa, %._crit_edge ], [ %spec.select, %33 ], [ 0, %1 ], [ 0, %tailrecurse ], [ 0, %.lr.ph ]
  ret i32 %.07
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4juce10OwnedArrayINS_12TreeViewItemENS_20DummyCriticalSectionEEixEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce10OwnedArrayINS_12TreeViewItemENS_20DummyCriticalSectionEE7indexOfEPKS1_(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef) local_unnamed_addr #0 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 = { 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 = { 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, !7, i64 16}
!6 = !{!"_ZTSN4juce12TreeViewItemE", !7, i64 8, !7, i64 16, !10, i64 24, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !13, i64 64, !13, i64 68, !14, i64 72, !14, i64 72, !14, i64 72, !14, i64 72, !14, i64 72, !14, i64 72, !13, i64 72}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN4juce10OwnedArrayINS_12TreeViewItemENS_20DummyCriticalSectionEEE", !11, i64 0, !13, i64 16}
!11 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_12TreeViewItemENS_20DummyCriticalSectionEEE", !12, i64 0, !13, i64 8}
!12 = !{!"_ZTSN4juce9HeapBlockIPNS_12TreeViewItemELb0EEE", !7, i64 0}
!13 = !{!"int", !8, i64 0}
!14 = !{!"bool", !8, i64 0}
!15 = !{!6, !7, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!19, !14, i64 310}
!19 = !{!"_ZTSN4juce8TreeViewE", !20, i64 0, !45, i64 200, !47, i64 216, !48, i64 224, !49, i64 232, !50, i64 240, !7, i64 280, !51, i64 288, !52, i64 296, !13, i64 304, !14, i64 308, !14, i64 309, !14, i64 310, !14, i64 311, !14, i64 312}
!20 = !{!"_ZTSN4juce9ComponentE", !21, i64 0, !22, i64 8, !22, i64 16, !7, i64 24, !24, i64 32, !26, i64 48, !27, i64 56, !28, i64 64, !7, i64 88, !31, i64 96, !7, i64 104, !32, i64 112, !33, i64 120, !34, i64 128, !35, i64 136, !39, i64 160, !43, i64 184, !8, i64 192, !8, i64 196}
!21 = !{!"_ZTSN4juce13MouseListenerE"}
!22 = !{!"_ZTSN4juce6StringE", !23, i64 0}
!23 = !{!"_ZTSN4juce16CharPointer_UTF8E", !7, i64 0}
!24 = !{!"_ZTSN4juce9RectangleIiEE", !25, i64 0, !13, i64 8, !13, i64 12}
!25 = !{!"_ZTSN4juce5PointIiEE", !13, i64 0, !13, i64 4}
!26 = !{!"_ZTSN4juce13ScopedPointerINS_9Component10PositionerEEE", !7, i64 0}
!27 = !{!"_ZTSN4juce13ScopedPointerINS_15AffineTransformEEE", !7, i64 0}
!28 = !{!"_ZTSN4juce5ArrayIPNS_9ComponentENS_20DummyCriticalSectionELi0EEE", !29, i64 0, !13, i64 16}
!29 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_9ComponentENS_20DummyCriticalSectionEEE", !30, i64 0, !13, i64 8}
!30 = !{!"_ZTSN4juce9HeapBlockIPNS_9ComponentELb0EEE", !7, i64 0}
!31 = !{!"_ZTSN4juce11MouseCursorE", !7, i64 0}
!32 = !{!"_ZTSN4juce13ScopedPointerINS_20CachedComponentImageEEE", !7, i64 0}
!33 = !{!"_ZTSN4juce13ScopedPointerINS_9Component17MouseListenerListEEE", !7, i64 0}
!34 = !{!"_ZTSN4juce13ScopedPointerINS_5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EEEEE", !7, i64 0}
!35 = !{!"_ZTSN4juce12ListenerListINS_17ComponentListenerENS_5ArrayIPS1_NS_20DummyCriticalSectionELi0EEEEE", !36, i64 0}
!36 = !{!"_ZTSN4juce5ArrayIPNS_17ComponentListenerENS_20DummyCriticalSectionELi0EEE", !37, i64 0, !13, i64 16}
!37 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_17ComponentListenerENS_20DummyCriticalSectionEEE", !38, i64 0, !13, i64 8}
!38 = !{!"_ZTSN4juce9HeapBlockIPNS_17ComponentListenerELb0EEE", !7, i64 0}
!39 = !{!"_ZTSN4juce13NamedValueSetE", !40, i64 0}
!40 = !{!"_ZTSN4juce5ArrayINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionELi0EEE", !41, i64 0, !13, i64 16}
!41 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionEEE", !42, i64 0, !13, i64 8}
!42 = !{!"_ZTSN4juce9HeapBlockINS_13NamedValueSet10NamedValueELb0EEE", !7, i64 0}
!43 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE6MasterE", !44, i64 0}
!44 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE13SharedPointerEEE", !7, i64 0}
!45 = !{!"_ZTSN4juce21SettableTooltipClientE", !46, i64 0, !22, i64 8}
!46 = !{!"_ZTSN4juce13TooltipClientE"}
!47 = !{!"_ZTSN4juce21FileDragAndDropTargetE"}
!48 = !{!"_ZTSN4juce17DragAndDropTargetE"}
!49 = !{!"_ZTSN4juce13ScopedPointerINS_8TreeView12TreeViewportEEE", !7, i64 0}
!50 = !{!"_ZTSN4juce15CriticalSectionE", !8, i64 0}
!51 = !{!"_ZTSN4juce13ScopedPointerINS_8TreeView20InsertPointHighlightEEE", !7, i64 0}
!52 = !{!"_ZTSN4juce13ScopedPointerINS_8TreeView20TargetGroupHighlightEEE", !7, i64 0}
!53 = !{i8 0, i8 2}
!54 = !{}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass