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

; 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::ModifierKeys" = type { i32 }
%"class.juce::Button" = type <{ %"class.juce::Component.base", [3 x i8], %"class.juce::SettableTooltipClient", %"class.juce::Array.104", %"class.juce::WeakReference", %"class.juce::String", %"class.juce::ListenerList.109", %"class.juce::ScopedPointer.115", i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, %"class.juce::Value", i8, i8, i8, i8, i8, i8, i8, 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::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::Array.104" = type { %"class.juce::ArrayAllocationBase.105", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.105" = type <{ %"class.juce::HeapBlock.106", i32, [4 x i8] }>
%"class.juce::HeapBlock.106" = type { ptr }
%"class.juce::WeakReference" = type { %"class.juce::ReferenceCountedObjectPtr" }
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::ListenerList.109" = type { %"class.juce::Array.110" }
%"class.juce::Array.110" = type { %"class.juce::ArrayAllocationBase.111", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.111" = type <{ %"class.juce::HeapBlock.112", i32, [4 x i8] }>
%"class.juce::HeapBlock.112" = type { ptr }
%"class.juce::ScopedPointer.115" = type { ptr }
%"class.juce::Value" = type { %"class.juce::ReferenceCountedObjectPtr.116", %"class.juce::ListenerList.117" }
%"class.juce::ReferenceCountedObjectPtr.116" = type { ptr }
%"class.juce::ListenerList.117" = type { %"class.juce::Array.118" }
%"class.juce::Array.118" = type { %"class.juce::ArrayAllocationBase.119", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.119" = type <{ %"class.juce::HeapBlock.120", i32, [4 x i8] }>
%"class.juce::HeapBlock.120" = 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 void @_ZN4juce12ModifierKeys19getCurrentModifiersEv(ptr dead_on_unwind noalias writable sret(%"class.juce::ModifierKeys") align 4) #1 align 2

; Function Attrs: nounwind
declare void @_ZN4juce5Timer9stopTimerEv(ptr noundef nonnull align 8 dereferenceable(32)) #2

; Function Attrs: nounwind
declare void @_ZN4juce5Timer10startTimerEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4juce6Button11updateStateEv(ptr noundef nonnull align 8 dereferenceable(375)) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce6Button19repeatTimerCallbackEv(ptr noundef nonnull align 8 dereferenceable(375) %0) #3 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca double, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.juce::ModifierKeys", align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %7 = load ptr, ptr %2, align 8
  %8 = getelementptr inbounds %"class.juce::Button", ptr %7, i32 0, i32 23
  %9 = load i8, ptr %8, align 1, !tbaa !9, !range !56, !noundef !57
  %10 = trunc i8 %9 to i1
  br i1 %10, label %11, label %16

11:                                               ; preds = %1
  %12 = getelementptr inbounds %"class.juce::Button", ptr %7, i32 0, i32 7
  %13 = call noundef ptr @_ZNK4juce13ScopedPointerINS_6Button14CallbackHelperEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  call void @_ZN4juce5Timer9stopTimerEv(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  %14 = call noundef i32 @_ZN4juce6Button11updateStateEv(ptr noundef nonnull align 8 dereferenceable(375) %7)
  %15 = getelementptr inbounds %"class.juce::Button", ptr %7, i32 0, i32 23
  store i8 0, ptr %15, align 1, !tbaa !9
  br label %88

16:                                               ; preds = %1
  %17 = getelementptr inbounds %"class.juce::Button", ptr %7, i32 0, i32 12
  %18 = load i32, ptr %17, align 4, !tbaa !58
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %20, label %79

20:                                               ; preds = %16
  %21 = getelementptr inbounds %"class.juce::Button", ptr %7, i32 0, i32 24
  %22 = load i8, ptr %21, align 4, !tbaa !59, !range !56, !noundef !57
  %23 = trunc i8 %22 to i1
  br i1 %23, label %27, label %24

24:                                               ; preds = %20
  %25 = call noundef i32 @_ZN4juce6Button11updateStateEv(ptr noundef nonnull align 8 dereferenceable(375) %7)
  %26 = icmp eq i32 %25, 2
  br i1 %26, label %27, label %79

27:                                               ; preds = %24, %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %28 = getelementptr inbounds %"class.juce::Button", ptr %7, i32 0, i32 12
  %29 = load i32, ptr %28, align 4, !tbaa !58
  store i32 %29, ptr %3, align 4, !tbaa !60
  %30 = getelementptr inbounds %"class.juce::Button", ptr %7, i32 0, i32 13
  %31 = load i32, ptr %30, align 8, !tbaa !61
  %32 = icmp sge i32 %31, 0
  br i1 %32, label %33, label %51

33:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %34 = call noundef i32 @_ZNK4juce6Button30getMillisecondsSinceButtonDownEv(ptr noundef nonnull align 8 dereferenceable(375) %7) #5
  %35 = uitofp i32 %34 to double
  %36 = fdiv double %35, 4.000000e+03
  %37 = call noundef double @_ZN4juce4jminIdEET_S1_S1_(double noundef 1.000000e+00, double noundef %36)
  store double %37, ptr %4, align 8, !tbaa !62
  %38 = load double, ptr %4, align 8, !tbaa !62
  %39 = load double, ptr %4, align 8, !tbaa !62
  %40 = fmul double %39, %38
  store double %40, ptr %4, align 8, !tbaa !62
  %41 = load i32, ptr %3, align 4, !tbaa !60
  %42 = load double, ptr %4, align 8, !tbaa !62
  %43 = getelementptr inbounds %"class.juce::Button", ptr %7, i32 0, i32 13
  %44 = load i32, ptr %43, align 8, !tbaa !61
  %45 = load i32, ptr %3, align 4, !tbaa !60
  %46 = sub nsw i32 %44, %45
  %47 = sitofp i32 %46 to double
  %48 = fmul double %42, %47
  %49 = fptosi double %48 to i32
  %50 = add nsw i32 %41, %49
  store i32 %50, ptr %3, align 4, !tbaa !60
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %51

51:                                               ; preds = %33, %27
  %52 = load i32, ptr %3, align 4, !tbaa !60
  %53 = call noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef 1, i32 noundef %52)
  store i32 %53, ptr %3, align 4, !tbaa !60
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %54 = call noundef i32 @_ZN4juce4Time21getMillisecondCounterEv() #5
  store i32 %54, ptr %5, align 4, !tbaa !60
  %55 = getelementptr inbounds %"class.juce::Button", ptr %7, i32 0, i32 9
  %56 = load i32, ptr %55, align 4, !tbaa !64
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %70

58:                                               ; preds = %51
  %59 = load i32, ptr %5, align 4, !tbaa !60
  %60 = getelementptr inbounds %"class.juce::Button", ptr %7, i32 0, i32 9
  %61 = load i32, ptr %60, align 4, !tbaa !64
  %62 = sub i32 %59, %61
  %63 = load i32, ptr %3, align 4, !tbaa !60
  %64 = mul nsw i32 %63, 2
  %65 = icmp sgt i32 %62, %64
  br i1 %65, label %66, label %70

66:                                               ; preds = %58
  %67 = load i32, ptr %3, align 4, !tbaa !60
  %68 = sdiv i32 %67, 2
  %69 = call noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef 1, i32 noundef %68)
  store i32 %69, ptr %3, align 4, !tbaa !60
  br label %70

70:                                               ; preds = %66, %58, %51
  %71 = load i32, ptr %5, align 4, !tbaa !60
  %72 = getelementptr inbounds %"class.juce::Button", ptr %7, i32 0, i32 9
  store i32 %71, ptr %72, align 4, !tbaa !64
  %73 = getelementptr inbounds %"class.juce::Button", ptr %7, i32 0, i32 7
  %74 = call noundef ptr @_ZNK4juce13ScopedPointerINS_6Button14CallbackHelperEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %73) #5
  %75 = load i32, ptr %3, align 4, !tbaa !60
  call void @_ZN4juce5Timer10startTimerEi(ptr noundef nonnull align 8 dereferenceable(32) %74, i32 noundef %75) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @_ZN4juce12ModifierKeys19getCurrentModifiersEv(ptr dead_on_unwind writable sret(%"class.juce::ModifierKeys") align 4 %6) #5
  %76 = load ptr, ptr %7, align 8, !tbaa !65
  %77 = getelementptr inbounds ptr, ptr %76, i64 51
  %78 = load ptr, ptr %77, align 8
  call void %78(ptr noundef nonnull align 8 dereferenceable(375) %7, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %87

79:                                               ; preds = %24, %16
  %80 = getelementptr inbounds %"class.juce::Button", ptr %7, i32 0, i32 22
  %81 = load i8, ptr %80, align 2, !tbaa !67, !range !56, !noundef !57
  %82 = trunc i8 %81 to i1
  br i1 %82, label %86, label %83

83:                                               ; preds = %79
  %84 = getelementptr inbounds %"class.juce::Button", ptr %7, i32 0, i32 7
  %85 = call noundef ptr @_ZNK4juce13ScopedPointerINS_6Button14CallbackHelperEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %84) #5
  call void @_ZN4juce5Timer9stopTimerEv(ptr noundef nonnull align 8 dereferenceable(32) %85) #5
  br label %86

86:                                               ; preds = %83, %79
  br label %87

87:                                               ; preds = %86, %70
  br label %88

88:                                               ; preds = %87, %11
  ret void
}

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

