; 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_src_cache = type { ptr, [1024 x float], 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 }
%union.anon = type { %struct.anon }
%struct.anon = type { double, i8 }

@.str.1 = external hidden unnamed_addr constant [103 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__._Z27drmp3_src_cache_read_framesP15drmp3_src_cachemPf = external hidden unnamed_addr constant [83 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 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

; 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) #1

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

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

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

15:                                               ; preds = %3
  br label %18

16:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 2481, ptr noundef @__PRETTY_FUNCTION__._Z27drmp3_src_cache_read_framesP15drmp3_src_cachemPf) #5
  unreachable

17:                                               ; No predecessors!
  br label %18

18:                                               ; preds = %17, %15
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.drmp3_src_cache, ptr %19, i32 0, i32 0
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %24

23:                                               ; preds = %18
  br label %26

24:                                               ; preds = %18
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 2482, ptr noundef @__PRETTY_FUNCTION__._Z27drmp3_src_cache_read_framesP15drmp3_src_cachemPf) #5
  unreachable

25:                                               ; No predecessors!
  br label %26

26:                                               ; preds = %25, %23
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.drmp3_src_cache, ptr %27, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8, !tbaa !11
  %30 = getelementptr inbounds %struct.drmp3_src, ptr %29, i32 0, i32 1
  %31 = load ptr, ptr %30, align 8, !tbaa !14
  %32 = icmp ne ptr %31, null
  br i1 %32, label %33, label %34

33:                                               ; preds = %26
  br label %36

34:                                               ; preds = %26
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 2483, ptr noundef @__PRETTY_FUNCTION__._Z27drmp3_src_cache_read_framesP15drmp3_src_cachemPf) #5
  unreachable

35:                                               ; No predecessors!
  br label %36

36:                                               ; preds = %35, %33
  %37 = load i64, ptr %5, align 8, !tbaa !9
  %38 = icmp ugt i64 %37, 0
  br i1 %38, label %39, label %40

39:                                               ; preds = %36
  br label %42

40:                                               ; preds = %36
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 2484, ptr noundef @__PRETTY_FUNCTION__._Z27drmp3_src_cache_read_framesP15drmp3_src_cachemPf) #5
  unreachable

41:                                               ; No predecessors!
  br label %42

42:                                               ; preds = %41, %39
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = icmp ne ptr %43, null
  br i1 %44, label %45, label %46

45:                                               ; preds = %42
  br label %48

46:                                               ; preds = %42
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 2485, ptr noundef @__PRETTY_FUNCTION__._Z27drmp3_src_cache_read_framesP15drmp3_src_cachemPf) #5
  unreachable

47:                                               ; No predecessors!
  br label %48

48:                                               ; preds = %47, %45
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.drmp3_src_cache, ptr %49, i32 0, i32 0
  %51 = load ptr, ptr %50, align 8, !tbaa !11
  %52 = getelementptr inbounds %struct.drmp3_src, ptr %51, i32 0, i32 0
  %53 = getelementptr inbounds %struct.drmp3_src_config, ptr %52, i32 0, i32 2
  %54 = load i32, ptr %53, align 8, !tbaa !18
  store i32 %54, ptr %7, align 4, !tbaa !19
  br label %55

55:                                               ; preds = %179, %48
  %56 = load i64, ptr %5, align 8, !tbaa !9
  %57 = icmp ugt i64 %56, 0
  br i1 %57, label %58, label %180

58:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.drmp3_src_cache, ptr %59, i32 0, i32 2
  %61 = load i32, ptr %60, align 8, !tbaa !20
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.drmp3_src_cache, ptr %62, i32 0, i32 3
  %64 = load i32, ptr %63, align 4, !tbaa !21
  %65 = sub i32 %61, %64
  %66 = zext i32 %65 to i64
  store i64 %66, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %67 = load i64, ptr %5, align 8, !tbaa !9
  store i64 %67, ptr %11, align 8, !tbaa !9
  %68 = load i64, ptr %11, align 8, !tbaa !9
  %69 = load i64, ptr %10, align 8, !tbaa !9
  %70 = icmp ugt i64 %68, %69
  br i1 %70, label %71, label %73

71:                                               ; preds = %58
  %72 = load i64, ptr %10, align 8, !tbaa !9
  store i64 %72, ptr %11, align 8, !tbaa !9
  br label %73

