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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.juce::MouseWheelDetails" = type { float, float, i8, i8, i8 }
%"class.juce::ListBox" = type { %"class.juce::Component.base", %"class.juce::SettableTooltipClient", ptr, %"class.juce::ScopedPointer.286", %"class.juce::ScopedPointer.159", %"class.juce::ScopedPointer.287", i32, i32, i32, i32, i32, i8, i8, i8, i8, %"class.juce::SparseSet" }
%"class.juce::Component.base" = type <{ %"class.juce::MouseListener", %"class.juce::String", %"class.juce::String", ptr, %"class.juce::Rectangle", %"class.juce::ScopedPointer", %"class.juce::ScopedPointer.0", %"class.juce::Array", ptr, %"class.juce::MouseCursor", ptr, %"class.juce::ScopedPointer.1", %"class.juce::ScopedPointer.2", %"class.juce::ScopedPointer.3", %"class.juce::ListenerList", %"class.juce::NamedValueSet", %"class.juce::WeakReference<juce::Component>::Master", %union.anon, i8 }>
%"class.juce::MouseListener" = type { ptr }
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::Rectangle" = type { %"class.juce::Point", i32, i32 }
%"class.juce::Point" = type { i32, i32 }
%"class.juce::ScopedPointer" = type { ptr }
%"class.juce::ScopedPointer.0" = type { ptr }
%"class.juce::Array" = type { %"class.juce::ArrayAllocationBase", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase" = type <{ %"class.juce::HeapBlock", i32, [4 x i8] }>
%"class.juce::HeapBlock" = type { ptr }
%"class.juce::MouseCursor" = type { ptr }
%"class.juce::ScopedPointer.1" = type { ptr }
%"class.juce::ScopedPointer.2" = type { ptr }
%"class.juce::ScopedPointer.3" = type { ptr }
%"class.juce::ListenerList" = type { %"class.juce::Array.4" }
%"class.juce::Array.4" = type { %"class.juce::ArrayAllocationBase.5", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.5" = type <{ %"class.juce::HeapBlock.6", i32, [4 x i8] }>
%"class.juce::HeapBlock.6" = type { ptr }
%"class.juce::NamedValueSet" = type { %"class.juce::Array.9" }
%"class.juce::Array.9" = type { %"class.juce::ArrayAllocationBase.10", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.10" = type <{ %"class.juce::HeapBlock.11", i32, [4 x i8] }>
%"class.juce::HeapBlock.11" = type { ptr }
%"class.juce::WeakReference<juce::Component>::Master" = type { %"class.juce::ReferenceCountedObjectPtr" }
%"class.juce::ReferenceCountedObjectPtr" = type { ptr }
%union.anon = type { i32 }
%"class.juce::SettableTooltipClient" = type { %"class.juce::TooltipClient", %"class.juce::String" }
%"class.juce::TooltipClient" = type { ptr }
%"class.juce::ScopedPointer.286" = type { ptr }
%"class.juce::ScopedPointer.159" = type { ptr }
%"class.juce::ScopedPointer.287" = type { ptr }
%"class.juce::SparseSet" = type { %"class.juce::Array.288" }
%"class.juce::Array.288" = type { %"class.juce::ArrayAllocationBase.289", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.289" = type <{ %"class.juce::HeapBlock.290", i32, [4 x i8] }>
%"class.juce::HeapBlock.290" = type { ptr }

; 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 zeroext i1 @_ZNK4juce9Component9isVisibleEv(ptr noundef nonnull align 8 dereferenceable(197)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce9Component14mouseWheelMoveERKNS_10MouseEventERKNS_17MouseWheelDetailsE(ptr noundef nonnull align 8 dereferenceable(197), ptr noundef nonnull align 8 dereferenceable(74), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce7ListBox14mouseWheelMoveERKNS_10MouseEventERKNS_17MouseWheelDetailsE(ptr noundef nonnull align 8 dereferenceable(296) %0, ptr noundef nonnull align 8 dereferenceable(74) %1, ptr noundef nonnull align 4 dereferenceable(12) %2) unnamed_addr #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %8 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #4
  store i8 0, ptr %7, align 1, !tbaa !9
  %9 = load ptr, ptr %6, align 8, !tbaa !5
  %10 = getelementptr inbounds %"struct.juce::MouseWheelDetails", ptr %9, i32 0, i32 0
  %11 = load float, ptr %10, align 4, !tbaa !11
  %12 = fcmp une float %11, 0.000000e+00
  br i1 %12, label %13, label %27

13:                                               ; preds = %3
  %14 = getelementptr inbounds %"class.juce::ListBox", ptr %8, i32 0, i32 3
  %15 = call noundef ptr @_ZNK4juce13ScopedPointerINS_7ListBox12ListViewportEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  %16 = call noundef ptr @_ZN4juce8Viewport22getHorizontalScrollBarEv(ptr noundef nonnull align 8 dereferenceable(1224) %15) #4
  %17 = call noundef zeroext i1 @_ZNK4juce9Component9isVisibleEv(ptr noundef nonnull align 8 dereferenceable(197) %16) #4
  br i1 %17, label %18, label %27

18:                                               ; preds = %13
  store i8 1, ptr %7, align 1, !tbaa !9
  %19 = getelementptr inbounds %"class.juce::ListBox", ptr %8, i32 0, i32 3
  %20 = call noundef ptr @_ZNK4juce13ScopedPointerINS_7ListBox12ListViewportEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #4
  %21 = call noundef ptr @_ZN4juce8Viewport22getHorizontalScrollBarEv(ptr noundef nonnull align 8 dereferenceable(1224) %20) #4
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = load ptr, ptr %21, align 8, !tbaa !14
  %25 = getelementptr inbounds ptr, ptr %24, i64 9
  %26 = load ptr, ptr %25, align 8
  call void %26(ptr noundef nonnull align 8 dereferenceable(376) %21, ptr noundef nonnull align 8 dereferenceable(74) %22, ptr noundef nonnull align 4 dereferenceable(12) %23)
  br label %27

27:                                               ; preds = %18, %13, %3
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.juce::MouseWheelDetails", ptr %28, i32 0, i32 1
  %30 = load float, ptr %29, align 4, !tbaa !16
  %31 = fcmp une float %30, 0.000000e+00
  br i1 %31, label %32, label %46

32:                                               ; preds = %27
  %33 = getelementptr inbounds %"class.juce::ListBox", ptr %8, i32 0, i32 3
  %34 = call noundef ptr @_ZNK4juce13ScopedPointerINS_7ListBox12ListViewportEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #4
  %35 = call noundef ptr @_ZN4juce8Viewport20getVerticalScrollBarEv(ptr noundef nonnull align 8 dereferenceable(1224) %34) #4
  %36 = call noundef zeroext i1 @_ZNK4juce9Component9isVisibleEv(ptr noundef nonnull align 8 dereferenceable(197) %35) #4
  br i1 %36, label %37, label %46

37:                                               ; preds = %32
  store i8 1, ptr %7, align 1, !tbaa !9
  %38 = getelementptr inbounds %"class.juce::ListBox", ptr %8, i32 0, i32 3
  %39 = call noundef ptr @_ZNK4juce13ScopedPointerINS_7ListBox12ListViewportEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %38) #4
  %40 = call noundef ptr @_ZN4juce8Viewport20getVerticalScrollBarEv(ptr noundef nonnull align 8 dereferenceable(1224) %39) #4
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = load ptr, ptr %40, align 8, !tbaa !14
  %44 = getelementptr inbounds ptr, ptr %43, i64 9
  %45 = load ptr, ptr %44, align 8
  call void %45(ptr noundef nonnull align 8 dereferenceable(376) %40, ptr noundef nonnull align 8 dereferenceable(74) %41, ptr noundef nonnull align 4 dereferenceable(12) %42)
  br label %46

46:                                               ; preds = %37, %32, %27
  %47 = load i8, ptr %7, align 1, !tbaa !9, !range !17, !noundef !18
  %48 = trunc i8 %47 to i1
  br i1 %48, label %52, label %49

49:                                               ; preds = %46
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN4juce9Component14mouseWheelMoveERKNS_10MouseEventERKNS_17MouseWheelDetailsE(ptr noundef nonnull align 8 dereferenceable(197) %8, ptr noundef nonnull align 8 dereferenceable(74) %50, ptr noundef nonnull align 4 dereferenceable(12) %51)
  br label %52

52:                                               ; preds = %49, %46
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  ret void
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN4juce17MouseWheelDetailsE", !13, i64 0, !13, i64 4, !10, i64 8, !10, i64 9, !10, i64 10}
!13 = !{!"float", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"vtable pointer", !8, i64 0}
!16 = !{!12, !13, i64 4}
!17 = !{i8 0, i8 2}
!18 = !{}


; 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 zeroext i1 @_ZNK4juce9Component9isVisibleEv(ptr noundef nonnull align 8 dereferenceable(197)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce9Component14mouseWheelMoveERKNS_10MouseEventERKNS_17MouseWheelDetailsE(ptr noundef nonnull align 8 dereferenceable(197), ptr noundef nonnull align 8 dereferenceable(74), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4juce8Viewport20getVerticalScrollBarEv(ptr noundef nonnull align 8 dereferenceable(1224)) local_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 uwtable
define dso_local void @_ZN4juce7ListBox14mouseWheelMoveERKNS_10MouseEventERKNS_17MouseWheelDetailsE(ptr noundef nonnull align 8 dereferenceable(296) %0, ptr noundef nonnull align 8 dereferenceable(74) %1, ptr noundef nonnull align 4 dereferenceable(12) %2) unnamed_addr #1 align 2 {
  %4 = load float, ptr %2, align 4, !tbaa !5
  %5 = fcmp une float %4, 0.000000e+00
  br i1 %5, label %6, label %17

6:                                                ; preds = %3
  %7 = getelementptr inbounds i8, ptr %0, i64 224
  %8 = tail call noundef ptr @_ZNK4juce13ScopedPointerINS_7ListBox12ListViewportEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #3
  %9 = tail call noundef ptr @_ZN4juce8Viewport22getHorizontalScrollBarEv(ptr noundef nonnull align 8 dereferenceable(1224) %8) #3
  %10 = tail call noundef zeroext i1 @_ZNK4juce9Component9isVisibleEv(ptr noundef nonnull align 8 dereferenceable(197) %9) #3
  br i1 %10, label %11, label %17

11:                                               ; preds = %6
  %12 = tail call noundef ptr @_ZNK4juce13ScopedPointerINS_7ListBox12ListViewportEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #3
  %13 = tail call noundef ptr @_ZN4juce8Viewport22getHorizontalScrollBarEv(ptr noundef nonnull align 8 dereferenceable(1224) %12) #3
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  %15 = getelementptr inbounds i8, ptr %14, i64 72
  %16 = load ptr, ptr %15, align 8
  tail call void %16(ptr noundef nonnull align 8 dereferenceable(376) %13, ptr noundef nonnull align 8 dereferenceable(74) %1, ptr noundef nonnull align 4 dereferenceable(12) %2)
  br label %17

17:                                               ; preds = %11, %6, %3
  %.0 = phi i1 [ true, %11 ], [ false, %6 ], [ false, %3 ]
  %18 = getelementptr inbounds i8, ptr %2, i64 4
  %19 = load float, ptr %18, align 4, !tbaa !13
  %20 = fcmp une float %19, 0.000000e+00
  br i1 %20, label %21, label %31

21:                                               ; preds = %17
  %22 = getelementptr inbounds i8, ptr %0, i64 224
  %23 = tail call noundef ptr @_ZNK4juce13ScopedPointerINS_7ListBox12ListViewportEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #3
  %24 = tail call noundef ptr @_ZN4juce8Viewport20getVerticalScrollBarEv(ptr noundef nonnull align 8 dereferenceable(1224) %23) #3
  %25 = tail call noundef zeroext i1 @_ZNK4juce9Component9isVisibleEv(ptr noundef nonnull align 8 dereferenceable(197) %24) #3
  br i1 %25, label %.thread, label %31

.thread:                                          ; preds = %21
  %26 = tail call noundef ptr @_ZNK4juce13ScopedPointerINS_7ListBox12ListViewportEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #3
  %27 = tail call noundef ptr @_ZN4juce8Viewport20getVerticalScrollBarEv(ptr noundef nonnull align 8 dereferenceable(1224) %26) #3
  %28 = load ptr, ptr %27, align 8, !tbaa !11
  %29 = getelementptr inbounds i8, ptr %28, i64 72
  %30 = load ptr, ptr %29, align 8
  tail call void %30(ptr noundef nonnull align 8 dereferenceable(376) %27, ptr noundef nonnull align 8 dereferenceable(74) %1, ptr noundef nonnull align 4 dereferenceable(12) %2)
  br label %33

31:                                               ; preds = %21, %17
  br i1 %.0, label %33, label %32

32:                                               ; preds = %31
  tail call void @_ZN4juce9Component14mouseWheelMoveERKNS_10MouseEventERKNS_17MouseWheelDetailsE(ptr noundef nonnull align 8 dereferenceable(197) %0, ptr noundef nonnull align 8 dereferenceable(74) %1, ptr noundef nonnull align 4 dereferenceable(12) %2)
  br label %33

33:                                               ; preds = %.thread, %32, %31
  ret void
}

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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, !7, i64 0}
!6 = !{!"_ZTSN4juce17MouseWheelDetailsE", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 9, !10, i64 10}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !9, i64 0}
!13 = !{!6, !7, i64 4}


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