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

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

%"class.juce::BufferingAudioSource" = type <{ %"class.juce::PositionableAudioSource", %"class.juce::TimeSliceClient", %"class.juce::OptionalScopedPointer", ptr, i32, i32, %"class.juce::AudioBuffer", %"class.juce::CriticalSection", %"class.juce::WaitableEvent", i64, i64, i64, double, i8, i8, i8, [5 x i8] }>
%"class.juce::PositionableAudioSource" = type { %"class.juce::AudioSource" }
%"class.juce::AudioSource" = type { ptr }
%"class.juce::TimeSliceClient" = type { ptr, %"class.juce::Time" }
%"class.juce::Time" = type { i64 }
%"class.juce::OptionalScopedPointer" = type <{ %"class.juce::ScopedPointer.79", i8, [7 x i8] }>
%"class.juce::ScopedPointer.79" = type { ptr }
%"class.juce::AudioBuffer" = type <{ i32, i32, i64, ptr, %"class.juce::HeapBlock.0", [32 x ptr], i8, [7 x i8] }>
%"class.juce::HeapBlock.0" = type { ptr }
%"class.juce::CriticalSection" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.juce::WaitableEvent" = type <{ %union.pthread_cond_t, %union.pthread_mutex_t, i8, i8, [6 x i8] }>
%union.pthread_cond_t = type { %struct.__pthread_cond_s }
%struct.__pthread_cond_s = type { %union.__atomic_wide_counter, %union.__atomic_wide_counter, [2 x i32], [2 x i32], i32, i32, [2 x i32] }
%union.__atomic_wide_counter = type { i64 }

; 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 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce20BufferingAudioSource13prepareToPlayEid(ptr noundef nonnull align 8 dereferenceable(523) %0, i32 noundef %1, double noundef %2) unnamed_addr #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store double %2, ptr %6, align 8, !tbaa !11
  %8 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %9 = load i32, ptr %5, align 4, !tbaa !9
  %10 = mul nsw i32 %9, 2
  %11 = getelementptr inbounds %"class.juce::BufferingAudioSource", ptr %8, i32 0, i32 4
  %12 = load i32, ptr %11, align 8, !tbaa !13
  %13 = call noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef %10, i32 noundef %12)
  store i32 %13, ptr %7, align 4, !tbaa !9
  %14 = load double, ptr %6, align 8, !tbaa !11
  %15 = getelementptr inbounds %"class.juce::BufferingAudioSource", ptr %8, i32 0, i32 12
  %16 = load volatile double, ptr %15, align 8, !tbaa !28
  %17 = fcmp une double %14, %16
  br i1 %17, label %27, label %18

18:                                               ; preds = %3
  %19 = load i32, ptr %7, align 4, !tbaa !9
  %20 = getelementptr inbounds %"class.juce::BufferingAudioSource", ptr %8, i32 0, i32 6
  %21 = call noundef i32 @_ZNK4juce11AudioBufferIfE13getNumSamplesEv(ptr noundef nonnull align 8 dereferenceable(289) %20) #5
  %22 = icmp ne i32 %19, %21
  br i1 %22, label %27, label %23

23:                                               ; preds = %18
  %24 = getelementptr inbounds %"class.juce::BufferingAudioSource", ptr %8, i32 0, i32 14
  %25 = load i8, ptr %24, align 1, !tbaa !29, !range !30, !noundef !31
  %26 = trunc i8 %25 to i1
  br i1 %26, label %77, label %27

