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

; 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::Range" = type { i32, i32 }
%"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 }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce9Component8getWidthEv(ptr noundef nonnull align 8 dereferenceable(197)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce9Component9getHeightEv(ptr noundef nonnull align 8 dereferenceable(197)) #0 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN4juce18isPositiveAndBelowIiEEbT_S1_(i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce5RangeIiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i32 noundef) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce7ListBox12getRowHeightEv(ptr noundef nonnull align 8 dereferenceable(296)) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce7ListBox17selectRowInternalEibbb(ptr noundef nonnull align 8 dereferenceable(296) %0, i32 noundef %1, i1 noundef zeroext %2, i1 noundef zeroext %3, i1 noundef zeroext %4) #1 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca %"class.juce::Range", align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  %12 = zext i1 %2 to i8
  store i8 %12, ptr %8, align 1, !tbaa !11
  %13 = zext i1 %3 to i8
  store i8 %13, ptr %9, align 1, !tbaa !11
  %14 = zext i1 %4 to i8
  store i8 %14, ptr %10, align 1, !tbaa !11
  %15 = load ptr, ptr %6, align 8
  %16 = getelementptr inbounds %"class.juce::ListBox", ptr %15, i32 0, i32 11
  %17 = load i8, ptr %16, align 4, !tbaa !13, !range !49, !noundef !50
  %18 = trunc i8 %17 to i1
  br i1 %18, label %20, label %19

19:                                               ; preds = %5
  store i8 1, ptr %9, align 1, !tbaa !11
  br label %20

20:                                               ; preds = %19, %5
  %21 = load i32, ptr %7, align 4, !tbaa !9
  %22 = call noundef zeroext i1 @_ZNK4juce7ListBox13isRowSelectedEi(ptr noundef nonnull align 8 dereferenceable(296) %15, i32 noundef %21)
  br i1 %22, label %23, label %29

23:                                               ; preds = %20
  %24 = load i8, ptr %9, align 1, !tbaa !11, !range !49, !noundef !50
  %25 = trunc i8 %24 to i1
  br i1 %25, label %26, label %77

26:                                               ; preds = %23
  %27 = call noundef i32 @_ZNK4juce7ListBox18getNumSelectedRowsEv(ptr noundef nonnull align 8 dereferenceable(296) %15)
  %28 = icmp sgt i32 %27, 1
  br i1 %28, label %29, label %77

29:                                               ; preds = %26, %20
  %30 = load i32, ptr %7, align 4, !tbaa !9
  %31 = getelementptr inbounds %"class.juce::ListBox", ptr %15, i32 0, i32 6
  %32 = load i32, ptr %31, align 8, !tbaa !51
  %33 = call noundef zeroext i1 @_ZN4juce18isPositiveAndBelowIiEEbT_S1_(i32 noundef %30, i32 noundef %32) #3
  br i1 %33, label %34, label %71

34:                                               ; preds = %29
  %35 = load i8, ptr %9, align 1, !tbaa !11, !range !49, !noundef !50
  %36 = trunc i8 %35 to i1
  br i1 %36, label %37, label %39

37:                                               ; preds = %34
  %38 = getelementptr inbounds %"class.juce::ListBox", ptr %15, i32 0, i32 15
  call void @_ZN4juce9SparseSetIiE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %38)
  br label %39

39:                                               ; preds = %37, %34
  %40 = getelementptr inbounds %"class.juce::ListBox", ptr %15, i32 0, i32 15
  %41 = load i32, ptr %7, align 4, !tbaa !9
  %42 = load i32, ptr %7, align 4, !tbaa !9
  %43 = add nsw i32 %42, 1
  call void @_ZN4juce5RangeIiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %11, i32 noundef %41, i32 noundef %43) #3
  call void @_ZN4juce9SparseSetIiE8addRangeENS_5RangeIiEE(ptr noundef nonnull align 8 dereferenceable(24) %40, ptr noundef %11)
  %44 = call noundef i32 @_ZNK4juce9Component9getHeightEv(ptr noundef nonnull align 8 dereferenceable(197) %15) #3
  %45 = icmp eq i32 %44, 0
  br i1 %45, label %49, label %46

46:                                               ; preds = %39
  %47 = call noundef i32 @_ZNK4juce9Component8getWidthEv(ptr noundef nonnull align 8 dereferenceable(197) %15) #3
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %49, label %50

49:                                               ; preds = %46, %39
  store i8 1, ptr %8, align 1, !tbaa !11
  br label %50

50:                                               ; preds = %49, %46
  %51 = getelementptr inbounds %"class.juce::ListBox", ptr %15, i32 0, i32 3
  %52 = call noundef ptr @_ZNK4juce13ScopedPointerINS_7ListBox12ListViewportEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %51) #3
  %53 = load i32, ptr %7, align 4, !tbaa !9
  %54 = call noundef i32 @_ZNK4juce7ListBox12getRowHeightEv(ptr noundef nonnull align 8 dereferenceable(296) %15) #3
  %55 = load i8, ptr %8, align 1, !tbaa !11, !range !49, !noundef !50
  %56 = trunc i8 %55 to i1
  %57 = getelementptr inbounds %"class.juce::ListBox", ptr %15, i32 0, i32 10
  %58 = load i32, ptr %57, align 8, !tbaa !52
  %59 = getelementptr inbounds %"class.juce::ListBox", ptr %15, i32 0, i32 6
  %60 = load i32, ptr %59, align 8, !tbaa !51
  %61 = load i8, ptr %10, align 1, !tbaa !11, !range !49, !noundef !50
  %62 = trunc i8 %61 to i1
  call void @_ZN4juce7ListBox12ListViewport9selectRowEiibiib(ptr noundef nonnull align 8 dereferenceable(1269) %52, i32 noundef %53, i32 noundef %54, i1 noundef zeroext %56, i32 noundef %58, i32 noundef %60, i1 noundef zeroext %62)
  %63 = load i32, ptr %7, align 4, !tbaa !9
  %64 = getelementptr inbounds %"class.juce::ListBox", ptr %15, i32 0, i32 10
  store i32 %63, ptr %64, align 8, !tbaa !52
  %65 = getelementptr inbounds %"class.juce::ListBox", ptr %15, i32 0, i32 2
  %66 = load ptr, ptr %65, align 8, !tbaa !53
  %67 = load i32, ptr %7, align 4, !tbaa !9
  %68 = load ptr, ptr %66, align 8, !tbaa !54
  %69 = getelementptr inbounds ptr, ptr %68, i64 8
  %70 = load ptr, ptr %69, align 8
  call void %70(ptr noundef nonnull align 8 dereferenceable(8) %66, i32 noundef %67)
  br label %76

71:                                               ; preds = %29
  %72 = load i8, ptr %9, align 1, !tbaa !11, !range !49, !noundef !50
  %73 = trunc i8 %72 to i1
  br i1 %73, label %74, label %75

74:                                               ; preds = %71
  call void @_ZN4juce7ListBox15deselectAllRowsEv(ptr noundef nonnull align 8 dereferenceable(296) %15)
  br label %75

75:                                               ; preds = %74, %71
  br label %76

76:                                               ; preds = %75, %50
  br label %77

77:                                               ; preds = %76, %26, %23
  ret void
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce7ListBox12ListViewport9selectRowEiibiib(ptr noundef nonnull align 8 dereferenceable(1269), i32 noundef, i32 noundef, i1 noundef zeroext, i32 noundef, i32 noundef, i1 noundef zeroext) #1 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 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !12, i64 268}
!14 = !{!"_ZTSN4juce7ListBoxE", !15, i64 0, !40, i64 200, !6, i64 216, !42, i64 224, !43, i64 232, !44, i64 240, !10, i64 248, !10, i64 252, !10, i64 256, !10, i64 260, !10, i64 264, !12, i64 268, !12, i64 269, !12, i64 270, !12, i64 271, !45, i64 272}
!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 = !{!"_ZTSN4juce21SettableTooltipClientE", !41, i64 0, !17, i64 8}
!41 = !{!"_ZTSN4juce13TooltipClientE"}
!42 = !{!"_ZTSN4juce13ScopedPointerINS_7ListBox12ListViewportEEE", !6, i64 0}
!43 = !{!"_ZTSN4juce13ScopedPointerINS_9ComponentEEE", !6, i64 0}
!44 = !{!"_ZTSN4juce13ScopedPointerINS_13MouseListenerEEE", !6, 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 = !{i8 0, i8 2}
!50 = !{}
!51 = !{!14, !10, i64 248}
!52 = !{!14, !10, i64 264}
!53 = !{!14, !6, i64 216}
!54 = !{!55, !55, i64 0}
!55 = !{!"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::Range" = type { i32, i32 }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce9Component8getWidthEv(ptr noundef nonnull align 8 dereferenceable(197)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce9Component9getHeightEv(ptr noundef nonnull align 8 dereferenceable(197)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN4juce18isPositiveAndBelowIiEEbT_S1_(i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce5RangeIiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i32 noundef) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4juce13ScopedPointerINS_7ListBox12ListViewportEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce7ListBox12getRowHeightEv(ptr noundef nonnull align 8 dereferenceable(296)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce7ListBox17selectRowInternalEibbb(ptr noundef nonnull align 8 dereferenceable(296) %0, i32 noundef %1, i1 noundef zeroext %2, i1 noundef zeroext %3, i1 noundef zeroext %4) local_unnamed_addr #1 align 2 {
  %6 = alloca %"class.juce::Range", align 4
  %7 = getelementptr inbounds i8, ptr %0, i64 268
  %8 = load i8, ptr %7, align 4, !tbaa !5, !range !46, !noundef !47
  %9 = trunc nuw i8 %8 to i1
  %not. = xor i1 %9, true
  %spec.select = or i1 %not., %3
  %10 = tail call noundef zeroext i1 @_ZNK4juce7ListBox13isRowSelectedEi(ptr noundef nonnull align 8 dereferenceable(296) %0, i32 noundef %1)
  br i1 %10, label %11, label %15

11:                                               ; preds = %5
  br i1 %spec.select, label %12, label %48

12:                                               ; preds = %11
  %13 = tail call noundef i32 @_ZNK4juce7ListBox18getNumSelectedRowsEv(ptr noundef nonnull align 8 dereferenceable(296) %0)
  %14 = icmp sgt i32 %13, 1
  br i1 %14, label %.thread, label %48

15:                                               ; preds = %5
  %16 = getelementptr inbounds i8, ptr %0, i64 248
  %17 = load i32, ptr %16, align 8, !tbaa !48
  %18 = tail call noundef zeroext i1 @_ZN4juce18isPositiveAndBelowIiEEbT_S1_(i32 noundef %1, i32 noundef %17) #3
  br i1 %18, label %22, label %47

.thread:                                          ; preds = %12
  %19 = getelementptr inbounds i8, ptr %0, i64 248
  %20 = load i32, ptr %19, align 8, !tbaa !48
  %21 = tail call noundef zeroext i1 @_ZN4juce18isPositiveAndBelowIiEEbT_S1_(i32 noundef %1, i32 noundef %20) #3
  br i1 %21, label %.thread13, label %.thread14

22:                                               ; preds = %15
  br i1 %spec.select, label %.thread13, label %25

.thread13:                                        ; preds = %.thread, %22
  %23 = phi ptr [ %16, %22 ], [ %19, %.thread ]
  %24 = getelementptr inbounds i8, ptr %0, i64 272
  tail call void @_ZN4juce9SparseSetIiE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %24)
  br label %25

25:                                               ; preds = %.thread13, %22
  %26 = phi ptr [ %23, %.thread13 ], [ %16, %22 ]
  %27 = getelementptr inbounds i8, ptr %0, i64 272
  %28 = add nsw i32 %1, 1
  call void @_ZN4juce5RangeIiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %6, i32 noundef %1, i32 noundef %28) #3
  call void @_ZN4juce9SparseSetIiE8addRangeENS_5RangeIiEE(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull %6)
  %29 = call noundef i32 @_ZNK4juce9Component9getHeightEv(ptr noundef nonnull align 8 dereferenceable(197) %0) #3
  %30 = icmp eq i32 %29, 0
  br i1 %30, label %34, label %31

31:                                               ; preds = %25
  %32 = call noundef i32 @_ZNK4juce9Component8getWidthEv(ptr noundef nonnull align 8 dereferenceable(197) %0) #3
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %34, label %35

34:                                               ; preds = %31, %25
  br label %35

35:                                               ; preds = %34, %31
  %.0 = phi i1 [ true, %34 ], [ %2, %31 ]
  %36 = getelementptr inbounds i8, ptr %0, i64 224
  %37 = call noundef ptr @_ZNK4juce13ScopedPointerINS_7ListBox12ListViewportEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %36) #3
  %38 = call noundef i32 @_ZNK4juce7ListBox12getRowHeightEv(ptr noundef nonnull align 8 dereferenceable(296) %0) #3
  %39 = getelementptr inbounds i8, ptr %0, i64 264
  %40 = load i32, ptr %39, align 8, !tbaa !49
  %41 = load i32, ptr %26, align 8, !tbaa !48
  call void @_ZN4juce7ListBox12ListViewport9selectRowEiibiib(ptr noundef nonnull align 8 dereferenceable(1269) %37, i32 noundef %1, i32 noundef %38, i1 noundef zeroext %.0, i32 noundef %40, i32 noundef %41, i1 noundef zeroext %4)
  store i32 %1, ptr %39, align 8, !tbaa !49
  %42 = getelementptr inbounds i8, ptr %0, i64 216
  %43 = load ptr, ptr %42, align 8, !tbaa !50
  %44 = load ptr, ptr %43, align 8, !tbaa !51
  %45 = getelementptr inbounds i8, ptr %44, i64 64
  %46 = load ptr, ptr %45, align 8
  call void %46(ptr noundef nonnull align 8 dereferenceable(8) %43, i32 noundef %1)
  br label %48

47:                                               ; preds = %15
  br i1 %spec.select, label %.thread14, label %48

.thread14:                                        ; preds = %.thread, %47
  tail call void @_ZN4juce7ListBox15deselectAllRowsEv(ptr noundef nonnull align 8 dereferenceable(296) %0)
  br label %48

48:                                               ; preds = %35, %.thread14, %47, %12, %11
  ret void
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce7ListBox12ListViewport9selectRowEiibiib(ptr noundef nonnull align 8 dereferenceable(1269), i32 noundef, i32 noundef, i1 noundef zeroext, i32 noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #1 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 = { 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, !41, i64 268}
!6 = !{!"_ZTSN4juce7ListBoxE", !7, i64 0, !36, i64 200, !11, i64 216, !38, i64 224, !39, i64 232, !40, i64 240, !16, i64 248, !16, i64 252, !16, i64 256, !16, i64 260, !16, i64 264, !41, i64 268, !41, i64 269, !41, i64 270, !41, i64 271, !42, i64 272}
!7 = !{!"_ZTSN4juce9ComponentE", !8, i64 0, !9, i64 8, !9, i64 16, !11, i64 24, !14, i64 32, !17, i64 48, !18, i64 56, !19, i64 64, !11, i64 88, !22, i64 96, !11, i64 104, !23, i64 112, !24, i64 120, !25, i64 128, !26, i64 136, !30, i64 160, !34, i64 184, !12, i64 192, !12, i64 196}
!8 = !{!"_ZTSN4juce13MouseListenerE"}
!9 = !{!"_ZTSN4juce6StringE", !10, i64 0}
!10 = !{!"_ZTSN4juce16CharPointer_UTF8E", !11, i64 0}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"_ZTSN4juce9RectangleIiEE", !15, i64 0, !16, i64 8, !16, i64 12}
!15 = !{!"_ZTSN4juce5PointIiEE", !16, i64 0, !16, i64 4}
!16 = !{!"int", !12, i64 0}
!17 = !{!"_ZTSN4juce13ScopedPointerINS_9Component10PositionerEEE", !11, i64 0}
!18 = !{!"_ZTSN4juce13ScopedPointerINS_15AffineTransformEEE", !11, 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", !11, i64 0}
!22 = !{!"_ZTSN4juce11MouseCursorE", !11, i64 0}
!23 = !{!"_ZTSN4juce13ScopedPointerINS_20CachedComponentImageEEE", !11, i64 0}
!24 = !{!"_ZTSN4juce13ScopedPointerINS_9Component17MouseListenerListEEE", !11, i64 0}
!25 = !{!"_ZTSN4juce13ScopedPointerINS_5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EEEEE", !11, 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", !11, 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", !11, i64 0}
!34 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE6MasterE", !35, i64 0}
!35 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE13SharedPointerEEE", !11, i64 0}
!36 = !{!"_ZTSN4juce21SettableTooltipClientE", !37, i64 0, !9, i64 8}
!37 = !{!"_ZTSN4juce13TooltipClientE"}
!38 = !{!"_ZTSN4juce13ScopedPointerINS_7ListBox12ListViewportEEE", !11, i64 0}
!39 = !{!"_ZTSN4juce13ScopedPointerINS_9ComponentEEE", !11, i64 0}
!40 = !{!"_ZTSN4juce13ScopedPointerINS_13MouseListenerEEE", !11, i64 0}
!41 = !{!"bool", !12, i64 0}
!42 = !{!"_ZTSN4juce9SparseSetIiEE", !43, i64 0}
!43 = !{!"_ZTSN4juce5ArrayIiNS_20DummyCriticalSectionELi0EEE", !44, i64 0, !16, i64 16}
!44 = !{!"_ZTSN4juce19ArrayAllocationBaseIiNS_20DummyCriticalSectionEEE", !45, i64 0, !16, i64 8}
!45 = !{!"_ZTSN4juce9HeapBlockIiLb0EEE", !11, i64 0}
!46 = !{i8 0, i8 2}
!47 = !{}
!48 = !{!6, !16, i64 248}
!49 = !{!6, !16, i64 264}
!50 = !{!6, !11, i64 216}
!51 = !{!52, !52, i64 0}
!52 = !{!"vtable pointer", !13, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass