; 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::MemoryBlock" = type { %"class.juce::HeapBlock.29", i64 }
%"class.juce::HeapBlock.29" = type { ptr }
%"class.juce::MidiFile" = type <{ %"class.juce::OwnedArray.30", i16, [6 x i8] }>
%"class.juce::OwnedArray.30" = type { %"class.juce::ArrayAllocationBase.31", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.31" = type <{ %"class.juce::HeapBlock.32", i32, [4 x i8] }>
%"class.juce::HeapBlock.32" = type { ptr }

@.str.81 = external hidden unnamed_addr constant [5 x i8], align 1

; 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: mustprogress uwtable
declare dso_local void @_ZN4juce8MidiFile5clearEv(ptr noundef nonnull align 8 dereferenceable(26)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4juce8MidiFile8readFromERNS_11InputStreamE(ptr noundef nonnull align 8 dereferenceable(26) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.juce::MemoryBlock", align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i16, align 2
  %13 = alloca i16, align 2
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %18 = load ptr, ptr %4, align 8
  call void @_ZN4juce8MidiFile5clearEv(ptr noundef nonnull align 8 dereferenceable(26) %18)
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #5
  call void @_ZN4juce11MemoryBlockC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 209715200, ptr %7, align 4, !tbaa !9
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = getelementptr inbounds ptr, ptr %20, i64 21
  %22 = load ptr, ptr %21, align 8
  %23 = invoke noundef i64 %22(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef 209715200)
          to label %24 unwind label %64

24:                                               ; preds = %2
  %25 = icmp ne i64 %23, 0
  br i1 %25, label %26, label %100

26:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %27 = call noundef i64 @_ZNK4juce11MemoryBlock7getSizeEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  store i64 %27, ptr %10, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %28 = call noundef ptr @_ZNK4juce11MemoryBlock7getDataEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  store ptr %28, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 2, ptr %13) #5
  %29 = load i64, ptr %10, align 8, !tbaa !13
  %30 = icmp ugt i64 %29, 16
  br i1 %30, label %31, label %96

31:                                               ; preds = %26
  %32 = getelementptr inbounds %"class.juce::MidiFile", ptr %18, i32 0, i32 1
  %33 = call noundef zeroext i1 @_ZN4juce15MidiFileHelpersL15parseMidiHeaderERPKhRsS4_S4_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 2 dereferenceable(2) %32, ptr noundef nonnull align 2 dereferenceable(2) %12, ptr noundef nonnull align 2 dereferenceable(2) %13) #5
  br i1 %33, label %34, label %96

34:                                               ; preds = %31
  %35 = load ptr, ptr %11, align 8, !tbaa !5
  %36 = call noundef ptr @_ZNK4juce11MemoryBlock7getDataEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  %37 = ptrtoint ptr %35 to i64
  %38 = ptrtoint ptr %36 to i64
  %39 = sub i64 %37, %38
  %40 = load i64, ptr %10, align 8, !tbaa !13
  %41 = sub i64 %40, %39
  store i64 %41, ptr %10, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %42

42:                                               ; preds = %94, %34
  %43 = load i64, ptr %10, align 8, !tbaa !13
  %44 = icmp ugt i64 %43, 0
  br i1 %44, label %45, label %50

45:                                               ; preds = %42
  %46 = load i32, ptr %14, align 4, !tbaa !9
  %47 = load i16, ptr %13, align 2, !tbaa !15
  %48 = sext i16 %47 to i32
  %49 = icmp slt i32 %46, %48
  br label %50

50:                                               ; preds = %45, %42
  %51 = phi i1 [ false, %42 ], [ %49, %45 ]
  br i1 %51, label %52, label %95

52:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %53 = load ptr, ptr %11, align 8, !tbaa !5
  %54 = call noundef i32 @_ZN4juce9ByteOrder12bigEndianIntEPKv(ptr noundef %53) #5
  store i32 %54, ptr %15, align 4, !tbaa !9
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %55, i64 4
  store ptr %56, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %57 = load ptr, ptr %11, align 8, !tbaa !5
  %58 = call noundef i32 @_ZN4juce9ByteOrder12bigEndianIntEPKv(ptr noundef %57) #5
  store i32 %58, ptr %16, align 4, !tbaa !9
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = getelementptr inbounds i8, ptr %59, i64 4
  store ptr %60, ptr %11, align 8, !tbaa !5
  %61 = load i32, ptr %16, align 4, !tbaa !9
  %62 = icmp sle i32 %61, 0
  br i1 %62, label %63, label %68

63:                                               ; preds = %52
  store i32 3, ptr %17, align 4
  br label %92

64:                                               ; preds = %2
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %8, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %9, align 4
  br label %103

68:                                               ; preds = %52
  %69 = load i32, ptr %15, align 4, !tbaa !9
  %70 = call noundef i32 @_ZN4juce9ByteOrder12bigEndianIntEPKv(ptr noundef @.str.81) #5
  %71 = icmp eq i32 %69, %70
  br i1 %71, label %72, label %80

72:                                               ; preds = %68
  %73 = load ptr, ptr %11, align 8, !tbaa !5
  %74 = load i32, ptr %16, align 4, !tbaa !9
  invoke void @_ZN4juce8MidiFile13readNextTrackEPKhi(ptr noundef nonnull align 8 dereferenceable(26) %18, ptr noundef %73, i32 noundef %74)
          to label %75 unwind label %76

75:                                               ; preds = %72
  br label %80

76:                                               ; preds = %72
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %8, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %103

80:                                               ; preds = %75, %68
  %81 = load i32, ptr %16, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = add i64 %82, 8
  %84 = load i64, ptr %10, align 8, !tbaa !13
  %85 = sub i64 %84, %83
  store i64 %85, ptr %10, align 8, !tbaa !13
  %86 = load i32, ptr %16, align 4, !tbaa !9
  %87 = load ptr, ptr %11, align 8, !tbaa !5
  %88 = sext i32 %86 to i64
  %89 = getelementptr inbounds i8, ptr %87, i64 %88
  store ptr %89, ptr %11, align 8, !tbaa !5
  %90 = load i32, ptr %14, align 4, !tbaa !9
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %14, align 4, !tbaa !9
  store i32 0, ptr %17, align 4
  br label %92

92:                                               ; preds = %80, %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  %93 = load i32, ptr %17, align 4
  switch i32 %93, label %109 [
    i32 0, label %94
    i32 3, label %95
  ]

94:                                               ; preds = %92
  br label %42, !llvm.loop !17

95:                                               ; preds = %92, %50
  store i1 true, ptr %3, align 1
  store i32 1, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %97

96:                                               ; preds = %31, %26
  store i32 0, ptr %17, align 4
  br label %97

97:                                               ; preds = %96, %95
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %98 = load i32, ptr %17, align 4
  switch i32 %98, label %101 [
    i32 0, label %99
  ]

99:                                               ; preds = %97
  br label %100

100:                                              ; preds = %99, %24
  store i1 false, ptr %3, align 1
  store i32 1, ptr %17, align 4
  br label %101

101:                                              ; preds = %100, %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @_ZN4juce11MemoryBlockD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #5
  %102 = load i1, ptr %3, align 1
  ret i1 %102

103:                                              ; preds = %76, %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @_ZN4juce11MemoryBlockD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #5
  br label %104

104:                                              ; preds = %103
  %105 = load ptr, ptr %8, align 8
  %106 = load i32, ptr %9, align 4
  %107 = insertvalue { ptr, i32 } poison, ptr %105, 0
  %108 = insertvalue { ptr, i32 } %107, i32 %106, 1
  resume { ptr, i32 } %108

109:                                              ; preds = %92
  unreachable
}

; Function Attrs: nounwind
declare void @_ZN4juce11MemoryBlockC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN4juce15MidiFileHelpersL15parseMidiHeaderERPKhRsS4_S4_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 2 dereferenceable(2), ptr noundef nonnull align 2 dereferenceable(2), ptr noundef nonnull align 2 dereferenceable(2)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce9ByteOrder12bigEndianIntEPKv(ptr noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce8MidiFile13readNextTrackEPKhi(ptr noundef nonnull align 8 dereferenceable(26), ptr noundef, i32 noundef) #1 align 2

; Function Attrs: nounwind
declare void @_ZN4juce11MemoryBlockD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { 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 = { 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 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"short", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"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"

%"class.juce::MemoryBlock" = type { %"class.juce::HeapBlock.29", i64 }
%"class.juce::HeapBlock.29" = type { ptr }

@.str.81 = external hidden unnamed_addr constant [5 x i8], align 1

; 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: mustprogress uwtable
declare dso_local void @_ZN4juce8MidiFile5clearEv(ptr noundef nonnull align 8 dereferenceable(26)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4juce8MidiFile8readFromERNS_11InputStreamE(ptr noundef nonnull align 8 dereferenceable(26) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.juce::MemoryBlock", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i16, align 2
  %6 = alloca i16, align 2
  tail call void @_ZN4juce8MidiFile5clearEv(ptr noundef nonnull align 8 dereferenceable(26) %0)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #5
  call void @_ZN4juce11MemoryBlockC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  %7 = load ptr, ptr %1, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %7, i64 168
  %9 = load ptr, ptr %8, align 8
  %10 = invoke noundef i64 %9(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef 209715200)
          to label %11 unwind label %37

11:                                               ; preds = %2
  %.not = icmp eq i64 %10, 0
  br i1 %.not, label %58, label %12

12:                                               ; preds = %11
  %13 = call noundef i64 @_ZNK4juce11MemoryBlock7getSizeEv(ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %14 = call noundef ptr @_ZNK4juce11MemoryBlock7getDataEv(ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  store ptr %14, ptr %4, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %6) #5
  %15 = icmp ugt i64 %13, 16
  br i1 %15, label %16, label %57

16:                                               ; preds = %12
  %17 = getelementptr inbounds i8, ptr %0, i64 24
  %18 = call noundef zeroext i1 @_ZN4juce15MidiFileHelpersL15parseMidiHeaderERPKhRsS4_S4_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 2 dereferenceable(2) %17, ptr noundef nonnull align 2 dereferenceable(2) %5, ptr noundef nonnull align 2 dereferenceable(2) %6) #5
  br i1 %18, label %19, label %57

19:                                               ; preds = %16
  %20 = load ptr, ptr %4, align 8, !tbaa !8
  %21 = call noundef ptr @_ZNK4juce11MemoryBlock7getDataEv(ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  %22 = ptrtoint ptr %20 to i64
  %23 = ptrtoint ptr %21 to i64
  %.neg = sub i64 %13, %22
  %24 = add i64 %.neg, %23
  %25 = icmp ne i64 %24, 0
  %26 = load i16, ptr %6, align 2
  %27 = icmp sgt i16 %26, 0
  %28 = select i1 %25, i1 %27, i1 false
  br i1 %28, label %.lr.ph.preheader, label %.critedge

.lr.ph.preheader:                                 ; preds = %19
  %.pre = load ptr, ptr %4, align 8, !tbaa !8
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %46
  %29 = phi ptr [ %50, %46 ], [ %.pre, %.lr.ph.preheader ]
  %.02036 = phi i32 [ %51, %46 ], [ 0, %.lr.ph.preheader ]
  %.02235 = phi i64 [ %48, %46 ], [ %24, %.lr.ph.preheader ]
  %30 = call noundef i32 @_ZN4juce9ByteOrder12bigEndianIntEPKv(ptr noundef %29) #5
  %31 = load ptr, ptr %4, align 8, !tbaa !8
  %32 = getelementptr inbounds i8, ptr %31, i64 4
  store ptr %32, ptr %4, align 8, !tbaa !8
  %33 = call noundef i32 @_ZN4juce9ByteOrder12bigEndianIntEPKv(ptr noundef nonnull %32) #5
  %34 = load ptr, ptr %4, align 8, !tbaa !8
  %35 = getelementptr inbounds i8, ptr %34, i64 4
  store ptr %35, ptr %4, align 8, !tbaa !8
  %36 = icmp slt i32 %33, 1
  br i1 %36, label %.critedge, label %39

37:                                               ; preds = %2
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %59

39:                                               ; preds = %.lr.ph
  %40 = call noundef i32 @_ZN4juce9ByteOrder12bigEndianIntEPKv(ptr noundef nonnull @.str.81) #5
  %41 = icmp eq i32 %30, %40
  br i1 %41, label %42, label %46

42:                                               ; preds = %39
  %43 = load ptr, ptr %4, align 8, !tbaa !8
  invoke void @_ZN4juce8MidiFile13readNextTrackEPKhi(ptr noundef nonnull align 8 dereferenceable(26) %0, ptr noundef %43, i32 noundef %33)
          to label %46 unwind label %44

44:                                               ; preds = %42
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %59

46:                                               ; preds = %39, %42
  %47 = zext nneg i32 %33 to i64
  %.neg34 = add i64 %.02235, -8
  %48 = sub i64 %.neg34, %47
  %49 = load ptr, ptr %4, align 8, !tbaa !8
  %50 = getelementptr inbounds i8, ptr %49, i64 %47
  store ptr %50, ptr %4, align 8, !tbaa !8
  %51 = add nuw nsw i32 %.02036, 1
  %52 = icmp ne i64 %48, 0
  %53 = load i16, ptr %6, align 2
  %54 = sext i16 %53 to i32
  %55 = icmp slt i32 %51, %54
  %56 = select i1 %52, i1 %55, i1 false
  br i1 %56, label %.lr.ph, label %.critedge

57:                                               ; preds = %12, %16
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %58

.critedge:                                        ; preds = %46, %.lr.ph, %19
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %58

58:                                               ; preds = %11, %57, %.critedge
  %.118 = phi i1 [ true, %.critedge ], [ false, %57 ], [ false, %11 ]
  call void @_ZN4juce11MemoryBlockD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  ret i1 %.118

59:                                               ; preds = %44, %37
  %.pn = phi { ptr, i32 } [ %45, %44 ], [ %38, %37 ]
  call void @_ZN4juce11MemoryBlockD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn
}

; Function Attrs: nounwind
declare void @_ZN4juce11MemoryBlockC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK4juce11MemoryBlock7getSizeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN4juce15MidiFileHelpersL15parseMidiHeaderERPKhRsS4_S4_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 2 dereferenceable(2), ptr noundef nonnull align 2 dereferenceable(2), ptr noundef nonnull align 2 dereferenceable(2)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce9ByteOrder12bigEndianIntEPKv(ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce8MidiFile13readNextTrackEPKhi(ptr noundef nonnull align 8 dereferenceable(26), ptr noundef, i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: nounwind
declare void @_ZN4juce11MemoryBlockD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { 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 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}


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