27:                                               ; preds = %23, %18, %3
  %28 = getelementptr inbounds %"class.juce::BufferingAudioSource", ptr %8, i32 0, i32 3
  %29 = load ptr, ptr %28, align 8, !tbaa !32
  %30 = getelementptr inbounds i8, ptr %8, i64 8
  call void @_ZN4juce15TimeSliceThread21removeTimeSliceClientEPNS_15TimeSliceClientE(ptr noundef nonnull align 8 dereferenceable(400) %29, ptr noundef %30)
  %31 = getelementptr inbounds %"class.juce::BufferingAudioSource", ptr %8, i32 0, i32 14
  store i8 1, ptr %31, align 1, !tbaa !29
  %32 = load double, ptr %6, align 8, !tbaa !11
  %33 = getelementptr inbounds %"class.juce::BufferingAudioSource", ptr %8, i32 0, i32 12
  store volatile double %32, ptr %33, align 8, !tbaa !28
  %34 = getelementptr inbounds %"class.juce::BufferingAudioSource", ptr %8, i32 0, i32 2
  %35 = call noundef ptr @_ZNK4juce21OptionalScopedPointerINS_23PositionableAudioSourceEEptEv(ptr noundef nonnull align 8 dereferenceable(9) %34) #5
  %36 = load i32, ptr %5, align 4, !tbaa !9
  %37 = load double, ptr %6, align 8, !tbaa !11
  %38 = load ptr, ptr %35, align 8, !tbaa !33
  %39 = getelementptr inbounds ptr, ptr %38, i64 2
  %40 = load ptr, ptr %39, align 8
  call void %40(ptr noundef nonnull align 8 dereferenceable(8) %35, i32 noundef %36, double noundef %37)
  %41 = getelementptr inbounds %"class.juce::BufferingAudioSource", ptr %8, i32 0, i32 6
  %42 = getelementptr inbounds %"class.juce::BufferingAudioSource", ptr %8, i32 0, i32 5
  %43 = load i32, ptr %42, align 4, !tbaa !35
  %44 = load i32, ptr %7, align 4, !tbaa !9
  call void @_ZN4juce11AudioBufferIfE7setSizeEiibbb(ptr noundef nonnull align 8 dereferenceable(289) %41, i32 noundef %43, i32 noundef %44, i1 noundef zeroext false, i1 noundef zeroext false, i1 noundef zeroext false) #5
  %45 = getelementptr inbounds %"class.juce::BufferingAudioSource", ptr %8, i32 0, i32 6
  call void @_ZN4juce11AudioBufferIfE5clearEv(ptr noundef nonnull align 8 dereferenceable(289) %45) #5
  %46 = getelementptr inbounds %"class.juce::BufferingAudioSource", ptr %8, i32 0, i32 9
  store volatile i64 0, ptr %46, align 8, !tbaa !36
  %47 = getelementptr inbounds %"class.juce::BufferingAudioSource", ptr %8, i32 0, i32 10
  store volatile i64 0, ptr %47, align 8, !tbaa !37
  %48 = getelementptr inbounds %"class.juce::BufferingAudioSource", ptr %8, i32 0, i32 3
  %49 = load ptr, ptr %48, align 8, !tbaa !32
  %50 = getelementptr inbounds i8, ptr %8, i64 8
  call void @_ZN4juce15TimeSliceThread18addTimeSliceClientEPNS_15TimeSliceClientEi(ptr noundef nonnull align 8 dereferenceable(400) %49, ptr noundef %50, i32 noundef 0)
  br label %51

51:                                               ; preds = %74, %27
  %52 = getelementptr inbounds %"class.juce::BufferingAudioSource", ptr %8, i32 0, i32 3
  %53 = load ptr, ptr %52, align 8, !tbaa !32
  %54 = getelementptr inbounds i8, ptr %8, i64 8
  call void @_ZN4juce15TimeSliceThread18moveToFrontOfQueueEPNS_15TimeSliceClientE(ptr noundef nonnull align 8 dereferenceable(400) %53, ptr noundef %54)
  call void @_ZN4juce6Thread5sleepEi(i32 noundef 5)
  br label %55

55:                                               ; preds = %51
  %56 = getelementptr inbounds %"class.juce::BufferingAudioSource", ptr %8, i32 0, i32 15
  %57 = load i8, ptr %56, align 2, !tbaa !38, !range !30, !noundef !31
  %58 = trunc i8 %57 to i1
  br i1 %58, label %59, label %74