73:                                               ; preds = %71, %58
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.drmp3_src_cache, ptr %75, i32 0, i32 1
  %77 = getelementptr inbounds [1024 x float], ptr %76, i64 0, i64 0
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.drmp3_src_cache, ptr %78, i32 0, i32 3
  %80 = load i32, ptr %79, align 4, !tbaa !21
  %81 = load i32, ptr %7, align 4, !tbaa !19
  %82 = mul i32 %80, %81
  %83 = zext i32 %82 to i64
  %84 = getelementptr inbounds float, ptr %77, i64 %83
  %85 = load i64, ptr %11, align 8, !tbaa !9
  %86 = load i32, ptr %7, align 4, !tbaa !19
  %87 = zext i32 %86 to i64
  %88 = mul i64 %85, %87
  %89 = mul i64 %88, 4
  %90 = trunc i64 %89 to i32
  %91 = zext i32 %90 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %74, ptr align 4 %84, i64 %91, i1 false)
  %92 = load i64, ptr %11, align 8, !tbaa !9
  %93 = trunc i64 %92 to i32
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.drmp3_src_cache, ptr %94, i32 0, i32 3
  %96 = load i32, ptr %95, align 4, !tbaa !21
  %97 = add i32 %96, %93
  store i32 %97, ptr %95, align 4, !tbaa !21
  %98 = load i64, ptr %11, align 8, !tbaa !9
  %99 = load i64, ptr %8, align 8, !tbaa !9
  %100 = add i64 %99, %98
  store i64 %100, ptr %8, align 8, !tbaa !9
  %101 = load i64, ptr %11, align 8, !tbaa !9
  %102 = load i64, ptr %5, align 8, !tbaa !9
  %103 = sub i64 %102, %101
  store i64 %103, ptr %5, align 8, !tbaa !9
  %104 = load i64, ptr %5, align 8, !tbaa !9
  %105 = icmp eq i64 %104, 0
  br i1 %105, label %106, label %107

106:                                              ; preds = %73
  store i32 3, ptr %12, align 4
  br label %177

107:                                              ; preds = %73
  %108 = load i64, ptr %5, align 8, !tbaa !9
  %109 = icmp ugt i64 %108, 0
  br i1 %109, label %110, label %111

110:                                              ; preds = %107
  br label %113

111:                                              ; preds = %107
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 2509, ptr noundef @__PRETTY_FUNCTION__._Z27drmp3_src_cache_read_framesP15drmp3_src_cachemPf) #5
  unreachable

112:                                              ; No predecessors!
  br label %113

113:                                              ; preds = %112, %110
  %114 = load i64, ptr %11, align 8, !tbaa !9
  %115 = load i32, ptr %7, align 4, !tbaa !19
  %116 = zext i32 %115 to i64
  %117 = mul i64 %114, %116
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = getelementptr inbounds float, ptr %118, i64 %117
  store ptr %119, ptr %6, align 8, !tbaa !5
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.drmp3_src_cache, ptr %120, i32 0, i32 3
  store i32 0, ptr %121, align 4, !tbaa !21
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.drmp3_src_cache, ptr %122, i32 0, i32 2
  store i32 0, ptr %123, align 8, !tbaa !20
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.drmp3_src_cache, ptr %124, i32 0, i32 0
  %126 = load ptr, ptr %125, align 8, !tbaa !11
  %127 = getelementptr inbounds %struct.drmp3_src, ptr %126, i32 0, i32 0
  %128 = getelementptr inbounds %struct.drmp3_src_config, ptr %127, i32 0, i32 2
  %129 = load i32, ptr %128, align 8, !tbaa !18
  %130 = zext i32 %129 to i64
  %131 = udiv i64 1024, %130
  %132 = trunc i64 %131 to i32
  store i32 %132, ptr %9, align 4, !tbaa !19
  %133 = load i32, ptr %9, align 4, !tbaa !19
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.drmp3_src_cache, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !11
  %137 = getelementptr inbounds %struct.drmp3_src, ptr %136, i32 0, i32 0
  %138 = getelementptr inbounds %struct.drmp3_src_config, ptr %137, i32 0, i32 4
  %139 = load i32, ptr %138, align 8, !tbaa !22
  %140 = icmp ugt i32 %133, %139
  br i1 %140, label %141, label %148

141:                                              ; preds = %113
  %142 = load ptr, ptr %4, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.drmp3_src_cache, ptr %142, i32 0, i32 0
  %144 = load ptr, ptr %143, align 8, !tbaa !11
  %145 = getelementptr inbounds %struct.drmp3_src, ptr %144, i32 0, i32 0
  %146 = getelementptr inbounds %struct.drmp3_src_config, ptr %145, i32 0, i32 4
  %147 = load i32, ptr %146, align 8, !tbaa !22
  store i32 %147, ptr %9, align 4, !tbaa !19
  br label %148

148:                                              ; preds = %141, %113
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.drmp3_src_cache, ptr %149, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8, !tbaa !11
  %152 = getelementptr inbounds %struct.drmp3_src, ptr %151, i32 0, i32 1
  %153 = load ptr, ptr %152, align 8, !tbaa !14
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.drmp3_src_cache, ptr %154, i32 0, i32 0
  %156 = load ptr, ptr %155, align 8, !tbaa !11
  %157 = load i32, ptr %9, align 4, !tbaa !19
  %158 = zext i32 %157 to i64
  %159 = load ptr, ptr %4, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.drmp3_src_cache, ptr %159, i32 0, i32 1
  %161 = getelementptr inbounds [1024 x float], ptr %160, i64 0, i64 0
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.drmp3_src_cache, ptr %162, i32 0, i32 0
  %164 = load ptr, ptr %163, align 8, !tbaa !11
  %165 = getelementptr inbounds %struct.drmp3_src, ptr %164, i32 0, i32 2
  %166 = load ptr, ptr %165, align 8, !tbaa !23
  %167 = call noundef i64 %153(ptr noundef %156, i64 noundef %158, ptr noundef %161, ptr noundef %166)
  %168 = trunc i64 %167 to i32
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.drmp3_src_cache, ptr %169, i32 0, i32 2
  store i32 %168, ptr %170, align 8, !tbaa !20
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.drmp3_src_cache, ptr %171, i32 0, i32 2
  %173 = load i32, ptr %172, align 8, !tbaa !20
  %174 = icmp eq i32 %173, 0
  br i1 %174, label %175, label %176

175:                                              ; preds = %148
  store i32 3, ptr %12, align 4
  br label %177

176:                                              ; preds = %148
  store i32 0, ptr %12, align 4
  br label %177

177:                                              ; preds = %176, %175, %106
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  %178 = load i32, ptr %12, align 4
  switch i32 %178, label %182 [
    i32 0, label %179
    i32 3, label %180
  ]

179:                                              ; preds = %177
  br label %55, !llvm.loop !24

180:                                              ; preds = %177, %55
  %181 = load i64, ptr %8, align 8, !tbaa !9
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret i64 %181

182:                                              ; preds = %177
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { nounwind }
attributes #5 = { 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 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS15drmp3_src_cache", !6, i64 0, !7, i64 8, !13, i64 4104, !13, i64 4108}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !6, i64 24}
!15 = !{!"_ZTS9drmp3_src", !16, i64 0, !6, i64 24, !6, i64 32, !7, i64 40, !12, i64 1064, !7, i64 5176}
!16 = !{!"_ZTS16drmp3_src_config", !13, i64 0, !13, i64 4, !13, i64 8, !17, i64 12, !13, i64 16}
!17 = !{!"_ZTS19drmp3_src_algorithm", !7, i64 0}
!18 = !{!15, !13, i64 8}
!19 = !{!13, !13, i64 0}
!20 = !{!12, !13, i64 4104}
!21 = !{!12, !13, i64 4108}
!22 = !{!15, !13, i64 16}
!23 = !{!15, !6, i64 32}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.1 = external hidden unnamed_addr constant [103 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__._Z27drmp3_src_cache_read_framesP15drmp3_src_cachemPf = external hidden unnamed_addr constant [83 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 x i8], align 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) #0

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z27drmp3_src_cache_read_framesP15drmp3_src_cachemPf(ptr noundef %0, i64 noundef %1, ptr noundef writeonly %2) local_unnamed_addr #2 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %4, label %5

4:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 2481, ptr noundef nonnull @__PRETTY_FUNCTION__._Z27drmp3_src_cache_read_framesP15drmp3_src_cachemPf) #4
  unreachable

5:                                                ; preds = %3
  %6 = load ptr, ptr %0, align 8, !tbaa !5
  %.not57 = icmp eq ptr %6, null
  br i1 %.not57, label %7, label %8

7:                                                ; preds = %5
  tail call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 2482, ptr noundef nonnull @__PRETTY_FUNCTION__._Z27drmp3_src_cache_read_framesP15drmp3_src_cachemPf) #4
  unreachable

8:                                                ; preds = %5
  %9 = getelementptr inbounds i8, ptr %6, i64 24
  %10 = load ptr, ptr %9, align 8, !tbaa !11
  %.not58 = icmp eq ptr %10, null
  br i1 %.not58, label %11, label %12

11:                                               ; preds = %8
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 2483, ptr noundef nonnull @__PRETTY_FUNCTION__._Z27drmp3_src_cache_read_framesP15drmp3_src_cachemPf) #4
  unreachable

12:                                               ; preds = %8
  %.not59 = icmp eq i64 %1, 0
  br i1 %.not59, label %13, label %14

13:                                               ; preds = %12
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 2484, ptr noundef nonnull @__PRETTY_FUNCTION__._Z27drmp3_src_cache_read_framesP15drmp3_src_cachemPf) #4
  unreachable

14:                                               ; preds = %12
  %.not60 = icmp eq ptr %2, null
  br i1 %.not60, label %15, label %16

15:                                               ; preds = %14
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 2485, ptr noundef nonnull @__PRETTY_FUNCTION__._Z27drmp3_src_cache_read_framesP15drmp3_src_cachemPf) #4
  unreachable

16:                                               ; preds = %14
  %17 = getelementptr inbounds i8, ptr %6, i64 8
  %18 = load i32, ptr %17, align 8, !tbaa !15
  %19 = getelementptr inbounds i8, ptr %0, i64 4104
  %20 = getelementptr inbounds i8, ptr %0, i64 4108
  %21 = getelementptr inbounds i8, ptr %0, i64 8
  %22 = zext i32 %18 to i64
  %.pre = load i32, ptr %19, align 8, !tbaa !16
  br label %23

23:                                               ; preds = %40, %16
  %24 = phi i32 [ %.pre, %16 ], [ %54, %40 ]
  %.048 = phi ptr [ %2, %16 ], [ %41, %40 ]
  %.047 = phi i64 [ 0, %16 ], [ %37, %40 ]
  %.045 = phi i64 [ %1, %16 ], [ %38, %40 ]
  %25 = load i32, ptr %20, align 4, !tbaa !17
  %26 = sub i32 %24, %25
  %27 = zext i32 %26 to i64
  %spec.select = tail call i64 @llvm.umin.i64(i64 %.045, i64 %27)
  %28 = mul i32 %25, %18
  %29 = zext i32 %28 to i64
  %30 = getelementptr inbounds float, ptr %21, i64 %29
  %31 = mul nuw i64 %spec.select, %22
  %32 = shl i64 %31, 2
  %33 = and i64 %32, 4294967292
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %.048, ptr nonnull align 4 %30, i64 %33, i1 false)
  %34 = trunc nuw i64 %spec.select to i32
  %35 = load i32, ptr %20, align 4, !tbaa !17
  %36 = add i32 %35, %34
  store i32 %36, ptr %20, align 4, !tbaa !17
  %37 = add i64 %spec.select, %.047
  %38 = sub i64 %.045, %spec.select
  %39 = icmp eq i64 %38, 0
  br i1 %39, label %.thread, label %40

40:                                               ; preds = %23
  %41 = getelementptr inbounds float, ptr %.048, i64 %31
  store i32 0, ptr %20, align 4, !tbaa !17
  store i32 0, ptr %19, align 8, !tbaa !16
  %42 = load ptr, ptr %0, align 8, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %42, i64 8
  %44 = load i32, ptr %43, align 8, !tbaa !15
  %45 = udiv i32 1024, %44
  %46 = getelementptr inbounds i8, ptr %42, i64 16
  %47 = load i32, ptr %46, align 8, !tbaa !18
  %spec.select62 = tail call i32 @llvm.umin.i32(i32 %45, i32 %47)
  %48 = getelementptr inbounds i8, ptr %42, i64 24
  %49 = load ptr, ptr %48, align 8, !tbaa !11
  %50 = zext nneg i32 %spec.select62 to i64
  %51 = getelementptr inbounds i8, ptr %42, i64 32
  %52 = load ptr, ptr %51, align 8, !tbaa !19
  %53 = tail call noundef i64 %49(ptr noundef %42, i64 noundef %50, ptr noundef nonnull %21, ptr noundef %52)
  %54 = trunc i64 %53 to i32
  store i32 %54, ptr %19, align 8, !tbaa !16
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %.thread, label %23

.thread:                                          ; preds = %40, %23
  ret i64 %37
}

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

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

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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, !7, i64 0}
!6 = !{!"_ZTS15drmp3_src_cache", !7, i64 0, !8, i64 8, !10, i64 4104, !10, i64 4108}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !7, i64 24}
!12 = !{!"_ZTS9drmp3_src", !13, i64 0, !7, i64 24, !7, i64 32, !8, i64 40, !6, i64 1064, !8, i64 5176}
!13 = !{!"_ZTS16drmp3_src_config", !10, i64 0, !10, i64 4, !10, i64 8, !14, i64 12, !10, i64 16}
!14 = !{!"_ZTS19drmp3_src_algorithm", !8, i64 0}
!15 = !{!12, !10, i64 8}
!16 = !{!6, !10, i64 4104}
!17 = !{!6, !10, i64 4108}
!18 = !{!12, !10, i64 16}
!19 = !{!12, !7, i64 32}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass