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

; 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::BigInteger" = type <{ %"class.juce::HeapBlock.34", [4 x i32], i64, i32, i8, [3 x i8] }>
%"class.juce::HeapBlock.34" = type { ptr }
%"class.juce::GenericScopedLock" = type { ptr }
%"class.juce::AudioProcessorPlayer" = type { %"class.juce::AudioIODeviceCallback", %"class.juce::MidiInputCallback", ptr, %"class.juce::CriticalSection", double, i32, i8, i8, i32, i32, %"class.juce::HeapBlock.225", %"class.juce::AudioBuffer", %"class.juce::AudioBuffer.226", %"class.juce::MidiBuffer", %"class.juce::MidiMessageCollector" }
%"class.juce::AudioIODeviceCallback" = type { ptr }
%"class.juce::MidiInputCallback" = 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::HeapBlock.225" = type { ptr }
%"class.juce::AudioBuffer" = type <{ i32, i32, i64, ptr, %"class.juce::HeapBlock.42", [32 x ptr], i8, [7 x i8] }>
%"class.juce::HeapBlock.42" = type { ptr }
%"class.juce::AudioBuffer.226" = type <{ i32, i32, i64, ptr, %"class.juce::HeapBlock.42", [32 x ptr], i8, [7 x i8] }>
%"class.juce::MidiBuffer" = type { %"class.juce::Array.165" }
%"class.juce::Array.165" = type { %"class.juce::ArrayAllocationBase.166", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.166" = type <{ %"class.juce::HeapBlock.167", i32, [4 x i8] }>
%"class.juce::HeapBlock.167" = type { ptr }
%"class.juce::MidiMessageCollector" = type { %"class.juce::MidiKeyboardStateListener", %"class.juce::MidiInputCallback", double, %"class.juce::CriticalSection", %"class.juce::MidiBuffer", double }
%"class.juce::MidiKeyboardStateListener" = type { ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #1 align 2

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

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

; Function Attrs: nounwind
declare void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37)) unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce20AudioProcessorPlayer12setProcessorEPNS_14AudioProcessorE(ptr noundef nonnull align 8 dereferenceable(808), ptr noundef) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce20AudioProcessorPlayer23audioDeviceAboutToStartEPNS_13AudioIODeviceE(ptr noundef nonnull align 8 dereferenceable(808) %0, ptr noundef %1) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.juce::BigInteger", align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.juce::BigInteger", align 8
  %11 = alloca %"class.juce::GenericScopedLock", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  %18 = getelementptr inbounds ptr, ptr %17, i64 15
  %19 = load ptr, ptr %18, align 8
  %20 = call noundef double %19(ptr noundef nonnull align 8 dereferenceable(24) %16)
  store double %20, ptr %5, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = getelementptr inbounds ptr, ptr %22, i64 14
  %24 = load ptr, ptr %23, align 8
  %25 = call noundef i32 %24(ptr noundef nonnull align 8 dereferenceable(24) %21)
  store i32 %25, ptr %6, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr %8) #6
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = load ptr, ptr %26, align 8, !tbaa !9
  %28 = getelementptr inbounds ptr, ptr %27, i64 18
  %29 = load ptr, ptr %28, align 8
  call void %29(ptr dead_on_unwind writable sret(%"class.juce::BigInteger") align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %26)
  %30 = call noundef i32 @_ZNK4juce10BigInteger20countNumberOfSetBitsEv(ptr noundef nonnull align 8 dereferenceable(37) %8) #6
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %8) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #6
  store i32 %30, ptr %7, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr %10) #6
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = getelementptr inbounds ptr, ptr %32, i64 17
  %34 = load ptr, ptr %33, align 8
  call void %34(ptr dead_on_unwind writable sret(%"class.juce::BigInteger") align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %31)
  %35 = call noundef i32 @_ZNK4juce10BigInteger20countNumberOfSetBitsEv(ptr noundef nonnull align 8 dereferenceable(37) %10) #6
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %10) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #6
  store i32 %35, ptr %9, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %36 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %15, i32 0, i32 3
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(40) %36) #6
  %37 = load double, ptr %5, align 8, !tbaa !11
  %38 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %15, i32 0, i32 4
  store double %37, ptr %38, align 8, !tbaa !15
  %39 = load i32, ptr %6, align 4, !tbaa !13
  %40 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %15, i32 0, i32 5
  store i32 %39, ptr %40, align 8, !tbaa !32
  %41 = load i32, ptr %7, align 4, !tbaa !13
  %42 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %15, i32 0, i32 8
  store i32 %41, ptr %42, align 8, !tbaa !33
  %43 = load i32, ptr %9, align 4, !tbaa !13
  %44 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %15, i32 0, i32 9
  store i32 %43, ptr %44, align 4, !tbaa !34
  %45 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %15, i32 0, i32 14
  %46 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %15, i32 0, i32 4
  %47 = load double, ptr %46, align 8, !tbaa !15
  invoke void @_ZN4juce20MidiMessageCollector5resetEd(ptr noundef nonnull align 8 dereferenceable(96) %45, double noundef %47)
          to label %48 unwind label %71