; Function Attrs: nounwind
declare noundef i32 @_ZN4juce4Time21getMillisecondCounterEv() #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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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 #5 = { 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, !55, i64 371}
!10 = !{!"_ZTSN4juce6ButtonE", !11, i64 0, !37, i64 200, !39, i64 216, !42, i64 240, !13, i64 248, !43, i64 256, !47, i64 280, !17, i64 288, !17, i64 292, !6, i64 296, !17, i64 304, !17, i64 308, !17, i64 312, !17, i64 316, !17, i64 320, !17, i64 324, !48, i64 328, !48, i64 332, !49, i64 336, !55, i64 368, !55, i64 369, !55, i64 370, !55, i64 371, !55, i64 372, !55, i64 373, !55, i64 374}
!11 = !{!"_ZTSN4juce9ComponentE", !12, i64 0, !13, i64 8, !13, i64 16, !6, i64 24, !15, i64 32, !18, i64 48, !19, i64 56, !20, i64 64, !6, i64 88, !23, i64 96, !6, i64 104, !24, i64 112, !25, i64 120, !26, i64 128, !27, i64 136, !31, i64 160, !35, i64 184, !7, i64 192, !7, i64 196}
!12 = !{!"_ZTSN4juce13MouseListenerE"}
!13 = !{!"_ZTSN4juce6StringE", !14, i64 0}
!14 = !{!"_ZTSN4juce16CharPointer_UTF8E", !6, i64 0}
!15 = !{!"_ZTSN4juce9RectangleIiEE", !16, i64 0, !17, i64 8, !17, i64 12}
!16 = !{!"_ZTSN4juce5PointIiEE", !17, i64 0, !17, i64 4}
!17 = !{!"int", !7, i64 0}
!18 = !{!"_ZTSN4juce13ScopedPointerINS_9Component10PositionerEEE", !6, i64 0}
!19 = !{!"_ZTSN4juce13ScopedPointerINS_15AffineTransformEEE", !6, 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", !6, i64 0}
!23 = !{!"_ZTSN4juce11MouseCursorE", !6, i64 0}
!24 = !{!"_ZTSN4juce13ScopedPointerINS_20CachedComponentImageEEE", !6, i64 0}
!25 = !{!"_ZTSN4juce13ScopedPointerINS_9Component17MouseListenerListEEE", !6, i64 0}
!26 = !{!"_ZTSN4juce13ScopedPointerINS_5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EEEEE", !6, 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", !6, 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", !6, i64 0}
!35 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE6MasterE", !36, i64 0}
!36 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE13SharedPointerEEE", !6, i64 0}
!37 = !{!"_ZTSN4juce21SettableTooltipClientE", !38, i64 0, !13, i64 8}
!38 = !{!"_ZTSN4juce13TooltipClientE"}
!39 = !{!"_ZTSN4juce5ArrayINS_8KeyPressENS_20DummyCriticalSectionELi0EEE", !40, i64 0, !17, i64 16}
!40 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_8KeyPressENS_20DummyCriticalSectionEEE", !41, i64 0, !17, i64 8}
!41 = !{!"_ZTSN4juce9HeapBlockINS_8KeyPressELb0EEE", !6, i64 0}
!42 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEE", !36, i64 0}
!43 = !{!"_ZTSN4juce12ListenerListINS_6Button8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEEE", !44, i64 0}
!44 = !{!"_ZTSN4juce5ArrayIPNS_6Button8ListenerENS_20DummyCriticalSectionELi0EEE", !45, i64 0, !17, i64 16}
!45 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_6Button8ListenerENS_20DummyCriticalSectionEEE", !46, i64 0, !17, i64 8}
!46 = !{!"_ZTSN4juce9HeapBlockIPNS_6Button8ListenerELb0EEE", !6, i64 0}
!47 = !{!"_ZTSN4juce13ScopedPointerINS_6Button14CallbackHelperEEE", !6, i64 0}
!48 = !{!"_ZTSN4juce6Button11ButtonStateE", !7, i64 0}
!49 = !{!"_ZTSN4juce5ValueE", !50, i64 0, !51, i64 8}
!50 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_5Value11ValueSourceEEE", !6, i64 0}
!51 = !{!"_ZTSN4juce12ListenerListINS_5Value8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEEE", !52, i64 0}
!52 = !{!"_ZTSN4juce5ArrayIPNS_5Value8ListenerENS_20DummyCriticalSectionELi0EEE", !53, i64 0, !17, i64 16}
!53 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_5Value8ListenerENS_20DummyCriticalSectionEEE", !54, i64 0, !17, i64 8}
!54 = !{!"_ZTSN4juce9HeapBlockIPNS_5Value8ListenerELb0EEE", !6, i64 0}
!55 = !{!"bool", !7, i64 0}
!56 = !{i8 0, i8 2}
!57 = !{}
!58 = !{!10, !17, i64 308}
!59 = !{!10, !55, i64 372}
!60 = !{!17, !17, i64 0}
!61 = !{!10, !17, i64 312}
!62 = !{!63, !63, i64 0}
!63 = !{!"double", !7, i64 0}
!64 = !{!10, !17, i64 292}
!65 = !{!66, !66, i64 0}
!66 = !{!"vtable pointer", !8, i64 0}
!67 = !{!10, !55, i64 370}


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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress 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) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce12ModifierKeys19getCurrentModifiersEv(ptr dead_on_unwind noalias writable sret(%"class.juce::ModifierKeys") align 4) local_unnamed_addr #1 align 2

; Function Attrs: nounwind
declare void @_ZN4juce5Timer9stopTimerEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN4juce5Timer10startTimerEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4juce6Button11updateStateEv(ptr noundef nonnull align 8 dereferenceable(375)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce6Button19repeatTimerCallbackEv(ptr noundef nonnull align 8 dereferenceable(375) %0) local_unnamed_addr #3 align 2 {
  %2 = alloca %"class.juce::ModifierKeys", align 4
  %3 = getelementptr inbounds i8, ptr %0, i64 371
  %4 = load i8, ptr %3, align 1, !tbaa !5, !range !55, !noundef !56
  %5 = trunc nuw i8 %4 to i1
  br i1 %5, label %6, label %10

6:                                                ; preds = %1
  %7 = getelementptr inbounds i8, ptr %0, i64 280
  %8 = tail call noundef ptr @_ZNK4juce13ScopedPointerINS_6Button14CallbackHelperEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  tail call void @_ZN4juce5Timer9stopTimerEv(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  %9 = tail call noundef i32 @_ZN4juce6Button11updateStateEv(ptr noundef nonnull align 8 dereferenceable(375) %0)
  store i8 0, ptr %3, align 1, !tbaa !5
  br label %63

10:                                               ; preds = %1
  %11 = getelementptr inbounds i8, ptr %0, i64 308
  %12 = load i32, ptr %11, align 4, !tbaa !57
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %14, label %56

14:                                               ; preds = %10
  %15 = getelementptr inbounds i8, ptr %0, i64 372
  %16 = load i8, ptr %15, align 4, !tbaa !58, !range !55, !noundef !56
  %17 = trunc nuw i8 %16 to i1
  br i1 %17, label %21, label %18

18:                                               ; preds = %14
  %19 = tail call noundef i32 @_ZN4juce6Button11updateStateEv(ptr noundef nonnull align 8 dereferenceable(375) %0)
  %20 = icmp eq i32 %19, 2
  br i1 %20, label %._crit_edge, label %56

._crit_edge:                                      ; preds = %18
  %.pre = load i32, ptr %11, align 4, !tbaa !57
  br label %21

21:                                               ; preds = %._crit_edge, %14
  %22 = phi i32 [ %.pre, %._crit_edge ], [ %12, %14 ]
  %23 = getelementptr inbounds i8, ptr %0, i64 312
  %24 = load i32, ptr %23, align 8, !tbaa !59
  %25 = icmp sgt i32 %24, -1
  br i1 %25, label %26, label %38

26:                                               ; preds = %21
  %27 = tail call noundef i32 @_ZNK4juce6Button30getMillisecondsSinceButtonDownEv(ptr noundef nonnull align 8 dereferenceable(375) %0) #5
  %28 = uitofp i32 %27 to double
  %29 = fdiv double %28, 4.000000e+03
  %30 = tail call noundef double @_ZN4juce4jminIdEET_S1_S1_(double noundef 1.000000e+00, double noundef %29)
  %31 = fmul double %30, %30
  %32 = load i32, ptr %23, align 8, !tbaa !59
  %33 = sub nsw i32 %32, %22
  %34 = sitofp i32 %33 to double
  %35 = fmul double %31, %34
  %36 = fptosi double %35 to i32
  %37 = add nsw i32 %22, %36
  br label %38

38:                                               ; preds = %26, %21
  %.0 = phi i32 [ %37, %26 ], [ %22, %21 ]
  %39 = tail call noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef 1, i32 noundef %.0)
  %40 = tail call noundef i32 @_ZN4juce4Time21getMillisecondCounterEv() #5
  %41 = getelementptr inbounds i8, ptr %0, i64 292
  %42 = load i32, ptr %41, align 4, !tbaa !60
  %.not = icmp eq i32 %42, 0
  br i1 %.not, label %50, label %43

43:                                               ; preds = %38
  %44 = sub i32 %40, %42
  %45 = shl nsw i32 %39, 1
  %46 = icmp sgt i32 %44, %45
  br i1 %46, label %47, label %50

47:                                               ; preds = %43
  %48 = sdiv i32 %39, 2
  %49 = tail call noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef 1, i32 noundef %48)
  br label %50

50:                                               ; preds = %47, %43, %38
  %.1 = phi i32 [ %49, %47 ], [ %39, %43 ], [ %39, %38 ]
  store i32 %40, ptr %41, align 4, !tbaa !60
  %51 = getelementptr inbounds i8, ptr %0, i64 280
  %52 = tail call noundef ptr @_ZNK4juce13ScopedPointerINS_6Button14CallbackHelperEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %51) #5
  tail call void @_ZN4juce5Timer10startTimerEi(ptr noundef nonnull align 8 dereferenceable(32) %52, i32 noundef %.1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  call void @_ZN4juce12ModifierKeys19getCurrentModifiersEv(ptr dead_on_unwind nonnull writable sret(%"class.juce::ModifierKeys") align 4 %2) #5
  %53 = load ptr, ptr %0, align 8, !tbaa !61
  %54 = getelementptr inbounds i8, ptr %53, i64 408
  %55 = load ptr, ptr %54, align 8
  call void %55(ptr noundef nonnull align 8 dereferenceable(375) %0, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  br label %63

56:                                               ; preds = %18, %10
  %57 = getelementptr inbounds i8, ptr %0, i64 370
  %58 = load i8, ptr %57, align 2, !tbaa !63, !range !55, !noundef !56
  %59 = trunc nuw i8 %58 to i1
  br i1 %59, label %63, label %60

60:                                               ; preds = %56
  %61 = getelementptr inbounds i8, ptr %0, i64 280
  %62 = tail call noundef ptr @_ZNK4juce13ScopedPointerINS_6Button14CallbackHelperEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %61) #5
  tail call void @_ZN4juce5Timer9stopTimerEv(ptr noundef nonnull align 8 dereferenceable(32) %62) #5
  br label %63

63:                                               ; preds = %50, %60, %56, %6
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN4juce4jminIdEET_S1_S1_(double noundef, double noundef) local_unnamed_addr #1

; Function Attrs: nounwind
declare noundef i32 @_ZN4juce4Time21getMillisecondCounterEv() local_unnamed_addr #2

attributes #0 = { mustprogress 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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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 #5 = { 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, !54, i64 371}
!6 = !{!"_ZTSN4juce6ButtonE", !7, i64 0, !36, i64 200, !38, i64 216, !41, i64 240, !9, i64 248, !42, i64 256, !46, i64 280, !16, i64 288, !16, i64 292, !11, i64 296, !16, i64 304, !16, i64 308, !16, i64 312, !16, i64 316, !16, i64 320, !16, i64 324, !47, i64 328, !47, i64 332, !48, i64 336, !54, i64 368, !54, i64 369, !54, i64 370, !54, i64 371, !54, i64 372, !54, i64 373, !54, i64 374}
!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 = !{!"_ZTSN4juce5ArrayINS_8KeyPressENS_20DummyCriticalSectionELi0EEE", !39, i64 0, !16, i64 16}
!39 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_8KeyPressENS_20DummyCriticalSectionEEE", !40, i64 0, !16, i64 8}
!40 = !{!"_ZTSN4juce9HeapBlockINS_8KeyPressELb0EEE", !11, i64 0}
!41 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEE", !35, i64 0}
!42 = !{!"_ZTSN4juce12ListenerListINS_6Button8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEEE", !43, i64 0}
!43 = !{!"_ZTSN4juce5ArrayIPNS_6Button8ListenerENS_20DummyCriticalSectionELi0EEE", !44, i64 0, !16, i64 16}
!44 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_6Button8ListenerENS_20DummyCriticalSectionEEE", !45, i64 0, !16, i64 8}
!45 = !{!"_ZTSN4juce9HeapBlockIPNS_6Button8ListenerELb0EEE", !11, i64 0}
!46 = !{!"_ZTSN4juce13ScopedPointerINS_6Button14CallbackHelperEEE", !11, i64 0}
!47 = !{!"_ZTSN4juce6Button11ButtonStateE", !12, i64 0}
!48 = !{!"_ZTSN4juce5ValueE", !49, i64 0, !50, i64 8}
!49 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_5Value11ValueSourceEEE", !11, i64 0}
!50 = !{!"_ZTSN4juce12ListenerListINS_5Value8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEEE", !51, i64 0}
!51 = !{!"_ZTSN4juce5ArrayIPNS_5Value8ListenerENS_20DummyCriticalSectionELi0EEE", !52, i64 0, !16, i64 16}
!52 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_5Value8ListenerENS_20DummyCriticalSectionEEE", !53, i64 0, !16, i64 8}
!53 = !{!"_ZTSN4juce9HeapBlockIPNS_5Value8ListenerELb0EEE", !11, i64 0}
!54 = !{!"bool", !12, i64 0}
!55 = !{i8 0, i8 2}
!56 = !{}
!57 = !{!6, !16, i64 308}
!58 = !{!6, !54, i64 372}
!59 = !{!6, !16, i64 312}
!60 = !{!6, !16, i64 292}
!61 = !{!62, !62, i64 0}
!62 = !{!"vtable pointer", !13, i64 0}
!63 = !{!6, !54, i64 370}


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