59:                                               ; preds = %55
  %60 = getelementptr inbounds %"class.juce::BufferingAudioSource", ptr %8, i32 0, i32 10
  %61 = load volatile i64, ptr %60, align 8, !tbaa !37
  %62 = getelementptr inbounds %"class.juce::BufferingAudioSource", ptr %8, i32 0, i32 9
  %63 = load volatile i64, ptr %62, align 8, !tbaa !36
  %64 = sub nsw i64 %61, %63
  %65 = load double, ptr %6, align 8, !tbaa !11
  %66 = fptosi double %65 to i32
  %67 = sdiv i32 %66, 4
  %68 = getelementptr inbounds %"class.juce::BufferingAudioSource", ptr %8, i32 0, i32 6
  %69 = call noundef i32 @_ZNK4juce11AudioBufferIfE13getNumSamplesEv(ptr noundef nonnull align 8 dereferenceable(289) %68) #5
  %70 = sdiv i32 %69, 2
  %71 = call noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef %67, i32 noundef %70)
  %72 = sext i32 %71 to i64
  %73 = icmp slt i64 %64, %72
  br label %74

74:                                               ; preds = %59, %55
  %75 = phi i1 [ false, %55 ], [ %73, %59 ]
  br i1 %75, label %51, label %76, !llvm.loop !39

76:                                               ; preds = %74
  br label %77

77:                                               ; preds = %76, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret void
}

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

declare void @_ZN4juce15TimeSliceThread21removeTimeSliceClientEPNS_15TimeSliceClientE(ptr noundef nonnull align 8 dereferenceable(400), ptr noundef) #3

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

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

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

declare void @_ZN4juce15TimeSliceThread18addTimeSliceClientEPNS_15TimeSliceClientEi(ptr noundef nonnull align 8 dereferenceable(400), ptr noundef, i32 noundef) #3

declare void @_ZN4juce15TimeSliceThread18moveToFrontOfQueueEPNS_15TimeSliceClientE(ptr noundef nonnull align 8 dereferenceable(400), ptr noundef) #3

declare void @_ZN4juce6Thread5sleepEi(i32 noundef) #3

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 = { "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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !10, i64 48}
!14 = !{!"_ZTSN4juce20BufferingAudioSourceE", !15, i64 0, !17, i64 8, !20, i64 24, !6, i64 40, !10, i64 48, !10, i64 52, !23, i64 56, !26, i64 352, !27, i64 392, !19, i64 488, !19, i64 496, !19, i64 504, !12, i64 512, !22, i64 520, !22, i64 521, !22, i64 522}
!15 = !{!"_ZTSN4juce23PositionableAudioSourceE", !16, i64 0}
!16 = !{!"_ZTSN4juce11AudioSourceE"}
!17 = !{!"_ZTSN4juce15TimeSliceClientE", !18, i64 8}
!18 = !{!"_ZTSN4juce4TimeE", !19, i64 0}
!19 = !{!"long long", !7, i64 0}
!20 = !{!"_ZTSN4juce21OptionalScopedPointerINS_23PositionableAudioSourceEEE", !21, i64 0, !22, i64 8}
!21 = !{!"_ZTSN4juce13ScopedPointerINS_23PositionableAudioSourceEEE", !6, i64 0}
!22 = !{!"bool", !7, i64 0}
!23 = !{!"_ZTSN4juce11AudioBufferIfEE", !10, i64 0, !10, i64 4, !24, i64 8, !6, i64 16, !25, i64 24, !7, i64 32, !22, i64 288}
!24 = !{!"long", !7, i64 0}
!25 = !{!"_ZTSN4juce9HeapBlockIcLb1EEE", !6, i64 0}
!26 = !{!"_ZTSN4juce15CriticalSectionE", !7, i64 0}
!27 = !{!"_ZTSN4juce13WaitableEventE", !7, i64 0, !7, i64 48, !22, i64 88, !22, i64 89}
!28 = !{!14, !12, i64 512}
!29 = !{!14, !22, i64 521}
!30 = !{i8 0, i8 2}
!31 = !{}
!32 = !{!14, !6, i64 40}
!33 = !{!34, !34, i64 0}
!34 = !{!"vtable pointer", !8, i64 0}
!35 = !{!14, !10, i64 52}
!36 = !{!14, !19, i64 488}
!37 = !{!14, !19, i64 496}
!38 = !{!14, !22, i64 522}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}


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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce20BufferingAudioSource13prepareToPlayEid(ptr noundef nonnull align 8 dereferenceable(523) %0, i32 noundef %1, double noundef %2) unnamed_addr #1 align 2 {
  %4 = shl nsw i32 %1, 1
  %5 = getelementptr inbounds i8, ptr %0, i64 48
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = tail call noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef %4, i32 noundef %6)
  %8 = getelementptr inbounds i8, ptr %0, i64 512
  %9 = load volatile double, ptr %8, align 8, !tbaa !25
  %10 = fcmp une double %9, %2
  br i1 %10, label %18, label %11

