; 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 }

@_ZL5debug = external hidden global ptr, align 8
@.str = external hidden unnamed_addr constant [49 x i8], align 1
@_ZL3TAG = external hidden global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [19 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
define dso_local noundef zeroext i1 @_ZN13FfmpegDecoder9GetBufferEPN5musik4core3sdk7IBufferE(ptr noundef nonnull align 8 dereferenceable(106) %0, ptr noundef %1) unnamed_addr #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.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator.5", align 1
  %8 = alloca ptr, align 8
  %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 = getelementptr inbounds %class.FfmpegDecoder, ptr %10, i32 0, i32 2
  %12 = load ptr, ptr %11, align 8, !tbaa !9
  %13 = icmp ne ptr %12, null
  br i1 %13, label %14, label %85

14:                                               ; preds = %2
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = getelementptr inbounds %class.FfmpegDecoder, ptr %10, i32 0, i32 9
  %17 = load i32, ptr %16, align 8, !tbaa !15
  %18 = sext i32 %17 to i64
  %19 = icmp sgt i64 %18, 0
  br i1 %19, label %20, label %23

20:                                               ; preds = %14
  %21 = getelementptr inbounds %class.FfmpegDecoder, ptr %10, i32 0, i32 9
  %22 = load i32, ptr %21, align 8, !tbaa !15
  br label %26

23:                                               ; preds = %14
  %24 = getelementptr inbounds %class.FfmpegDecoder, ptr %10, i32 0, i32 12
  %25 = load i32, ptr %24, align 8, !tbaa !16
  br label %26

26:                                               ; preds = %23, %20
  %27 = phi i32 [ %22, %20 ], [ %25, %23 ]
  %28 = sext i32 %27 to i64
  %29 = load ptr, ptr %15, align 8, !tbaa !17
  %30 = getelementptr inbounds ptr, ptr %29, i64 1
  %31 = load ptr, ptr %30, align 8
  call void %31(ptr noundef nonnull align 8 dereferenceable(8) %15, i64 noundef %28)
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %class.FfmpegDecoder, ptr %10, i32 0, i32 13
  %34 = load i32, ptr %33, align 4, !tbaa !19
  %35 = sext i32 %34 to i64
  %36 = trunc i64 %35 to i32
  %37 = load ptr, ptr %32, align 8, !tbaa !17
  %38 = getelementptr inbounds ptr, ptr %37, i64 3
  %39 = load ptr, ptr %38, align 8
  call void %39(ptr noundef nonnull align 8 dereferenceable(8) %32, i32 noundef %36)
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = load ptr, ptr %40, align 8, !tbaa !17
  %42 = getelementptr inbounds ptr, ptr %41, i64 6
  %43 = load ptr, ptr %42, align 8
  call void %43(ptr noundef nonnull align 8 dereferenceable(8) %40, i64 noundef 0)
  %44 = getelementptr inbounds %class.FfmpegDecoder, ptr %10, i32 0, i32 18
  %45 = load i8, ptr %44, align 1, !tbaa !20, !range !21, !noundef !22
  %46 = trunc i8 %45 to i1
  br i1 %46, label %80, label %47

47:                                               ; preds = %26
  %48 = getelementptr inbounds %class.FfmpegDecoder, ptr %10, i32 0, i32 8
  %49 = load ptr, ptr %48, align 8, !tbaa !23
  %50 = icmp ne ptr %49, null
  br i1 %50, label %66, label %51

51:                                               ; preds = %47
  %52 = call noundef zeroext i1 @_ZN13FfmpegDecoder19InitializeResamplerEv(ptr noundef nonnull align 8 dereferenceable(106) %10)
  br i1 %52, label %66, label %53

53:                                               ; preds = %51
  %54 = getelementptr inbounds %class.FfmpegDecoder, ptr %10, i32 0, i32 17
  store i8 1, ptr %54, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %55 unwind label %57

55:                                               ; preds = %53
  invoke void @_ZL8logErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %56 unwind label %61

56:                                               ; preds = %55
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #4
  store i1 false, ptr %3, align 1
  br label %92

57:                                               ; preds = %53
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %8, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %9, align 4
  br label %65

61:                                               ; preds = %55
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %8, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  br label %65

65:                                               ; preds = %61, %57
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #4
  br label %94

66:                                               ; preds = %51, %47
  %67 = getelementptr inbounds %class.FfmpegDecoder, ptr %10, i32 0, i32 3
  %68 = load ptr, ptr %67, align 8, !tbaa !25
  %69 = call i32 @av_audio_fifo_size(ptr noundef %68)
  %70 = getelementptr inbounds %class.FfmpegDecoder, ptr %10, i32 0, i32 15
  %71 = load i32, ptr %70, align 4, !tbaa !26
  %72 = icmp slt i32 %69, %71
  br i1 %72, label %73, label %79

73:                                               ; preds = %66
  %74 = call noundef zeroext i1 @_ZN13FfmpegDecoder15RefillFifoQueueEv(ptr noundef nonnull align 8 dereferenceable(106) %10)
  br i1 %74, label %78, label %75

75:                                               ; preds = %73
  call void @_ZN13FfmpegDecoder23FlushAndFinalizeDecoderEv(ptr noundef nonnull align 8 dereferenceable(106) %10)
  %76 = call noundef zeroext i1 @_ZN13FfmpegDecoder25DrainResamplerToFifoQueueEv(ptr noundef nonnull align 8 dereferenceable(106) %10)
  %77 = getelementptr inbounds %class.FfmpegDecoder, ptr %10, i32 0, i32 18
  store i8 1, ptr %77, align 1, !tbaa !20
  br label %78

78:                                               ; preds = %75, %73
  br label %79

79:                                               ; preds = %78, %66
  br label %80

80:                                               ; preds = %79, %26
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = call noundef zeroext i1 @_ZN13FfmpegDecoder28ReadFromFifoAndWriteToBufferEPN5musik4core3sdk7IBufferE(ptr noundef nonnull align 8 dereferenceable(106) %10, ptr noundef %81)
  br i1 %82, label %83, label %84

83:                                               ; preds = %80
  store i1 true, ptr %3, align 1
  br label %92

84:                                               ; preds = %80
  br label %85

85:                                               ; preds = %84, %2
  %86 = load ptr, ptr @_ZL5debug, align 8, !tbaa !5
  %87 = load ptr, ptr @_ZL3TAG, align 8, !tbaa !5
  %88 = load ptr, ptr %86, align 8, !tbaa !17
  %89 = getelementptr inbounds ptr, ptr %88, i64 1
  %90 = load ptr, ptr %89, align 8
  call void %90(ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef %87, ptr noundef @.str.1)
  %91 = getelementptr inbounds %class.FfmpegDecoder, ptr %10, i32 0, i32 17
  store i8 1, ptr %91, align 8, !tbaa !24
  store i1 false, ptr %3, align 1
  br label %92

92:                                               ; preds = %85, %83, %56
  %93 = load i1, ptr %3, align 1
  ret i1 %93

94:                                               ; preds = %65
  %95 = load ptr, ptr %8, align 8
  %96 = load i32, ptr %9, align 4
  %97 = insertvalue { ptr, i32 } poison, ptr %95, 0
  %98 = insertvalue { ptr, i32 } %97, i32 %96, 1
  resume { ptr, i32 } %98
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN13FfmpegDecoder19InitializeResamplerEv(ptr noundef nonnull align 8 dereferenceable(106)) #1 align 2

; 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
declare dso_local noundef zeroext i1 @_ZN13FfmpegDecoder15RefillFifoQueueEv(ptr noundef nonnull align 8 dereferenceable(106)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13FfmpegDecoder23FlushAndFinalizeDecoderEv(ptr noundef nonnull align 8 dereferenceable(106)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN13FfmpegDecoder25DrainResamplerToFifoQueueEv(ptr noundef nonnull align 8 dereferenceable(106)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN13FfmpegDecoder28ReadFromFifoAndWriteToBufferEPN5musik4core3sdk7IBufferE(ptr noundef nonnull align 8 dereferenceable(106), ptr noundef) #1 align 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 = { 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, !6, i64 16}
!10 = !{!"_ZTS13FfmpegDecoder", !11, 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, !12, i64 72, !13, i64 76, !12, i64 80, !12, i64 84, !12, i64 88, !12, i64 92, !14, i64 96, !13, i64 104, !13, i64 105}
!11 = !{!"_ZTSN5musik4core3sdk8IDecoderE"}
!12 = !{!"int", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!10, !12, i64 72}
!16 = !{!10, !12, i64 80}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !8, i64 0}
!19 = !{!10, !12, i64 84}
!20 = !{!10, !13, i64 105}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!10, !6, i64 64}
!24 = !{!10, !13, i64 104}
!25 = !{!10, !6, i64 24}
!26 = !{!10, !12, i64 92}


; 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 }

@_ZL5debug = external hidden local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [49 x i8], align 1
@_ZL3TAG = external hidden local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [19 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
define dso_local noundef zeroext i1 @_ZN13FfmpegDecoder9GetBufferEPN5musik4core3sdk7IBufferE(ptr noundef nonnull align 8 dereferenceable(106) %0, ptr noundef %1) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator.5", align 1
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %56, label %7

7:                                                ; preds = %2
  %8 = getelementptr inbounds i8, ptr %0, i64 72
  %9 = load i32, ptr %8, align 8, !tbaa !14
  %10 = icmp sgt i32 %9, 0
  %11 = getelementptr inbounds i8, ptr %0, i64 80
  %12 = load i32, ptr %11, align 8
  %13 = select i1 %10, i32 %9, i32 %12
  %14 = sext i32 %13 to i64
  %15 = load ptr, ptr %1, align 8, !tbaa !15
  %16 = getelementptr inbounds i8, ptr %15, i64 8
  %17 = load ptr, ptr %16, align 8
  tail call void %17(ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef %14)
  %18 = getelementptr inbounds i8, ptr %0, i64 84
  %19 = load i32, ptr %18, align 4, !tbaa !17
  %20 = load ptr, ptr %1, align 8, !tbaa !15
  %21 = getelementptr inbounds i8, ptr %20, i64 24
  %22 = load ptr, ptr %21, align 8
  tail call void %22(ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %19)
  %23 = load ptr, ptr %1, align 8, !tbaa !15
  %24 = getelementptr inbounds i8, ptr %23, i64 48
  %25 = load ptr, ptr %24, align 8
  tail call void %25(ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef 0)
  %26 = getelementptr inbounds i8, ptr %0, i64 105
  %27 = load i8, ptr %26, align 1, !tbaa !18, !range !19, !noundef !20
  %28 = trunc nuw i8 %27 to i1
  br i1 %28, label %54, label %29

29:                                               ; preds = %7
  %30 = getelementptr inbounds i8, ptr %0, i64 64
  %31 = load ptr, ptr %30, align 8, !tbaa !21
  %.not9 = icmp eq ptr %31, null
  br i1 %.not9, label %32, label %43

32:                                               ; preds = %29
  %33 = tail call noundef zeroext i1 @_ZN13FfmpegDecoder19InitializeResamplerEv(ptr noundef nonnull align 8 dereferenceable(106) %0)
  br i1 %33, label %43, label %34

34:                                               ; preds = %32
  %35 = getelementptr inbounds i8, ptr %0, i64 104
  store i8 1, ptr %35, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %36 unwind label %38

36:                                               ; preds = %34
  invoke void @_ZL8logErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %37 unwind label %40

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

38:                                               ; preds = %34
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %42

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

42:                                               ; preds = %40, %38
  %.pn = phi { ptr, i32 } [ %41, %40 ], [ %39, %38 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn

43:                                               ; preds = %32, %29
  %44 = getelementptr inbounds i8, ptr %0, i64 24
  %45 = load ptr, ptr %44, align 8, !tbaa !23
  %46 = tail call i32 @av_audio_fifo_size(ptr noundef %45)
  %47 = getelementptr inbounds i8, ptr %0, i64 92
  %48 = load i32, ptr %47, align 4, !tbaa !24
  %49 = icmp slt i32 %46, %48
  br i1 %49, label %50, label %54

50:                                               ; preds = %43
  %51 = tail call noundef zeroext i1 @_ZN13FfmpegDecoder15RefillFifoQueueEv(ptr noundef nonnull align 8 dereferenceable(106) %0)
  br i1 %51, label %54, label %52

52:                                               ; preds = %50
  tail call void @_ZN13FfmpegDecoder23FlushAndFinalizeDecoderEv(ptr noundef nonnull align 8 dereferenceable(106) %0)
  %53 = tail call noundef zeroext i1 @_ZN13FfmpegDecoder25DrainResamplerToFifoQueueEv(ptr noundef nonnull align 8 dereferenceable(106) %0)
  store i8 1, ptr %26, align 1, !tbaa !18
  br label %54

54:                                               ; preds = %43, %52, %50, %7
  %55 = tail call noundef zeroext i1 @_ZN13FfmpegDecoder28ReadFromFifoAndWriteToBufferEPN5musik4core3sdk7IBufferE(ptr noundef nonnull align 8 dereferenceable(106) %0, ptr noundef nonnull %1)
  br i1 %55, label %63, label %56

56:                                               ; preds = %54, %2
  %57 = load ptr, ptr @_ZL5debug, align 8, !tbaa !25
  %58 = load ptr, ptr @_ZL3TAG, align 8, !tbaa !25
  %59 = load ptr, ptr %57, align 8, !tbaa !15
  %60 = getelementptr inbounds i8, ptr %59, i64 8
  %61 = load ptr, ptr %60, align 8
  tail call void %61(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef %58, ptr noundef nonnull @.str.1)
  %62 = getelementptr inbounds i8, ptr %0, i64 104
  store i8 1, ptr %62, align 8, !tbaa !22
  br label %63

63:                                               ; preds = %54, %56, %37
  %.08 = phi i1 [ false, %56 ], [ false, %37 ], [ true, %54 ]
  ret i1 %.08
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN13FfmpegDecoder19InitializeResamplerEv(ptr noundef nonnull align 8 dereferenceable(106)) local_unnamed_addr #1 align 2

; 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
declare dso_local noundef zeroext i1 @_ZN13FfmpegDecoder15RefillFifoQueueEv(ptr noundef nonnull align 8 dereferenceable(106)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13FfmpegDecoder23FlushAndFinalizeDecoderEv(ptr noundef nonnull align 8 dereferenceable(106)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN13FfmpegDecoder25DrainResamplerToFifoQueueEv(ptr noundef nonnull align 8 dereferenceable(106)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN13FfmpegDecoder28ReadFromFifoAndWriteToBufferEPN5musik4core3sdk7IBufferE(ptr noundef nonnull align 8 dereferenceable(106), ptr noundef) local_unnamed_addr #1 align 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 = { 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, !8, i64 16}
!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, !11, i64 72}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !10, i64 0}
!17 = !{!6, !11, i64 84}
!18 = !{!6, !12, i64 105}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!6, !8, i64 64}
!22 = !{!6, !12, i64 104}
!23 = !{!6, !8, i64 24}
!24 = !{!6, !11, i64 92}
!25 = !{!8, !8, i64 0}


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