; 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::unordered_set" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%struct.AVProbeData = type { ptr, ptr, i32, ptr }
%"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 }
%struct.AVChannelLayout = type { i32, i32, %union.anon.8, ptr }
%union.anon.8 = type { i64 }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%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 }
%struct.AVFormatContext = type { ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32, ptr, i32, ptr, ptr, i64, i64, i64, i32, i32, i32, i64, i64, ptr, i32, i32, ptr, i32, i32, i32, i32, ptr, i64, i32, i32, %struct.AVIOInterruptCB, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, ptr, i32, ptr, ptr, i64, ptr, ptr, ptr }
%struct.AVIOInterruptCB = type { ptr, ptr }
%struct.AVCodecContext = type { ptr, i32, i32, ptr, i32, i32, ptr, ptr, ptr, i64, i32, i32, ptr, i32, %struct.AVRational, %struct.AVRational, %struct.AVRational, i32, i32, i32, i32, i32, i32, %struct.AVRational, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, float, float, float, float, float, float, float, float, float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.AVChannelLayout, i32, i32, i32, i32, i32, i32, i32, i32, ptr, i32, i32, i32, float, float, i32, i32, i32, i32, i32, ptr, i64, i64, float, float, i32, i32, ptr, ptr, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i32, i32, [8 x i64], i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, ptr, ptr, ptr, ptr, i32, i32, i64, i32, i32, i64, ptr, i64, ptr, i32, ptr, i32 }
%struct.AVRational = type { i32, i32 }
%struct.AVStream = type { ptr, i32, i32, ptr, ptr, %struct.AVRational, i64, i64, i64, i32, i32, %struct.AVRational, ptr, %struct.AVRational, %struct.AVPacket, ptr, i32, i32, %struct.AVRational, i32 }
%struct.AVPacket = type { ptr, i64, i64, ptr, i32, i32, i32, ptr, i32, i64, i64, ptr, ptr, %struct.AVRational }
%struct.AVCodec = type { ptr, ptr, i32, i32, i32, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.AVCodecParameters = type { i32, i32, i32, ptr, i32, ptr, i32, i32, i64, i32, i32, i32, i32, i32, i32, %struct.AVRational, %struct.AVRational, i32, i32, i32, i32, i32, i32, i32, %struct.AVChannelLayout, i32, i32, i32, i32, i32, i32 }

@_ZL25ignoreInvalidPacketCodecs = external hidden global %"class.std::unordered_set", align 8
@_ZL5debug = external hidden global ptr, align 8
@_ZL3TAG = external hidden global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [39 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #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 #3 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 #3 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL10logAvErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN13FfmpegDecoder4OpenEPN5musik4core3sdk11IDataStreamE(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 i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca [32768 x i8], align 16
  %9 = alloca i32, align 4
  %10 = alloca %struct.AVProbeData, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator.5", align 1
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator.5", align 1
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::allocator.5", align 1
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::allocator.5", align 1
  %24 = alloca i32, align 4
  %25 = alloca %struct.AVChannelLayout, align 8
  %26 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %27 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %28 = alloca ptr, align 8
  %29 = alloca %"class.std::__cxx11::basic_string", align 8
  %30 = alloca %"class.std::allocator.5", align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %31 = load ptr, ptr %4, align 8
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = load ptr, ptr %32, align 8, !tbaa !9
  %34 = getelementptr inbounds ptr, ptr %33, i64 12
  %35 = load ptr, ptr %34, align 8
  %36 = call noundef zeroext i1 %35(ptr noundef nonnull align 8 dereferenceable(8) %32)
  br i1 %36, label %37, label %342

37:                                               ; preds = %2
  %38 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 2
  %39 = load ptr, ptr %38, align 8, !tbaa !11
  %40 = icmp eq ptr %39, null
  br i1 %40, label %41, label %342

41:                                               ; preds = %37
  %42 = load ptr, ptr @_ZL5debug, align 8, !tbaa !5
  %43 = load ptr, ptr @_ZL3TAG, align 8, !tbaa !5
  %44 = load ptr, ptr %42, align 8, !tbaa !9
  %45 = getelementptr inbounds ptr, ptr %44, i64 1
  %46 = load ptr, ptr %45, align 8
  call void %46(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef %43, ptr noundef @.str.4)
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 1
  store ptr %47, ptr %48, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 4160, ptr %6, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %49 = call noalias ptr @av_malloc(i64 noundef 4160)
  store ptr %49, ptr %7, align 8, !tbaa !5
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = call ptr @avio_alloc_context(ptr noundef %50, i32 noundef 4160, i32 noundef 0, ptr noundef %31, ptr noundef @_ZL12readCallbackPvPhi, ptr noundef @_ZL13writeCallbackPvPKhi, ptr noundef @_ZL12seekCallbackPvli)
  %52 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 2
  store ptr %51, ptr %52, align 8, !tbaa !11
  %53 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 2
  %54 = load ptr, ptr %53, align 8, !tbaa !11
  %55 = icmp ne ptr %54, null
  br i1 %55, label %56, label %338

56:                                               ; preds = %41
  %57 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 14
  store i32 -1, ptr %57, align 8, !tbaa !19
  %58 = call ptr @avformat_alloc_context()
  %59 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 4
  store ptr %58, ptr %59, align 8, !tbaa !20
  %60 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 2
  %61 = load ptr, ptr %60, align 8, !tbaa !11
  %62 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 4
  %63 = load ptr, ptr %62, align 8, !tbaa !20
  %64 = getelementptr inbounds %struct.AVFormatContext, ptr %63, i32 0, i32 4
  store ptr %61, ptr %64, align 8, !tbaa !21
  %65 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 4
  %66 = load ptr, ptr %65, align 8, !tbaa !20
  %67 = getelementptr inbounds %struct.AVFormatContext, ptr %66, i32 0, i32 18
  store i32 128, ptr %67, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 32768, ptr %8) #7
  %68 = getelementptr inbounds [32768 x i8], ptr %8, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %68, i8 0, i64 32768, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds [32768 x i8], ptr %8, i64 0, i64 0
  %71 = load ptr, ptr %69, align 8, !tbaa !9
  %72 = getelementptr inbounds ptr, ptr %71, i64 8
  %73 = load ptr, ptr %72, align 8
  %74 = call noundef i64 %73(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef %70, i64 noundef 32736)
  %75 = trunc i64 %74 to i32
  store i32 %75, ptr %9, align 4, !tbaa !18
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = load ptr, ptr %76, align 8, !tbaa !9
  %78 = getelementptr inbounds ptr, ptr %77, i64 10
  %79 = load ptr, ptr %78, align 8
  %80 = call noundef zeroext i1 %79(ptr noundef nonnull align 8 dereferenceable(8) %76, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #7
  call void @llvm.memset.p0.i64(ptr align 8 %10, i8 0, i64 32, i1 false)
  %81 = getelementptr inbounds [32768 x i8], ptr %8, i64 0, i64 0
  %82 = getelementptr inbounds %struct.AVProbeData, ptr %10, i32 0, i32 1
  store ptr %81, ptr %82, align 8, !tbaa !28
  %83 = load i32, ptr %9, align 4, !tbaa !18
  %84 = getelementptr inbounds %struct.AVProbeData, ptr %10, i32 0, i32 2
  store i32 %83, ptr %84, align 8, !tbaa !30
  %85 = getelementptr inbounds %struct.AVProbeData, ptr %10, i32 0, i32 0
  store ptr @.str.5, ptr %85, align 8, !tbaa !31
  %86 = call ptr @av_probe_input_format(ptr noundef %10, i32 noundef 1)
  %87 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 4
  %88 = load ptr, ptr %87, align 8, !tbaa !20
  %89 = getelementptr inbounds %struct.AVFormatContext, ptr %88, i32 0, i32 1
  store ptr %86, ptr %89, align 8, !tbaa !32
  %90 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 4
  %91 = load ptr, ptr %90, align 8, !tbaa !20
  %92 = getelementptr inbounds %struct.AVFormatContext, ptr %91, i32 0, i32 1
  %93 = load ptr, ptr %92, align 8, !tbaa !32
  %94 = icmp ne ptr %93, null
  br i1 %94, label %95, label %334

95:                                               ; preds = %56
  %96 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 4
  %97 = call i32 @avformat_open_input(ptr noundef %96, ptr noundef @.str.5, ptr noundef null, ptr noundef null)
  %98 = icmp eq i32 %97, 0
  br i1 %98, label %99, label %333

99:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store ptr null, ptr %11, align 8, !tbaa !5
  %100 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 4
  %101 = load ptr, ptr %100, align 8, !tbaa !20
  %102 = call i32 @avformat_find_stream_info(ptr noundef %101, ptr noundef null)
  %103 = icmp sge i32 %102, 0
  br i1 %103, label %104, label %109

104:                                              ; preds = %99
  %105 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 4
  %106 = load ptr, ptr %105, align 8, !tbaa !20
  %107 = call i32 @av_find_best_stream(ptr noundef %106, i32 noundef 1, i32 noundef -1, i32 noundef -1, ptr noundef %11, i32 noundef 0)
  %108 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 14
  store i32 %107, ptr %108, align 8, !tbaa !19
  br label %109

109:                                              ; preds = %104, %99
  %110 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 14
  %111 = load i32, ptr %110, align 8, !tbaa !19
  %112 = icmp ne i32 %111, -1
  br i1 %112, label %113, label %322

113:                                              ; preds = %109
  %114 = load ptr, ptr %11, align 8, !tbaa !5
  %115 = icmp ne ptr %114, null
  br i1 %115, label %116, label %322

116:                                              ; preds = %113
  %117 = load ptr, ptr @_ZL5debug, align 8, !tbaa !5
  %118 = load ptr, ptr @_ZL3TAG, align 8, !tbaa !5
  %119 = load ptr, ptr %117, align 8, !tbaa !9
  %120 = getelementptr inbounds ptr, ptr %119, i64 1
  %121 = load ptr, ptr %120, align 8
  call void %121(ptr noundef nonnull align 8 dereferenceable(8) %117, ptr noundef %118, ptr noundef @.str.6)
  %122 = load ptr, ptr %11, align 8, !tbaa !5
  %123 = call ptr @avcodec_alloc_context3(ptr noundef %122)
  %124 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 5
  store ptr %123, ptr %124, align 8, !tbaa !33
  %125 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 5
  %126 = load ptr, ptr %125, align 8, !tbaa !33
  %127 = icmp ne ptr %126, null
  br i1 %127, label %128, label %271

128:                                              ; preds = %116
  %129 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 5
  %130 = load ptr, ptr %129, align 8, !tbaa !33
  %131 = getelementptr inbounds %struct.AVCodecContext, ptr %130, i32 0, i32 77
  store i32 3, ptr %131, align 8, !tbaa !34
  %132 = load ptr, ptr %11, align 8, !tbaa !5
  %133 = icmp ne ptr %132, null
  br i1 %133, label %134, label %221

134:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %135 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 5
  %136 = load ptr, ptr %135, align 8, !tbaa !33
  %137 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 4
  %138 = load ptr, ptr %137, align 8, !tbaa !20
  %139 = getelementptr inbounds %struct.AVFormatContext, ptr %138, i32 0, i32 7
  %140 = load ptr, ptr %139, align 8, !tbaa !51
  %141 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 14
  %142 = load i32, ptr %141, align 8, !tbaa !19
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds ptr, ptr %140, i64 %143
  %145 = load ptr, ptr %144, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.AVStream, ptr %145, i32 0, i32 3
  %147 = load ptr, ptr %146, align 8, !tbaa !52
  %148 = call i32 @avcodec_parameters_to_context(ptr noundef %136, ptr noundef %147)
  store i32 %148, ptr %12, align 4, !tbaa !18
  %149 = load i32, ptr %12, align 4, !tbaa !18
  %150 = icmp slt i32 %149, 0
  br i1 %150, label %151, label %164

151:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef @.str.7, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %152 unwind label %155

152:                                              ; preds = %151
  %153 = load i32, ptr %12, align 4, !tbaa !18
  invoke void @_ZL10logAvErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(32) %13, i32 noundef %153)
          to label %154 unwind label %159

154:                                              ; preds = %152
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  store i32 2, ptr %24, align 4
  br label %198

155:                                              ; preds = %151
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %15, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %16, align 4
  br label %163

159:                                              ; preds = %152
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %15, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  br label %163

163:                                              ; preds = %159, %155
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  br label %220

164:                                              ; preds = %134
  %165 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 5
  %166 = load ptr, ptr %165, align 8, !tbaa !33
  %167 = load ptr, ptr %11, align 8, !tbaa !5
  %168 = call i32 @avcodec_open2(ptr noundef %166, ptr noundef %167, ptr noundef null)
  store i32 %168, ptr %12, align 4, !tbaa !18
  %169 = load i32, ptr %12, align 4, !tbaa !18
  %170 = icmp slt i32 %169, 0
  br i1 %170, label %171, label %184

171:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str.8, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %172 unwind label %175

172:                                              ; preds = %171
  %173 = load i32, ptr %12, align 4, !tbaa !18
  invoke void @_ZL10logAvErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %173)
          to label %174 unwind label %179