11:                                               ; preds = %3
  %12 = getelementptr inbounds i8, ptr %0, i64 56
  %13 = tail call noundef i32 @_ZNK4juce11AudioBufferIfE13getNumSamplesEv(ptr noundef nonnull align 8 dereferenceable(289) %12) #4
  %.not = icmp eq i32 %7, %13
  br i1 %.not, label %14, label %18

14:                                               ; preds = %11
  %15 = getelementptr inbounds i8, ptr %0, i64 521
  %16 = load i8, ptr %15, align 1, !tbaa !26, !range !27, !noundef !28
  %17 = trunc nuw i8 %16 to i1
  br i1 %17, label %.critedge, label %18

18:                                               ; preds = %14, %11, %3
  %19 = getelementptr inbounds i8, ptr %0, i64 40
  %20 = load ptr, ptr %19, align 8, !tbaa !29
  %21 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZN4juce15TimeSliceThread21removeTimeSliceClientEPNS_15TimeSliceClientE(ptr noundef nonnull align 8 dereferenceable(400) %20, ptr noundef nonnull %21)
  %22 = getelementptr inbounds i8, ptr %0, i64 521
  store i8 1, ptr %22, align 1, !tbaa !26
  store volatile double %2, ptr %8, align 8, !tbaa !25
  %23 = getelementptr inbounds i8, ptr %0, i64 24
  %24 = tail call noundef ptr @_ZNK4juce21OptionalScopedPointerINS_23PositionableAudioSourceEEptEv(ptr noundef nonnull align 8 dereferenceable(9) %23) #4
  %25 = load ptr, ptr %24, align 8, !tbaa !30
  %26 = getelementptr inbounds i8, ptr %25, i64 16
  %27 = load ptr, ptr %26, align 8
  tail call void %27(ptr noundef nonnull align 8 dereferenceable(8) %24, i32 noundef %1, double noundef %2)
  %28 = getelementptr inbounds i8, ptr %0, i64 56
  %29 = getelementptr inbounds i8, ptr %0, i64 52
  %30 = load i32, ptr %29, align 4, !tbaa !32
  tail call void @_ZN4juce11AudioBufferIfE7setSizeEiibbb(ptr noundef nonnull align 8 dereferenceable(289) %28, i32 noundef %30, i32 noundef %7, i1 noundef zeroext false, i1 noundef zeroext false, i1 noundef zeroext false) #4
  tail call void @_ZN4juce11AudioBufferIfE5clearEv(ptr noundef nonnull align 8 dereferenceable(289) %28) #4
  %31 = getelementptr inbounds i8, ptr %0, i64 488
  store volatile i64 0, ptr %31, align 8, !tbaa !33
  %32 = getelementptr inbounds i8, ptr %0, i64 496
  store volatile i64 0, ptr %32, align 8, !tbaa !34
  %33 = load ptr, ptr %19, align 8, !tbaa !29
  tail call void @_ZN4juce15TimeSliceThread18addTimeSliceClientEPNS_15TimeSliceClientEi(ptr noundef nonnull align 8 dereferenceable(400) %33, ptr noundef nonnull %21, i32 noundef 0)
  %34 = getelementptr inbounds i8, ptr %0, i64 522
  %35 = fptosi double %2 to i32
  %36 = sdiv i32 %35, 4
  br label %37

37:                                               ; preds = %41, %18
  %38 = load ptr, ptr %19, align 8, !tbaa !29
  tail call void @_ZN4juce15TimeSliceThread18moveToFrontOfQueueEPNS_15TimeSliceClientE(ptr noundef nonnull align 8 dereferenceable(400) %38, ptr noundef nonnull %21)
  tail call void @_ZN4juce6Thread5sleepEi(i32 noundef 5)
  %39 = load i8, ptr %34, align 2, !tbaa !35, !range !27, !noundef !28
  %40 = trunc nuw i8 %39 to i1
  br i1 %40, label %41, label %.critedge

41:                                               ; preds = %37
  %42 = load volatile i64, ptr %32, align 8, !tbaa !34
  %43 = load volatile i64, ptr %31, align 8, !tbaa !33
  %44 = sub nsw i64 %42, %43
  %45 = tail call noundef i32 @_ZNK4juce11AudioBufferIfE13getNumSamplesEv(ptr noundef nonnull align 8 dereferenceable(289) %28) #4
  %46 = sdiv i32 %45, 2
  %47 = tail call noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef %36, i32 noundef %46)
  %48 = sext i32 %47 to i64
  %49 = icmp slt i64 %44, %48
  br i1 %49, label %37, label %.critedge, !llvm.loop !36

.critedge:                                        ; preds = %37, %41, %14
  ret void
}

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

declare void @_ZN4juce15TimeSliceThread21removeTimeSliceClientEPNS_15TimeSliceClientE(ptr noundef nonnull align 8 dereferenceable(400), ptr noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce11AudioBufferIfE7setSizeEiibbb(ptr noundef nonnull align 8 dereferenceable(289), i32 noundef, i32 noundef, i1 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #0 align 2

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

declare void @_ZN4juce15TimeSliceThread18addTimeSliceClientEPNS_15TimeSliceClientEi(ptr noundef nonnull align 8 dereferenceable(400), ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @_ZN4juce15TimeSliceThread18moveToFrontOfQueueEPNS_15TimeSliceClientE(ptr noundef nonnull align 8 dereferenceable(400), ptr noundef) local_unnamed_addr #2

declare void @_ZN4juce6Thread5sleepEi(i32 noundef) local_unnamed_addr #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 = { "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, !18, i64 48}
!6 = !{!"_ZTSN4juce20BufferingAudioSourceE", !7, i64 0, !9, i64 8, !14, i64 24, !16, i64 40, !18, i64 48, !18, i64 52, !19, i64 56, !22, i64 352, !23, i64 392, !11, i64 488, !11, i64 496, !11, i64 504, !24, i64 512, !17, i64 520, !17, i64 521, !17, i64 522}
!7 = !{!"_ZTSN4juce23PositionableAudioSourceE", !8, i64 0}
!8 = !{!"_ZTSN4juce11AudioSourceE"}
!9 = !{!"_ZTSN4juce15TimeSliceClientE", !10, i64 8}
!10 = !{!"_ZTSN4juce4TimeE", !11, i64 0}
!11 = !{!"long long", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"_ZTSN4juce21OptionalScopedPointerINS_23PositionableAudioSourceEEE", !15, i64 0, !17, i64 8}
!15 = !{!"_ZTSN4juce13ScopedPointerINS_23PositionableAudioSourceEEE", !16, i64 0}
!16 = !{!"any pointer", !12, i64 0}
!17 = !{!"bool", !12, i64 0}
!18 = !{!"int", !12, i64 0}
!19 = !{!"_ZTSN4juce11AudioBufferIfEE", !18, i64 0, !18, i64 4, !20, i64 8, !16, i64 16, !21, i64 24, !12, i64 32, !17, i64 288}
!20 = !{!"long", !12, i64 0}
!21 = !{!"_ZTSN4juce9HeapBlockIcLb1EEE", !16, i64 0}
!22 = !{!"_ZTSN4juce15CriticalSectionE", !12, i64 0}
!23 = !{!"_ZTSN4juce13WaitableEventE", !12, i64 0, !12, i64 48, !17, i64 88, !17, i64 89}
!24 = !{!"double", !12, i64 0}
!25 = !{!6, !24, i64 512}
!26 = !{!6, !17, i64 521}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = !{!6, !16, i64 40}
!30 = !{!31, !31, i64 0}
!31 = !{!"vtable pointer", !13, i64 0}
!32 = !{!6, !18, i64 52}
!33 = !{!6, !11, i64 488}
!34 = !{!6, !11, i64 496}
!35 = !{!6, !17, i64 522}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass