; 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::Range.50" = type { i32, i32 }
%"class.juce::MPEValue" = type { i32 }
%"class.juce::MPEInstrument" = type { ptr, %"class.juce::CriticalSection", %"class.juce::Array.61", %"class.juce::MPEZoneLayout", %"class.juce::ListenerList.66", [16 x i8], [16 x i8], [16 x i8], %"struct.juce::MPEInstrument::LegacyMode", %"struct.juce::MPEInstrument::MPEDimension", %"struct.juce::MPEInstrument::MPEDimension", %"struct.juce::MPEInstrument::MPEDimension" }
%"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::Array.61" = type { %"class.juce::ArrayAllocationBase.62", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.62" = type <{ %"class.juce::HeapBlock.63", i32, [4 x i8] }>
%"class.juce::HeapBlock.63" = type { ptr }
%"class.juce::MPEZoneLayout" = type { %"class.juce::Array.51", %"class.juce::MidiRPNDetector", %"class.juce::ListenerList" }
%"class.juce::Array.51" = type { %"class.juce::ArrayAllocationBase.52", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.52" = type <{ %"class.juce::HeapBlock.53", i32, [4 x i8] }>
%"class.juce::HeapBlock.53" = type { ptr }
%"class.juce::MidiRPNDetector" = type { [16 x %"struct.juce::MidiRPNDetector::ChannelState"] }
%"struct.juce::MidiRPNDetector::ChannelState" = type { i8, i8, i8, i8, i8 }
%"class.juce::ListenerList" = type { %"class.juce::Array.56" }
%"class.juce::Array.56" = type { %"class.juce::ArrayAllocationBase.57", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.57" = type <{ %"class.juce::HeapBlock.58", i32, [4 x i8] }>
%"class.juce::HeapBlock.58" = type { ptr }
%"class.juce::ListenerList.66" = type { %"class.juce::Array.67" }
%"class.juce::Array.67" = type { %"class.juce::ArrayAllocationBase.68", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.68" = type <{ %"class.juce::HeapBlock.69", i32, [4 x i8] }>
%"class.juce::HeapBlock.69" = type { ptr }
%"struct.juce::MPEInstrument::LegacyMode" = type { i8, %"class.juce::Range.50", i32 }
%"struct.juce::MPEInstrument::MPEDimension" = type { i32, [16 x %"class.juce::MPEValue"], i64 }
%"struct.juce::MPENote" = type <{ i16, i8, i8, %"class.juce::MPEValue", %"class.juce::MPEValue", %"class.juce::MPEValue", %"class.juce::MPEValue", %"class.juce::MPEValue", double, i32, [4 x i8] }>

; 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4juce8MPEValueneERKS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK4juce7MPEZone19getNoteChannelRangeEv(ptr dead_on_unwind noalias writable sret(%"class.juce::Range.50") align 4, ptr noundef nonnull align 4 dereferenceable(16)) #2 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(36) ptr @_ZNK4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EE12getReferenceEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce13MPEInstrument24updateNoteTotalPitchbendERNS_7MPENoteE(ptr noundef nonnull align 8 dereferenceable(528), ptr noundef nonnull align 8 dereferenceable(36)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce13MPEInstrument21updateDimensionMasterERNS_7MPEZoneERNS0_12MPEDimensionENS_8MPEValueE(ptr noundef nonnull align 8 dereferenceable(528) %0, ptr noundef nonnull align 4 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(80) %2, i32 %3) #4 align 2 {
  %5 = alloca %"class.juce::MPEValue", align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.juce::Range.50", align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca { i64, i64 }, align 8
  %14 = getelementptr inbounds %"class.juce::MPEValue", ptr %5, i32 0, i32 0
  store i32 %3, ptr %14, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  %15 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %16 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNK4juce7MPEZone19getNoteChannelRangeEv(ptr dead_on_unwind writable sret(%"class.juce::Range.50") align 4 %9, ptr noundef nonnull align 4 dereferenceable(16) %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %17 = getelementptr inbounds %"class.juce::MPEInstrument", ptr %15, i32 0, i32 2
  %18 = call noundef i32 @_ZNK4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %17) #5
  store i32 %18, ptr %10, align 4, !tbaa !9
  br label %19

19:                                               ; preds = %61, %59, %4
  %20 = load i32, ptr %10, align 4, !tbaa !9
  %21 = add nsw i32 %20, -1
  store i32 %21, ptr %10, align 4, !tbaa !9
  %22 = icmp sge i32 %21, 0
  br i1 %22, label %24, label %23

23:                                               ; preds = %19
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %62

24:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %25 = getelementptr inbounds %"class.juce::MPEInstrument", ptr %15, i32 0, i32 2
  %26 = load i32, ptr %10, align 4, !tbaa !9
  %27 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNK4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EE12getReferenceEi(ptr noundef nonnull align 8 dereferenceable(20) %25, i32 noundef %26) #5
  store ptr %27, ptr %12, align 8, !tbaa !5
  %28 = load ptr, ptr %12, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.juce::MPENote", ptr %28, i32 0, i32 1
  %30 = load i8, ptr %29, align 2, !tbaa !11
  %31 = zext i8 %30 to i32
  %32 = call noundef zeroext i1 @_ZNK4juce5RangeIiE8containsEi(ptr noundef nonnull align 4 dereferenceable(8) %9, i32 noundef %31) #5
  br i1 %32, label %34, label %33

33:                                               ; preds = %24
  store i32 3, ptr %11, align 4
  br label %59, !llvm.loop !17

34:                                               ; preds = %24
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = getelementptr inbounds %"class.juce::MPEInstrument", ptr %15, i32 0, i32 9
  %37 = icmp eq ptr %35, %36
  br i1 %37, label %38, label %46

38:                                               ; preds = %34
  %39 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN4juce13MPEInstrument24updateNoteTotalPitchbendERNS_7MPENoteE(ptr noundef nonnull align 8 dereferenceable(528) %15, ptr noundef nonnull align 8 dereferenceable(36) %39)
  %40 = getelementptr inbounds %"class.juce::MPEInstrument", ptr %15, i32 0, i32 4
  %41 = load ptr, ptr %12, align 8, !tbaa !5
  store { i64, i64 } { i64 33, i64 0 }, ptr %13, align 8, !tbaa !19
  %42 = getelementptr inbounds { i64, i64 }, ptr %13, i32 0, i32 0
  %43 = load i64, ptr %42, align 8
  %44 = getelementptr inbounds { i64, i64 }, ptr %13, i32 0, i32 1
  %45 = load i64, ptr %44, align 8
  call void @_ZN4juce12ListenerListINS_13MPEInstrument8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEE4callINS_7MPENoteEEEvMS2_FvT_ENS_11TypeHelpers13ParameterTypeISA_E4typeE(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 %43, i64 %45, ptr noundef nonnull align 8 dereferenceable(36) %41)
  br label %58

46:                                               ; preds = %34
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = load ptr, ptr %12, align 8, !tbaa !5
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4juce13MPEInstrument12MPEDimension8getValueERNS_7MPENoteE(ptr noundef nonnull align 8 dereferenceable(80) %47, ptr noundef nonnull align 8 dereferenceable(36) %48) #5
  %50 = call noundef zeroext i1 @_ZNK4juce8MPEValueneERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %49, ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  br i1 %50, label %51, label %57

51:                                               ; preds = %46
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = load ptr, ptr %12, align 8, !tbaa !5
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4juce13MPEInstrument12MPEDimension8getValueERNS_7MPENoteE(ptr noundef nonnull align 8 dereferenceable(80) %52, ptr noundef nonnull align 8 dereferenceable(36) %53) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %54, ptr align 4 %5, i64 4, i1 false), !tbaa.struct !20
  %55 = load ptr, ptr %12, align 8, !tbaa !5
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN4juce13MPEInstrument29callListenersDimensionChangedERNS_7MPENoteERNS0_12MPEDimensionE(ptr noundef nonnull align 8 dereferenceable(528) %15, ptr noundef nonnull align 8 dereferenceable(36) %55, ptr noundef nonnull align 8 dereferenceable(80) %56)
  br label %57

57:                                               ; preds = %51, %46
  br label %58

58:                                               ; preds = %57, %38
  store i32 0, ptr %11, align 4
  br label %59

59:                                               ; preds = %58, %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %60 = load i32, ptr %11, align 4
  switch i32 %60, label %63 [
    i32 0, label %61
    i32 3, label %19
  ]

61:                                               ; preds = %59
  br label %19, !llvm.loop !17

62:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  ret void

63:                                               ; preds = %59
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN4juce13MPEInstrument12MPEDimension8getValueERNS_7MPENoteE(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(36)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce13MPEInstrument29callListenersDimensionChangedERNS_7MPENoteERNS0_12MPEDimensionE(ptr noundef nonnull align 8 dereferenceable(528), ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(80)) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 = { 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, !7, i64 2}
!12 = !{!"_ZTSN4juce7MPENoteE", !13, i64 0, !7, i64 2, !7, i64 3, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !15, i64 24, !16, i64 32}
!13 = !{!"short", !7, i64 0}
!14 = !{!"_ZTSN4juce8MPEValueE", !10, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = !{!"_ZTSN4juce7MPENote8KeyStateE", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!7, !7, i64 0}
!20 = !{i64 0, i64 4, !9}


; 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::Range.50" = type { i32, i32 }
%"class.juce::MPEValue" = 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 zeroext i1 @_ZNK4juce8MPEValueneERKS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK4juce7MPEZone19getNoteChannelRangeEv(ptr dead_on_unwind noalias writable sret(%"class.juce::Range.50") align 4, ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(36) ptr @_ZNK4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EE12getReferenceEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce12ListenerListINS_13MPEInstrument8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEE4callINS_7MPENoteEEEvMS2_FvT_ENS_11TypeHelpers13ParameterTypeISA_E4typeE(ptr noundef nonnull align 8 dereferenceable(24), i64, i64, ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce13MPEInstrument24updateNoteTotalPitchbendERNS_7MPENoteE(ptr noundef nonnull align 8 dereferenceable(528), ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce13MPEInstrument21updateDimensionMasterERNS_7MPEZoneERNS0_12MPEDimensionENS_8MPEValueE(ptr noundef nonnull align 8 dereferenceable(528) %0, ptr noundef nonnull align 4 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(80) %2, i32 %3) local_unnamed_addr #3 align 2 {
  %5 = alloca %"class.juce::MPEValue", align 4
  %6 = alloca %"class.juce::Range.50", align 4
  store i32 %3, ptr %5, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  call void @_ZNK4juce7MPEZone19getNoteChannelRangeEv(ptr dead_on_unwind nonnull writable sret(%"class.juce::Range.50") align 4 %6, ptr noundef nonnull align 4 dereferenceable(16) %1) #4
  %7 = getelementptr inbounds i8, ptr %0, i64 48
  %8 = call noundef i32 @_ZNK4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %7) #4
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %4
  %10 = add nsw i32 %8, -1
  %11 = getelementptr inbounds i8, ptr %0, i64 288
  %12 = icmp eq ptr %11, %2
  %13 = getelementptr inbounds i8, ptr %0, i64 200
  br i1 %12, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %21
  %14 = phi i32 [ %22, %21 ], [ %10, %.lr.ph ]
  %15 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNK4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EE12getReferenceEi(ptr noundef nonnull align 8 dereferenceable(20) %7, i32 noundef %14) #4
  %16 = getelementptr inbounds i8, ptr %15, i64 2
  %17 = load i8, ptr %16, align 2, !tbaa !5
  %18 = zext i8 %17 to i32
  %19 = call noundef zeroext i1 @_ZNK4juce5RangeIiE8containsEi(ptr noundef nonnull align 4 dereferenceable(8) %6, i32 noundef %18) #4
  br i1 %19, label %20, label %21, !llvm.loop !14

20:                                               ; preds = %.lr.ph.split.us
  call void @_ZN4juce13MPEInstrument24updateNoteTotalPitchbendERNS_7MPENoteE(ptr noundef nonnull align 8 dereferenceable(528) %0, ptr noundef nonnull align 8 dereferenceable(36) %15)
  call void @_ZN4juce12ListenerListINS_13MPEInstrument8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEE4callINS_7MPENoteEEEvMS2_FvT_ENS_11TypeHelpers13ParameterTypeISA_E4typeE(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 33, i64 0, ptr noundef nonnull align 8 dereferenceable(36) %15)
  br label %21

21:                                               ; preds = %20, %.lr.ph.split.us
  %22 = add nsw i32 %14, -1
  %23 = icmp sgt i32 %14, 0
  br i1 %23, label %.lr.ph.split.us, label %._crit_edge

._crit_edge:                                      ; preds = %36, %21, %4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  ret void

.lr.ph.split:                                     ; preds = %.lr.ph, %36
  %24 = phi i32 [ %37, %36 ], [ %10, %.lr.ph ]
  %25 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNK4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EE12getReferenceEi(ptr noundef nonnull align 8 dereferenceable(20) %7, i32 noundef %24) #4
  %26 = getelementptr inbounds i8, ptr %25, i64 2
  %27 = load i8, ptr %26, align 2, !tbaa !5
  %28 = zext i8 %27 to i32
  %29 = call noundef zeroext i1 @_ZNK4juce5RangeIiE8containsEi(ptr noundef nonnull align 4 dereferenceable(8) %6, i32 noundef %28) #4
  br i1 %29, label %30, label %36, !llvm.loop !14

30:                                               ; preds = %.lr.ph.split
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4juce13MPEInstrument12MPEDimension8getValueERNS_7MPENoteE(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 8 dereferenceable(36) %25) #4
  %32 = call noundef zeroext i1 @_ZNK4juce8MPEValueneERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %31, ptr noundef nonnull align 4 dereferenceable(4) %5) #4
  br i1 %32, label %33, label %36

33:                                               ; preds = %30
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4juce13MPEInstrument12MPEDimension8getValueERNS_7MPENoteE(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 8 dereferenceable(36) %25) #4
  %35 = load i32, ptr %5, align 4, !tbaa !16
  store i32 %35, ptr %34, align 4, !tbaa !16
  call void @_ZN4juce13MPEInstrument29callListenersDimensionChangedERNS_7MPENoteERNS0_12MPEDimensionE(ptr noundef nonnull align 8 dereferenceable(528) %0, ptr noundef nonnull align 8 dereferenceable(36) %25, ptr noundef nonnull align 8 dereferenceable(80) %2)
  br label %36

36:                                               ; preds = %33, %30, %.lr.ph.split
  %37 = add nsw i32 %24, -1
  %38 = icmp sgt i32 %24, 0
  br i1 %38, label %.lr.ph.split, label %._crit_edge
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN4juce13MPEInstrument12MPEDimension8getValueERNS_7MPENoteE(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce13MPEInstrument29callListenersDimensionChangedERNS_7MPENoteERNS0_12MPEDimensionE(ptr noundef nonnull align 8 dereferenceable(528), ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 align 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 = { 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 = { 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 = { 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, !8, i64 2}
!6 = !{!"_ZTSN4juce7MPENoteE", !7, i64 0, !8, i64 2, !8, i64 3, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !12, i64 24, !13, i64 32}
!7 = !{!"short", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN4juce8MPEValueE", !11, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"double", !8, i64 0}
!13 = !{!"_ZTSN4juce7MPENote8KeyStateE", !8, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!11, !11, i64 0}


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