; LLVM IR from clangen/musikcube :: src/plugins/ffmpegdecoder (FfmpegDecoder)

; 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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.5" = type { i8 }
%class.FfmpegDecoder = type <{ %"class.musik::core::sdk::IDecoder", ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i8, [3 x i8], i32, i32, i32, i32, double, i8, i8, [6 x i8] }>
%"class.musik::core::sdk::IDecoder" = type { ptr }

@.str.18 = external hidden unnamed_addr constant [56 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 hidden void @_ZL8logErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) #1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @av_audio_fifo_size(ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN13FfmpegDecoder28ReadFromFifoAndWriteToBufferEPN5musik4core3sdk7IBufferE(ptr noundef nonnull align 8 dereferenceable(106) %0, ptr noundef %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 i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator.5", align 1
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %16 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %17 = getelementptr inbounds %class.FfmpegDecoder, ptr %16, i32 0, i32 3
  %18 = load ptr, ptr %17, align 8, !tbaa !11
  %19 = call i32 @av_audio_fifo_size(ptr noundef %18)
  store i32 %19, ptr %7, align 4, !tbaa !9
  %20 = getelementptr inbounds %class.FfmpegDecoder, ptr %16, i32 0, i32 18
  %21 = load i8, ptr %20, align 1, !tbaa !16, !range !17, !noundef !18
  %22 = trunc i8 %21 to i1
  br i1 %22, label %23, label %27

23:                                               ; preds = %2
  %24 = load i32, ptr %7, align 4, !tbaa !9
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %27

26:                                               ; preds = %23
  store i1 false, ptr %3, align 1
  store i32 1, ptr %8, align 4
  br label %104

27:                                               ; preds = %23, %2
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = getelementptr inbounds %class.FfmpegDecoder, ptr %16, i32 0, i32 15
  %30 = load i32, ptr %29, align 4, !tbaa !19
  %31 = icmp sge i32 %28, %30
  br i1 %31, label %39, label %32

32:                                               ; preds = %27
  %33 = getelementptr inbounds %class.FfmpegDecoder, ptr %16, i32 0, i32 18
  %34 = load i8, ptr %33, align 1, !tbaa !16, !range !17, !noundef !18
  %35 = trunc i8 %34 to i1
  br i1 %35, label %36, label %103

36:                                               ; preds = %32
  %37 = load i32, ptr %7, align 4, !tbaa !9
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %39, label %103

39:                                               ; preds = %36, %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %40 = load i32, ptr %7, align 4, !tbaa !9
  %41 = getelementptr inbounds %class.FfmpegDecoder, ptr %16, i32 0, i32 15
  %42 = load i32, ptr %41, align 4, !tbaa !19
  %43 = icmp sgt i32 %40, %42
  br i1 %43, label %44, label %47

44:                                               ; preds = %39
  %45 = getelementptr inbounds %class.FfmpegDecoder, ptr %16, i32 0, i32 15
  %46 = load i32, ptr %45, align 4, !tbaa !19
  br label %49

47:                                               ; preds = %39
  %48 = load i32, ptr %7, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %47, %44
  %50 = phi i32 [ %46, %44 ], [ %48, %47 ]
  store i32 %50, ptr %9, align 4, !tbaa !9
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = load i32, ptr %9, align 4, !tbaa !9
  %53 = getelementptr inbounds %class.FfmpegDecoder, ptr %16, i32 0, i32 13
  %54 = load i32, ptr %53, align 4, !tbaa !20
  %55 = mul nsw i32 %52, %54
  %56 = sext i32 %55 to i64
  %57 = load ptr, ptr %51, align 8, !tbaa !21
  %58 = getelementptr inbounds ptr, ptr %57, i64 6
  %59 = load ptr, ptr %58, align 8
  call void %59(ptr noundef nonnull align 8 dereferenceable(8) %51, i64 noundef %56)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = load ptr, ptr %60, align 8, !tbaa !21
  %62 = getelementptr inbounds ptr, ptr %61, i64 4
  %63 = load ptr, ptr %62, align 8
  %64 = call noundef ptr %63(ptr noundef nonnull align 8 dereferenceable(8) %60)
  store ptr %64, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %65 = getelementptr inbounds %class.FfmpegDecoder, ptr %16, i32 0, i32 3
  %66 = load ptr, ptr %65, align 8, !tbaa !11
  %67 = load i32, ptr %9, align 4, !tbaa !9
  %68 = call i32 @av_audio_fifo_read(ptr noundef %66, ptr noundef %10, i32 noundef %67)
  store i32 %68, ptr %11, align 4, !tbaa !9
  %69 = load i32, ptr %11, align 4, !tbaa !9
  %70 = load i32, ptr %9, align 4, !tbaa !9
  %71 = icmp sgt i32 %69, %70
  br i1 %71, label %72, label %84

72:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.18, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %73 unwind label %75

73:                                               ; preds = %72
  invoke void @_ZL8logErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %74 unwind label %79

74:                                               ; preds = %73
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #4
  store i1 false, ptr %3, align 1
  store i32 1, ptr %8, align 4
  br label %100

75:                                               ; preds = %72
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %14, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %15, align 4
  br label %83

79:                                               ; preds = %73
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %14, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %15, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  br label %83

83:                                               ; preds = %79, %75
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %106

84:                                               ; preds = %49
  %85 = load i32, ptr %11, align 4, !tbaa !9
  %86 = load i32, ptr %9, align 4, !tbaa !9
  %87 = icmp ne i32 %85, %86
  br i1 %87, label %88, label %98

88:                                               ; preds = %84
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = load i32, ptr %11, align 4, !tbaa !9
  %91 = getelementptr inbounds %class.FfmpegDecoder, ptr %16, i32 0, i32 13
  %92 = load i32, ptr %91, align 4, !tbaa !20
  %93 = mul nsw i32 %90, %92
  %94 = sext i32 %93 to i64
  %95 = load ptr, ptr %89, align 8, !tbaa !21
  %96 = getelementptr inbounds ptr, ptr %95, i64 6
  %97 = load ptr, ptr %96, align 8
  call void %97(ptr noundef nonnull align 8 dereferenceable(8) %89, i64 noundef %94)
  br label %98

98:                                               ; preds = %88, %84
  br label %99

99:                                               ; preds = %98
  store i32 0, ptr %8, align 4
  br label %100

100:                                              ; preds = %99, %74
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  %101 = load i32, ptr %8, align 4
  switch i32 %101, label %104 [
    i32 0, label %102
  ]

102:                                              ; preds = %100
  br label %103

103:                                              ; preds = %102, %36, %32
  store i1 true, ptr %3, align 1
  store i32 1, ptr %8, align 4
  br label %104

104:                                              ; preds = %103, %100, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %105 = load i1, ptr %3, align 1
  ret i1 %105

106:                                              ; preds = %83
  %107 = load ptr, ptr %14, align 8
  %108 = load i32, ptr %15, align 4
  %109 = insertvalue { ptr, i32 } poison, ptr %107, 0
  %110 = insertvalue { ptr, i32 } %109, i32 %108, 1
  resume { ptr, i32 } %110
}

declare i32 @av_audio_fifo_read(ptr noundef, ptr noundef, i32 noundef) #3

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 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !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, !6, i64 24}
!12 = !{!"_ZTS13FfmpegDecoder", !13, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !10, i64 72, !14, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !15, i64 96, !14, i64 104, !14, i64 105}
!13 = !{!"_ZTSN5musik4core3sdk8IDecoderE"}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = !{!12, !14, i64 105}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!12, !10, i64 92}
!20 = !{!12, !10, i64 84}
!21 = !{!22, !22, i64 0}
!22 = !{!"vtable pointer", !8, i64 0}


; 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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.5" = type { i8 }

@.str.18 = external hidden unnamed_addr constant [56 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 hidden void @_ZL8logErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @av_audio_fifo_size(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN13FfmpegDecoder28ReadFromFifoAndWriteToBufferEPN5musik4core3sdk7IBufferE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(106) %0, ptr noundef %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator.5", align 1
  %6 = getelementptr inbounds i8, ptr %0, i64 24
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = tail call i32 @av_audio_fifo_size(ptr noundef %7)
  %9 = getelementptr inbounds i8, ptr %0, i64 105
  %10 = load i8, ptr %9, align 1, !tbaa !14, !range !15, !noundef !16
  %11 = trunc nuw i8 %10 to i1
  %12 = icmp eq i32 %8, 0
  %or.cond = select i1 %11, i1 %12, i1 false
  br i1 %or.cond, label %47, label %13

13:                                               ; preds = %2
  %14 = getelementptr inbounds i8, ptr %0, i64 92
  %15 = load i32, ptr %14, align 4, !tbaa !17
  %.not = icmp sge i32 %8, %15
  %16 = icmp sgt i32 %8, 0
  %or.cond3 = select i1 %11, i1 %16, i1 false
  %or.cond33 = or i1 %or.cond3, %.not
  br i1 %or.cond33, label %17, label %47

17:                                               ; preds = %13
  %. = tail call i32 @llvm.smin.i32(i32 %8, i32 %15)
  %18 = getelementptr inbounds i8, ptr %0, i64 84
  %19 = load i32, ptr %18, align 4, !tbaa !18
  %20 = mul nsw i32 %19, %.
  %21 = sext i32 %20 to i64
  %22 = load ptr, ptr %1, align 8, !tbaa !19
  %23 = getelementptr inbounds i8, ptr %22, i64 48
  %24 = load ptr, ptr %23, align 8
  tail call void %24(ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef %21)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %25 = load ptr, ptr %1, align 8, !tbaa !19
  %26 = getelementptr inbounds i8, ptr %25, i64 32
  %27 = load ptr, ptr %26, align 8
  %28 = tail call noundef ptr %27(ptr noundef nonnull align 8 dereferenceable(8) %1)
  store ptr %28, ptr %3, align 8, !tbaa !21
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = call i32 @av_audio_fifo_read(ptr noundef %29, ptr noundef nonnull %3, i32 noundef %.)
  %.not32 = icmp sgt i32 %30, %.
  br i1 %.not32, label %31, label %38

31:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.18, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %32 unwind label %33

32:                                               ; preds = %31
  invoke void @_ZL8logErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %46 unwind label %35

33:                                               ; preds = %31
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %37

35:                                               ; preds = %32
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  br label %37

37:                                               ; preds = %35, %33
  %.pn = phi { ptr, i32 } [ %36, %35 ], [ %34, %33 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn

38:                                               ; preds = %17
  %.not30 = icmp eq i32 %30, %.
  br i1 %.not30, label %.thread, label %39

39:                                               ; preds = %38
  %40 = load i32, ptr %18, align 4, !tbaa !18
  %41 = mul nsw i32 %40, %30
  %42 = sext i32 %41 to i64
  %43 = load ptr, ptr %1, align 8, !tbaa !19
  %44 = getelementptr inbounds i8, ptr %43, i64 48
  %45 = load ptr, ptr %44, align 8
  call void %45(ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef %42)
  br label %.thread

.thread:                                          ; preds = %39, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %47

46:                                               ; preds = %32
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %47

47:                                               ; preds = %13, %.thread, %46, %2
  %.1 = phi i1 [ false, %46 ], [ false, %2 ], [ true, %.thread ], [ true, %13 ]
  ret i1 %.1
}

declare i32 @av_audio_fifo_read(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #4

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 = { 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 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !8, i64 24}
!6 = !{!"_ZTS13FfmpegDecoder", !7, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !8, i64 32, !8, i64 40, !8, i64 48, !8, i64 56, !8, i64 64, !11, i64 72, !12, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !13, i64 96, !12, i64 104, !12, i64 105}
!7 = !{!"_ZTSN5musik4core3sdk8IDecoderE"}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"bool", !9, i64 0}
!13 = !{!"double", !9, i64 0}
!14 = !{!6, !12, i64 105}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!6, !11, i64 92}
!18 = !{!6, !11, i64 84}
!19 = !{!20, !20, i64 0}
!20 = !{!"vtable pointer", !10, i64 0}
!21 = !{!8, !8, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass