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

; 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::ScrollBar" = type { %"class.juce::Component.base", %"class.juce::AsyncUpdater", %"class.juce::Timer", %"class.juce::Range.324", %"class.juce::Range.324", double, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8, i8, i8, %"class.juce::ScopedPointer.325", %"class.juce::ScopedPointer.325", %"class.juce::ListenerList.326" }
%"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::AsyncUpdater" = type { ptr, %"class.juce::ReferenceCountedObjectPtr.15" }
%"class.juce::ReferenceCountedObjectPtr.15" = type { ptr }
%"class.juce::Timer" = type { ptr, i32, i32, ptr, ptr }
%"class.juce::Range.324" = type { double, double }
%"class.juce::ScopedPointer.325" = type { ptr }
%"class.juce::ListenerList.326" = type { %"class.juce::Array.327" }
%"class.juce::Array.327" = type { %"class.juce::ArrayAllocationBase.328", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.328" = type <{ %"class.juce::HeapBlock.329", i32, [4 x i8] }>
%"class.juce::HeapBlock.329" = 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 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef, i32 noundef) #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce10roundToIntIdEEiT_(double noundef) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(281) ptr @_ZNK4juce9Component14getLookAndFeelEv(ptr noundef nonnull align 8 dereferenceable(197)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce9ScrollBar19updateThumbPositionEv(ptr noundef nonnull align 8 dereferenceable(376) %0) #2 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %8 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %9 = call noundef nonnull align 8 dereferenceable(281) ptr @_ZNK4juce9Component14getLookAndFeelEv(ptr noundef nonnull align 8 dereferenceable(197) %8) #4
  %10 = load ptr, ptr %9, align 8, !tbaa !9
  %11 = getelementptr inbounds ptr, ptr %10, i64 6
  %12 = load ptr, ptr %11, align 8
  %13 = call noundef i32 %12(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(376) %8)
  store i32 %13, ptr %3, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %14 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 3
  %15 = call noundef double @_ZNK4juce5RangeIdE9getLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %14) #4
  %16 = fcmp ogt double %15, 0.000000e+00
  br i1 %16, label %17, label %27

17:                                               ; preds = %1
  %18 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 4
  %19 = call noundef double @_ZNK4juce5RangeIdE9getLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %18) #4
  %20 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 8
  %21 = load i32, ptr %20, align 4, !tbaa !13
  %22 = sitofp i32 %21 to double
  %23 = fmul double %19, %22
  %24 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 3
  %25 = call noundef double @_ZNK4juce5RangeIdE9getLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %24) #4
  %26 = fdiv double %23, %25
  br label %31

27:                                               ; preds = %1
  %28 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 8
  %29 = load i32, ptr %28, align 4, !tbaa !13
  %30 = sitofp i32 %29 to double
  br label %31

31:                                               ; preds = %27, %17
  %32 = phi double [ %26, %17 ], [ %30, %27 ]
  %33 = call noundef i32 @_ZN4juce10roundToIntIdEEiT_(double noundef %32) #4
  store i32 %33, ptr %4, align 4, !tbaa !11
  %34 = load i32, ptr %4, align 4, !tbaa !11
  %35 = load i32, ptr %3, align 4, !tbaa !11
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %37, label %43

37:                                               ; preds = %31
  %38 = load i32, ptr %3, align 4, !tbaa !11
  %39 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 8
  %40 = load i32, ptr %39, align 4, !tbaa !13
  %41 = sub nsw i32 %40, 1
  %42 = call noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef %38, i32 noundef %41)
  store i32 %42, ptr %4, align 4, !tbaa !11
  br label %43

43:                                               ; preds = %37, %31
  %44 = load i32, ptr %4, align 4, !tbaa !11
  %45 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 8
  %46 = load i32, ptr %45, align 4, !tbaa !13
  %47 = icmp sgt i32 %44, %46
  br i1 %47, label %48, label %51

48:                                               ; preds = %43
  %49 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 8
  %50 = load i32, ptr %49, align 4, !tbaa !13
  store i32 %50, ptr %4, align 4, !tbaa !11
  br label %51

51:                                               ; preds = %48, %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %52 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 7
  %53 = load i32, ptr %52, align 8, !tbaa !51
  store i32 %53, ptr %5, align 4, !tbaa !11
  %54 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 3
  %55 = call noundef double @_ZNK4juce5RangeIdE9getLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %54) #4
  %56 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 4
  %57 = call noundef double @_ZNK4juce5RangeIdE9getLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %56) #4
  %58 = fcmp ogt double %55, %57
  br i1 %58, label %59, label %80

59:                                               ; preds = %51
  %60 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 4
  %61 = call noundef double @_ZNK4juce5RangeIdE8getStartEv(ptr noundef nonnull align 8 dereferenceable(16) %60) #4
  %62 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 3
  %63 = call noundef double @_ZNK4juce5RangeIdE8getStartEv(ptr noundef nonnull align 8 dereferenceable(16) %62) #4
  %64 = fsub double %61, %63
  %65 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 8
  %66 = load i32, ptr %65, align 4, !tbaa !13
  %67 = load i32, ptr %4, align 4, !tbaa !11
  %68 = sub nsw i32 %66, %67
  %69 = sitofp i32 %68 to double
  %70 = fmul double %64, %69
  %71 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 3
  %72 = call noundef double @_ZNK4juce5RangeIdE9getLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %71) #4
  %73 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 4
  %74 = call noundef double @_ZNK4juce5RangeIdE9getLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %73) #4
  %75 = fsub double %72, %74
  %76 = fdiv double %70, %75
  %77 = call noundef i32 @_ZN4juce10roundToIntIdEEiT_(double noundef %76) #4
  %78 = load i32, ptr %5, align 4, !tbaa !11
  %79 = add nsw i32 %78, %77
  store i32 %79, ptr %5, align 4, !tbaa !11
  br label %80

80:                                               ; preds = %59, %51
  %81 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 18
  %82 = load i8, ptr %81, align 2, !tbaa !52, !range !53, !noundef !54
  %83 = trunc i8 %82 to i1
  br i1 %83, label %84, label %96

84:                                               ; preds = %80
  %85 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 3
  %86 = call noundef double @_ZNK4juce5RangeIdE9getLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %85) #4
  %87 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 4
  %88 = call noundef double @_ZNK4juce5RangeIdE9getLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %87) #4
  %89 = fcmp ogt double %86, %88
  br i1 %89, label %90, label %94

90:                                               ; preds = %84
  %91 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 4
  %92 = call noundef double @_ZNK4juce5RangeIdE9getLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %91) #4
  %93 = fcmp ogt double %92, 0.000000e+00
  br label %94

94:                                               ; preds = %90, %84
  %95 = phi i1 [ false, %84 ], [ %93, %90 ]
  br label %96

96:                                               ; preds = %94, %80
  %97 = phi i1 [ true, %80 ], [ %95, %94 ]
  %98 = load ptr, ptr %8, align 8, !tbaa !9
  %99 = getelementptr inbounds ptr, ptr %98, i64 11
  %100 = load ptr, ptr %99, align 8
  call void %100(ptr noundef nonnull align 8 dereferenceable(197) %8, i1 noundef zeroext %97)
  %101 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 9
  %102 = load i32, ptr %101, align 8, !tbaa !55
  %103 = load i32, ptr %5, align 4, !tbaa !11
  %104 = icmp ne i32 %102, %103
  br i1 %104, label %110, label %105

105:                                              ; preds = %96
  %106 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 10
  %107 = load i32, ptr %106, align 4, !tbaa !56
  %108 = load i32, ptr %4, align 4, !tbaa !11
  %109 = icmp ne i32 %107, %108
  br i1 %109, label %110, label %144

110:                                              ; preds = %105, %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %111 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 9
  %112 = load i32, ptr %111, align 8, !tbaa !55
  %113 = load i32, ptr %5, align 4, !tbaa !11
  %114 = call noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef %112, i32 noundef %113)
  %115 = sub nsw i32 %114, 4
  store i32 %115, ptr %6, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %116 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 9
  %117 = load i32, ptr %116, align 8, !tbaa !55
  %118 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 10
  %119 = load i32, ptr %118, align 4, !tbaa !56
  %120 = add nsw i32 %117, %119
  %121 = load i32, ptr %5, align 4, !tbaa !11
  %122 = load i32, ptr %4, align 4, !tbaa !11
  %123 = add nsw i32 %121, %122
  %124 = call noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef %120, i32 noundef %123)
  %125 = add nsw i32 %124, 8
  %126 = load i32, ptr %6, align 4, !tbaa !11
  %127 = sub nsw i32 %125, %126
  store i32 %127, ptr %7, align 4, !tbaa !11
  %128 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 16
  %129 = load i8, ptr %128, align 4, !tbaa !57, !range !53, !noundef !54
  %130 = trunc i8 %129 to i1
  br i1 %130, label %131, label %135

131:                                              ; preds = %110
  %132 = load i32, ptr %6, align 4, !tbaa !11
  %133 = call noundef i32 @_ZNK4juce9Component8getWidthEv(ptr noundef nonnull align 8 dereferenceable(197) %8) #4
  %134 = load i32, ptr %7, align 4, !tbaa !11
  call void @_ZN4juce9Component7repaintEiiii(ptr noundef nonnull align 8 dereferenceable(197) %8, i32 noundef 0, i32 noundef %132, i32 noundef %133, i32 noundef %134)
  br label %139

135:                                              ; preds = %110
  %136 = load i32, ptr %6, align 4, !tbaa !11
  %137 = load i32, ptr %7, align 4, !tbaa !11
  %138 = call noundef i32 @_ZNK4juce9Component9getHeightEv(ptr noundef nonnull align 8 dereferenceable(197) %8) #4
  call void @_ZN4juce9Component7repaintEiiii(ptr noundef nonnull align 8 dereferenceable(197) %8, i32 noundef %136, i32 noundef 0, i32 noundef %137, i32 noundef %138)
  br label %139

139:                                              ; preds = %135, %131
  %140 = load i32, ptr %5, align 4, !tbaa !11
  %141 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 9
  store i32 %140, ptr %141, align 8, !tbaa !55
  %142 = load i32, ptr %4, align 4, !tbaa !11
  %143 = getelementptr inbounds %"class.juce::ScrollBar", ptr %8, i32 0, i32 10
  store i32 %142, ptr %143, align 4, !tbaa !56
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %144

144:                                              ; preds = %139, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  ret void
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK4juce5RangeIdE8getStartEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 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 = { 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 #3 = { 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 #4 = { 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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 300}
!14 = !{!"_ZTSN4juce9ScrollBarE", !15, i64 0, !40, i64 200, !42, i64 216, !43, i64 248, !43, i64 264, !44, i64 280, !44, i64 288, !12, i64 296, !12, i64 300, !12, i64 304, !12, i64 308, !12, i64 312, !12, i64 316, !12, i64 320, !12, i64 324, !12, i64 328, !45, i64 332, !45, i64 333, !45, i64 334, !46, i64 336, !46, i64 344, !47, i64 352}
!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, !12, i64 8, !12, i64 12}
!20 = !{!"_ZTSN4juce5PointIiEE", !12, i64 0, !12, i64 4}
!21 = !{!"_ZTSN4juce13ScopedPointerINS_9Component10PositionerEEE", !6, i64 0}
!22 = !{!"_ZTSN4juce13ScopedPointerINS_15AffineTransformEEE", !6, i64 0}
!23 = !{!"_ZTSN4juce5ArrayIPNS_9ComponentENS_20DummyCriticalSectionELi0EEE", !24, i64 0, !12, i64 16}
!24 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_9ComponentENS_20DummyCriticalSectionEEE", !25, i64 0, !12, 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, !12, i64 16}
!32 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_17ComponentListenerENS_20DummyCriticalSectionEEE", !33, i64 0, !12, i64 8}
!33 = !{!"_ZTSN4juce9HeapBlockIPNS_17ComponentListenerELb0EEE", !6, i64 0}
!34 = !{!"_ZTSN4juce13NamedValueSetE", !35, i64 0}
!35 = !{!"_ZTSN4juce5ArrayINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionELi0EEE", !36, i64 0, !12, i64 16}
!36 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionEEE", !37, i64 0, !12, i64 8}
!37 = !{!"_ZTSN4juce9HeapBlockINS_13NamedValueSet10NamedValueELb0EEE", !6, i64 0}
!38 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE6MasterE", !39, i64 0}
!39 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE13SharedPointerEEE", !6, i64 0}
!40 = !{!"_ZTSN4juce12AsyncUpdaterE", !41, i64 8}
!41 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_12AsyncUpdater19AsyncUpdaterMessageEEE", !6, i64 0}
!42 = !{!"_ZTSN4juce5TimerE", !12, i64 8, !12, i64 12, !6, i64 16, !6, i64 24}
!43 = !{!"_ZTSN4juce5RangeIdEE", !44, i64 0, !44, i64 8}
!44 = !{!"double", !7, i64 0}
!45 = !{!"bool", !7, i64 0}
!46 = !{!"_ZTSN4juce13ScopedPointerINS_9ScrollBar15ScrollbarButtonEEE", !6, i64 0}
!47 = !{!"_ZTSN4juce12ListenerListINS_9ScrollBar8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEEE", !48, i64 0}
!48 = !{!"_ZTSN4juce5ArrayIPNS_9ScrollBar8ListenerENS_20DummyCriticalSectionELi0EEE", !49, i64 0, !12, i64 16}
!49 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_9ScrollBar8ListenerENS_20DummyCriticalSectionEEE", !50, i64 0, !12, i64 8}
!50 = !{!"_ZTSN4juce9HeapBlockIPNS_9ScrollBar8ListenerELb0EEE", !6, i64 0}
!51 = !{!14, !12, i64 296}
!52 = !{!14, !45, i64 334}
!53 = !{i8 0, i8 2}
!54 = !{}
!55 = !{!14, !12, i64 304}
!56 = !{!14, !12, i64 308}
!57 = !{!14, !45, i64 332}


; 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 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef, i32 noundef) local_unnamed_addr #0

; 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 nounwind uwtable
declare dso_local noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce10roundToIntIdEEiT_(double noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce9ScrollBar19updateThumbPositionEv(ptr noundef nonnull align 8 dereferenceable(376) %0) local_unnamed_addr #1 align 2 {
  %2 = tail call noundef nonnull align 8 dereferenceable(281) ptr @_ZNK4juce9Component14getLookAndFeelEv(ptr noundef nonnull align 8 dereferenceable(197) %0) #4
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %3, i64 48
  %5 = load ptr, ptr %4, align 8
  %6 = tail call noundef i32 %5(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(376) %0)
  %7 = getelementptr inbounds i8, ptr %0, i64 248
  %8 = tail call noundef double @_ZNK4juce5RangeIdE9getLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #4
  %9 = fcmp ogt double %8, 0.000000e+00
  br i1 %9, label %10, label %19

10:                                               ; preds = %1
  %11 = getelementptr inbounds i8, ptr %0, i64 264
  %12 = tail call noundef double @_ZNK4juce5RangeIdE9getLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %11) #4
  %13 = getelementptr inbounds i8, ptr %0, i64 300
  %14 = load i32, ptr %13, align 4, !tbaa !8
  %15 = sitofp i32 %14 to double
  %16 = fmul double %12, %15
  %17 = tail call noundef double @_ZNK4juce5RangeIdE9getLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #4
  %18 = fdiv double %16, %17
  br label %23

19:                                               ; preds = %1
  %20 = getelementptr inbounds i8, ptr %0, i64 300
  %21 = load i32, ptr %20, align 4, !tbaa !8
  %22 = sitofp i32 %21 to double
  br label %23

23:                                               ; preds = %19, %10
  %24 = phi double [ %18, %10 ], [ %22, %19 ]
  %25 = tail call noundef i32 @_ZN4juce10roundToIntIdEEiT_(double noundef %24) #4
  %26 = icmp slt i32 %25, %6
  br i1 %26, label %27, label %32

27:                                               ; preds = %23
  %28 = getelementptr inbounds i8, ptr %0, i64 300
  %29 = load i32, ptr %28, align 4, !tbaa !8
  %30 = add nsw i32 %29, -1
  %31 = tail call noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef %6, i32 noundef %30)
  br label %32

32:                                               ; preds = %27, %23
  %.0 = phi i32 [ %31, %27 ], [ %25, %23 ]
  %33 = getelementptr inbounds i8, ptr %0, i64 300
  %34 = load i32, ptr %33, align 4, !tbaa !8
  %spec.select = tail call i32 @llvm.smin.i32(i32 %.0, i32 %34)
  %35 = getelementptr inbounds i8, ptr %0, i64 296
  %36 = load i32, ptr %35, align 8, !tbaa !49
  %37 = tail call noundef double @_ZNK4juce5RangeIdE9getLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #4
  %38 = getelementptr inbounds i8, ptr %0, i64 264
  %39 = tail call noundef double @_ZNK4juce5RangeIdE9getLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %38) #4
  %40 = fcmp ogt double %37, %39
  br i1 %40, label %41, label %55

41:                                               ; preds = %32
  %42 = tail call noundef double @_ZNK4juce5RangeIdE8getStartEv(ptr noundef nonnull align 8 dereferenceable(16) %38) #4
  %43 = tail call noundef double @_ZNK4juce5RangeIdE8getStartEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #4
  %44 = fsub double %42, %43
  %45 = load i32, ptr %33, align 4, !tbaa !8
  %46 = sub nsw i32 %45, %spec.select
  %47 = sitofp i32 %46 to double
  %48 = fmul double %44, %47
  %49 = tail call noundef double @_ZNK4juce5RangeIdE9getLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #4
  %50 = tail call noundef double @_ZNK4juce5RangeIdE9getLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %38) #4
  %51 = fsub double %49, %50
  %52 = fdiv double %48, %51
  %53 = tail call noundef i32 @_ZN4juce10roundToIntIdEEiT_(double noundef %52) #4
  %54 = add nsw i32 %53, %36
  br label %55

55:                                               ; preds = %41, %32
  %.018 = phi i32 [ %54, %41 ], [ %36, %32 ]
  %56 = getelementptr inbounds i8, ptr %0, i64 334
  %57 = load i8, ptr %56, align 2, !tbaa !50, !range !51, !noundef !52
  %58 = trunc nuw i8 %57 to i1
  br i1 %58, label %59, label %66

59:                                               ; preds = %55
  %60 = tail call noundef double @_ZNK4juce5RangeIdE9getLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #4
  %61 = tail call noundef double @_ZNK4juce5RangeIdE9getLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %38) #4
  %62 = fcmp ogt double %60, %61
  br i1 %62, label %63, label %66

63:                                               ; preds = %59
  %64 = tail call noundef double @_ZNK4juce5RangeIdE9getLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %38) #4
  %65 = fcmp ogt double %64, 0.000000e+00
  br label %66

66:                                               ; preds = %59, %63, %55
  %67 = phi i1 [ true, %55 ], [ false, %59 ], [ %65, %63 ]
  %68 = load ptr, ptr %0, align 8, !tbaa !5
  %69 = getelementptr inbounds i8, ptr %68, i64 88
  %70 = load ptr, ptr %69, align 8
  tail call void %70(ptr noundef nonnull align 8 dereferenceable(197) %0, i1 noundef zeroext %67)
  %71 = getelementptr inbounds i8, ptr %0, i64 304
  %72 = load i32, ptr %71, align 8, !tbaa !53
  %.not = icmp eq i32 %72, %.018
  %73 = getelementptr inbounds i8, ptr %0, i64 308
  %74 = load i32, ptr %73, align 4
  %.not22 = icmp eq i32 %74, %spec.select
  %or.cond = select i1 %.not, i1 %.not22, i1 false
  br i1 %or.cond, label %92, label %75

75:                                               ; preds = %66
  %76 = tail call noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef %72, i32 noundef %.018)
  %77 = add nsw i32 %76, -4
  %78 = load i32, ptr %71, align 8, !tbaa !53
  %79 = load i32, ptr %73, align 4, !tbaa !54
  %80 = add nsw i32 %79, %78
  %81 = add nsw i32 %.018, %spec.select
  %82 = tail call noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef %80, i32 noundef %81)
  %reass.sub = sub i32 %82, %76
  %83 = add i32 %reass.sub, 12
  %84 = getelementptr inbounds i8, ptr %0, i64 332
  %85 = load i8, ptr %84, align 4, !tbaa !55, !range !51, !noundef !52
  %86 = trunc nuw i8 %85 to i1
  br i1 %86, label %87, label %89

87:                                               ; preds = %75
  %88 = tail call noundef i32 @_ZNK4juce9Component8getWidthEv(ptr noundef nonnull align 8 dereferenceable(197) %0) #4
  tail call void @_ZN4juce9Component7repaintEiiii(ptr noundef nonnull align 8 dereferenceable(197) %0, i32 noundef 0, i32 noundef %77, i32 noundef %88, i32 noundef %83)
  br label %91

89:                                               ; preds = %75
  %90 = tail call noundef i32 @_ZNK4juce9Component9getHeightEv(ptr noundef nonnull align 8 dereferenceable(197) %0) #4
  tail call void @_ZN4juce9Component7repaintEiiii(ptr noundef nonnull align 8 dereferenceable(197) %0, i32 noundef %77, i32 noundef 0, i32 noundef %83, i32 noundef %90)
  br label %91

91:                                               ; preds = %89, %87
  store i32 %.018, ptr %71, align 8, !tbaa !53
  store i32 %spec.select, ptr %73, align 4, !tbaa !54
  br label %92

92:                                               ; preds = %66, %91
  ret void
}

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #3

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !18, i64 300}
!9 = !{!"_ZTSN4juce9ScrollBarE", !10, i64 0, !38, i64 200, !40, i64 216, !41, i64 248, !41, i64 264, !42, i64 280, !42, i64 288, !18, i64 296, !18, i64 300, !18, i64 304, !18, i64 308, !18, i64 312, !18, i64 316, !18, i64 320, !18, i64 324, !18, i64 328, !43, i64 332, !43, i64 333, !43, i64 334, !44, i64 336, !44, i64 344, !45, i64 352}
!10 = !{!"_ZTSN4juce9ComponentE", !11, i64 0, !12, i64 8, !12, i64 16, !14, i64 24, !16, i64 32, !19, i64 48, !20, i64 56, !21, i64 64, !14, i64 88, !24, i64 96, !14, i64 104, !25, i64 112, !26, i64 120, !27, i64 128, !28, i64 136, !32, i64 160, !36, i64 184, !15, i64 192, !15, i64 196}
!11 = !{!"_ZTSN4juce13MouseListenerE"}
!12 = !{!"_ZTSN4juce6StringE", !13, i64 0}
!13 = !{!"_ZTSN4juce16CharPointer_UTF8E", !14, i64 0}
!14 = !{!"any pointer", !15, i64 0}
!15 = !{!"omnipotent char", !7, i64 0}
!16 = !{!"_ZTSN4juce9RectangleIiEE", !17, i64 0, !18, i64 8, !18, i64 12}
!17 = !{!"_ZTSN4juce5PointIiEE", !18, i64 0, !18, i64 4}
!18 = !{!"int", !15, i64 0}
!19 = !{!"_ZTSN4juce13ScopedPointerINS_9Component10PositionerEEE", !14, i64 0}
!20 = !{!"_ZTSN4juce13ScopedPointerINS_15AffineTransformEEE", !14, 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", !14, i64 0}
!24 = !{!"_ZTSN4juce11MouseCursorE", !14, i64 0}
!25 = !{!"_ZTSN4juce13ScopedPointerINS_20CachedComponentImageEEE", !14, i64 0}
!26 = !{!"_ZTSN4juce13ScopedPointerINS_9Component17MouseListenerListEEE", !14, i64 0}
!27 = !{!"_ZTSN4juce13ScopedPointerINS_5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EEEEE", !14, 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", !14, 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", !14, i64 0}
!36 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE6MasterE", !37, i64 0}
!37 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE13SharedPointerEEE", !14, i64 0}
!38 = !{!"_ZTSN4juce12AsyncUpdaterE", !39, i64 8}
!39 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_12AsyncUpdater19AsyncUpdaterMessageEEE", !14, i64 0}
!40 = !{!"_ZTSN4juce5TimerE", !18, i64 8, !18, i64 12, !14, i64 16, !14, i64 24}
!41 = !{!"_ZTSN4juce5RangeIdEE", !42, i64 0, !42, i64 8}
!42 = !{!"double", !15, i64 0}
!43 = !{!"bool", !15, i64 0}
!44 = !{!"_ZTSN4juce13ScopedPointerINS_9ScrollBar15ScrollbarButtonEEE", !14, i64 0}
!45 = !{!"_ZTSN4juce12ListenerListINS_9ScrollBar8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEEE", !46, i64 0}
!46 = !{!"_ZTSN4juce5ArrayIPNS_9ScrollBar8ListenerENS_20DummyCriticalSectionELi0EEE", !47, i64 0, !18, i64 16}
!47 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_9ScrollBar8ListenerENS_20DummyCriticalSectionEEE", !48, i64 0, !18, i64 8}
!48 = !{!"_ZTSN4juce9HeapBlockIPNS_9ScrollBar8ListenerELb0EEE", !14, i64 0}
!49 = !{!9, !18, i64 296}
!50 = !{!9, !43, i64 334}
!51 = !{i8 0, i8 2}
!52 = !{}
!53 = !{!9, !18, i64 304}
!54 = !{!9, !18, i64 308}
!55 = !{!9, !43, i64 332}


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