174:                                              ; preds = %172
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  store i32 2, ptr %24, align 4
  br label %198

175:                                              ; preds = %171
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %15, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %16, align 4
  br label %183

179:                                              ; preds = %172
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %15, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %183

183:                                              ; preds = %179, %175
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  br label %220

184:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef @.str.9, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %185 unwind label %201

185:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #7
  %186 = load ptr, ptr %11, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.AVCodec, ptr %186, i32 0, i32 1
  %188 = load ptr, ptr %187, align 8, !tbaa !55
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef %188, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %189 unwind label %205

189:                                              ; preds = %185
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %19, ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(32) %22)
          to label %190 unwind label %209

190:                                              ; preds = %189
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #7
  %191 = load ptr, ptr @_ZL5debug, align 8, !tbaa !5
  %192 = load ptr, ptr @_ZL3TAG, align 8, !tbaa !5
  %193 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  %194 = load ptr, ptr %191, align 8, !tbaa !9
  %195 = getelementptr inbounds ptr, ptr %194, i64 1
  %196 = load ptr, ptr %195, align 8
  invoke void %196(ptr noundef nonnull align 8 dereferenceable(8) %191, ptr noundef %192, ptr noundef %193)
          to label %197 unwind label %215

197:                                              ; preds = %190
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  store i32 0, ptr %24, align 4
  br label %198

198:                                              ; preds = %197, %174, %154
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  %199 = load i32, ptr %24, align 4
  switch i32 %199, label %329 [
    i32 0, label %200
  ]

200:                                              ; preds = %198
  br label %227

201:                                              ; preds = %184
  %202 = landingpad { ptr, i32 }
          cleanup
  %203 = extractvalue { ptr, i32 } %202, 0
  store ptr %203, ptr %15, align 8
  %204 = extractvalue { ptr, i32 } %202, 1
  store i32 %204, ptr %16, align 4
  br label %214

205:                                              ; preds = %185
  %206 = landingpad { ptr, i32 }
          cleanup
  %207 = extractvalue { ptr, i32 } %206, 0
  store ptr %207, ptr %15, align 8
  %208 = extractvalue { ptr, i32 } %206, 1
  store i32 %208, ptr %16, align 4
  br label %213

209:                                              ; preds = %189
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %15, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  br label %213

213:                                              ; preds = %209, %205
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  br label %214

214:                                              ; preds = %213, %201
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #7
  br label %219

215:                                              ; preds = %190
  %216 = landingpad { ptr, i32 }
          cleanup
  %217 = extractvalue { ptr, i32 } %216, 0
  store ptr %217, ptr %15, align 8
  %218 = extractvalue { ptr, i32 } %216, 1
  store i32 %218, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  br label %219

219:                                              ; preds = %215, %214
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  br label %220

220:                                              ; preds = %219, %183, %163
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %332

221:                                              ; preds = %128
  %222 = load ptr, ptr @_ZL5debug, align 8, !tbaa !5
  %223 = load ptr, ptr @_ZL3TAG, align 8, !tbaa !5
  %224 = load ptr, ptr %222, align 8, !tbaa !9
  %225 = getelementptr inbounds ptr, ptr %224, i64 3
  %226 = load ptr, ptr %225, align 8
  call void %226(ptr noundef nonnull align 8 dereferenceable(8) %222, ptr noundef %223, ptr noundef @.str.10)
  store i32 2, ptr %24, align 4
  br label %329

227:                                              ; preds = %200
  %228 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 5
  %229 = load ptr, ptr %228, align 8, !tbaa !33
  %230 = getelementptr inbounds %struct.AVCodecContext, ptr %229, i32 0, i32 72
  %231 = getelementptr inbounds %struct.AVChannelLayout, ptr %230, i32 0, i32 1
  %232 = load i32, ptr %231, align 4, !tbaa !57
  %233 = icmp eq i32 %232, 0
  br i1 %233, label %234, label %244

234:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #7
  %235 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 5
  %236 = load ptr, ptr %235, align 8, !tbaa !33
  %237 = getelementptr inbounds %struct.AVCodecContext, ptr %236, i32 0, i32 72
  %238 = getelementptr inbounds %struct.AVChannelLayout, ptr %237, i32 0, i32 1
  %239 = load i32, ptr %238, align 4, !tbaa !57
  %240 = sext i32 %239 to i64
  call void @_ZL20resolveChannelLayoutm(ptr dead_on_unwind writable sret(%struct.AVChannelLayout) align 8 %25, i64 noundef %240)
  %241 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 5
  %242 = load ptr, ptr %241, align 8, !tbaa !33
  %243 = getelementptr inbounds %struct.AVCodecContext, ptr %242, i32 0, i32 72
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %243, ptr align 8 %25, i64 24, i1 false), !tbaa.struct !58
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #7
  br label %244

244:                                              ; preds = %234, %227
  %245 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 5
  %246 = load ptr, ptr %245, align 8, !tbaa !33
  %247 = getelementptr inbounds %struct.AVCodecContext, ptr %246, i32 0, i32 73
  %248 = load i32, ptr %247, align 8, !tbaa !61
  %249 = icmp ne i32 %248, 0
  br i1 %249, label %250, label %255

250:                                              ; preds = %244
  %251 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 5
  %252 = load ptr, ptr %251, align 8, !tbaa !33
  %253 = getelementptr inbounds %struct.AVCodecContext, ptr %252, i32 0, i32 73
  %254 = load i32, ptr %253, align 8, !tbaa !61
  br label %256

255:                                              ; preds = %244
  br label %256

256:                                              ; preds = %255, %250
  %257 = phi i32 [ %254, %250 ], [ 4096, %255 ]
  %258 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 15
  store i32 %257, ptr %258, align 4, !tbaa !62
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %259 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 5
  %260 = load ptr, ptr %259, align 8, !tbaa !33
  %261 = getelementptr inbounds %struct.AVCodecContext, ptr %260, i32 0, i32 4
  %262 = call ptr @_ZNSt13unordered_setI9AVCodecIDSt4hashIS0_ESt8equal_toIS0_ESaIS0_EE4findERKS0_(ptr noundef nonnull align 8 dereferenceable(56) @_ZL25ignoreInvalidPacketCodecs, ptr noundef nonnull align 4 dereferenceable(4) %261)
  %263 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %26, i32 0, i32 0
  %264 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %263, i32 0, i32 0
  store ptr %262, ptr %264, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %265 = call ptr @_ZNSt13unordered_setI9AVCodecIDSt4hashIS0_ESt8equal_toIS0_ESaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(56) @_ZL25ignoreInvalidPacketCodecs) #7
  %266 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %27, i32 0, i32 0
  %267 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %266, i32 0, i32 0
  store ptr %265, ptr %267, align 8
  %268 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseI9AVCodecIDLb0EEES4_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %27) #7
  %269 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 10
  %270 = zext i1 %268 to i8
  store i8 %270, ptr %269, align 4, !tbaa !63
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %271

271:                                              ; preds = %256, %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %272 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 4
  %273 = load ptr, ptr %272, align 8, !tbaa !20
  %274 = getelementptr inbounds %struct.AVFormatContext, ptr %273, i32 0, i32 7
  %275 = load ptr, ptr %274, align 8, !tbaa !51
  %276 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 14
  %277 = load i32, ptr %276, align 8, !tbaa !19
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds ptr, ptr %275, i64 %278
  %280 = load ptr, ptr %279, align 8, !tbaa !5
  store ptr %280, ptr %28, align 8, !tbaa !5
  %281 = load ptr, ptr %28, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.AVStream, ptr %281, i32 0, i32 3
  %283 = load ptr, ptr %282, align 8, !tbaa !52
  %284 = getelementptr inbounds %struct.AVCodecParameters, ptr %283, i32 0, i32 25
  %285 = load i32, ptr %284, align 8, !tbaa !64
  %286 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 12
  store i32 %285, ptr %286, align 8, !tbaa !66
  %287 = load ptr, ptr %28, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.AVStream, ptr %287, i32 0, i32 3
  %289 = load ptr, ptr %288, align 8, !tbaa !52
  %290 = getelementptr inbounds %struct.AVCodecParameters, ptr %289, i32 0, i32 24
  %291 = getelementptr inbounds %struct.AVChannelLayout, ptr %290, i32 0, i32 1
  %292 = load i32, ptr %291, align 4, !tbaa !67
  %293 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 13
  store i32 %292, ptr %293, align 4, !tbaa !68
  %294 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 4
  %295 = load ptr, ptr %294, align 8, !tbaa !20
  %296 = getelementptr inbounds %struct.AVFormatContext, ptr %295, i32 0, i32 14
  %297 = load i64, ptr %296, align 8, !tbaa !69
  %298 = sitofp i64 %297 to double
  %299 = fdiv double %298, 1.000000e+06
  %300 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 16
  store double %299, ptr %300, align 8, !tbaa !70
  %301 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 13
  %302 = load i32, ptr %301, align 4, !tbaa !68
  %303 = call ptr @av_audio_fifo_alloc(i32 noundef 3, i32 noundef %302, i32 noundef 1)
  %304 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 3
  store ptr %303, ptr %304, align 8, !tbaa !71
  %305 = getelementptr inbounds %class.FfmpegDecoder, ptr %31, i32 0, i32 3
  %306 = load ptr, ptr %305, align 8, !tbaa !71
  %307 = icmp ne ptr %306, null
  br i1 %307, label %320, label %308

308:                                              ; preds = %271
  call void @llvm.lifetime.start.p0(i64 32, ptr %29) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %29, ptr noundef @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %30)
          to label %309 unwind label %311

309:                                              ; preds = %308
  invoke void @_ZL8logErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %29)
          to label %310 unwind label %315

310:                                              ; preds = %309
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %29) #7
  store i32 2, ptr %24, align 4
  br label %321

311:                                              ; preds = %308
  %312 = landingpad { ptr, i32 }
          cleanup
  %313 = extractvalue { ptr, i32 } %312, 0
  store ptr %313, ptr %15, align 8
  %314 = extractvalue { ptr, i32 } %312, 1
  store i32 %314, ptr %16, align 4
  br label %319

315:                                              ; preds = %309
  %316 = landingpad { ptr, i32 }
          cleanup
  %317 = extractvalue { ptr, i32 } %316, 0
  store ptr %317, ptr %15, align 8
  %318 = extractvalue { ptr, i32 } %316, 1
  store i32 %318, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #7
  br label %319

319:                                              ; preds = %315, %311
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %332

320:                                              ; preds = %271
  store i1 true, ptr %3, align 1
  store i32 1, ptr %24, align 4
  br label %321

321:                                              ; preds = %320, %310
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %329

322:                                              ; preds = %113, %109
  %323 = load ptr, ptr @_ZL5debug, align 8, !tbaa !5
  %324 = load ptr, ptr @_ZL3TAG, align 8, !tbaa !5
  %325 = load ptr, ptr %323, align 8, !tbaa !9
  %326 = getelementptr inbounds ptr, ptr %325, i64 3
  %327 = load ptr, ptr %326, align 8
  call void %327(ptr noundef nonnull align 8 dereferenceable(8) %323, ptr noundef %324, ptr noundef @.str.12)
  br label %328

328:                                              ; preds = %322
  store i32 0, ptr %24, align 4
  br label %329

329:                                              ; preds = %328, %321, %221, %198
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  %330 = load i32, ptr %24, align 4
  switch i32 %330, label %335 [
    i32 0, label %331
  ]

331:                                              ; preds = %329
  br label %333

332:                                              ; preds = %319, %220
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 32768, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %351

333:                                              ; preds = %331, %95
  br label %334

334:                                              ; preds = %333, %56
  store i32 0, ptr %24, align 4
  br label %335

335:                                              ; preds = %334, %329
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 32768, ptr %8) #7
  %336 = load i32, ptr %24, align 4
  switch i32 %336, label %339 [
    i32 0, label %337
  ]

337:                                              ; preds = %335
  br label %338

338:                                              ; preds = %337, %41
  store i32 0, ptr %24, align 4
  br label %339

339:                                              ; preds = %338, %335
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %340 = load i32, ptr %24, align 4
  switch i32 %340, label %356 [
    i32 0, label %341
    i32 1, label %349
    i32 2, label %343
  ]

341:                                              ; preds = %339
  br label %342

342:                                              ; preds = %341, %37, %2
  br label %343

343:                                              ; preds = %342, %339
  %344 = load ptr, ptr @_ZL5debug, align 8, !tbaa !5
  %345 = load ptr, ptr @_ZL3TAG, align 8, !tbaa !5
  %346 = load ptr, ptr %344, align 8, !tbaa !9
  %347 = getelementptr inbounds ptr, ptr %346, i64 3
  %348 = load ptr, ptr %347, align 8
  call void %348(ptr noundef nonnull align 8 dereferenceable(8) %344, ptr noundef %345, ptr noundef @.str.13)
  call void @_ZN13FfmpegDecoder5ResetEv(ptr noundef nonnull align 8 dereferenceable(106) %31)
  store i1 false, ptr %3, align 1
  br label %349

349:                                              ; preds = %343, %339
  %350 = load i1, ptr %3, align 1
  ret i1 %350

351:                                              ; preds = %332
  %352 = load ptr, ptr %15, align 8
  %353 = load i32, ptr %16, align 4
  %354 = insertvalue { ptr, i32 } poison, ptr %352, 0
  %355 = insertvalue { ptr, i32 } %354, i32 %353, 1
  resume { ptr, i32 } %355

356:                                              ; preds = %339
  unreachable
}

declare noalias ptr @av_malloc(i64 noundef) #4

declare ptr @avio_alloc_context(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL12readCallbackPvPhi(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL13writeCallbackPvPKhi(ptr noundef, ptr noundef, i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZL12seekCallbackPvli(ptr noundef, i64 noundef, i32 noundef) #1

declare ptr @avformat_alloc_context() #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

declare ptr @av_probe_input_format(ptr noundef, i32 noundef) #4

declare i32 @avformat_open_input(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

declare i32 @avformat_find_stream_info(ptr noundef, ptr noundef) #4

declare i32 @av_find_best_stream(ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) #4

declare ptr @avcodec_alloc_context3(ptr noundef) #4

declare i32 @avcodec_parameters_to_context(ptr noundef, ptr noundef) #4

declare i32 @avcodec_open2(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #6

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL20resolveChannelLayoutm(ptr dead_on_unwind noalias writable sret(%struct.AVChannelLayout) align 8, i64 noundef) #3

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

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

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

declare ptr @av_audio_fifo_alloc(i32 noundef, i32 noundef, i32 noundef) #4

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #7 = { 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, !6, i64 16}
!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, !14, i64 72, !15, i64 76, !14, i64 80, !14, i64 84, !14, i64 88, !14, i64 92, !16, i64 96, !15, i64 104, !15, i64 105}
!13 = !{!"_ZTSN5musik4core3sdk8IDecoderE"}
!14 = !{!"int", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!12, !6, i64 8}
!18 = !{!14, !14, i64 0}
!19 = !{!12, !14, i64 88}
!20 = !{!12, !6, i64 32}
!21 = !{!22, !6, i64 32}
!22 = !{!"_ZTS15AVFormatContext", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !14, i64 40, !14, i64 44, !6, i64 48, !14, i64 56, !6, i64 64, !14, i64 72, !6, i64 80, !6, i64 88, !23, i64 96, !23, i64 104, !23, i64 112, !14, i64 120, !14, i64 124, !14, i64 128, !23, i64 136, !23, i64 144, !6, i64 152, !14, i64 160, !14, i64 164, !6, i64 168, !24, i64 176, !24, i64 180, !24, i64 184, !24, i64 188, !6, i64 192, !23, i64 200, !14, i64 208, !14, i64 212, !25, i64 216, !14, i64 232, !14, i64 236, !14, i64 240, !14, i64 244, !23, i64 248, !14, i64 256, !14, i64 260, !14, i64 264, !14, i64 268, !14, i64 272, !14, i64 276, !14, i64 280, !14, i64 284, !14, i64 288, !14, i64 292, !14, i64 296, !26, i64 300, !23, i64 304, !14, i64 312, !14, i64 316, !14, i64 320, !14, i64 324, !14, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !14, i64 368, !6, i64 376, !6, i64 384, !6, i64 392, !6, i64 400, !14, i64 408, !6, i64 416, !6, i64 424, !23, i64 432, !6, i64 440, !6, i64 448, !6, i64 456}
!23 = !{!"long", !7, i64 0}
!24 = !{!"_ZTS9AVCodecID", !7, i64 0}
!25 = !{!"_ZTS15AVIOInterruptCB", !6, i64 0, !6, i64 8}
!26 = !{!"_ZTS26AVDurationEstimationMethod", !7, i64 0}
!27 = !{!22, !14, i64 128}
!28 = !{!29, !6, i64 8}
!29 = !{!"_ZTS11AVProbeData", !6, i64 0, !6, i64 8, !14, i64 16, !6, i64 24}
!30 = !{!29, !14, i64 16}
!31 = !{!29, !6, i64 0}
!32 = !{!22, !6, i64 8}
!33 = !{!12, !6, i64 40}
!34 = !{!35, !46, i64 392}
!35 = !{!"_ZTS14AVCodecContext", !6, i64 0, !14, i64 8, !36, i64 12, !6, i64 16, !24, i64 24, !14, i64 28, !6, i64 32, !6, i64 40, !6, i64 48, !23, i64 56, !14, i64 64, !14, i64 68, !6, i64 72, !14, i64 80, !37, i64 84, !37, i64 92, !37, i64 100, !14, i64 108, !14, i64 112, !14, i64 116, !14, i64 120, !14, i64 124, !14, i64 128, !37, i64 132, !38, i64 140, !38, i64 144, !39, i64 148, !40, i64 152, !41, i64 156, !42, i64 160, !43, i64 164, !44, i64 168, !14, i64 172, !14, i64 176, !14, i64 180, !6, i64 184, !6, i64 192, !14, i64 200, !45, i64 204, !45, i64 208, !45, i64 212, !45, i64 216, !45, i64 220, !45, i64 224, !45, i64 228, !45, i64 232, !45, i64 236, !14, i64 240, !14, i64 244, !14, i64 248, !14, i64 252, !14, i64 256, !14, i64 260, !14, i64 264, !14, i64 268, !14, i64 272, !14, i64 276, !14, i64 280, !14, i64 284, !6, i64 288, !6, i64 296, !6, i64 304, !14, i64 312, !14, i64 316, !14, i64 320, !14, i64 324, !14, i64 328, !14, i64 332, !14, i64 336, !14, i64 340, !14, i64 344, !46, i64 348, !47, i64 352, !14, i64 376, !14, i64 380, !14, i64 384, !49, i64 388, !46, i64 392, !14, i64 396, !14, i64 400, !14, i64 404, !6, i64 408, !14, i64 416, !14, i64 420, !14, i64 424, !45, i64 428, !45, i64 432, !14, i64 436, !14, i64 440, !14, i64 444, !14, i64 448, !14, i64 452, !6, i64 456, !23, i64 464, !23, i64 472, !45, i64 480, !45, i64 484, !14, i64 488, !14, i64 492, !6, i64 496, !6, i64 504, !14, i64 512, !14, i64 516, !14, i64 520, !14, i64 524, !14, i64 528, !6, i64 536, !6, i64 544, !6, i64 552, !6, i64 560, !14, i64 568, !14, i64 572, !7, i64 576, !14, i64 640, !14, i64 644, !14, i64 648, !14, i64 652, !14, i64 656, !14, i64 660, !14, i64 664, !6, i64 672, !6, i64 680, !14, i64 688, !14, i64 692, !14, i64 696, !50, i64 700, !50, i64 704, !50, i64 708, !14, i64 712, !14, i64 716, !14, i64 720, !14, i64 724, !6, i64 728, !6, i64 736, !14, i64 744, !14, i64 748, !6, i64 752, !6, i64 760, !6, i64 768, !6, i64 776, !14, i64 784, !14, i64 788, !23, i64 792, !14, i64 800, !14, i64 804, !23, i64 808, !6, i64 816, !23, i64 824, !6, i64 832, !14, i64 840, !6, i64 848, !14, i64 856}
!36 = !{!"_ZTS11AVMediaType", !7, i64 0}
!37 = !{!"_ZTS10AVRational", !14, i64 0, !14, i64 4}
!38 = !{!"_ZTS13AVPixelFormat", !7, i64 0}
!39 = !{!"_ZTS16AVColorPrimaries", !7, i64 0}
!40 = !{!"_ZTS29AVColorTransferCharacteristic", !7, i64 0}
!41 = !{!"_ZTS12AVColorSpace", !7, i64 0}
!42 = !{!"_ZTS12AVColorRange", !7, i64 0}
!43 = !{!"_ZTS16AVChromaLocation", !7, i64 0}
!44 = !{!"_ZTS12AVFieldOrder", !7, i64 0}
!45 = !{!"float", !7, i64 0}
!46 = !{!"_ZTS14AVSampleFormat", !7, i64 0}
!47 = !{!"_ZTS15AVChannelLayout", !48, i64 0, !14, i64 4, !7, i64 8, !6, i64 16}
!48 = !{!"_ZTS14AVChannelOrder", !7, i64 0}
!49 = !{!"_ZTS18AVAudioServiceType", !7, i64 0}
!50 = !{!"_ZTS9AVDiscard", !7, i64 0}
!51 = !{!22, !6, i64 48}
!52 = !{!53, !6, i64 16}
!53 = !{!"_ZTS8AVStream", !6, i64 0, !14, i64 8, !14, i64 12, !6, i64 16, !6, i64 24, !37, i64 32, !23, i64 40, !23, i64 48, !23, i64 56, !14, i64 64, !50, i64 68, !37, i64 72, !6, i64 80, !37, i64 88, !54, i64 96, !6, i64 200, !14, i64 208, !14, i64 212, !37, i64 216, !14, i64 224}
!54 = !{!"_ZTS8AVPacket", !6, i64 0, !23, i64 8, !23, i64 16, !6, i64 24, !14, i64 32, !14, i64 36, !14, i64 40, !6, i64 48, !14, i64 56, !23, i64 64, !23, i64 72, !6, i64 80, !6, i64 88, !37, i64 96}
!55 = !{!56, !6, i64 8}
!56 = !{!"_ZTS7AVCodec", !6, i64 0, !6, i64 8, !36, i64 16, !24, i64 20, !14, i64 24, !7, i64 28, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88}
!57 = !{!35, !14, i64 356}
!58 = !{i64 0, i64 4, !59, i64 4, i64 4, !18, i64 8, i64 8, !60, i64 16, i64 8, !5}
!59 = !{!48, !48, i64 0}
!60 = !{!7, !7, i64 0}
!61 = !{!35, !14, i64 376}
!62 = !{!12, !14, i64 92}
!63 = !{!12, !15, i64 76}
!64 = !{!65, !14, i64 152}
!65 = !{!"_ZTS17AVCodecParameters", !36, i64 0, !24, i64 4, !14, i64 8, !6, i64 16, !14, i64 24, !6, i64 32, !14, i64 40, !14, i64 44, !23, i64 48, !14, i64 56, !14, i64 60, !14, i64 64, !14, i64 68, !14, i64 72, !14, i64 76, !37, i64 80, !37, i64 88, !44, i64 96, !42, i64 100, !39, i64 104, !40, i64 108, !41, i64 112, !43, i64 116, !14, i64 120, !47, i64 128, !14, i64 152, !14, i64 156, !14, i64 160, !14, i64 164, !14, i64 168, !14, i64 172}
!66 = !{!12, !14, i64 80}
!67 = !{!65, !14, i64 132}
!68 = !{!12, !14, i64 84}
!69 = !{!22, !23, i64 104}
!70 = !{!12, !16, i64 96}
!71 = !{!12, !6, i64 24}


; 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::unordered_set" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%struct.AVProbeData = type { ptr, ptr, i32, ptr }
%"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 }
%struct.AVChannelLayout = type { i32, i32, %union.anon.8, ptr }
%union.anon.8 = type { i64 }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }

@_ZL25ignoreInvalidPacketCodecs = external hidden global %"class.std::unordered_set", align 8
@_ZL5debug = external hidden local_unnamed_addr global ptr, align 8
@_ZL3TAG = external hidden local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [39 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #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 #3 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 #3 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL10logAvErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN13FfmpegDecoder4OpenEPN5musik4core3sdk11IDataStreamE(ptr noundef nonnull align 8 dereferenceable(106) %0, ptr noundef %1) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca [32768 x i8], align 16
  %4 = alloca %struct.AVProbeData, 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 %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator.5", align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator.5", align 1
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator.5", align 1
  %15 = alloca %struct.AVChannelLayout, align 8
  %16 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %17 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator.5", align 1
  %20 = load ptr, ptr %1, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 96
  %22 = load ptr, ptr %21, align 8
  %23 = tail call noundef zeroext i1 %22(ptr noundef nonnull align 8 dereferenceable(8) %1)
  br i1 %23, label %24, label %.thread73

24:                                               ; preds = %2
  %25 = getelementptr inbounds i8, ptr %0, i64 16
  %26 = load ptr, ptr %25, align 8, !tbaa !8
  %27 = icmp eq ptr %26, null
  br i1 %27, label %28, label %.thread73

28:                                               ; preds = %24
  %29 = load ptr, ptr @_ZL5debug, align 8, !tbaa !16
  %30 = load ptr, ptr @_ZL3TAG, align 8, !tbaa !16
  %31 = load ptr, ptr %29, align 8, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %31, i64 8
  %33 = load ptr, ptr %32, align 8
  tail call void %33(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef %30, ptr noundef nonnull @.str.4)
  %34 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %34, align 8, !tbaa !17
  %35 = tail call noalias ptr @av_malloc(i64 noundef 4160)
  %36 = tail call ptr @avio_alloc_context(ptr noundef %35, i32 noundef 4160, i32 noundef 0, ptr noundef nonnull %0, ptr noundef nonnull @_ZL12readCallbackPvPhi, ptr noundef nonnull @_ZL13writeCallbackPvPKhi, ptr noundef nonnull @_ZL12seekCallbackPvli)
  store ptr %36, ptr %25, align 8, !tbaa !8
  %.not = icmp eq ptr %36, null
  br i1 %.not, label %.thread73, label %37

37:                                               ; preds = %28
  %38 = getelementptr inbounds i8, ptr %0, i64 88
  store i32 -1, ptr %38, align 8, !tbaa !18
  %39 = tail call ptr @avformat_alloc_context()
  %40 = getelementptr inbounds i8, ptr %0, i64 32
  store ptr %39, ptr %40, align 8, !tbaa !19
  %41 = load ptr, ptr %25, align 8, !tbaa !8
  %42 = getelementptr inbounds i8, ptr %39, i64 32
  store ptr %41, ptr %42, align 8, !tbaa !20
  %43 = getelementptr inbounds i8, ptr %39, i64 128
  store i32 128, ptr %43, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 32768, ptr nonnull %3) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32768) %3, i8 0, i64 32768, i1 false)
  %44 = load ptr, ptr %1, align 8, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %44, i64 64
  %46 = load ptr, ptr %45, align 8
  %47 = call noundef i64 %46(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull %3, i64 noundef 32736)
  %48 = trunc i64 %47 to i32
  %49 = load ptr, ptr %1, align 8, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %49, i64 80
  %51 = load ptr, ptr %50, align 8
  %52 = call noundef zeroext i1 %51(ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  %53 = getelementptr inbounds i8, ptr %4, i64 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %53, i8 0, i64 16, i1 false)
  %54 = getelementptr inbounds i8, ptr %4, i64 8
  store ptr %3, ptr %54, align 8, !tbaa !27
  %55 = getelementptr inbounds i8, ptr %4, i64 16
  store i32 %48, ptr %55, align 8, !tbaa !29
  store ptr @.str.5, ptr %4, align 8, !tbaa !30
  %56 = call ptr @av_probe_input_format(ptr noundef nonnull %4, i32 noundef 1)
  %57 = load ptr, ptr %40, align 8, !tbaa !19
  %58 = getelementptr inbounds i8, ptr %57, i64 8
  store ptr %56, ptr %58, align 8, !tbaa !31
  %.not45 = icmp eq ptr %56, null
  br i1 %.not45, label %.thread69, label %59

59:                                               ; preds = %37
  %60 = call i32 @avformat_open_input(ptr noundef nonnull %40, ptr noundef nonnull @.str.5, ptr noundef null, ptr noundef null)
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %62, label %.thread69

62:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  store ptr null, ptr %5, align 8, !tbaa !16
  %63 = load ptr, ptr %40, align 8, !tbaa !19
  %64 = call i32 @avformat_find_stream_info(ptr noundef %63, ptr noundef null)
  %65 = icmp sgt i32 %64, -1
  br i1 %65, label %66, label %._crit_edge

._crit_edge:                                      ; preds = %62
  %.pre = load i32, ptr %38, align 8, !tbaa !18
  br label %69

66:                                               ; preds = %62
  %67 = load ptr, ptr %40, align 8, !tbaa !19
  %68 = call i32 @av_find_best_stream(ptr noundef %67, i32 noundef 1, i32 noundef -1, i32 noundef -1, ptr noundef nonnull %5, i32 noundef 0)
  store i32 %68, ptr %38, align 8, !tbaa !18
  br label %69

69:                                               ; preds = %._crit_edge, %66
  %70 = phi i32 [ %.pre, %._crit_edge ], [ %68, %66 ]
  %71 = icmp ne i32 %70, -1
  %72 = load ptr, ptr %5, align 8
  %73 = icmp ne ptr %72, null
  %or.cond = select i1 %71, i1 %73, i1 false
  %74 = load ptr, ptr @_ZL5debug, align 8, !tbaa !16
  %75 = load ptr, ptr @_ZL3TAG, align 8, !tbaa !16
  %76 = load ptr, ptr %74, align 8, !tbaa !5
  br i1 %or.cond, label %77, label %199

77:                                               ; preds = %69
  %78 = getelementptr inbounds i8, ptr %76, i64 8
  %79 = load ptr, ptr %78, align 8
  call void %79(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef %75, ptr noundef nonnull @.str.6)
  %80 = load ptr, ptr %5, align 8, !tbaa !16
  %81 = call ptr @avcodec_alloc_context3(ptr noundef %80)
  %82 = getelementptr inbounds i8, ptr %0, i64 40
  store ptr %81, ptr %82, align 8, !tbaa !32
  %.not46 = icmp eq ptr %81, null
  br i1 %.not46, label %168, label %83

83:                                               ; preds = %77
  %84 = getelementptr inbounds i8, ptr %81, i64 392
  store i32 3, ptr %84, align 8, !tbaa !33
  %85 = load ptr, ptr %5, align 8, !tbaa !16
  %.not47 = icmp eq ptr %85, null
  br i1 %.not47, label %143, label %86

86:                                               ; preds = %83
  %87 = load ptr, ptr %40, align 8, !tbaa !19
  %88 = getelementptr inbounds i8, ptr %87, i64 48
  %89 = load ptr, ptr %88, align 8, !tbaa !50
  %90 = load i32, ptr %38, align 8, !tbaa !18
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds ptr, ptr %89, i64 %91
  %93 = load ptr, ptr %92, align 8, !tbaa !16
  %94 = getelementptr inbounds i8, ptr %93, i64 16
  %95 = load ptr, ptr %94, align 8, !tbaa !51
  %96 = call i32 @avcodec_parameters_to_context(ptr noundef nonnull %81, ptr noundef %95)
  %97 = icmp slt i32 %96, 0
  br i1 %97, label %98, label %106

98:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.7, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %99 unwind label %101

99:                                               ; preds = %98
  invoke void @_ZL10logAvErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(32) %6, i32 noundef %96)
          to label %100 unwind label %103

100:                                              ; preds = %99
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  br label %.thread78

101:                                              ; preds = %98
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %105

103:                                              ; preds = %99
  %104 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  br label %105

105:                                              ; preds = %103, %101
  %.pn54 = phi { ptr, i32 } [ %104, %103 ], [ %102, %101 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  br label %202

106:                                              ; preds = %86
  %107 = load ptr, ptr %82, align 8, !tbaa !32
  %108 = load ptr, ptr %5, align 8, !tbaa !16
  %109 = call i32 @avcodec_open2(ptr noundef %107, ptr noundef %108, ptr noundef null)
  %110 = icmp slt i32 %109, 0
  br i1 %110, label %111, label %119

111:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.8, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %112 unwind label %114

112:                                              ; preds = %111
  invoke void @_ZL10logAvErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef %109)
          to label %113 unwind label %116

113:                                              ; preds = %112
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  br label %.thread78

114:                                              ; preds = %111
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %118

116:                                              ; preds = %112
  %117 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  br label %118

118:                                              ; preds = %116, %114
  %.pn52 = phi { ptr, i32 } [ %117, %116 ], [ %115, %114 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  br label %202

119:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull @.str.9, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %120 unwind label %132

120:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #7
  %121 = load ptr, ptr %5, align 8, !tbaa !16
  %122 = getelementptr inbounds i8, ptr %121, i64 8
  %123 = load ptr, ptr %122, align 8, !tbaa !54
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef %123, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %124 unwind label %134

124:                                              ; preds = %120
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %125 unwind label %136

125:                                              ; preds = %124
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  %126 = load ptr, ptr @_ZL5debug, align 8, !tbaa !16
  %127 = load ptr, ptr @_ZL3TAG, align 8, !tbaa !16
  %128 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  %129 = load ptr, ptr %126, align 8, !tbaa !5
  %130 = getelementptr inbounds i8, ptr %129, i64 8
  %131 = load ptr, ptr %130, align 8
  invoke void %131(ptr noundef nonnull align 8 dereferenceable(8) %126, ptr noundef %127, ptr noundef %128)
          to label %149 unwind label %140

132:                                              ; preds = %119
  %133 = landingpad { ptr, i32 }
          cleanup
  br label %139

134:                                              ; preds = %120
  %135 = landingpad { ptr, i32 }
          cleanup
  br label %138

136:                                              ; preds = %124
  %137 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  br label %138

138:                                              ; preds = %136, %134
  %.pn = phi { ptr, i32 } [ %137, %136 ], [ %135, %134 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %139

139:                                              ; preds = %138, %132
  %.pn.pn = phi { ptr, i32 } [ %.pn, %138 ], [ %133, %132 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  br label %142

140:                                              ; preds = %125
  %141 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  br label %142

142:                                              ; preds = %140, %139
  %.pn50 = phi { ptr, i32 } [ %141, %140 ], [ %.pn.pn, %139 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  br label %202

143:                                              ; preds = %83
  %144 = load ptr, ptr @_ZL5debug, align 8, !tbaa !16
  %145 = load ptr, ptr @_ZL3TAG, align 8, !tbaa !16
  %146 = load ptr, ptr %144, align 8, !tbaa !5
  %147 = getelementptr inbounds i8, ptr %146, i64 24
  %148 = load ptr, ptr %147, align 8
  call void %148(ptr noundef nonnull align 8 dereferenceable(8) %144, ptr noundef %145, ptr noundef nonnull @.str.10)
  br label %.thread78

149:                                              ; preds = %125
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  %150 = load ptr, ptr %82, align 8, !tbaa !32
  %151 = getelementptr inbounds i8, ptr %150, i64 356
  %152 = load i32, ptr %151, align 4, !tbaa !56
  %153 = icmp eq i32 %152, 0
  br i1 %153, label %154, label %157

154:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #7
  call void @_ZL20resolveChannelLayoutm(ptr dead_on_unwind nonnull writable sret(%struct.AVChannelLayout) align 8 %15, i64 noundef 0)
  %155 = load ptr, ptr %82, align 8, !tbaa !32
  %156 = getelementptr inbounds i8, ptr %155, i64 352
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %156, ptr noundef nonnull align 8 dereferenceable(24) %15, i64 24, i1 false), !tbaa.struct !57
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #7
  %.pre82 = load ptr, ptr %82, align 8, !tbaa !32
  br label %157

157:                                              ; preds = %154, %149
  %158 = phi ptr [ %.pre82, %154 ], [ %150, %149 ]
  %159 = getelementptr inbounds i8, ptr %158, i64 376
  %160 = load i32, ptr %159, align 8, !tbaa !61
  %.not57 = icmp eq i32 %160, 0
  %spec.select = select i1 %.not57, i32 4096, i32 %160
  %161 = getelementptr inbounds i8, ptr %0, i64 92
  store i32 %spec.select, ptr %161, align 4, !tbaa !62
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #7
  %162 = getelementptr inbounds i8, ptr %158, i64 24
  %163 = call ptr @_ZNSt13unordered_setI9AVCodecIDSt4hashIS0_ESt8equal_toIS0_ESaIS0_EE4findERKS0_(ptr noundef nonnull align 8 dereferenceable(56) @_ZL25ignoreInvalidPacketCodecs, ptr noundef nonnull align 4 dereferenceable(4) %162)
  store ptr %163, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %164 = call ptr @_ZNSt13unordered_setI9AVCodecIDSt4hashIS0_ESt8equal_toIS0_ESaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(56) @_ZL25ignoreInvalidPacketCodecs) #7
  store ptr %164, ptr %17, align 8
  %165 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseI9AVCodecIDLb0EEES4_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  %166 = getelementptr inbounds i8, ptr %0, i64 76
  %167 = zext i1 %165 to i8
  store i8 %167, ptr %166, align 4, !tbaa !63
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  br label %168

168:                                              ; preds = %157, %77
  %169 = load ptr, ptr %40, align 8, !tbaa !19
  %170 = getelementptr inbounds i8, ptr %169, i64 48
  %171 = load ptr, ptr %170, align 8, !tbaa !50
  %172 = load i32, ptr %38, align 8, !tbaa !18
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds ptr, ptr %171, i64 %173
  %175 = load ptr, ptr %174, align 8, !tbaa !16
  %176 = getelementptr inbounds i8, ptr %175, i64 16
  %177 = load ptr, ptr %176, align 8, !tbaa !51
  %178 = getelementptr inbounds i8, ptr %177, i64 152
  %179 = load i32, ptr %178, align 8, !tbaa !64
  %180 = getelementptr inbounds i8, ptr %0, i64 80
  store i32 %179, ptr %180, align 8, !tbaa !66
  %181 = getelementptr inbounds i8, ptr %177, i64 132
  %182 = load i32, ptr %181, align 4, !tbaa !67
  %183 = getelementptr inbounds i8, ptr %0, i64 84
  store i32 %182, ptr %183, align 4, !tbaa !68
  %184 = getelementptr inbounds i8, ptr %169, i64 104
  %185 = load i64, ptr %184, align 8, !tbaa !69
  %186 = sitofp i64 %185 to double
  %187 = fdiv double %186, 1.000000e+06
  %188 = getelementptr inbounds i8, ptr %0, i64 96
  store double %187, ptr %188, align 8, !tbaa !70
  %189 = call ptr @av_audio_fifo_alloc(i32 noundef 3, i32 noundef %182, i32 noundef 1)
  %190 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %189, ptr %190, align 8, !tbaa !71
  %.not58 = icmp eq ptr %189, null
  br i1 %.not58, label %191, label %203

191:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %19) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %192 unwind label %194

192:                                              ; preds = %191
  invoke void @_ZL8logErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %193 unwind label %196

193:                                              ; preds = %192
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %18) #7
  br label %.thread78

194:                                              ; preds = %191
  %195 = landingpad { ptr, i32 }
          cleanup
  br label %198

196:                                              ; preds = %192
  %197 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  br label %198

198:                                              ; preds = %196, %194
  %.pn59 = phi { ptr, i32 } [ %197, %196 ], [ %195, %194 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %18) #7
  br label %202

199:                                              ; preds = %69
  %200 = getelementptr inbounds i8, ptr %76, i64 24
  %201 = load ptr, ptr %200, align 8
  call void %201(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef %75, ptr noundef nonnull @.str.12)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %.thread69

202:                                              ; preds = %105, %118, %142, %198
  %.pn59.pn = phi { ptr, i32 } [ %.pn59, %198 ], [ %.pn54, %105 ], [ %.pn52, %118 ], [ %.pn50, %142 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 32768, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn59.pn

.thread69:                                        ; preds = %199, %59, %37
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 32768, ptr nonnull %3) #7
  br label %.thread73

.thread78:                                        ; preds = %193, %143, %100, %113
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 32768, ptr nonnull %3) #7
  br label %.thread73

203:                                              ; preds = %168
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 32768, ptr nonnull %3) #7
  br label %209

.thread73:                                        ; preds = %28, %.thread69, %.thread78, %2, %24
  %204 = load ptr, ptr @_ZL5debug, align 8, !tbaa !16
  %205 = load ptr, ptr @_ZL3TAG, align 8, !tbaa !16
  %206 = load ptr, ptr %204, align 8, !tbaa !5
  %207 = getelementptr inbounds i8, ptr %206, i64 24
  %208 = load ptr, ptr %207, align 8
  call void %208(ptr noundef nonnull align 8 dereferenceable(8) %204, ptr noundef %205, ptr noundef nonnull @.str.13)
  call void @_ZN13FfmpegDecoder5ResetEv(ptr noundef nonnull align 8 dereferenceable(106) %0)
  br label %209

209:                                              ; preds = %203, %.thread73
  %.6 = phi i1 [ true, %203 ], [ false, %.thread73 ]
  ret i1 %.6
}

declare noalias ptr @av_malloc(i64 noundef) local_unnamed_addr #4

declare ptr @avio_alloc_context(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL12readCallbackPvPhi(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL13writeCallbackPvPKhi(ptr noundef, ptr noundef, i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZL12seekCallbackPvli(ptr noundef, i64 noundef, i32 noundef) #1

declare ptr @avformat_alloc_context() local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

declare ptr @av_probe_input_format(ptr noundef, i32 noundef) local_unnamed_addr #4

declare i32 @avformat_open_input(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @avformat_find_stream_info(ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @av_find_best_stream(ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

declare ptr @avcodec_alloc_context3(ptr noundef) local_unnamed_addr #4

declare i32 @avcodec_parameters_to_context(ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @avcodec_open2(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #6

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL20resolveChannelLayoutm(ptr dead_on_unwind noalias writable sret(%struct.AVChannelLayout) align 8, i64 noundef) local_unnamed_addr #3

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

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

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

declare ptr @av_audio_fifo_alloc(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { "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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #7 = { 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, !11, i64 16}
!9 = !{!"_ZTS13FfmpegDecoder", !10, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !13, i64 72, !14, i64 76, !13, i64 80, !13, i64 84, !13, i64 88, !13, i64 92, !15, i64 96, !14, i64 104, !14, i64 105}
!10 = !{!"_ZTSN5musik4core3sdk8IDecoderE"}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !7, i64 0}
!13 = !{!"int", !12, i64 0}
!14 = !{!"bool", !12, i64 0}
!15 = !{!"double", !12, i64 0}
!16 = !{!11, !11, i64 0}
!17 = !{!9, !11, i64 8}
!18 = !{!9, !13, i64 88}
!19 = !{!9, !11, i64 32}
!20 = !{!21, !11, i64 32}
!21 = !{!"_ZTS15AVFormatContext", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !13, i64 40, !13, i64 44, !11, i64 48, !13, i64 56, !11, i64 64, !13, i64 72, !11, i64 80, !11, i64 88, !22, i64 96, !22, i64 104, !22, i64 112, !13, i64 120, !13, i64 124, !13, i64 128, !22, i64 136, !22, i64 144, !11, i64 152, !13, i64 160, !13, i64 164, !11, i64 168, !23, i64 176, !23, i64 180, !23, i64 184, !23, i64 188, !11, i64 192, !22, i64 200, !13, i64 208, !13, i64 212, !24, i64 216, !13, i64 232, !13, i64 236, !13, i64 240, !13, i64 244, !22, i64 248, !13, i64 256, !13, i64 260, !13, i64 264, !13, i64 268, !13, i64 272, !13, i64 276, !13, i64 280, !13, i64 284, !13, i64 288, !13, i64 292, !13, i64 296, !25, i64 300, !22, i64 304, !13, i64 312, !13, i64 316, !13, i64 320, !13, i64 324, !13, i64 328, !11, i64 336, !11, i64 344, !11, i64 352, !11, i64 360, !13, i64 368, !11, i64 376, !11, i64 384, !11, i64 392, !11, i64 400, !13, i64 408, !11, i64 416, !11, i64 424, !22, i64 432, !11, i64 440, !11, i64 448, !11, i64 456}
!22 = !{!"long", !12, i64 0}
!23 = !{!"_ZTS9AVCodecID", !12, i64 0}
!24 = !{!"_ZTS15AVIOInterruptCB", !11, i64 0, !11, i64 8}
!25 = !{!"_ZTS26AVDurationEstimationMethod", !12, i64 0}
!26 = !{!21, !13, i64 128}
!27 = !{!28, !11, i64 8}
!28 = !{!"_ZTS11AVProbeData", !11, i64 0, !11, i64 8, !13, i64 16, !11, i64 24}
!29 = !{!28, !13, i64 16}
!30 = !{!28, !11, i64 0}
!31 = !{!21, !11, i64 8}
!32 = !{!9, !11, i64 40}
!33 = !{!34, !45, i64 392}
!34 = !{!"_ZTS14AVCodecContext", !11, i64 0, !13, i64 8, !35, i64 12, !11, i64 16, !23, i64 24, !13, i64 28, !11, i64 32, !11, i64 40, !11, i64 48, !22, i64 56, !13, i64 64, !13, i64 68, !11, i64 72, !13, i64 80, !36, i64 84, !36, i64 92, !36, i64 100, !13, i64 108, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124, !13, i64 128, !36, i64 132, !37, i64 140, !37, i64 144, !38, i64 148, !39, i64 152, !40, i64 156, !41, i64 160, !42, i64 164, !43, i64 168, !13, i64 172, !13, i64 176, !13, i64 180, !11, i64 184, !11, i64 192, !13, i64 200, !44, i64 204, !44, i64 208, !44, i64 212, !44, i64 216, !44, i64 220, !44, i64 224, !44, i64 228, !44, i64 232, !44, i64 236, !13, i64 240, !13, i64 244, !13, i64 248, !13, i64 252, !13, i64 256, !13, i64 260, !13, i64 264, !13, i64 268, !13, i64 272, !13, i64 276, !13, i64 280, !13, i64 284, !11, i64 288, !11, i64 296, !11, i64 304, !13, i64 312, !13, i64 316, !13, i64 320, !13, i64 324, !13, i64 328, !13, i64 332, !13, i64 336, !13, i64 340, !13, i64 344, !45, i64 348, !46, i64 352, !13, i64 376, !13, i64 380, !13, i64 384, !48, i64 388, !45, i64 392, !13, i64 396, !13, i64 400, !13, i64 404, !11, i64 408, !13, i64 416, !13, i64 420, !13, i64 424, !44, i64 428, !44, i64 432, !13, i64 436, !13, i64 440, !13, i64 444, !13, i64 448, !13, i64 452, !11, i64 456, !22, i64 464, !22, i64 472, !44, i64 480, !44, i64 484, !13, i64 488, !13, i64 492, !11, i64 496, !11, i64 504, !13, i64 512, !13, i64 516, !13, i64 520, !13, i64 524, !13, i64 528, !11, i64 536, !11, i64 544, !11, i64 552, !11, i64 560, !13, i64 568, !13, i64 572, !12, i64 576, !13, i64 640, !13, i64 644, !13, i64 648, !13, i64 652, !13, i64 656, !13, i64 660, !13, i64 664, !11, i64 672, !11, i64 680, !13, i64 688, !13, i64 692, !13, i64 696, !49, i64 700, !49, i64 704, !49, i64 708, !13, i64 712, !13, i64 716, !13, i64 720, !13, i64 724, !11, i64 728, !11, i64 736, !13, i64 744, !13, i64 748, !11, i64 752, !11, i64 760, !11, i64 768, !11, i64 776, !13, i64 784, !13, i64 788, !22, i64 792, !13, i64 800, !13, i64 804, !22, i64 808, !11, i64 816, !22, i64 824, !11, i64 832, !13, i64 840, !11, i64 848, !13, i64 856}
!35 = !{!"_ZTS11AVMediaType", !12, i64 0}
!36 = !{!"_ZTS10AVRational", !13, i64 0, !13, i64 4}
!37 = !{!"_ZTS13AVPixelFormat", !12, i64 0}
!38 = !{!"_ZTS16AVColorPrimaries", !12, i64 0}
!39 = !{!"_ZTS29AVColorTransferCharacteristic", !12, i64 0}
!40 = !{!"_ZTS12AVColorSpace", !12, i64 0}
!41 = !{!"_ZTS12AVColorRange", !12, i64 0}
!42 = !{!"_ZTS16AVChromaLocation", !12, i64 0}
!43 = !{!"_ZTS12AVFieldOrder", !12, i64 0}
!44 = !{!"float", !12, i64 0}
!45 = !{!"_ZTS14AVSampleFormat", !12, i64 0}
!46 = !{!"_ZTS15AVChannelLayout", !47, i64 0, !13, i64 4, !12, i64 8, !11, i64 16}
!47 = !{!"_ZTS14AVChannelOrder", !12, i64 0}
!48 = !{!"_ZTS18AVAudioServiceType", !12, i64 0}
!49 = !{!"_ZTS9AVDiscard", !12, i64 0}
!50 = !{!21, !11, i64 48}
!51 = !{!52, !11, i64 16}
!52 = !{!"_ZTS8AVStream", !11, i64 0, !13, i64 8, !13, i64 12, !11, i64 16, !11, i64 24, !36, i64 32, !22, i64 40, !22, i64 48, !22, i64 56, !13, i64 64, !49, i64 68, !36, i64 72, !11, i64 80, !36, i64 88, !53, i64 96, !11, i64 200, !13, i64 208, !13, i64 212, !36, i64 216, !13, i64 224}
!53 = !{!"_ZTS8AVPacket", !11, i64 0, !22, i64 8, !22, i64 16, !11, i64 24, !13, i64 32, !13, i64 36, !13, i64 40, !11, i64 48, !13, i64 56, !22, i64 64, !22, i64 72, !11, i64 80, !11, i64 88, !36, i64 96}
!54 = !{!55, !11, i64 8}
!55 = !{!"_ZTS7AVCodec", !11, i64 0, !11, i64 8, !35, i64 16, !23, i64 20, !13, i64 24, !12, i64 28, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88}
!56 = !{!34, !13, i64 356}
!57 = !{i64 0, i64 4, !58, i64 4, i64 4, !59, i64 8, i64 8, !60, i64 16, i64 8, !16}
!58 = !{!47, !47, i64 0}
!59 = !{!13, !13, i64 0}
!60 = !{!12, !12, i64 0}
!61 = !{!34, !13, i64 376}
!62 = !{!9, !13, i64 92}
!63 = !{!9, !14, i64 76}
!64 = !{!65, !13, i64 152}
!65 = !{!"_ZTS17AVCodecParameters", !35, i64 0, !23, i64 4, !13, i64 8, !11, i64 16, !13, i64 24, !11, i64 32, !13, i64 40, !13, i64 44, !22, i64 48, !13, i64 56, !13, i64 60, !13, i64 64, !13, i64 68, !13, i64 72, !13, i64 76, !36, i64 80, !36, i64 88, !43, i64 96, !41, i64 100, !38, i64 104, !39, i64 108, !40, i64 112, !42, i64 116, !13, i64 120, !46, i64 128, !13, i64 152, !13, i64 156, !13, i64 160, !13, i64 164, !13, i64 168, !13, i64 172}
!66 = !{!9, !13, i64 80}
!67 = !{!65, !13, i64 132}
!68 = !{!9, !13, i64 84}
!69 = !{!21, !22, i64 104}
!70 = !{!9, !15, i64 96}
!71 = !{!9, !11, i64 24}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass