; LLVM IR from merpheus-dev/LavaEngine :: src/Utils/soloud/src/audiosource/wav (dr_impl)

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

%struct.drmp3_allocation_callbacks = type { ptr, ptr, ptr, ptr }
%struct.drmp3_config = type { i32, i32 }
%struct.drmp3 = type { %struct.drmp3dec, %struct.drmp3dec_frame_info, i32, i32, ptr, ptr, ptr, %struct.drmp3_allocation_callbacks, i32, i32, i32, i32, [9216 x i8], i64, i64, %struct.drmp3_src, ptr, i32, i64, i64, ptr, i8, %struct.anon.0 }
%struct.drmp3dec = type { [2 x [288 x float]], [960 x float], i32, i32, [4 x i8], [511 x i8] }
%struct.drmp3dec_frame_info = type { i32, i32, i32, i32, i32 }
%struct.drmp3_src = type { %struct.drmp3_src_config, ptr, ptr, [256 x float], %struct.drmp3_src_cache, %union.anon }
%struct.drmp3_src_config = type { i32, i32, i32, i32, i32 }
%struct.drmp3_src_cache = type { ptr, [1024 x float], i32, i32 }
%union.anon = type { %struct.anon }
%struct.anon = type { double, i8 }
%struct.anon.0 = type { ptr, i64, i64 }

@.str.1 = external hidden unnamed_addr constant [103 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [15 x i8], align 1
@__PRETTY_FUNCTION__._Z19drmp3_init_internalP5drmp3PFmPvS1_mEPFjS1_i17drmp3_seek_originES1_PK12drmp3_configPK26drmp3_allocation_callbacks = external hidden unnamed_addr constant [142 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @drmp3dec_init(ptr noundef) #0

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z43drmp3_copy_allocation_callbacks_or_defaultsPK26drmp3_allocation_callbacks(ptr dead_on_unwind noalias writable sret(%struct.drmp3_allocation_callbacks) align 8, ptr noundef) #0

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z19drmp3_init_internalP5drmp3PFmPvS1_mEPFjS1_i17drmp3_seek_originES1_PK12drmp3_configPK26drmp3_allocation_callbacks(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #5 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %struct.drmp3_config, align 4
  %15 = alloca %struct.drmp3_allocation_callbacks, align 8
  %16 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  %18 = icmp ne ptr %17, null
  br i1 %18, label %19, label %20

19:                                               ; preds = %6
  br label %22

20:                                               ; preds = %6
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 3027, ptr noundef @__PRETTY_FUNCTION__._Z19drmp3_init_internalP5drmp3PFmPvS1_mEPFjS1_i17drmp3_seek_originES1_PK12drmp3_configPK26drmp3_allocation_callbacks) #7
  unreachable

21:                                               ; No predecessors!
  br label %22

22:                                               ; preds = %21, %19
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %26

25:                                               ; preds = %22
  br label %28

26:                                               ; preds = %22
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 3028, ptr noundef @__PRETTY_FUNCTION__._Z19drmp3_init_internalP5drmp3PFmPvS1_mEPFjS1_i17drmp3_seek_originES1_PK12drmp3_configPK26drmp3_allocation_callbacks) #7
  unreachable

27:                                               ; No predecessors!
  br label %28

28:                                               ; preds = %27, %25
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.drmp3, ptr %29, i32 0, i32 0
  call void @drmp3dec_init(ptr noundef %30)
  %31 = load ptr, ptr %12, align 8, !tbaa !5
  %32 = icmp ne ptr %31, null
  br i1 %32, label %33, label %35

33:                                               ; preds = %28
  %34 = load ptr, ptr %12, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %34, i64 8, i1 false), !tbaa.struct !9
  br label %36

35:                                               ; preds = %28
  call void @llvm.memset.p0.i64(ptr align 4 %14, i8 0, i64 8, i1 false)
  br label %36

36:                                               ; preds = %35, %33
  %37 = getelementptr inbounds %struct.drmp3_config, ptr %14, i32 0, i32 0
  %38 = load i32, ptr %37, align 4, !tbaa !12
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.drmp3, ptr %39, i32 0, i32 2
  store i32 %38, ptr %40, align 8, !tbaa !14
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.drmp3, ptr %41, i32 0, i32 2
  %43 = load i32, ptr %42, align 8, !tbaa !14
  %44 = icmp ugt i32 %43, 2
  br i1 %44, label %45, label %48

45:                                               ; preds = %36
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.drmp3, ptr %46, i32 0, i32 2
  store i32 2, ptr %47, align 8, !tbaa !14
  br label %48

48:                                               ; preds = %45, %36
  %49 = getelementptr inbounds %struct.drmp3_config, ptr %14, i32 0, i32 1
  %50 = load i32, ptr %49, align 4, !tbaa !25
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.drmp3, ptr %51, i32 0, i32 3
  store i32 %50, ptr %52, align 4, !tbaa !26
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.drmp3, ptr %54, i32 0, i32 4
  store ptr %53, ptr %55, align 8, !tbaa !27
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.drmp3, ptr %57, i32 0, i32 5
  store ptr %56, ptr %58, align 8, !tbaa !28
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.drmp3, ptr %60, i32 0, i32 6
  store ptr %59, ptr %61, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #6
  %62 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_Z43drmp3_copy_allocation_callbacks_or_defaultsPK26drmp3_allocation_callbacks(ptr dead_on_unwind writable sret(%struct.drmp3_allocation_callbacks) align 8 %15, ptr noundef %62)
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.drmp3, ptr %63, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %64, ptr align 8 %15, i64 32, i1 false), !tbaa.struct !30
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.drmp3, ptr %65, i32 0, i32 7
  %67 = getelementptr inbounds %struct.drmp3_allocation_callbacks, ptr %66, i32 0, i32 3
  %68 = load ptr, ptr %67, align 8, !tbaa !31
  %69 = icmp eq ptr %68, null
  br i1 %69, label %82, label %70

70:                                               ; preds = %48
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.drmp3, ptr %71, i32 0, i32 7
  %73 = getelementptr inbounds %struct.drmp3_allocation_callbacks, ptr %72, i32 0, i32 1
  %74 = load ptr, ptr %73, align 8, !tbaa !32
  %75 = icmp eq ptr %74, null
  br i1 %75, label %76, label %83

76:                                               ; preds = %70
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.drmp3, ptr %77, i32 0, i32 7
  %79 = getelementptr inbounds %struct.drmp3_allocation_callbacks, ptr %78, i32 0, i32 2
  %80 = load ptr, ptr %79, align 8, !tbaa !33
  %81 = icmp eq ptr %80, null
  br i1 %81, label %82, label %83

82:                                               ; preds = %76, %48
  store i32 0, ptr %7, align 4
  store i32 1, ptr %16, align 4
  br label %103

83:                                               ; preds = %76, %70
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.drmp3, ptr %84, i32 0, i32 2
  %86 = load i32, ptr %85, align 8, !tbaa !14
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %88, label %96

88:                                               ; preds = %83
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.drmp3, ptr %89, i32 0, i32 3
  %91 = load i32, ptr %90, align 4, !tbaa !26
  %92 = icmp ne i32 %91, 0
  br i1 %92, label %93, label %96

93:                                               ; preds = %88
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  %95 = call noundef i32 @_ZL14drmp3_init_srcP5drmp3(ptr noundef %94)
  br label %96

96:                                               ; preds = %93, %88, %83
  %97 = load ptr, ptr %8, align 8, !tbaa !5
  %98 = call noundef i32 @_ZL23drmp3_decode_next_frameP5drmp3(ptr noundef %97)
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %102, label %100

100:                                              ; preds = %96
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  call void @drmp3_uninit(ptr noundef %101)
  store i32 0, ptr %7, align 4
  store i32 1, ptr %16, align 4
  br label %103

102:                                              ; preds = %96
  store i32 1, ptr %7, align 4
  store i32 1, ptr %16, align 4
  br label %103

103:                                              ; preds = %102, %100, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  %104 = load i32, ptr %7, align 4
  ret i32 %104
}

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL14drmp3_init_srcP5drmp3(ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL23drmp3_decode_next_frameP5drmp3(ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @drmp3_uninit(ptr noundef) #5

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { noreturn 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 = !{i64 0, i64 4, !10, i64 4, i64 4, !10}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !11, i64 0}
!13 = !{!"_ZTS12drmp3_config", !11, i64 0, !11, i64 4}
!14 = !{!15, !11, i64 6688}
!15 = !{!"_ZTS5drmp3", !16, i64 0, !17, i64 6668, !11, i64 6688, !11, i64 6692, !6, i64 6696, !6, i64 6704, !6, i64 6712, !18, i64 6720, !11, i64 6752, !11, i64 6756, !11, i64 6760, !11, i64 6764, !7, i64 6768, !19, i64 15984, !19, i64 15992, !20, i64 16000, !6, i64 21192, !11, i64 21200, !19, i64 21208, !19, i64 21216, !6, i64 21224, !11, i64 21232, !24, i64 21240}
!16 = !{!"_ZTS8drmp3dec", !7, i64 0, !7, i64 2304, !11, i64 6144, !11, i64 6148, !7, i64 6152, !7, i64 6156}
!17 = !{!"_ZTS19drmp3dec_frame_info", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16}
!18 = !{!"_ZTS26drmp3_allocation_callbacks", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!19 = !{!"long", !7, i64 0}
!20 = !{!"_ZTS9drmp3_src", !21, i64 0, !6, i64 24, !6, i64 32, !7, i64 40, !23, i64 1064, !7, i64 5176}
!21 = !{!"_ZTS16drmp3_src_config", !11, i64 0, !11, i64 4, !11, i64 8, !22, i64 12, !11, i64 16}
!22 = !{!"_ZTS19drmp3_src_algorithm", !7, i64 0}
!23 = !{!"_ZTS15drmp3_src_cache", !6, i64 0, !7, i64 8, !11, i64 4104, !11, i64 4108}
!24 = !{!"_ZTSN5drmp3Ut_E", !6, i64 0, !19, i64 8, !19, i64 16}
!25 = !{!13, !11, i64 4}
!26 = !{!15, !11, i64 6692}
!27 = !{!15, !6, i64 6696}
!28 = !{!15, !6, i64 6704}
!29 = !{!15, !6, i64 6712}
!30 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !5}
!31 = !{!15, !6, i64 6744}
!32 = !{!15, !6, i64 6728}
!33 = !{!15, !6, i64 6736}


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

%struct.drmp3_allocation_callbacks = type { ptr, ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [103 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [15 x i8], align 1
@__PRETTY_FUNCTION__._Z19drmp3_init_internalP5drmp3PFmPvS1_mEPFjS1_i17drmp3_seek_originES1_PK12drmp3_configPK26drmp3_allocation_callbacks = external hidden unnamed_addr constant [142 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @drmp3dec_init(ptr noundef) local_unnamed_addr #0

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

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z43drmp3_copy_allocation_callbacks_or_defaultsPK26drmp3_allocation_callbacks(ptr dead_on_unwind noalias writable sret(%struct.drmp3_allocation_callbacks) align 8, ptr noundef) local_unnamed_addr #0

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_Z19drmp3_init_internalP5drmp3PFmPvS1_mEPFjS1_i17drmp3_seek_originES1_PK12drmp3_configPK26drmp3_allocation_callbacks(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef readonly %4, ptr noundef %5) local_unnamed_addr #4 {
  %7 = alloca %struct.drmp3_allocation_callbacks, align 8
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %8, label %9

8:                                                ; preds = %6
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 3027, ptr noundef nonnull @__PRETTY_FUNCTION__._Z19drmp3_init_internalP5drmp3PFmPvS1_mEPFjS1_i17drmp3_seek_originES1_PK12drmp3_configPK26drmp3_allocation_callbacks) #6
  unreachable

9:                                                ; preds = %6
  %.not28 = icmp eq ptr %1, null
  br i1 %.not28, label %10, label %11

10:                                               ; preds = %9
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, i32 noundef 3028, ptr noundef nonnull @__PRETTY_FUNCTION__._Z19drmp3_init_internalP5drmp3PFmPvS1_mEPFjS1_i17drmp3_seek_originES1_PK12drmp3_configPK26drmp3_allocation_callbacks) #6
  unreachable

11:                                               ; preds = %9
  tail call void @drmp3dec_init(ptr noundef nonnull %0)
  %.not29 = icmp eq ptr %4, null
  br i1 %.not29, label %.thread, label %12

12:                                               ; preds = %11
  %.sroa.0.0.copyload = load i32, ptr %4, align 4, !tbaa !5
  %.sroa.0.0.copyload.fr = freeze i32 %.sroa.0.0.copyload
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 4
  %.sroa.5.0.copyload = load i32, ptr %.sroa.5.0..sroa_idx, align 4, !tbaa !5
  %spec.select = tail call i32 @llvm.umin.i32(i32 %.sroa.0.0.copyload.fr, i32 2)
  br label %.thread

.thread:                                          ; preds = %11, %12
  %.sroa.5.036 = phi i32 [ %.sroa.5.0.copyload, %12 ], [ 0, %11 ]
  %13 = phi i32 [ %spec.select, %12 ], [ 0, %11 ]
  %14 = getelementptr inbounds i8, ptr %0, i64 6688
  store i32 %13, ptr %14, align 8, !tbaa !9
  %15 = getelementptr inbounds i8, ptr %0, i64 6692
  store i32 %.sroa.5.036, ptr %15, align 4, !tbaa !21
  %16 = getelementptr inbounds i8, ptr %0, i64 6696
  store ptr %1, ptr %16, align 8, !tbaa !22
  %17 = getelementptr inbounds i8, ptr %0, i64 6704
  store ptr %2, ptr %17, align 8, !tbaa !23
  %18 = getelementptr inbounds i8, ptr %0, i64 6712
  store ptr %3, ptr %18, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  call void @_Z43drmp3_copy_allocation_callbacks_or_defaultsPK26drmp3_allocation_callbacks(ptr dead_on_unwind nonnull writable sret(%struct.drmp3_allocation_callbacks) align 8 %7, ptr noundef %5)
  %19 = getelementptr inbounds i8, ptr %0, i64 6720
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %7, i64 32, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  %20 = getelementptr inbounds i8, ptr %0, i64 6744
  %21 = load ptr, ptr %20, align 8, !tbaa !27
  %22 = icmp eq ptr %21, null
  br i1 %22, label %40, label %23

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

27:                                               ; preds = %23
  %28 = getelementptr inbounds i8, ptr %0, i64 6736
  %29 = load ptr, ptr %28, align 8, !tbaa !29
  %30 = icmp eq ptr %29, null
  br i1 %30, label %40, label %31

31:                                               ; preds = %27, %23
  %32 = load i32, ptr %14, align 8, !tbaa !9
  %.not30 = icmp eq i32 %32, 0
  br i1 %.not30, label %37, label %33

33:                                               ; preds = %31
  %34 = load i32, ptr %15, align 4, !tbaa !21
  %.not31 = icmp eq i32 %34, 0
  br i1 %.not31, label %37, label %35

35:                                               ; preds = %33
  %36 = call noundef i32 @_ZL14drmp3_init_srcP5drmp3(ptr noundef nonnull %0)
  br label %37

37:                                               ; preds = %35, %33, %31
  %38 = call noundef i32 @_ZL23drmp3_decode_next_frameP5drmp3(ptr noundef nonnull %0)
  %.not32 = icmp eq i32 %38, 0
  br i1 %.not32, label %39, label %40

39:                                               ; preds = %37
  call void @drmp3_uninit(ptr noundef nonnull %0)
  br label %40

40:                                               ; preds = %37, %.thread, %27, %39
  %.0 = phi i32 [ 0, %39 ], [ 0, %27 ], [ 0, %.thread ], [ 1, %37 ]
  ret i32 %.0
}

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL14drmp3_init_srcP5drmp3(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL23drmp3_decode_next_frameP5drmp3(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @drmp3_uninit(ptr noundef) local_unnamed_addr #4

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { noreturn nounwind }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 6688}
!10 = !{!"_ZTS5drmp3", !11, i64 0, !12, i64 6668, !6, i64 6688, !6, i64 6692, !13, i64 6696, !13, i64 6704, !13, i64 6712, !14, i64 6720, !6, i64 6752, !6, i64 6756, !6, i64 6760, !6, i64 6764, !7, i64 6768, !15, i64 15984, !15, i64 15992, !16, i64 16000, !13, i64 21192, !6, i64 21200, !15, i64 21208, !15, i64 21216, !13, i64 21224, !6, i64 21232, !20, i64 21240}
!11 = !{!"_ZTS8drmp3dec", !7, i64 0, !7, i64 2304, !6, i64 6144, !6, i64 6148, !7, i64 6152, !7, i64 6156}
!12 = !{!"_ZTS19drmp3dec_frame_info", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"_ZTS26drmp3_allocation_callbacks", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTS9drmp3_src", !17, i64 0, !13, i64 24, !13, i64 32, !7, i64 40, !19, i64 1064, !7, i64 5176}
!17 = !{!"_ZTS16drmp3_src_config", !6, i64 0, !6, i64 4, !6, i64 8, !18, i64 12, !6, i64 16}
!18 = !{!"_ZTS19drmp3_src_algorithm", !7, i64 0}
!19 = !{!"_ZTS15drmp3_src_cache", !13, i64 0, !7, i64 8, !6, i64 4104, !6, i64 4108}
!20 = !{!"_ZTSN5drmp3Ut_E", !13, i64 0, !15, i64 8, !15, i64 16}
!21 = !{!10, !6, i64 6692}
!22 = !{!10, !13, i64 6696}
!23 = !{!10, !13, i64 6704}
!24 = !{!10, !13, i64 6712}
!25 = !{i64 0, i64 8, !26, i64 8, i64 8, !26, i64 16, i64 8, !26, i64 24, i64 8, !26}
!26 = !{!13, !13, i64 0}
!27 = !{!10, !13, i64 6744}
!28 = !{!10, !13, i64 6728}
!29 = !{!10, !13, i64 6736}


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