48:                                               ; preds = %2
  %49 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %15, i32 0, i32 10
  %50 = load i32, ptr %7, align 4, !tbaa !13
  %51 = load i32, ptr %9, align 4, !tbaa !13
  %52 = invoke noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef %50, i32 noundef %51)
          to label %53 unwind label %71

53:                                               ; preds = %48
  %54 = sext i32 %52 to i64
  %55 = add i64 %54, 2
  invoke void @_ZN4juce9HeapBlockIPfLb0EE6callocEmm(ptr noundef nonnull align 8 dereferenceable(8) %49, i64 noundef %55, i64 noundef 8)
          to label %56 unwind label %71

56:                                               ; preds = %53
  %57 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %15, i32 0, i32 2
  %58 = load ptr, ptr %57, align 8, !tbaa !35
  %59 = icmp ne ptr %58, null
  br i1 %59, label %60, label %85

60:                                               ; preds = %56
  %61 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %15, i32 0, i32 6
  %62 = load i8, ptr %61, align 4, !tbaa !36, !range !37, !noundef !38
  %63 = trunc i8 %62 to i1
  br i1 %63, label %64, label %75

64:                                               ; preds = %60
  %65 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %15, i32 0, i32 2
  %66 = load ptr, ptr %65, align 8, !tbaa !35
  %67 = load ptr, ptr %66, align 8, !tbaa !9
  %68 = getelementptr inbounds ptr, ptr %67, i64 4
  %69 = load ptr, ptr %68, align 8
  invoke void %69(ptr noundef nonnull align 8 dereferenceable(256) %66)
          to label %70 unwind label %71

70:                                               ; preds = %64
  br label %75

71:                                               ; preds = %64, %53, %48, %2
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %12, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %13, align 4
  br label %86

75:                                               ; preds = %70, %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %76 = getelementptr inbounds %"class.juce::AudioProcessorPlayer", ptr %15, i32 0, i32 2
  %77 = load ptr, ptr %76, align 8, !tbaa !35
  store ptr %77, ptr %14, align 8, !tbaa !5
  invoke void @_ZN4juce20AudioProcessorPlayer12setProcessorEPNS_14AudioProcessorE(ptr noundef nonnull align 8 dereferenceable(808) %15, ptr noundef null)
          to label %78 unwind label %81

78:                                               ; preds = %75
  %79 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZN4juce20AudioProcessorPlayer12setProcessorEPNS_14AudioProcessorE(ptr noundef nonnull align 8 dereferenceable(808) %15, ptr noundef %79)
          to label %80 unwind label %81

80:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %85

81:                                               ; preds = %78, %75
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %12, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %86

85:                                               ; preds = %80, %56
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  ret void

86:                                               ; preds = %81, %71
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %87

87:                                               ; preds = %86
  %88 = load ptr, ptr %12, align 8
  %89 = load i32, ptr %13, align 4
  %90 = insertvalue { ptr, i32 } poison, ptr %88, 0
  %91 = insertvalue { ptr, i32 } %90, i32 %89, 1
  resume { ptr, i32 } %91
}

; Function Attrs: nounwind
declare noundef i32 @_ZNK4juce10BigInteger20countNumberOfSetBitsEv(ptr noundef nonnull align 8 dereferenceable(37)) #3

declare void @_ZN4juce20MidiMessageCollector5resetEd(ptr noundef nonnull align 8 dereferenceable(96), double noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce9HeapBlockIPfLb0EE6callocEmm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i64 noundef) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 "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 = { 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 #5 = { "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 #6 = { 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 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !12, i64 64}
!16 = !{!"_ZTSN4juce20AudioProcessorPlayerE", !17, i64 0, !18, i64 8, !6, i64 16, !19, i64 24, !12, i64 64, !14, i64 72, !20, i64 76, !20, i64 77, !14, i64 80, !14, i64 84, !21, i64 88, !22, i64 96, !25, i64 392, !26, i64 688, !30, i64 712}
!17 = !{!"_ZTSN4juce21AudioIODeviceCallbackE"}
!18 = !{!"_ZTSN4juce17MidiInputCallbackE"}
!19 = !{!"_ZTSN4juce15CriticalSectionE", !7, i64 0}
!20 = !{!"bool", !7, i64 0}
!21 = !{!"_ZTSN4juce9HeapBlockIPfLb0EEE", !6, i64 0}
!22 = !{!"_ZTSN4juce11AudioBufferIfEE", !14, i64 0, !14, i64 4, !23, i64 8, !6, i64 16, !24, i64 24, !7, i64 32, !20, i64 288}
!23 = !{!"long", !7, i64 0}
!24 = !{!"_ZTSN4juce9HeapBlockIcLb1EEE", !6, i64 0}
!25 = !{!"_ZTSN4juce11AudioBufferIdEE", !14, i64 0, !14, i64 4, !23, i64 8, !6, i64 16, !24, i64 24, !7, i64 32, !20, i64 288}
!26 = !{!"_ZTSN4juce10MidiBufferE", !27, i64 0}
!27 = !{!"_ZTSN4juce5ArrayIhNS_20DummyCriticalSectionELi0EEE", !28, i64 0, !14, i64 16}
!28 = !{!"_ZTSN4juce19ArrayAllocationBaseIhNS_20DummyCriticalSectionEEE", !29, i64 0, !14, i64 8}
!29 = !{!"_ZTSN4juce9HeapBlockIhLb0EEE", !6, i64 0}
!30 = !{!"_ZTSN4juce20MidiMessageCollectorE", !31, i64 0, !18, i64 8, !12, i64 16, !19, i64 24, !26, i64 64, !12, i64 88}
!31 = !{!"_ZTSN4juce25MidiKeyboardStateListenerE"}
!32 = !{!16, !14, i64 72}
!33 = !{!16, !14, i64 80}
!34 = !{!16, !14, i64 84}
!35 = !{!16, !6, i64 16}
!36 = !{!16, !20, i64 76}
!37 = !{i8 0, i8 2}
!38 = !{}


; 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::BigInteger" = type <{ %"class.juce::HeapBlock.34", [4 x i32], i64, i32, i8, [3 x i8] }>
%"class.juce::HeapBlock.34" = type { ptr }
%"class.juce::GenericScopedLock" = type { ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37)) unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce20AudioProcessorPlayer12setProcessorEPNS_14AudioProcessorE(ptr noundef nonnull align 8 dereferenceable(808), ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce20AudioProcessorPlayer23audioDeviceAboutToStartEPNS_13AudioIODeviceE(ptr noundef nonnull align 8 dereferenceable(808) %0, ptr noundef %1) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.juce::BigInteger", align 8
  %4 = alloca %"class.juce::BigInteger", align 8
  %5 = alloca %"class.juce::GenericScopedLock", align 8
  %6 = load ptr, ptr %1, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 120
  %8 = load ptr, ptr %7, align 8
  %9 = tail call noundef double %8(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %10 = load ptr, ptr %1, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %10, i64 112
  %12 = load ptr, ptr %11, align 8
  %13 = tail call noundef i32 %12(ptr noundef nonnull align 8 dereferenceable(24) %1)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #6
  %14 = load ptr, ptr %1, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %14, i64 144
  %16 = load ptr, ptr %15, align 8
  call void %16(ptr dead_on_unwind nonnull writable sret(%"class.juce::BigInteger") align 8 %3, ptr noundef nonnull align 8 dereferenceable(24) %1)
  %17 = call noundef i32 @_ZNK4juce10BigInteger20countNumberOfSetBitsEv(ptr noundef nonnull align 8 dereferenceable(37) %3) #6
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %3) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #6
  %18 = load ptr, ptr %1, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %18, i64 136
  %20 = load ptr, ptr %19, align 8
  call void %20(ptr dead_on_unwind nonnull writable sret(%"class.juce::BigInteger") align 8 %4, ptr noundef nonnull align 8 dereferenceable(24) %1)
  %21 = call noundef i32 @_ZNK4juce10BigInteger20countNumberOfSetBitsEv(ptr noundef nonnull align 8 dereferenceable(37) %4) #6
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %4) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %22 = getelementptr inbounds i8, ptr %0, i64 24
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(40) %22) #6
  %23 = getelementptr inbounds i8, ptr %0, i64 64
  store double %9, ptr %23, align 8, !tbaa !8
  %24 = getelementptr inbounds i8, ptr %0, i64 72
  store i32 %13, ptr %24, align 8, !tbaa !29
  %25 = getelementptr inbounds i8, ptr %0, i64 80
  store i32 %17, ptr %25, align 8, !tbaa !30
  %26 = getelementptr inbounds i8, ptr %0, i64 84
  store i32 %21, ptr %26, align 4, !tbaa !31
  %27 = getelementptr inbounds i8, ptr %0, i64 712
  invoke void @_ZN4juce20MidiMessageCollector5resetEd(ptr noundef nonnull align 8 dereferenceable(96) %27, double noundef %9)
          to label %28 unwind label %44

28:                                               ; preds = %2
  %29 = getelementptr inbounds i8, ptr %0, i64 88
  %30 = call noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef %17, i32 noundef %21)
  %31 = sext i32 %30 to i64
  %32 = add nsw i64 %31, 2
  invoke void @_ZN4juce9HeapBlockIPfLb0EE6callocEmm(ptr noundef nonnull align 8 dereferenceable(8) %29, i64 noundef %32, i64 noundef 8)
          to label %33 unwind label %44

33:                                               ; preds = %28
  %34 = getelementptr inbounds i8, ptr %0, i64 16
  %35 = load ptr, ptr %34, align 8, !tbaa !32
  %.not = icmp eq ptr %35, null
  br i1 %.not, label %51, label %36

36:                                               ; preds = %33
  %37 = getelementptr inbounds i8, ptr %0, i64 76
  %38 = load i8, ptr %37, align 4, !tbaa !33, !range !34, !noundef !35
  %39 = trunc nuw i8 %38 to i1
  br i1 %39, label %40, label %46

40:                                               ; preds = %36
  %41 = load ptr, ptr %35, align 8, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %41, i64 32
  %43 = load ptr, ptr %42, align 8
  invoke void %43(ptr noundef nonnull align 8 dereferenceable(256) %35)
          to label %._crit_edge unwind label %44

._crit_edge:                                      ; preds = %40
  %.pre = load ptr, ptr %34, align 8, !tbaa !32
  br label %46

44:                                               ; preds = %40, %28, %2
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %52

46:                                               ; preds = %._crit_edge, %36
  %47 = phi ptr [ %.pre, %._crit_edge ], [ %35, %36 ]
  invoke void @_ZN4juce20AudioProcessorPlayer12setProcessorEPNS_14AudioProcessorE(ptr noundef nonnull align 8 dereferenceable(808) %0, ptr noundef null)
          to label %48 unwind label %49

48:                                               ; preds = %46
  invoke void @_ZN4juce20AudioProcessorPlayer12setProcessorEPNS_14AudioProcessorE(ptr noundef nonnull align 8 dereferenceable(808) %0, ptr noundef %47)
          to label %51 unwind label %49

49:                                               ; preds = %48, %46
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %52

51:                                               ; preds = %48, %33
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  ret void

52:                                               ; preds = %49, %44
  %.pn = phi { ptr, i32 } [ %50, %49 ], [ %45, %44 ]
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  resume { ptr, i32 } %.pn
}

; Function Attrs: nounwind
declare noundef i32 @_ZNK4juce10BigInteger20countNumberOfSetBitsEv(ptr noundef nonnull align 8 dereferenceable(37)) local_unnamed_addr #3

declare void @_ZN4juce20MidiMessageCollector5resetEd(ptr noundef nonnull align 8 dereferenceable(96), double noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce9HeapBlockIPfLb0EE6callocEmm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i64 noundef) local_unnamed_addr #4 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 "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 = { 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 #5 = { "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 #6 = { 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, !15, i64 64}
!9 = !{!"_ZTSN4juce20AudioProcessorPlayerE", !10, i64 0, !11, i64 8, !12, i64 16, !14, i64 24, !15, i64 64, !16, i64 72, !17, i64 76, !17, i64 77, !16, i64 80, !16, i64 84, !18, i64 88, !19, i64 96, !22, i64 392, !23, i64 688, !27, i64 712}
!10 = !{!"_ZTSN4juce21AudioIODeviceCallbackE"}
!11 = !{!"_ZTSN4juce17MidiInputCallbackE"}
!12 = !{!"any pointer", !13, i64 0}
!13 = !{!"omnipotent char", !7, i64 0}
!14 = !{!"_ZTSN4juce15CriticalSectionE", !13, i64 0}
!15 = !{!"double", !13, i64 0}
!16 = !{!"int", !13, i64 0}
!17 = !{!"bool", !13, i64 0}
!18 = !{!"_ZTSN4juce9HeapBlockIPfLb0EEE", !12, i64 0}
!19 = !{!"_ZTSN4juce11AudioBufferIfEE", !16, i64 0, !16, i64 4, !20, i64 8, !12, i64 16, !21, i64 24, !13, i64 32, !17, i64 288}
!20 = !{!"long", !13, i64 0}
!21 = !{!"_ZTSN4juce9HeapBlockIcLb1EEE", !12, i64 0}
!22 = !{!"_ZTSN4juce11AudioBufferIdEE", !16, i64 0, !16, i64 4, !20, i64 8, !12, i64 16, !21, i64 24, !13, i64 32, !17, i64 288}
!23 = !{!"_ZTSN4juce10MidiBufferE", !24, i64 0}
!24 = !{!"_ZTSN4juce5ArrayIhNS_20DummyCriticalSectionELi0EEE", !25, i64 0, !16, i64 16}
!25 = !{!"_ZTSN4juce19ArrayAllocationBaseIhNS_20DummyCriticalSectionEEE", !26, i64 0, !16, i64 8}
!26 = !{!"_ZTSN4juce9HeapBlockIhLb0EEE", !12, i64 0}
!27 = !{!"_ZTSN4juce20MidiMessageCollectorE", !28, i64 0, !11, i64 8, !15, i64 16, !14, i64 24, !23, i64 64, !15, i64 88}
!28 = !{!"_ZTSN4juce25MidiKeyboardStateListenerE"}
!29 = !{!9, !16, i64 72}
!30 = !{!9, !16, i64 80}
!31 = !{!9, !16, i64 84}
!32 = !{!9, !12, i64 16}
!33 = !{!9, !17, i64 76}
!34 = !{i8 0, i8 2}
!35 = !{}


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