; 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::GenericScopedLock" = type { ptr }
%"class.juce::AudioThumbnailCache" = type <{ ptr, %"class.juce::TimeSliceThread", %"class.juce::OwnedArray.132", %"class.juce::CriticalSection", i32, [4 x i8] }>
%"class.juce::TimeSliceThread" = type { %"class.juce::Thread.base", %"class.juce::CriticalSection", %"class.juce::CriticalSection", %"class.juce::Array.127", ptr }
%"class.juce::Thread.base" = type <{ ptr, %"class.juce::String", ptr, ptr, %"class.juce::CriticalSection", %"class.juce::WaitableEvent", %"class.juce::WaitableEvent", i32, [4 x i8], i64, i32, i8 }>
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::WaitableEvent" = type <{ %union.pthread_cond_t, %union.pthread_mutex_t, i8, i8, [6 x i8] }>
%union.pthread_cond_t = type { %struct.__pthread_cond_s }
%struct.__pthread_cond_s = type { %union.__atomic_wide_counter, %union.__atomic_wide_counter, [2 x i32], [2 x i32], i32, i32, [2 x i32] }
%union.__atomic_wide_counter = type { i64 }
%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.127" = type { %"class.juce::ArrayAllocationBase.128", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.128" = type <{ %"class.juce::HeapBlock.129", i32, [4 x i8] }>
%"class.juce::HeapBlock.129" = type { ptr }
%"class.juce::OwnedArray.132" = type { %"class.juce::ArrayAllocationBase.133", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.133" = type <{ %"class.juce::HeapBlock.134", i32, [4 x i8] }>
%"class.juce::HeapBlock.134" = type { ptr }
%"class.juce::CriticalSection" = type { %union.pthread_mutex_t }

; 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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #1

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce19AudioThumbnailCache5clearEv(ptr noundef nonnull align 8 dereferenceable(476)) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4juce19AudioThumbnailCache14readFromStreamERNS_11InputStreamE(ptr noundef nonnull align 8 dereferenceable(476) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) #5 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::GenericScopedLock", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %10 = load ptr, ptr %4, align 8
  %11 = load ptr, ptr %5, align 8, !tbaa !5
  %12 = load ptr, ptr %11, align 8, !tbaa !9
  %13 = getelementptr inbounds ptr, ptr %12, i64 9
  %14 = load ptr, ptr %13, align 8
  %15 = call noundef i32 %14(ptr noundef nonnull align 8 dereferenceable(8) %11)
  %16 = call noundef i32 @_ZN4juceL32getThumbnailCacheFileMagicHeaderEv() #6
  %17 = icmp ne i32 %15, %16
  br i1 %17, label %18, label %19

18:                                               ; preds = %2
  store i1 false, ptr %3, align 1
  br label %68

19:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %20 = getelementptr inbounds %"class.juce::AudioThumbnailCache", ptr %10, i32 0, i32 3
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(40) %20) #6
  invoke void @_ZN4juce19AudioThumbnailCache5clearEv(ptr noundef nonnull align 8 dereferenceable(476) %10)
          to label %21 unwind label %53

21:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %22 = getelementptr inbounds %"class.juce::AudioThumbnailCache", ptr %10, i32 0, i32 4
  %23 = load i32, ptr %22, align 8, !tbaa !11
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  %26 = getelementptr inbounds ptr, ptr %25, i64 9
  %27 = load ptr, ptr %26, align 8
  %28 = invoke noundef i32 %27(ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %29 unwind label %57

29:                                               ; preds = %21
  %30 = invoke noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef %23, i32 noundef %28)
          to label %31 unwind label %57

31:                                               ; preds = %29
  store i32 %30, ptr %9, align 4, !tbaa !28
  br label %32

32:                                               ; preds = %51, %31
  %33 = load i32, ptr %9, align 4, !tbaa !28
  %34 = add nsw i32 %33, -1
  store i32 %34, ptr %9, align 4, !tbaa !28
  %35 = icmp sge i32 %34, 0
  br i1 %35, label %36, label %44

36:                                               ; preds = %32
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = load ptr, ptr %37, align 8, !tbaa !9
  %39 = getelementptr inbounds ptr, ptr %38, i64 3
  %40 = load ptr, ptr %39, align 8
  %41 = invoke noundef zeroext i1 %40(ptr noundef nonnull align 8 dereferenceable(8) %37)
          to label %42 unwind label %57

42:                                               ; preds = %36
  %43 = xor i1 %41, true
  br label %44

44:                                               ; preds = %42, %32
  %45 = phi i1 [ false, %32 ], [ %43, %42 ]
  br i1 %45, label %46, label %65

46:                                               ; preds = %44
  %47 = getelementptr inbounds %"class.juce::AudioThumbnailCache", ptr %10, i32 0, i32 2
  %48 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 32) #7
          to label %49 unwind label %57

49:                                               ; preds = %46
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN4juce19AudioThumbnailCache19ThumbnailCacheEntryC2ERNS_11InputStreamE(ptr noundef nonnull align 8 dereferenceable(32) %48, ptr noundef nonnull align 8 dereferenceable(8) %50)
          to label %51 unwind label %61

51:                                               ; preds = %49
  %52 = call noundef ptr @_ZN4juce10OwnedArrayINS_19AudioThumbnailCache19ThumbnailCacheEntryENS_20DummyCriticalSectionEE3addEPS2_(ptr noundef nonnull align 8 dereferenceable(20) %47, ptr noundef %48) #6
  br label %32, !llvm.loop !29

53:                                               ; preds = %19
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %7, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %8, align 4
  br label %67

57:                                               ; preds = %46, %36, %29, %21
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %7, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %8, align 4
  br label %66

61:                                               ; preds = %49
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %7, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %48, i64 noundef 32) #8
  br label %66

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

66:                                               ; preds = %61, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %67

67:                                               ; preds = %66, %53
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %70

68:                                               ; preds = %65, %18
  %69 = load i1, ptr %3, align 1
  ret i1 %69

70:                                               ; preds = %67
  %71 = load ptr, ptr %7, align 8
  %72 = load i32, ptr %8, align 4
  %73 = insertvalue { ptr, i32 } poison, ptr %71, 0
  %74 = insertvalue { ptr, i32 } %73, i32 %72, 1
  resume { ptr, i32 } %74
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN4juceL32getThumbnailCacheFileMagicHeaderEv() #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce19AudioThumbnailCache19ThumbnailCacheEntryC2ERNS_11InputStreamE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin allocsize(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 = { nobuiltin 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 = { 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 #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { builtin nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !20, i64 472}
!12 = !{!"_ZTSN4juce19AudioThumbnailCacheE", !13, i64 8, !25, i64 408, !17, i64 432, !20, i64 472}
!13 = !{!"_ZTSN4juce15TimeSliceThreadE", !14, i64 0, !17, i64 288, !17, i64 328, !22, i64 368, !6, i64 392}
!14 = !{!"_ZTSN4juce6ThreadE", !15, i64 8, !6, i64 16, !6, i64 24, !17, i64 32, !18, i64 72, !18, i64 168, !20, i64 264, !21, i64 272, !20, i64 280, !19, i64 284}
!15 = !{!"_ZTSN4juce6StringE", !16, i64 0}
!16 = !{!"_ZTSN4juce16CharPointer_UTF8E", !6, i64 0}
!17 = !{!"_ZTSN4juce15CriticalSectionE", !7, i64 0}
!18 = !{!"_ZTSN4juce13WaitableEventE", !7, i64 0, !7, i64 48, !19, i64 88, !19, i64 89}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTSN4juce5ArrayIPNS_15TimeSliceClientENS_20DummyCriticalSectionELi0EEE", !23, i64 0, !20, i64 16}
!23 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_15TimeSliceClientENS_20DummyCriticalSectionEEE", !24, i64 0, !20, i64 8}
!24 = !{!"_ZTSN4juce9HeapBlockIPNS_15TimeSliceClientELb0EEE", !6, i64 0}
!25 = !{!"_ZTSN4juce10OwnedArrayINS_19AudioThumbnailCache19ThumbnailCacheEntryENS_20DummyCriticalSectionEEE", !26, i64 0, !20, i64 16}
!26 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_19AudioThumbnailCache19ThumbnailCacheEntryENS_20DummyCriticalSectionEEE", !27, i64 0, !20, i64 8}
!27 = !{!"_ZTSN4juce9HeapBlockIPNS_19AudioThumbnailCache19ThumbnailCacheEntryELb0EEE", !6, i64 0}
!28 = !{!20, !20, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"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::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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #1

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce19AudioThumbnailCache5clearEv(ptr noundef nonnull align 8 dereferenceable(476)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4juce19AudioThumbnailCache14readFromStreamERNS_11InputStreamE(ptr noundef nonnull align 8 dereferenceable(476) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.juce::GenericScopedLock", align 8
  %4 = load ptr, ptr %1, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %4, i64 72
  %6 = load ptr, ptr %5, align 8
  %7 = tail call noundef i32 %6(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %8 = tail call noundef i32 @_ZN4juceL32getThumbnailCacheFileMagicHeaderEv() #6
  %.not = icmp eq i32 %7, %8
  br i1 %.not, label %9, label %40

9:                                                ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %10 = getelementptr inbounds i8, ptr %0, i64 432
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(40) %10) #6
  invoke void @_ZN4juce19AudioThumbnailCache5clearEv(ptr noundef nonnull align 8 dereferenceable(476) %0)
          to label %11 unwind label %35

11:                                               ; preds = %9
  %12 = getelementptr inbounds i8, ptr %0, i64 472
  %13 = load i32, ptr %12, align 8, !tbaa !8
  %14 = load ptr, ptr %1, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %14, i64 72
  %16 = load ptr, ptr %15, align 8
  %17 = invoke noundef i32 %16(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %18 unwind label %.loopexit.split-lp

18:                                               ; preds = %11
  %19 = call noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef %13, i32 noundef %17)
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %18
  %21 = getelementptr inbounds i8, ptr %0, i64 408
  br label %22

22:                                               ; preds = %.lr.ph, %32
  %.in = phi i32 [ %19, %.lr.ph ], [ %23, %32 ]
  %23 = add nsw i32 %.in, -1
  %24 = load ptr, ptr %1, align 8, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %24, i64 24
  %26 = load ptr, ptr %25, align 8
  %27 = invoke noundef zeroext i1 %26(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %28 unwind label %.loopexit

28:                                               ; preds = %22
  br i1 %27, label %.critedge, label %29

29:                                               ; preds = %28
  %30 = invoke noalias noundef nonnull dereferenceable(32) ptr @_Znwm(i64 noundef 32) #7
          to label %31 unwind label %.loopexit

31:                                               ; preds = %29
  invoke void @_ZN4juce19AudioThumbnailCache19ThumbnailCacheEntryC2ERNS_11InputStreamE(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %32 unwind label %37

32:                                               ; preds = %31
  %33 = call noundef ptr @_ZN4juce10OwnedArrayINS_19AudioThumbnailCache19ThumbnailCacheEntryENS_20DummyCriticalSectionEE3addEPS2_(ptr noundef nonnull align 8 dereferenceable(20) %21, ptr noundef nonnull %30) #6
  %34 = icmp ugt i32 %.in, 1
  br i1 %34, label %22, label %.critedge, !llvm.loop !27

35:                                               ; preds = %9
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %39

.loopexit:                                        ; preds = %22, %29
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %39

.loopexit.split-lp:                               ; preds = %11
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %39

37:                                               ; preds = %31
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %30, i64 noundef 32) #8
  br label %39

.critedge:                                        ; preds = %28, %32, %18
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  br label %40

39:                                               ; preds = %.loopexit, %.loopexit.split-lp, %37, %35
  %.pn.pn = phi { ptr, i32 } [ %36, %35 ], [ %38, %37 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn.pn

40:                                               ; preds = %2, %.critedge
  ret i1 %.not
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN4juceL32getThumbnailCacheFileMagicHeaderEv() local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce19AudioThumbnailCache19ThumbnailCacheEntryC2ERNS_11InputStreamE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin allocsize(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 = { nobuiltin 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 = { 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 #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { builtin 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, !19, i64 472}
!9 = !{!"_ZTSN4juce19AudioThumbnailCacheE", !10, i64 8, !24, i64 408, !16, i64 432, !19, i64 472}
!10 = !{!"_ZTSN4juce15TimeSliceThreadE", !11, i64 0, !16, i64 288, !16, i64 328, !21, i64 368, !14, i64 392}
!11 = !{!"_ZTSN4juce6ThreadE", !12, i64 8, !14, i64 16, !14, i64 24, !16, i64 32, !17, i64 72, !17, i64 168, !19, i64 264, !20, i64 272, !19, i64 280, !18, i64 284}
!12 = !{!"_ZTSN4juce6StringE", !13, i64 0}
!13 = !{!"_ZTSN4juce16CharPointer_UTF8E", !14, i64 0}
!14 = !{!"any pointer", !15, i64 0}
!15 = !{!"omnipotent char", !7, i64 0}
!16 = !{!"_ZTSN4juce15CriticalSectionE", !15, i64 0}
!17 = !{!"_ZTSN4juce13WaitableEventE", !15, i64 0, !15, i64 48, !18, i64 88, !18, i64 89}
!18 = !{!"bool", !15, i64 0}
!19 = !{!"int", !15, i64 0}
!20 = !{!"long", !15, i64 0}
!21 = !{!"_ZTSN4juce5ArrayIPNS_15TimeSliceClientENS_20DummyCriticalSectionELi0EEE", !22, i64 0, !19, i64 16}
!22 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_15TimeSliceClientENS_20DummyCriticalSectionEEE", !23, i64 0, !19, i64 8}
!23 = !{!"_ZTSN4juce9HeapBlockIPNS_15TimeSliceClientELb0EEE", !14, i64 0}
!24 = !{!"_ZTSN4juce10OwnedArrayINS_19AudioThumbnailCache19ThumbnailCacheEntryENS_20DummyCriticalSectionEEE", !25, i64 0, !19, i64 16}
!25 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_19AudioThumbnailCache19ThumbnailCacheEntryENS_20DummyCriticalSectionEEE", !26, i64 0, !19, i64 8}
!26 = !{!"_ZTSN4juce9HeapBlockIPNS_19AudioThumbnailCache19ThumbnailCacheEntryELb0EEE", !14, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass