; LLVM IR from Overload-Technologies/Overload :: Dependencies/soloud/src/audiosource/wav (soloud_wav)

; 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 = 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, ptr, i32, i64, i64, i64, ptr, i8, %struct.anon.1 }
%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_allocation_callbacks = type { ptr, ptr, ptr, ptr }
%struct.anon.1 = type { ptr, i64, i64 }
%"class.SoLoud::Wav" = type <{ %"class.SoLoud::AudioSource", ptr, i32, [4 x i8] }>
%"class.SoLoud::AudioSource" = type { ptr, i32, float, float, i32, i32, float, float, float, i32, float, [8 x ptr], ptr, ptr, ptr, i32, double }

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #1

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN6SoLoud3Wav7loadmp3EPNS_10MemoryFileE(ptr noundef nonnull align 8 dereferenceable(164) %0, ptr noundef %1) #3 align 2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %struct.drmp3, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca [4096 x float], align 16
  %13 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %14 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 16080, ptr %6) #5
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  %17 = getelementptr inbounds ptr, ptr %16, i64 8
  %18 = load ptr, ptr %17, align 8
  %19 = call noundef ptr %18(ptr noundef nonnull align 8 dereferenceable(25) %15)
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  %22 = getelementptr inbounds ptr, ptr %21, i64 4
  %23 = load ptr, ptr %22, align 8
  %24 = call noundef i32 %23(ptr noundef nonnull align 8 dereferenceable(25) %20)
  %25 = zext i32 %24 to i64
  %26 = call i32 @drmp3_init_memory(ptr noundef %6, ptr noundef %19, i64 noundef %25, ptr noundef null)
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %29, label %28

28:                                               ; preds = %2
  store i32 3, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %127

29:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %30 = call i64 @drmp3_get_pcm_frame_count(ptr noundef %6)
  store i64 %30, ptr %8, align 8, !tbaa !11
  %31 = load i64, ptr %8, align 8, !tbaa !11
  %32 = icmp ne i64 %31, 0
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  call void @drmp3_uninit(ptr noundef %6)
  store i32 3, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %126

34:                                               ; preds = %29
  %35 = load i64, ptr %8, align 8, !tbaa !11
  %36 = getelementptr inbounds %struct.drmp3, ptr %6, i32 0, i32 2
  %37 = load i32, ptr %36, align 8, !tbaa !13
  %38 = zext i32 %37 to i64
  %39 = mul i64 %35, %38
  %40 = trunc i64 %39 to i32
  %41 = zext i32 %40 to i64
  %42 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %41, i64 4)
  %43 = extractvalue { i64, i1 } %42, 1
  %44 = extractvalue { i64, i1 } %42, 0
  %45 = select i1 %43, i64 -1, i64 %44
  %46 = call noalias noundef nonnull ptr @_Znam(i64 noundef %45) #6
  %47 = getelementptr inbounds %"class.SoLoud::Wav", ptr %14, i32 0, i32 1
  store ptr %46, ptr %47, align 8, !tbaa !21
  %48 = getelementptr inbounds %struct.drmp3, ptr %6, i32 0, i32 3
  %49 = load i32, ptr %48, align 4, !tbaa !26
  %50 = uitofp i32 %49 to float
  %51 = getelementptr inbounds %"class.SoLoud::AudioSource", ptr %14, i32 0, i32 2
  store float %50, ptr %51, align 4, !tbaa !27
  %52 = load i64, ptr %8, align 8, !tbaa !11
  %53 = trunc i64 %52 to i32
  %54 = getelementptr inbounds %"class.SoLoud::Wav", ptr %14, i32 0, i32 2
  store i32 %53, ptr %54, align 8, !tbaa !28
  %55 = getelementptr inbounds %struct.drmp3, ptr %6, i32 0, i32 2
  %56 = load i32, ptr %55, align 8, !tbaa !13
  %57 = getelementptr inbounds %"class.SoLoud::AudioSource", ptr %14, i32 0, i32 4
  store i32 %56, ptr %57, align 4, !tbaa !29
  %58 = call i32 @drmp3_seek_to_pcm_frame(ptr noundef %6, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %9, align 4, !tbaa !30
  br label %59

59:                                               ; preds = %122, %34
  %60 = load i32, ptr %9, align 4, !tbaa !30
  %61 = getelementptr inbounds %"class.SoLoud::Wav", ptr %14, i32 0, i32 2
  %62 = load i32, ptr %61, align 8, !tbaa !28
  %63 = icmp ult i32 %60, %62
  br i1 %63, label %64, label %125

64:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 16384, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %65 = getelementptr inbounds %"class.SoLoud::Wav", ptr %14, i32 0, i32 2
  %66 = load i32, ptr %65, align 8, !tbaa !28
  %67 = load i32, ptr %9, align 4, !tbaa !30
  %68 = sub i32 %66, %67
  %69 = icmp ugt i32 %68, 512
  br i1 %69, label %70, label %71

70:                                               ; preds = %64
  br label %76

71:                                               ; preds = %64
  %72 = getelementptr inbounds %"class.SoLoud::Wav", ptr %14, i32 0, i32 2
  %73 = load i32, ptr %72, align 8, !tbaa !28
  %74 = load i32, ptr %9, align 4, !tbaa !30
  %75 = sub i32 %73, %74
  br label %76

76:                                               ; preds = %71, %70
  %77 = phi i32 [ 512, %70 ], [ %75, %71 ]
  store i32 %77, ptr %13, align 4, !tbaa !30
  %78 = load i32, ptr %13, align 4, !tbaa !30
  %79 = zext i32 %78 to i64
  %80 = getelementptr inbounds [4096 x float], ptr %12, i64 0, i64 0
  %81 = call i64 @drmp3_read_pcm_frames_f32(ptr noundef %6, i64 noundef %79, ptr noundef %80)
  store i32 0, ptr %10, align 4, !tbaa !30
  br label %82

82:                                               ; preds = %118, %76
  %83 = load i32, ptr %10, align 4, !tbaa !30
  %84 = load i32, ptr %13, align 4, !tbaa !30
  %85 = icmp ult i32 %83, %84
  br i1 %85, label %86, label %121

86:                                               ; preds = %82
  store i32 0, ptr %11, align 4, !tbaa !30
  br label %87

87:                                               ; preds = %114, %86
  %88 = load i32, ptr %11, align 4, !tbaa !30
  %89 = getelementptr inbounds %struct.drmp3, ptr %6, i32 0, i32 2
  %90 = load i32, ptr %89, align 8, !tbaa !13
  %91 = icmp ult i32 %88, %90
  br i1 %91, label %92, label %117

92:                                               ; preds = %87
  %93 = load i32, ptr %10, align 4, !tbaa !30
  %94 = getelementptr inbounds %struct.drmp3, ptr %6, i32 0, i32 2
  %95 = load i32, ptr %94, align 8, !tbaa !13
  %96 = mul i32 %93, %95
  %97 = load i32, ptr %11, align 4, !tbaa !30
  %98 = add i32 %96, %97
  %99 = zext i32 %98 to i64
  %100 = getelementptr inbounds [4096 x float], ptr %12, i64 0, i64 %99
  %101 = load float, ptr %100, align 4, !tbaa !31
  %102 = getelementptr inbounds %"class.SoLoud::Wav", ptr %14, i32 0, i32 1
  %103 = load ptr, ptr %102, align 8, !tbaa !21
  %104 = load i32, ptr %11, align 4, !tbaa !30
  %105 = getelementptr inbounds %"class.SoLoud::Wav", ptr %14, i32 0, i32 2
  %106 = load i32, ptr %105, align 8, !tbaa !28
  %107 = mul i32 %104, %106
  %108 = load i32, ptr %9, align 4, !tbaa !30
  %109 = add i32 %107, %108
  %110 = load i32, ptr %10, align 4, !tbaa !30
  %111 = add i32 %109, %110
  %112 = zext i32 %111 to i64
  %113 = getelementptr inbounds float, ptr %103, i64 %112
  store float %101, ptr %113, align 4, !tbaa !31
  br label %114

114:                                              ; preds = %92
  %115 = load i32, ptr %11, align 4, !tbaa !30
  %116 = add i32 %115, 1
  store i32 %116, ptr %11, align 4, !tbaa !30
  br label %87, !llvm.loop !32

117:                                              ; preds = %87
  br label %118

118:                                              ; preds = %117
  %119 = load i32, ptr %10, align 4, !tbaa !30
  %120 = add i32 %119, 1
  store i32 %120, ptr %10, align 4, !tbaa !30
  br label %82, !llvm.loop !34

121:                                              ; preds = %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 16384, ptr %12) #5
  br label %122

122:                                              ; preds = %121
  %123 = load i32, ptr %9, align 4, !tbaa !30
  %124 = add i32 %123, 512
  store i32 %124, ptr %9, align 4, !tbaa !30
  br label %59, !llvm.loop !35

125:                                              ; preds = %59
  call void @drmp3_uninit(ptr noundef %6)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %126

126:                                              ; preds = %125, %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %127

127:                                              ; preds = %126, %28
  call void @llvm.lifetime.end.p0(i64 16080, ptr %6) #5
  %128 = load i32, ptr %3, align 4
  ret i32 %128
}

declare i32 @drmp3_init_memory(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #4

declare i64 @drmp3_get_pcm_frame_count(ptr noundef) #4

declare void @drmp3_uninit(ptr noundef) #4

declare i32 @drmp3_seek_to_pcm_frame(ptr noundef, i64 noundef) #4

declare i64 @drmp3_read_pcm_frames_f32(ptr noundef, i64 noundef, ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nobuiltin allocsize(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 = { 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 = { "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 = { nounwind }
attributes #6 = { builtin allocsize(0) }

!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, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!14, !16, i64 6688}
!14 = !{!"_ZTS5drmp3", !15, i64 0, !17, i64 6668, !16, i64 6688, !16, i64 6692, !6, i64 6696, !6, i64 6704, !6, i64 6712, !18, i64 6720, !16, i64 6752, !16, i64 6756, !16, i64 6760, !16, i64 6764, !7, i64 6768, !12, i64 15984, !12, i64 15992, !6, i64 16000, !16, i64 16008, !19, i64 16016, !19, i64 16024, !19, i64 16032, !6, i64 16040, !16, i64 16048, !20, i64 16056}
!15 = !{!"_ZTS8drmp3dec", !7, i64 0, !7, i64 2304, !16, i64 6144, !16, i64 6148, !7, i64 6152, !7, i64 6156}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTS19drmp3dec_frame_info", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12, !16, i64 16}
!18 = !{!"_ZTS26drmp3_allocation_callbacks", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!19 = !{!"long", !7, i64 0}
!20 = !{!"_ZTSN5drmp3Ut_E", !6, i64 0, !19, i64 8, !19, i64 16}
!21 = !{!22, !6, i64 152}
!22 = !{!"_ZTSN6SoLoud3WavE", !23, i64 0, !6, i64 152, !16, i64 160}
!23 = !{!"_ZTSN6SoLoud11AudioSourceE", !16, i64 8, !24, i64 12, !24, i64 16, !16, i64 20, !16, i64 24, !24, i64 28, !24, i64 32, !24, i64 36, !16, i64 40, !24, i64 44, !7, i64 48, !6, i64 112, !6, i64 120, !6, i64 128, !16, i64 136, !25, i64 144}
!24 = !{!"float", !7, i64 0}
!25 = !{!"double", !7, i64 0}
!26 = !{!14, !16, i64 6692}
!27 = !{!23, !24, i64 12}
!28 = !{!22, !16, i64 160}
!29 = !{!23, !16, i64 20}
!30 = !{!16, !16, i64 0}
!31 = !{!24, !24, i64 0}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = distinct !{!34, !33}
!35 = distinct !{!35, !33}


; 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 = 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, ptr, i32, i64, i64, i64, ptr, i8, %struct.anon.1 }
%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_allocation_callbacks = type { ptr, ptr, ptr, ptr }
%struct.anon.1 = type { ptr, i64, i64 }

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 4) i32 @_ZN6SoLoud3Wav7loadmp3EPNS_10MemoryFileE(ptr nocapture noundef nonnull align 8 dereferenceable(164) %0, ptr noundef %1) local_unnamed_addr #2 align 2 {
  %3 = alloca %struct.drmp3, align 8
  %4 = alloca [4096 x float], align 16
  %5 = ptrtoint ptr %4 to i64
  call void @llvm.lifetime.start.p0(i64 16080, ptr nonnull %3) #5
  %6 = load ptr, ptr %1, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 64
  %8 = load ptr, ptr %7, align 8
  %9 = tail call noundef ptr %8(ptr noundef nonnull align 8 dereferenceable(25) %1)
  %10 = load ptr, ptr %1, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %10, i64 32
  %12 = load ptr, ptr %11, align 8
  %13 = tail call noundef i32 %12(ptr noundef nonnull align 8 dereferenceable(25) %1)
  %14 = zext i32 %13 to i64
  %15 = call i32 @drmp3_init_memory(ptr noundef nonnull %3, ptr noundef %9, i64 noundef %14, ptr noundef null)
  %.not = icmp eq i32 %15, 0
  br i1 %.not, label %112, label %16

16:                                               ; preds = %2
  %17 = call i64 @drmp3_get_pcm_frame_count(ptr noundef nonnull %3)
  %.not27 = icmp eq i64 %17, 0
  br i1 %.not27, label %.sink.split, label %18

18:                                               ; preds = %16
  %19 = getelementptr inbounds i8, ptr %3, i64 6688
  %20 = load i32, ptr %19, align 8, !tbaa !8
  %21 = trunc i64 %17 to i32
  %22 = mul i32 %20, %21
  %23 = zext i32 %22 to i64
  %24 = shl nuw nsw i64 %23, 2
  %25 = call noalias noundef nonnull ptr @_Znam(i64 noundef %24) #6
  %26 = getelementptr inbounds i8, ptr %0, i64 152
  store ptr %25, ptr %26, align 8, !tbaa !19
  %27 = getelementptr inbounds i8, ptr %3, i64 6692
  %28 = load i32, ptr %27, align 4, !tbaa !24
  %29 = uitofp i32 %28 to float
  %30 = getelementptr inbounds i8, ptr %0, i64 12
  store float %29, ptr %30, align 4, !tbaa !25
  %31 = getelementptr inbounds i8, ptr %0, i64 160
  store i32 %21, ptr %31, align 8, !tbaa !26
  %32 = getelementptr inbounds i8, ptr %0, i64 20
  store i32 %20, ptr %32, align 4, !tbaa !27
  %33 = call i32 @drmp3_seek_to_pcm_frame(ptr noundef nonnull %3, i64 noundef 0)
  %34 = load i32, ptr %31, align 8, !tbaa !26
  %.not33 = icmp eq i32 %34, 0
  br i1 %.not33, label %.sink.split, label %.lr.ph

.lr.ph:                                           ; preds = %18, %._crit_edge30
  %indvars.iv38 = phi i32 [ %indvars.iv.next39, %._crit_edge30 ], [ 0, %18 ]
  %35 = phi i32 [ %.pre41, %._crit_edge30 ], [ %34, %18 ]
  %.02331 = phi i32 [ %110, %._crit_edge30 ], [ 0, %18 ]
  %36 = zext i32 %.02331 to i64
  %37 = shl nuw nsw i64 %36, 2
  call void @llvm.lifetime.start.p0(i64 16384, ptr nonnull %4) #5
  %38 = sub i32 %35, %.02331
  %spec.select = call i32 @llvm.umin.i32(i32 %38, i32 512)
  %39 = zext nneg i32 %spec.select to i64
  %40 = call i64 @drmp3_read_pcm_frames_f32(ptr noundef nonnull %3, i64 noundef %39, ptr noundef nonnull %4)
  %.not34 = icmp eq i32 %35, %.02331
  %.pre41 = load i32, ptr %31, align 8
  br i1 %.not34, label %._crit_edge30, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %.lr.ph
  %41 = load i32, ptr %19, align 8, !tbaa !8
  %.not35 = icmp eq i32 %41, 0
  %42 = load ptr, ptr %26, align 8
  br i1 %.not35, label %._crit_edge30, label %.preheader.us.preheader

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %43 = ptrtoint ptr %42 to i64
  %44 = add i32 %35, %indvars.iv38
  %umin = call i32 @llvm.umin.i32(i32 %44, i32 512)
  %umax = call i32 @llvm.umax.i32(i32 %umin, i32 1)
  %wide.trip.count = zext i32 %41 to i64
  %45 = add nsw i64 %wide.trip.count, -1
  %46 = sub i64 %43, %5
  %47 = add i64 %46, %37
  %min.iters.check = icmp ult i32 %41, 20
  %ident.check = icmp ne i32 %.pre41, 1
  %48 = trunc i64 %45 to i32
  %49 = icmp ugt i64 %45, 4294967295
  %50 = trunc i64 %45 to i32
  %n.vec = and i64 %wide.trip.count, 4294967288
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  %xtraiter = and i64 %wide.trip.count, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %51 = add nsw i64 %wide.trip.count, -1
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us
  %indvar = phi i64 [ 0, %.preheader.us.preheader ], [ %indvar.next, %._crit_edge.us ]
  %.02229.us = phi i32 [ 0, %.preheader.us.preheader ], [ %109, %._crit_edge.us ]
  %52 = mul i32 %41, %.02229.us
  %53 = add nuw nsw i32 %.02229.us, %.02331
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.scevcheck

vector.scevcheck:                                 ; preds = %.preheader.us
  %54 = shl nuw nsw i64 %indvar, 2
  %55 = add i64 %47, %54
  %56 = trunc i64 %indvar to i32
  %57 = mul i32 %41, %56
  %58 = zext i32 %57 to i64
  %59 = shl nuw nsw i64 %58, 2
  %60 = sub i64 %55, %59
  %61 = mul i32 %41, %.02229.us
  %62 = add i32 %.02331, %.02229.us
  %63 = xor i32 %62, -1
  %64 = icmp ult i32 %63, %48
  %65 = or i1 %64, %49
  %66 = xor i32 %61, -1
  %67 = icmp ult i32 %66, %50
  %68 = or i1 %ident.check, %65
  %69 = or i1 %67, %68
  %diff.check = icmp ult i64 %60, 32
  %or.cond = select i1 %69, i1 true, i1 %diff.check
  br i1 %or.cond, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %vector.scevcheck, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.scevcheck ]
  %70 = trunc i64 %index to i32
  %71 = add i32 %52, %70
  %72 = zext i32 %71 to i64
  %73 = getelementptr inbounds [4096 x float], ptr %4, i64 0, i64 %72
  %74 = getelementptr inbounds i8, ptr %73, i64 16
  %wide.load = load <4 x float>, ptr %73, align 4, !tbaa !28
  %wide.load42 = load <4 x float>, ptr %74, align 4, !tbaa !28
  %75 = add i32 %53, %70
  %76 = zext i32 %75 to i64
  %77 = getelementptr inbounds float, ptr %42, i64 %76
  %78 = getelementptr inbounds i8, ptr %77, i64 16
  store <4 x float> %wide.load, ptr %77, align 4, !tbaa !28
  store <4 x float> %wide.load42, ptr %78, align 4, !tbaa !28
  %index.next = add nuw i64 %index, 8
  %79 = icmp eq i64 %index.next, %n.vec
  br i1 %79, label %middle.block, label %vector.body, !llvm.loop !29

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %vector.scevcheck, %.preheader.us
  %indvars.iv.ph = phi i64 [ 0, %vector.scevcheck ], [ 0, %.preheader.us ], [ %n.vec, %middle.block ]
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %80 = trunc nuw i64 %indvars.iv.ph to i32
  %81 = add i32 %52, %80
  %82 = zext i32 %81 to i64
  %83 = getelementptr inbounds [4096 x float], ptr %4, i64 0, i64 %82
  %84 = load float, ptr %83, align 4, !tbaa !28
  %85 = mul i32 %.pre41, %80
  %86 = add i32 %53, %85
  %87 = zext i32 %86 to i64
  %88 = getelementptr inbounds float, ptr %42, i64 %87
  store float %84, ptr %88, align 4, !tbaa !28
  %indvars.iv.next.prol = or disjoint i64 %indvars.iv.ph, 1
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %89 = icmp eq i64 %indvars.iv.ph, %51
  br i1 %89, label %._crit_edge.us, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %90 = trunc nuw i64 %indvars.iv to i32
  %91 = add i32 %52, %90
  %92 = zext i32 %91 to i64
  %93 = getelementptr inbounds [4096 x float], ptr %4, i64 0, i64 %92
  %94 = load float, ptr %93, align 4, !tbaa !28
  %95 = mul i32 %.pre41, %90
  %96 = add i32 %53, %95
  %97 = zext i32 %96 to i64
  %98 = getelementptr inbounds float, ptr %42, i64 %97
  store float %94, ptr %98, align 4, !tbaa !28
  %99 = trunc i64 %indvars.iv to i32
  %100 = add i32 %99, 1
  %101 = add i32 %52, %100
  %102 = zext i32 %101 to i64
  %103 = getelementptr inbounds [4096 x float], ptr %4, i64 0, i64 %102
  %104 = load float, ptr %103, align 4, !tbaa !28
  %105 = mul i32 %.pre41, %100
  %106 = add i32 %53, %105
  %107 = zext i32 %106 to i64
  %108 = getelementptr inbounds float, ptr %42, i64 %107
  store float %104, ptr %108, align 4, !tbaa !28
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond.not.1, label %._crit_edge.us, label %scalar.ph, !llvm.loop !33

._crit_edge.us:                                   ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %109 = add nuw nsw i32 %.02229.us, 1
  %exitcond40.not = icmp eq i32 %109, %umax
  %indvar.next = add i64 %indvar, 1
  br i1 %exitcond40.not, label %._crit_edge30, label %.preheader.us, !llvm.loop !34

._crit_edge30:                                    ; preds = %._crit_edge.us, %.preheader.lr.ph, %.lr.ph
  call void @llvm.lifetime.end.p0(i64 16384, ptr nonnull %4) #5
  %110 = add i32 %.02331, 512
  %111 = icmp ult i32 %110, %.pre41
  %indvars.iv.next39 = add i32 %indvars.iv38, -512
  br i1 %111, label %.lr.ph, label %.sink.split, !llvm.loop !35

.sink.split:                                      ; preds = %._crit_edge30, %18, %16
  %.1.ph = phi i32 [ 3, %16 ], [ 0, %18 ], [ 0, %._crit_edge30 ]
  call void @drmp3_uninit(ptr noundef nonnull %3)
  br label %112

112:                                              ; preds = %.sink.split, %2
  %.1 = phi i32 [ 3, %2 ], [ %.1.ph, %.sink.split ]
  call void @llvm.lifetime.end.p0(i64 16080, ptr nonnull %3) #5
  ret i32 %.1
}

declare i32 @drmp3_init_memory(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

declare i64 @drmp3_get_pcm_frame_count(ptr noundef) local_unnamed_addr #3

declare void @drmp3_uninit(ptr noundef) local_unnamed_addr #3

declare i32 @drmp3_seek_to_pcm_frame(ptr noundef, i64 noundef) local_unnamed_addr #3

declare i64 @drmp3_read_pcm_frames_f32(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin allocsize(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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
attributes #6 = { builtin allocsize(0) }

!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, !12, i64 6688}
!9 = !{!"_ZTS5drmp3", !10, i64 0, !13, i64 6668, !12, i64 6688, !12, i64 6692, !14, i64 6696, !14, i64 6704, !14, i64 6712, !15, i64 6720, !12, i64 6752, !12, i64 6756, !12, i64 6760, !12, i64 6764, !11, i64 6768, !16, i64 15984, !16, i64 15992, !14, i64 16000, !12, i64 16008, !17, i64 16016, !17, i64 16024, !17, i64 16032, !14, i64 16040, !12, i64 16048, !18, i64 16056}
!10 = !{!"_ZTS8drmp3dec", !11, i64 0, !11, i64 2304, !12, i64 6144, !12, i64 6148, !11, i64 6152, !11, i64 6156}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!"int", !11, i64 0}
!13 = !{!"_ZTS19drmp3dec_frame_info", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16}
!14 = !{!"any pointer", !11, i64 0}
!15 = !{!"_ZTS26drmp3_allocation_callbacks", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!16 = !{!"long long", !11, i64 0}
!17 = !{!"long", !11, i64 0}
!18 = !{!"_ZTSN5drmp3Ut_E", !14, i64 0, !17, i64 8, !17, i64 16}
!19 = !{!20, !14, i64 152}
!20 = !{!"_ZTSN6SoLoud3WavE", !21, i64 0, !14, i64 152, !12, i64 160}
!21 = !{!"_ZTSN6SoLoud11AudioSourceE", !12, i64 8, !22, i64 12, !22, i64 16, !12, i64 20, !12, i64 24, !22, i64 28, !22, i64 32, !22, i64 36, !12, i64 40, !22, i64 44, !11, i64 48, !14, i64 112, !14, i64 120, !14, i64 128, !12, i64 136, !23, i64 144}
!22 = !{!"float", !11, i64 0}
!23 = !{!"double", !11, i64 0}
!24 = !{!9, !12, i64 6692}
!25 = !{!21, !22, i64 12}
!26 = !{!20, !12, i64 160}
!27 = !{!21, !12, i64 20}
!28 = !{!22, !22, i64 0}
!29 = distinct !{!29, !30, !31, !32}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!"llvm.loop.isvectorized", i32 1}
!32 = !{!"llvm.loop.unroll.runtime.disable"}
!33 = distinct !{!33, !30, !31}
!34 = distinct !{!34, !30}
!35 = distinct !{!35, !30}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass