; 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::BufferedInputStream" = type { %"class.juce::InputStream", %"class.juce::OptionalScopedPointer", i32, i64, i64, i64, i64, %"class.juce::HeapBlock.143" }
%"class.juce::InputStream" = type { ptr }
%"class.juce::OptionalScopedPointer" = type <{ %"class.juce::ScopedPointer.142", i8, [7 x i8] }>
%"class.juce::ScopedPointer.142" = type { ptr }
%"class.juce::HeapBlock.143" = type { ptr }
%"class.juce::GenericScopedLock" = type { ptr }
%"class.juce::AudioThumbnail" = type { %"class.juce::AudioThumbnailBase", ptr, ptr, %"class.juce::ScopedPointer.115", %"class.juce::ScopedPointer.116", %"class.juce::OwnedArray.117", i32, i64, i64, i32, double, %"class.juce::CriticalSection" }
%"class.juce::AudioThumbnailBase" = type { %"class.juce::ChangeBroadcaster", %"class.juce::AudioFormatWriter::ThreadedWriter::IncomingDataReceiver" }
%"class.juce::ChangeBroadcaster" = type { ptr, %"class.juce::ChangeBroadcaster::ChangeBroadcasterCallback", %"class.juce::ListenerList.20" }
%"class.juce::ChangeBroadcaster::ChangeBroadcasterCallback" = type { %"class.juce::AsyncUpdater", ptr }
%"class.juce::AsyncUpdater" = type { ptr, %"class.juce::ReferenceCountedObjectPtr.19" }
%"class.juce::ReferenceCountedObjectPtr.19" = type { ptr }
%"class.juce::ListenerList.20" = type { %"class.juce::Array.21" }
%"class.juce::Array.21" = type { %"class.juce::ArrayAllocationBase.22", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.22" = type <{ %"class.juce::HeapBlock.23", i32, [4 x i8] }>
%"class.juce::HeapBlock.23" = type { ptr }
%"class.juce::AudioFormatWriter::ThreadedWriter::IncomingDataReceiver" = type { ptr }
%"class.juce::ScopedPointer.115" = type { ptr }
%"class.juce::ScopedPointer.116" = type { ptr }
%"class.juce::OwnedArray.117" = type { %"class.juce::ArrayAllocationBase.118", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.118" = type <{ %"class.juce::HeapBlock.119", i32, [4 x i8] }>
%"class.juce::HeapBlock.119" = 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 }

; 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: mustprogress uwtable
declare dso_local void @_ZN4juce14AudioThumbnail16clearChannelDataEv(ptr noundef nonnull align 8 dereferenceable(200)) #2 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 uwtable
declare dso_local void @_ZN4juce14AudioThumbnail14createChannelsEi(ptr noundef nonnull align 8 dereferenceable(200), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4juce14AudioThumbnail8loadFromERNS_11InputStreamE(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) unnamed_addr #2 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::BufferedInputStream", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.juce::GenericScopedLock", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %14 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 72, ptr %6) #6
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN4juce19BufferedInputStreamC1ERNS_11InputStreamEi(ptr noundef nonnull align 8 dereferenceable(72) %6, ptr noundef nonnull align 8 dereferenceable(8) %15, i32 noundef 4096)
  %16 = invoke noundef signext i8 @_ZN4juce11InputStream8readByteEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %17 unwind label %36

17:                                               ; preds = %2
  %18 = sext i8 %16 to i32
  %19 = icmp ne i32 %18, 106
  br i1 %19, label %35, label %20

20:                                               ; preds = %17
  %21 = invoke noundef signext i8 @_ZN4juce11InputStream8readByteEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %22 unwind label %36

22:                                               ; preds = %20
  %23 = sext i8 %21 to i32
  %24 = icmp ne i32 %23, 97
  br i1 %24, label %35, label %25

25:                                               ; preds = %22
  %26 = invoke noundef signext i8 @_ZN4juce11InputStream8readByteEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %27 unwind label %36

27:                                               ; preds = %25
  %28 = sext i8 %26 to i32
  %29 = icmp ne i32 %28, 116
  br i1 %29, label %35, label %30

30:                                               ; preds = %27
  %31 = invoke noundef signext i8 @_ZN4juce11InputStream8readByteEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %32 unwind label %36

32:                                               ; preds = %30
  %33 = sext i8 %31 to i32
  %34 = icmp ne i32 %33, 109
  br i1 %34, label %35, label %40

35:                                               ; preds = %32, %27, %22, %17
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %105

36:                                               ; preds = %30, %25, %20, %2
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %7, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %8, align 4
  br label %107

40:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %41 = getelementptr inbounds %"class.juce::AudioThumbnail", ptr %14, i32 0, i32 11
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(40) %41) #6
  invoke void @_ZN4juce14AudioThumbnail16clearChannelDataEv(ptr noundef nonnull align 8 dereferenceable(200) %14)
          to label %42 unwind label %69

42:                                               ; preds = %40
  %43 = invoke noundef i32 @_ZN4juce11InputStream7readIntEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %44 unwind label %69

44:                                               ; preds = %42
  %45 = getelementptr inbounds %"class.juce::AudioThumbnail", ptr %14, i32 0, i32 6
  store i32 %43, ptr %45, align 8, !tbaa !9
  %46 = invoke noundef i64 @_ZN4juce11InputStream9readInt64Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %47 unwind label %69

47:                                               ; preds = %44
  %48 = getelementptr inbounds %"class.juce::AudioThumbnail", ptr %14, i32 0, i32 7
  store i64 %46, ptr %48, align 8, !tbaa !30
  %49 = invoke noundef i64 @_ZN4juce11InputStream9readInt64Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %50 unwind label %69

50:                                               ; preds = %47
  %51 = getelementptr inbounds %"class.juce::AudioThumbnail", ptr %14, i32 0, i32 8
  store i64 %49, ptr %51, align 8, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %52 = invoke noundef i32 @_ZN4juce11InputStream7readIntEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %53 unwind label %73

53:                                               ; preds = %50
  store i32 %52, ptr %11, align 4, !tbaa !32
  %54 = invoke noundef i32 @_ZN4juce11InputStream7readIntEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %55 unwind label %73

55:                                               ; preds = %53
  %56 = getelementptr inbounds %"class.juce::AudioThumbnail", ptr %14, i32 0, i32 9
  store i32 %54, ptr %56, align 8, !tbaa !33
  %57 = invoke noundef i32 @_ZN4juce11InputStream7readIntEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %58 unwind label %73

58:                                               ; preds = %55
  %59 = sitofp i32 %57 to double
  %60 = getelementptr inbounds %"class.juce::AudioThumbnail", ptr %14, i32 0, i32 10
  store double %59, ptr %60, align 8, !tbaa !34
  invoke void @_ZN4juce11InputStream13skipNextBytesEx(ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef 16)
          to label %61 unwind label %73

61:                                               ; preds = %58
  %62 = load i32, ptr %11, align 4, !tbaa !32
  invoke void @_ZN4juce14AudioThumbnail14createChannelsEi(ptr noundef nonnull align 8 dereferenceable(200) %14, i32 noundef %62)
          to label %63 unwind label %73

63:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !32
  br label %64

64:                                               ; preds = %99, %63
  %65 = load i32, ptr %12, align 4, !tbaa !32
  %66 = load i32, ptr %11, align 4, !tbaa !32
  %67 = icmp slt i32 %65, %66
  br i1 %67, label %77, label %68

68:                                               ; preds = %64
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %102

69:                                               ; preds = %47, %44, %42, %40
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %7, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %8, align 4
  br label %104

73:                                               ; preds = %61, %58, %55, %53, %50
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %7, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %8, align 4
  br label %103

77:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !32
  br label %78

78:                                               ; preds = %91, %77
  %79 = load i32, ptr %13, align 4, !tbaa !32
  %80 = getelementptr inbounds %"class.juce::AudioThumbnail", ptr %14, i32 0, i32 9
  %81 = load i32, ptr %80, align 8, !tbaa !33
  %82 = icmp slt i32 %79, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %78
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %98

84:                                               ; preds = %78
  %85 = getelementptr inbounds %"class.juce::AudioThumbnail", ptr %14, i32 0, i32 5
  %86 = load i32, ptr %13, align 4, !tbaa !32
  %87 = call noundef ptr @_ZNK4juce10OwnedArrayINS_14AudioThumbnail9ThumbDataENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %85, i32 noundef %86) #6
  %88 = load i32, ptr %12, align 4, !tbaa !32
  %89 = call noundef ptr @_ZN4juce14AudioThumbnail9ThumbData7getDataEi(ptr noundef nonnull align 8 dereferenceable(28) %87, i32 noundef %88) #6
  invoke void @_ZN4juce14AudioThumbnail11MinMaxValue4readERNS_11InputStreamE(ptr noundef nonnull align 1 dereferenceable(2) %89, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %90 unwind label %94

90:                                               ; preds = %84
  br label %91

91:                                               ; preds = %90
  %92 = load i32, ptr %13, align 4, !tbaa !32
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %13, align 4, !tbaa !32
  br label %78, !llvm.loop !35

94:                                               ; preds = %84
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %7, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %103

98:                                               ; preds = %83
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %12, align 4, !tbaa !32
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %12, align 4, !tbaa !32
  br label %64, !llvm.loop !37

102:                                              ; preds = %68
  store i1 true, ptr %3, align 1
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %105

103:                                              ; preds = %94, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %104

104:                                              ; preds = %103, %69
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %107

105:                                              ; preds = %102, %35
  call void @_ZN4juce19BufferedInputStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(72) %6) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %6) #6
  %106 = load i1, ptr %3, align 1
  ret i1 %106

107:                                              ; preds = %104, %36
  call void @_ZN4juce19BufferedInputStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(72) %6) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %6) #6
  br label %108

108:                                              ; preds = %107
  %109 = load ptr, ptr %7, align 8
  %110 = load i32, ptr %8, align 4
  %111 = insertvalue { ptr, i32 } poison, ptr %109, 0
  %112 = insertvalue { ptr, i32 } %111, i32 %110, 1
  resume { ptr, i32 } %112
}

declare void @_ZN4juce19BufferedInputStreamC1ERNS_11InputStreamEi(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) unnamed_addr #3

declare noundef signext i8 @_ZN4juce11InputStream8readByteEv(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

declare noundef i32 @_ZN4juce11InputStream7readIntEv(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

declare noundef i64 @_ZN4juce11InputStream9readInt64Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

declare void @_ZN4juce11InputStream13skipNextBytesEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4juce14AudioThumbnail9ThumbData7getDataEi(ptr noundef nonnull align 8 dereferenceable(28), i32 noundef) #1 align 2

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

; Function Attrs: nounwind
declare void @_ZN4juce19BufferedInputStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #5

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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 "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, !20, i64 120}
!10 = !{!"_ZTSN4juce14AudioThumbnailE", !11, i64 0, !6, i64 64, !6, i64 72, !22, i64 80, !23, i64 88, !24, i64 96, !20, i64 120, !27, i64 128, !27, i64 136, !20, i64 144, !28, i64 152, !29, i64 160}
!11 = !{!"_ZTSN4juce18AudioThumbnailBaseE", !12, i64 0, !21, i64 56}
!12 = !{!"_ZTSN4juce17ChangeBroadcasterE", !13, i64 8, !16, i64 32}
!13 = !{!"_ZTSN4juce17ChangeBroadcaster25ChangeBroadcasterCallbackE", !14, i64 0, !6, i64 16}
!14 = !{!"_ZTSN4juce12AsyncUpdaterE", !15, i64 8}
!15 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_12AsyncUpdater19AsyncUpdaterMessageEEE", !6, i64 0}
!16 = !{!"_ZTSN4juce12ListenerListINS_14ChangeListenerENS_5ArrayIPS1_NS_20DummyCriticalSectionELi0EEEEE", !17, i64 0}
!17 = !{!"_ZTSN4juce5ArrayIPNS_14ChangeListenerENS_20DummyCriticalSectionELi0EEE", !18, i64 0, !20, i64 16}
!18 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_14ChangeListenerENS_20DummyCriticalSectionEEE", !19, i64 0, !20, i64 8}
!19 = !{!"_ZTSN4juce9HeapBlockIPNS_14ChangeListenerELb0EEE", !6, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!"_ZTSN4juce17AudioFormatWriter14ThreadedWriter20IncomingDataReceiverE"}
!22 = !{!"_ZTSN4juce13ScopedPointerINS_14AudioThumbnail15LevelDataSourceEEE", !6, i64 0}
!23 = !{!"_ZTSN4juce13ScopedPointerINS_14AudioThumbnail12CachedWindowEEE", !6, i64 0}
!24 = !{!"_ZTSN4juce10OwnedArrayINS_14AudioThumbnail9ThumbDataENS_20DummyCriticalSectionEEE", !25, i64 0, !20, i64 16}
!25 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_14AudioThumbnail9ThumbDataENS_20DummyCriticalSectionEEE", !26, i64 0, !20, i64 8}
!26 = !{!"_ZTSN4juce9HeapBlockIPNS_14AudioThumbnail9ThumbDataELb0EEE", !6, i64 0}
!27 = !{!"long long", !7, i64 0}
!28 = !{!"double", !7, i64 0}
!29 = !{!"_ZTSN4juce15CriticalSectionE", !7, i64 0}
!30 = !{!10, !27, i64 128}
!31 = !{!10, !27, i64 136}
!32 = !{!20, !20, i64 0}
!33 = !{!10, !20, i64 144}
!34 = !{!10, !28, i64 152}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = distinct !{!37, !36}


; 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::BufferedInputStream" = type { %"class.juce::InputStream", %"class.juce::OptionalScopedPointer", i32, i64, i64, i64, i64, %"class.juce::HeapBlock.143" }
%"class.juce::InputStream" = type { ptr }
%"class.juce::OptionalScopedPointer" = type <{ %"class.juce::ScopedPointer.142", i8, [7 x i8] }>
%"class.juce::ScopedPointer.142" = type { ptr }
%"class.juce::HeapBlock.143" = 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: mustprogress uwtable
declare dso_local void @_ZN4juce14AudioThumbnail16clearChannelDataEv(ptr noundef nonnull align 8 dereferenceable(200)) local_unnamed_addr #2 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 uwtable
declare dso_local void @_ZN4juce14AudioThumbnail14createChannelsEi(ptr noundef nonnull align 8 dereferenceable(200), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4juce14AudioThumbnail8loadFromERNS_11InputStreamE(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.juce::BufferedInputStream", align 8
  %4 = alloca %"class.juce::GenericScopedLock", align 8
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %3) #6
  call void @_ZN4juce19BufferedInputStreamC1ERNS_11InputStreamEi(ptr noundef nonnull align 8 dereferenceable(72) %3, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef 4096)
  %5 = invoke noundef signext i8 @_ZN4juce11InputStream8readByteEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %6 unwind label %16

6:                                                ; preds = %2
  %.not = icmp eq i8 %5, 106
  br i1 %.not, label %7, label %61

7:                                                ; preds = %6
  %8 = invoke noundef signext i8 @_ZN4juce11InputStream8readByteEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %9 unwind label %16

9:                                                ; preds = %7
  %.not18 = icmp eq i8 %8, 97
  br i1 %.not18, label %10, label %61

10:                                               ; preds = %9
  %11 = invoke noundef signext i8 @_ZN4juce11InputStream8readByteEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %12 unwind label %16

12:                                               ; preds = %10
  %.not19 = icmp eq i8 %11, 116
  br i1 %.not19, label %13, label %61

13:                                               ; preds = %12
  %14 = invoke noundef signext i8 @_ZN4juce11InputStream8readByteEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %15 unwind label %16

15:                                               ; preds = %13
  %.not20 = icmp eq i8 %14, 109
  br i1 %.not20, label %18, label %61

16:                                               ; preds = %13, %10, %7, %2
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %62

18:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %19 = getelementptr inbounds i8, ptr %0, i64 160
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(40) %19) #6
  invoke void @_ZN4juce14AudioThumbnail16clearChannelDataEv(ptr noundef nonnull align 8 dereferenceable(200) %0)
          to label %20 unwind label %46

20:                                               ; preds = %18
  %21 = invoke noundef i32 @_ZN4juce11InputStream7readIntEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %22 unwind label %46

22:                                               ; preds = %20
  %23 = getelementptr inbounds i8, ptr %0, i64 120
  store i32 %21, ptr %23, align 8, !tbaa !5
  %24 = invoke noundef i64 @_ZN4juce11InputStream9readInt64Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %25 unwind label %46

25:                                               ; preds = %22
  %26 = getelementptr inbounds i8, ptr %0, i64 128
  store i64 %24, ptr %26, align 8, !tbaa !29
  %27 = invoke noundef i64 @_ZN4juce11InputStream9readInt64Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %28 unwind label %46

28:                                               ; preds = %25
  %29 = getelementptr inbounds i8, ptr %0, i64 136
  store i64 %27, ptr %29, align 8, !tbaa !30
  %30 = invoke noundef i32 @_ZN4juce11InputStream7readIntEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %31 unwind label %48

31:                                               ; preds = %28
  %32 = invoke noundef i32 @_ZN4juce11InputStream7readIntEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %33 unwind label %48

33:                                               ; preds = %31
  %34 = getelementptr inbounds i8, ptr %0, i64 144
  store i32 %32, ptr %34, align 8, !tbaa !31
  %35 = invoke noundef i32 @_ZN4juce11InputStream7readIntEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %36 unwind label %48

36:                                               ; preds = %33
  %37 = sitofp i32 %35 to double
  %38 = getelementptr inbounds i8, ptr %0, i64 152
  store double %37, ptr %38, align 8, !tbaa !32
  invoke void @_ZN4juce11InputStream13skipNextBytesEx(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef 16)
          to label %39 unwind label %48

39:                                               ; preds = %36
  invoke void @_ZN4juce14AudioThumbnail14createChannelsEi(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef %30)
          to label %.preheader24 unwind label %48

.preheader24:                                     ; preds = %39
  %40 = icmp sgt i32 %30, 0
  br i1 %40, label %.preheader.lr.ph, label %._crit_edge27

.preheader.lr.ph:                                 ; preds = %.preheader24
  %41 = getelementptr inbounds i8, ptr %0, i64 96
  %42 = load i32, ptr %34, align 8, !tbaa !31
  %43 = icmp sgt i32 %42, 0
  br i1 %43, label %.preheader, label %._crit_edge27

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %44 = phi i32 [ %50, %._crit_edge ], [ %42, %.preheader.lr.ph ]
  %.01226 = phi i32 [ %51, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %45 = icmp sgt i32 %44, 0
  br i1 %45, label %.lr.ph, label %._crit_edge

._crit_edge27:                                    ; preds = %._crit_edge, %.preheader.lr.ph, %.preheader24
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %61

46:                                               ; preds = %25, %22, %20, %18
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %60

48:                                               ; preds = %39, %36, %33, %31, %28
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %60

._crit_edge:                                      ; preds = %54, %.preheader
  %50 = phi i32 [ %44, %.preheader ], [ %56, %54 ]
  %51 = add nuw nsw i32 %.01226, 1
  %exitcond.not = icmp eq i32 %51, %30
  br i1 %exitcond.not, label %._crit_edge27, label %.preheader, !llvm.loop !33

.lr.ph:                                           ; preds = %.preheader, %54
  %.025 = phi i32 [ %55, %54 ], [ 0, %.preheader ]
  %52 = call noundef ptr @_ZNK4juce10OwnedArrayINS_14AudioThumbnail9ThumbDataENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %41, i32 noundef %.025) #6
  %53 = call noundef ptr @_ZN4juce14AudioThumbnail9ThumbData7getDataEi(ptr noundef nonnull align 8 dereferenceable(28) %52, i32 noundef %.01226) #6
  invoke void @_ZN4juce14AudioThumbnail11MinMaxValue4readERNS_11InputStreamE(ptr noundef nonnull align 1 dereferenceable(2) %53, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %54 unwind label %58

54:                                               ; preds = %.lr.ph
  %55 = add nuw nsw i32 %.025, 1
  %56 = load i32, ptr %34, align 8, !tbaa !31
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %.lr.ph, label %._crit_edge, !llvm.loop !36

58:                                               ; preds = %.lr.ph
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %60

60:                                               ; preds = %48, %58, %46
  %.pn.pn = phi { ptr, i32 } [ %47, %46 ], [ %59, %58 ], [ %49, %48 ]
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %62

61:                                               ; preds = %6, %9, %12, %15, %._crit_edge27
  %.013 = phi i1 [ true, %._crit_edge27 ], [ false, %15 ], [ false, %12 ], [ false, %9 ], [ false, %6 ]
  call void @_ZN4juce19BufferedInputStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(72) %3) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %3) #6
  ret i1 %.013

62:                                               ; preds = %60, %16
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %60 ], [ %17, %16 ]
  call void @_ZN4juce19BufferedInputStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(72) %3) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn.pn.pn
}

declare void @_ZN4juce19BufferedInputStreamC1ERNS_11InputStreamEi(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) unnamed_addr #3

declare noundef signext i8 @_ZN4juce11InputStream8readByteEv(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

declare noundef i32 @_ZN4juce11InputStream7readIntEv(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

declare noundef i64 @_ZN4juce11InputStream9readInt64Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

declare void @_ZN4juce11InputStream13skipNextBytesEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) unnamed_addr #3

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

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

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

; Function Attrs: nounwind
declare void @_ZN4juce19BufferedInputStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #5

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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 "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, !19, i64 120}
!6 = !{!"_ZTSN4juce14AudioThumbnailE", !7, i64 0, !12, i64 64, !12, i64 72, !21, i64 80, !22, i64 88, !23, i64 96, !19, i64 120, !26, i64 128, !26, i64 136, !19, i64 144, !27, i64 152, !28, i64 160}
!7 = !{!"_ZTSN4juce18AudioThumbnailBaseE", !8, i64 0, !20, i64 56}
!8 = !{!"_ZTSN4juce17ChangeBroadcasterE", !9, i64 8, !15, i64 32}
!9 = !{!"_ZTSN4juce17ChangeBroadcaster25ChangeBroadcasterCallbackE", !10, i64 0, !12, i64 16}
!10 = !{!"_ZTSN4juce12AsyncUpdaterE", !11, i64 8}
!11 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_12AsyncUpdater19AsyncUpdaterMessageEEE", !12, i64 0}
!12 = !{!"any pointer", !13, i64 0}
!13 = !{!"omnipotent char", !14, i64 0}
!14 = !{!"Simple C++ TBAA"}
!15 = !{!"_ZTSN4juce12ListenerListINS_14ChangeListenerENS_5ArrayIPS1_NS_20DummyCriticalSectionELi0EEEEE", !16, i64 0}
!16 = !{!"_ZTSN4juce5ArrayIPNS_14ChangeListenerENS_20DummyCriticalSectionELi0EEE", !17, i64 0, !19, i64 16}
!17 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_14ChangeListenerENS_20DummyCriticalSectionEEE", !18, i64 0, !19, i64 8}
!18 = !{!"_ZTSN4juce9HeapBlockIPNS_14ChangeListenerELb0EEE", !12, i64 0}
!19 = !{!"int", !13, i64 0}
!20 = !{!"_ZTSN4juce17AudioFormatWriter14ThreadedWriter20IncomingDataReceiverE"}
!21 = !{!"_ZTSN4juce13ScopedPointerINS_14AudioThumbnail15LevelDataSourceEEE", !12, i64 0}
!22 = !{!"_ZTSN4juce13ScopedPointerINS_14AudioThumbnail12CachedWindowEEE", !12, i64 0}
!23 = !{!"_ZTSN4juce10OwnedArrayINS_14AudioThumbnail9ThumbDataENS_20DummyCriticalSectionEEE", !24, i64 0, !19, i64 16}
!24 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_14AudioThumbnail9ThumbDataENS_20DummyCriticalSectionEEE", !25, i64 0, !19, i64 8}
!25 = !{!"_ZTSN4juce9HeapBlockIPNS_14AudioThumbnail9ThumbDataELb0EEE", !12, i64 0}
!26 = !{!"long long", !13, i64 0}
!27 = !{!"double", !13, i64 0}
!28 = !{!"_ZTSN4juce15CriticalSectionE", !13, i64 0}
!29 = !{!6, !26, i64 128}
!30 = !{!6, !26, i64 136}
!31 = !{!6, !19, i64 144}
!32 = !{!6, !27, i64 152}
!33 = distinct !{!33, !34, !35}
!34 = !{!"llvm.loop.mustprogress"}
!35 = !{!"llvm.loop.unswitch.partial.disable"}
!36 = distinct !{!36, !34}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass