; 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::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 }
%"class.juce::Range.50" = type { i32, 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 i32 @_ZNK4juce11MidiMessage10getChannelEv(ptr noundef nonnull align 8 dereferenceable(20)) #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4juce13MPEZoneLayout22getZoneByMasterChannelEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce13MPEInstrument29processMidiAllNotesOffMessageERKNS_11MidiMessageE(ptr noundef nonnull align 8 dereferenceable(528) %0, ptr noundef nonnull align 8 dereferenceable(20) %1) #3 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca %"class.juce::MPEValue", align 4
  %8 = alloca { i64, i64 }, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %"class.juce::MPEValue", align 4
  %13 = alloca { i64, i64 }, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %14 = load ptr, ptr %3, align 8
  %15 = getelementptr inbounds %"class.juce::MPEInstrument", ptr %14, i32 0, i32 8
  %16 = getelementptr inbounds %"struct.juce::MPEInstrument::LegacyMode", ptr %15, i32 0, i32 0
  %17 = load i8, ptr %16, align 8, !tbaa !9, !range !34, !noundef !35
  %18 = trunc i8 %17 to i1
  br i1 %18, label %19, label %61

19:                                               ; preds = %2
  %20 = getelementptr inbounds %"class.juce::MPEInstrument", ptr %14, i32 0, i32 8
  %21 = getelementptr inbounds %"struct.juce::MPEInstrument::LegacyMode", ptr %20, i32 0, i32 1
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = call noundef i32 @_ZNK4juce11MidiMessage10getChannelEv(ptr noundef nonnull align 8 dereferenceable(20) %22) #5
  %24 = call noundef zeroext i1 @_ZNK4juce5RangeIiE8containsEi(ptr noundef nonnull align 4 dereferenceable(8) %21, i32 noundef %23) #5
  br i1 %24, label %25, label %61

25:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %26 = getelementptr inbounds %"class.juce::MPEInstrument", ptr %14, i32 0, i32 2
  %27 = call noundef i32 @_ZNK4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %26) #5
  store i32 %27, ptr %5, align 4, !tbaa !36
  br label %28

28:                                               ; preds = %59, %25
  %29 = load i32, ptr %5, align 4, !tbaa !36
  %30 = add nsw i32 %29, -1
  store i32 %30, ptr %5, align 4, !tbaa !36
  %31 = icmp sge i32 %30, 0
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %60

33:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %34 = getelementptr inbounds %"class.juce::MPEInstrument", ptr %14, i32 0, i32 2
  %35 = load i32, ptr %5, align 4, !tbaa !36
  %36 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNK4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EE12getReferenceEi(ptr noundef nonnull align 8 dereferenceable(20) %34, i32 noundef %35) #5
  store ptr %36, ptr %6, align 8, !tbaa !5
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.juce::MPENote", ptr %37, i32 0, i32 1
  %39 = load i8, ptr %38, align 2, !tbaa !37
  %40 = zext i8 %39 to i32
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = call noundef i32 @_ZNK4juce11MidiMessage10getChannelEv(ptr noundef nonnull align 8 dereferenceable(20) %41) #5
  %43 = icmp eq i32 %40, %42
  br i1 %43, label %44, label %59

44:                                               ; preds = %33
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.juce::MPENote", ptr %45, i32 0, i32 9
  store i32 0, ptr %46, align 8, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %47 = call i32 @_ZN4juce8MPEValue11from7BitIntEi(i32 noundef 64) #5
  %48 = getelementptr inbounds %"class.juce::MPEValue", ptr %7, i32 0, i32 0
  store i32 %47, ptr %48, align 4
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.juce::MPENote", ptr %49, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %50, ptr align 4 %7, i64 4, i1 false), !tbaa.struct !44
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  %51 = getelementptr inbounds %"class.juce::MPEInstrument", ptr %14, i32 0, i32 4
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  store { i64, i64 } { i64 57, i64 0 }, ptr %8, align 8, !tbaa !45
  %53 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 0
  %54 = load i64, ptr %53, align 8
  %55 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 1
  %56 = load i64, ptr %55, align 8
  call void @_ZN4juce12ListenerListINS_13MPEInstrument8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEE4callINS_7MPENoteEEEvMS2_FvT_ENS_11TypeHelpers13ParameterTypeISA_E4typeE(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 %54, i64 %56, ptr noundef nonnull align 8 dereferenceable(36) %52)
  %57 = getelementptr inbounds %"class.juce::MPEInstrument", ptr %14, i32 0, i32 2
  %58 = load i32, ptr %5, align 4, !tbaa !36
  call void @_ZN4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EE6removeEi(ptr noundef nonnull align 8 dereferenceable(20) %57, i32 noundef %58)
  br label %59

59:                                               ; preds = %44, %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %28, !llvm.loop !46

60:                                               ; preds = %32
  br label %104

61:                                               ; preds = %19, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %62 = getelementptr inbounds %"class.juce::MPEInstrument", ptr %14, i32 0, i32 3
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = call noundef i32 @_ZNK4juce11MidiMessage10getChannelEv(ptr noundef nonnull align 8 dereferenceable(20) %63) #5
  %65 = call noundef ptr @_ZNK4juce13MPEZoneLayout22getZoneByMasterChannelEi(ptr noundef nonnull align 8 dereferenceable(128) %62, i32 noundef %64) #5
  store ptr %65, ptr %9, align 8, !tbaa !5
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = icmp ne ptr %66, null
  br i1 %67, label %68, label %103

68:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %69 = getelementptr inbounds %"class.juce::MPEInstrument", ptr %14, i32 0, i32 2
  %70 = call noundef i32 @_ZNK4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %69) #5
  store i32 %70, ptr %10, align 4, !tbaa !36
  br label %71

71:                                               ; preds = %101, %68
  %72 = load i32, ptr %10, align 4, !tbaa !36
  %73 = add nsw i32 %72, -1
  store i32 %73, ptr %10, align 4, !tbaa !36
  %74 = icmp sge i32 %73, 0
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %102

76:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %77 = getelementptr inbounds %"class.juce::MPEInstrument", ptr %14, i32 0, i32 2
  %78 = load i32, ptr %10, align 4, !tbaa !36
  %79 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNK4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EE12getReferenceEi(ptr noundef nonnull align 8 dereferenceable(20) %77, i32 noundef %78) #5
  store ptr %79, ptr %11, align 8, !tbaa !5
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = load ptr, ptr %11, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.juce::MPENote", ptr %81, i32 0, i32 1
  %83 = load i8, ptr %82, align 2, !tbaa !37
  %84 = zext i8 %83 to i32
  %85 = call noundef zeroext i1 @_ZNK4juce7MPEZone27isUsingChannelAsNoteChannelEi(ptr noundef nonnull align 4 dereferenceable(16) %80, i32 noundef %84) #5
  br i1 %85, label %86, label %101

86:                                               ; preds = %76
  %87 = load ptr, ptr %11, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.juce::MPENote", ptr %87, i32 0, i32 9
  store i32 0, ptr %88, align 8, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %89 = call i32 @_ZN4juce8MPEValue11from7BitIntEi(i32 noundef 64) #5
  %90 = getelementptr inbounds %"class.juce::MPEValue", ptr %12, i32 0, i32 0
  store i32 %89, ptr %90, align 4
  %91 = load ptr, ptr %11, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.juce::MPENote", ptr %91, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %92, ptr align 4 %12, i64 4, i1 false), !tbaa.struct !44
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  %93 = getelementptr inbounds %"class.juce::MPEInstrument", ptr %14, i32 0, i32 4
  %94 = load ptr, ptr %11, align 8, !tbaa !5
  store { i64, i64 } { i64 57, i64 0 }, ptr %13, align 8, !tbaa !45
  %95 = getelementptr inbounds { i64, i64 }, ptr %13, i32 0, i32 0
  %96 = load i64, ptr %95, align 8
  %97 = getelementptr inbounds { i64, i64 }, ptr %13, i32 0, i32 1
  %98 = load i64, ptr %97, align 8
  call void @_ZN4juce12ListenerListINS_13MPEInstrument8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEE4callINS_7MPENoteEEEvMS2_FvT_ENS_11TypeHelpers13ParameterTypeISA_E4typeE(ptr noundef nonnull align 8 dereferenceable(24) %93, i64 %96, i64 %98, ptr noundef nonnull align 8 dereferenceable(36) %94)
  %99 = getelementptr inbounds %"class.juce::MPEInstrument", ptr %14, i32 0, i32 2
  %100 = load i32, ptr %10, align 4, !tbaa !36
  call void @_ZN4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EE6removeEi(ptr noundef nonnull align 8 dereferenceable(20) %99, i32 noundef %100)
  br label %101

101:                                              ; preds = %86, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %71, !llvm.loop !48

102:                                              ; preds = %75
  br label %103

103:                                              ; preds = %102, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %104

104:                                              ; preds = %103, %60
  ret void
}

; 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)) #4 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) #4 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)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EE6removeEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) #3 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 = { 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, !30, i64 272}
!10 = !{!"_ZTSN4juce13MPEInstrumentE", !11, i64 8, !12, i64 48, !16, i64 72, !25, i64 200, !7, i64 224, !7, i64 240, !7, i64 256, !29, i64 272, !32, i64 288, !32, i64 368, !32, i64 448}
!11 = !{!"_ZTSN4juce15CriticalSectionE", !7, i64 0}
!12 = !{!"_ZTSN4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EEE", !13, i64 0, !15, i64 16}
!13 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_7MPENoteENS_20DummyCriticalSectionEEE", !14, i64 0, !15, i64 8}
!14 = !{!"_ZTSN4juce9HeapBlockINS_7MPENoteELb0EEE", !6, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSN4juce13MPEZoneLayoutE", !17, i64 0, !20, i64 24, !21, i64 104}
!17 = !{!"_ZTSN4juce5ArrayINS_7MPEZoneENS_20DummyCriticalSectionELi0EEE", !18, i64 0, !15, i64 16}
!18 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_7MPEZoneENS_20DummyCriticalSectionEEE", !19, i64 0, !15, i64 8}
!19 = !{!"_ZTSN4juce9HeapBlockINS_7MPEZoneELb0EEE", !6, i64 0}
!20 = !{!"_ZTSN4juce15MidiRPNDetectorE", !7, i64 0}
!21 = !{!"_ZTSN4juce12ListenerListINS_13MPEZoneLayout8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEEE", !22, i64 0}
!22 = !{!"_ZTSN4juce5ArrayIPNS_13MPEZoneLayout8ListenerENS_20DummyCriticalSectionELi0EEE", !23, i64 0, !15, i64 16}
!23 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_13MPEZoneLayout8ListenerENS_20DummyCriticalSectionEEE", !24, i64 0, !15, i64 8}
!24 = !{!"_ZTSN4juce9HeapBlockIPNS_13MPEZoneLayout8ListenerELb0EEE", !6, i64 0}
!25 = !{!"_ZTSN4juce12ListenerListINS_13MPEInstrument8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEEE", !26, i64 0}
!26 = !{!"_ZTSN4juce5ArrayIPNS_13MPEInstrument8ListenerENS_20DummyCriticalSectionELi0EEE", !27, i64 0, !15, i64 16}
!27 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_13MPEInstrument8ListenerENS_20DummyCriticalSectionEEE", !28, i64 0, !15, i64 8}
!28 = !{!"_ZTSN4juce9HeapBlockIPNS_13MPEInstrument8ListenerELb0EEE", !6, i64 0}
!29 = !{!"_ZTSN4juce13MPEInstrument10LegacyModeE", !30, i64 0, !31, i64 4, !15, i64 12}
!30 = !{!"bool", !7, i64 0}
!31 = !{!"_ZTSN4juce5RangeIiEE", !15, i64 0, !15, i64 4}
!32 = !{!"_ZTSN4juce13MPEInstrument12MPEDimensionE", !33, i64 0, !7, i64 4, !7, i64 72}
!33 = !{!"_ZTSN4juce13MPEInstrument12TrackingModeE", !7, i64 0}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = !{!15, !15, i64 0}
!37 = !{!38, !7, i64 2}
!38 = !{!"_ZTSN4juce7MPENoteE", !39, i64 0, !7, i64 2, !7, i64 3, !40, i64 4, !40, i64 8, !40, i64 12, !40, i64 16, !40, i64 20, !41, i64 24, !42, i64 32}
!39 = !{!"short", !7, i64 0}
!40 = !{!"_ZTSN4juce8MPEValueE", !15, i64 0}
!41 = !{!"double", !7, i64 0}
!42 = !{!"_ZTSN4juce7MPENote8KeyStateE", !7, i64 0}
!43 = !{!38, !42, i64 32}
!44 = !{i64 0, i64 4, !36}
!45 = !{!7, !7, i64 0}
!46 = distinct !{!46, !47}
!47 = !{!"llvm.loop.mustprogress"}
!48 = distinct !{!48, !47}


; 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 @_ZNK4juce11MidiMessage10getChannelEv(ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i32 @_ZN4juce8MPEValue11from7BitIntEi(i32 noundef) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce13MPEInstrument29processMidiAllNotesOffMessageERKNS_11MidiMessageE(ptr noundef nonnull align 8 dereferenceable(528) %0, ptr noundef nonnull align 8 dereferenceable(20) %1) local_unnamed_addr #1 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 272
  %4 = load i8, ptr %3, align 8, !tbaa !5, !range !33, !noundef !34
  %5 = trunc nuw i8 %4 to i1
  br i1 %5, label %6, label %29

6:                                                ; preds = %2
  %7 = getelementptr inbounds i8, ptr %0, i64 276
  %8 = tail call noundef i32 @_ZNK4juce11MidiMessage10getChannelEv(ptr noundef nonnull align 8 dereferenceable(20) %1) #3
  %9 = tail call noundef zeroext i1 @_ZNK4juce5RangeIiE8containsEi(ptr noundef nonnull align 4 dereferenceable(8) %7, i32 noundef %8) #3
  br i1 %9, label %10, label %29

10:                                               ; preds = %6
  %11 = getelementptr inbounds i8, ptr %0, i64 48
  %12 = tail call noundef i32 @_ZNK4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %11) #3
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.lr.ph28, label %.loopexit

.lr.ph28:                                         ; preds = %10
  %14 = getelementptr inbounds i8, ptr %0, i64 200
  br label %15

15:                                               ; preds = %.lr.ph28, %27
  %.in29 = phi i32 [ %12, %.lr.ph28 ], [ %16, %27 ]
  %16 = add nsw i32 %.in29, -1
  %17 = tail call noundef nonnull align 8 dereferenceable(36) ptr @_ZNK4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EE12getReferenceEi(ptr noundef nonnull align 8 dereferenceable(20) %11, i32 noundef %16) #3
  %18 = getelementptr inbounds i8, ptr %17, i64 2
  %19 = load i8, ptr %18, align 2, !tbaa !35
  %20 = zext i8 %19 to i32
  %21 = tail call noundef i32 @_ZNK4juce11MidiMessage10getChannelEv(ptr noundef nonnull align 8 dereferenceable(20) %1) #3
  %22 = icmp eq i32 %21, %20
  br i1 %22, label %23, label %27

23:                                               ; preds = %15
  %24 = getelementptr inbounds i8, ptr %17, i64 32
  store i32 0, ptr %24, align 8, !tbaa !41
  %25 = tail call i32 @_ZN4juce8MPEValue11from7BitIntEi(i32 noundef 64) #3
  %26 = getelementptr inbounds i8, ptr %17, i64 20
  store i32 %25, ptr %26, align 4, !tbaa !42
  tail call void @_ZN4juce12ListenerListINS_13MPEInstrument8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEE4callINS_7MPENoteEEEvMS2_FvT_ENS_11TypeHelpers13ParameterTypeISA_E4typeE(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 57, i64 0, ptr noundef nonnull align 8 dereferenceable(36) %17)
  tail call void @_ZN4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EE6removeEi(ptr noundef nonnull align 8 dereferenceable(20) %11, i32 noundef %16)
  br label %27

27:                                               ; preds = %23, %15
  %28 = icmp ugt i32 %.in29, 1
  br i1 %28, label %15, label %.loopexit, !llvm.loop !43

29:                                               ; preds = %6, %2
  %30 = getelementptr inbounds i8, ptr %0, i64 72
  %31 = tail call noundef i32 @_ZNK4juce11MidiMessage10getChannelEv(ptr noundef nonnull align 8 dereferenceable(20) %1) #3
  %32 = tail call noundef ptr @_ZNK4juce13MPEZoneLayout22getZoneByMasterChannelEi(ptr noundef nonnull align 8 dereferenceable(128) %30, i32 noundef %31) #3
  %.not = icmp eq ptr %32, null
  br i1 %.not, label %.loopexit, label %33

33:                                               ; preds = %29
  %34 = getelementptr inbounds i8, ptr %0, i64 48
  %35 = tail call noundef i32 @_ZNK4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %34) #3
  %36 = icmp sgt i32 %35, 0
  br i1 %36, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %33
  %37 = getelementptr inbounds i8, ptr %0, i64 200
  br label %38

38:                                               ; preds = %.lr.ph, %49
  %.in = phi i32 [ %35, %.lr.ph ], [ %39, %49 ]
  %39 = add nsw i32 %.in, -1
  %40 = tail call noundef nonnull align 8 dereferenceable(36) ptr @_ZNK4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EE12getReferenceEi(ptr noundef nonnull align 8 dereferenceable(20) %34, i32 noundef %39) #3
  %41 = getelementptr inbounds i8, ptr %40, i64 2
  %42 = load i8, ptr %41, align 2, !tbaa !35
  %43 = zext i8 %42 to i32
  %44 = tail call noundef zeroext i1 @_ZNK4juce7MPEZone27isUsingChannelAsNoteChannelEi(ptr noundef nonnull align 4 dereferenceable(16) %32, i32 noundef %43) #3
  br i1 %44, label %45, label %49

45:                                               ; preds = %38
  %46 = getelementptr inbounds i8, ptr %40, i64 32
  store i32 0, ptr %46, align 8, !tbaa !41
  %47 = tail call i32 @_ZN4juce8MPEValue11from7BitIntEi(i32 noundef 64) #3
  %48 = getelementptr inbounds i8, ptr %40, i64 20
  store i32 %47, ptr %48, align 4, !tbaa !42
  tail call void @_ZN4juce12ListenerListINS_13MPEInstrument8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEE4callINS_7MPENoteEEEvMS2_FvT_ENS_11TypeHelpers13ParameterTypeISA_E4typeE(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 57, i64 0, ptr noundef nonnull align 8 dereferenceable(36) %40)
  tail call void @_ZN4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EE6removeEi(ptr noundef nonnull align 8 dereferenceable(20) %34, i32 noundef %39)
  br label %49

49:                                               ; preds = %45, %38
  %50 = icmp ugt i32 %.in, 1
  br i1 %50, label %38, label %.loopexit, !llvm.loop !45

.loopexit:                                        ; preds = %49, %27, %33, %10, %29
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4juce5RangeIiE8containsEi(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef) local_unnamed_addr #0 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 #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EE6removeEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) local_unnamed_addr #1 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, !29, i64 272}
!6 = !{!"_ZTSN4juce13MPEInstrumentE", !7, i64 8, !10, i64 48, !15, i64 72, !24, i64 200, !8, i64 224, !8, i64 240, !8, i64 256, !28, i64 272, !31, i64 288, !31, i64 368, !31, i64 448}
!7 = !{!"_ZTSN4juce15CriticalSectionE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN4juce5ArrayINS_7MPENoteENS_20DummyCriticalSectionELi0EEE", !11, i64 0, !14, i64 16}
!11 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_7MPENoteENS_20DummyCriticalSectionEEE", !12, i64 0, !14, i64 8}
!12 = !{!"_ZTSN4juce9HeapBlockINS_7MPENoteELb0EEE", !13, i64 0}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"int", !8, i64 0}
!15 = !{!"_ZTSN4juce13MPEZoneLayoutE", !16, i64 0, !19, i64 24, !20, i64 104}
!16 = !{!"_ZTSN4juce5ArrayINS_7MPEZoneENS_20DummyCriticalSectionELi0EEE", !17, i64 0, !14, i64 16}
!17 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_7MPEZoneENS_20DummyCriticalSectionEEE", !18, i64 0, !14, i64 8}
!18 = !{!"_ZTSN4juce9HeapBlockINS_7MPEZoneELb0EEE", !13, i64 0}
!19 = !{!"_ZTSN4juce15MidiRPNDetectorE", !8, i64 0}
!20 = !{!"_ZTSN4juce12ListenerListINS_13MPEZoneLayout8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEEE", !21, i64 0}
!21 = !{!"_ZTSN4juce5ArrayIPNS_13MPEZoneLayout8ListenerENS_20DummyCriticalSectionELi0EEE", !22, i64 0, !14, i64 16}
!22 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_13MPEZoneLayout8ListenerENS_20DummyCriticalSectionEEE", !23, i64 0, !14, i64 8}
!23 = !{!"_ZTSN4juce9HeapBlockIPNS_13MPEZoneLayout8ListenerELb0EEE", !13, i64 0}
!24 = !{!"_ZTSN4juce12ListenerListINS_13MPEInstrument8ListenerENS_5ArrayIPS2_NS_20DummyCriticalSectionELi0EEEEE", !25, i64 0}
!25 = !{!"_ZTSN4juce5ArrayIPNS_13MPEInstrument8ListenerENS_20DummyCriticalSectionELi0EEE", !26, i64 0, !14, i64 16}
!26 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_13MPEInstrument8ListenerENS_20DummyCriticalSectionEEE", !27, i64 0, !14, i64 8}
!27 = !{!"_ZTSN4juce9HeapBlockIPNS_13MPEInstrument8ListenerELb0EEE", !13, i64 0}
!28 = !{!"_ZTSN4juce13MPEInstrument10LegacyModeE", !29, i64 0, !30, i64 4, !14, i64 12}
!29 = !{!"bool", !8, i64 0}
!30 = !{!"_ZTSN4juce5RangeIiEE", !14, i64 0, !14, i64 4}
!31 = !{!"_ZTSN4juce13MPEInstrument12MPEDimensionE", !32, i64 0, !8, i64 4, !8, i64 72}
!32 = !{!"_ZTSN4juce13MPEInstrument12TrackingModeE", !8, i64 0}
!33 = !{i8 0, i8 2}
!34 = !{}
!35 = !{!36, !8, i64 2}
!36 = !{!"_ZTSN4juce7MPENoteE", !37, i64 0, !8, i64 2, !8, i64 3, !38, i64 4, !38, i64 8, !38, i64 12, !38, i64 16, !38, i64 20, !39, i64 24, !40, i64 32}
!37 = !{!"short", !8, i64 0}
!38 = !{!"_ZTSN4juce8MPEValueE", !14, i64 0}
!39 = !{!"double", !8, i64 0}
!40 = !{!"_ZTSN4juce7MPENote8KeyStateE", !8, i64 0}
!41 = !{!36, !40, i64 32}
!42 = !{!14, !14, i64 0}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.mustprogress"}
!45 = distinct !{!45, !44}


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