; LLVM IR from Natrox/RaptorAudio :: RaptorAudio/src (stb_vorbis)

; 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.stb_vorbis = type { i32, i32, i32, i32, i32, ptr, i32, i32, ptr, ptr, ptr, i32, i8, i32, %struct.ProbedPage, %struct.ProbedPage, %struct.stb_vorbis_alloc, i32, i32, i32, i32, [2 x i32], i32, i32, i32, ptr, i32, [64 x i16], ptr, i32, [64 x i16], ptr, i32, ptr, i32, [64 x %struct.Mode], i32, [16 x ptr], [16 x ptr], [16 x ptr], i32, [16 x ptr], i32, i32, [2 x ptr], [2 x ptr], [2 x ptr], [2 x ptr], [2 x ptr], i32, i32, i32, [255 x i8], i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x %struct.CRCscan], i32, i32 }
%struct.ProbedPage = type { i32, i32, i32, i32, i32 }
%struct.stb_vorbis_alloc = type { ptr, i32 }
%struct.Mode = type { i8, i8, i16, i16 }
%struct.CRCscan = type { i32, i32, i32, i32, i32 }

; 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 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: nounwind uwtable
declare dso_local i32 @stb_vorbis_get_frame_float(ptr noundef, ptr noundef, ptr noundef) #2

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

21:                                               ; preds = %4
  %22 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %22, ptr %11, align 4, !tbaa !9
  br label %23

23:                                               ; preds = %21, %4
  br label %24

24:                                               ; preds = %118, %23
  %25 = load i32, ptr %10, align 4, !tbaa !9
  %26 = load i32, ptr %8, align 4, !tbaa !9
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %28, label %119

28:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.stb_vorbis, ptr %29, i32 0, i32 69
  %31 = load i32, ptr %30, align 8, !tbaa !15
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.stb_vorbis, ptr %32, i32 0, i32 68
  %34 = load i32, ptr %33, align 4, !tbaa !16
  %35 = sub nsw i32 %31, %34
  store i32 %35, ptr %13, align 4, !tbaa !9
  %36 = load i32, ptr %10, align 4, !tbaa !9
  %37 = load i32, ptr %13, align 4, !tbaa !9
  %38 = add nsw i32 %36, %37
  %39 = load i32, ptr %8, align 4, !tbaa !9
  %40 = icmp sge i32 %38, %39
  br i1 %40, label %41, label %45

41:                                               ; preds = %28
  %42 = load i32, ptr %8, align 4, !tbaa !9
  %43 = load i32, ptr %10, align 4, !tbaa !9
  %44 = sub nsw i32 %42, %43
  store i32 %44, ptr %13, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %41, %28
  %46 = load i32, ptr %13, align 4, !tbaa !9
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %48, label %97

48:                                               ; preds = %45
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %73, %48
  %50 = load i32, ptr %12, align 4, !tbaa !9
  %51 = load i32, ptr %11, align 4, !tbaa !9
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %53, label %76

53:                                               ; preds = %49
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = load i32, ptr %12, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds ptr, ptr %54, i64 %56
  %58 = load ptr, ptr %57, align 8, !tbaa !5
  %59 = load i32, ptr %10, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds float, ptr %58, i64 %60
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.stb_vorbis, ptr %62, i32 0, i32 37
  %64 = getelementptr inbounds [16 x ptr], ptr %63, i64 0, i64 0
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.stb_vorbis, ptr %65, i32 0, i32 68
  %67 = load i32, ptr %66, align 4, !tbaa !16
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds ptr, ptr %64, i64 %68
  %70 = load i32, ptr %13, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = mul i64 4, %71
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %61, ptr align 8 %69, i64 %72, i1 false)
  br label %73

73:                                               ; preds = %53
  %74 = load i32, ptr %12, align 4, !tbaa !9
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %12, align 4, !tbaa !9
  br label %49, !llvm.loop !17

76:                                               ; preds = %49
  br label %77

77:                                               ; preds = %93, %76
  %78 = load i32, ptr %12, align 4, !tbaa !9
  %79 = load i32, ptr %6, align 4, !tbaa !9
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %81, label %96

81:                                               ; preds = %77
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = load i32, ptr %12, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds ptr, ptr %82, i64 %84
  %86 = load ptr, ptr %85, align 8, !tbaa !5
  %87 = load i32, ptr %10, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds float, ptr %86, i64 %88
  %90 = load i32, ptr %13, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = mul i64 4, %91
  call void @llvm.memset.p0.i64(ptr align 4 %89, i8 0, i64 %92, i1 false)
  br label %93

93:                                               ; preds = %81
  %94 = load i32, ptr %12, align 4, !tbaa !9
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %12, align 4, !tbaa !9
  br label %77, !llvm.loop !19

96:                                               ; preds = %77
  br label %97

97:                                               ; preds = %96, %45
  %98 = load i32, ptr %13, align 4, !tbaa !9
  %99 = load i32, ptr %10, align 4, !tbaa !9
  %100 = add nsw i32 %99, %98
  store i32 %100, ptr %10, align 4, !tbaa !9
  %101 = load i32, ptr %13, align 4, !tbaa !9
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.stb_vorbis, ptr %102, i32 0, i32 68
  %104 = load i32, ptr %103, align 4, !tbaa !16
  %105 = add nsw i32 %104, %101
  store i32 %105, ptr %103, align 4, !tbaa !16
  %106 = load i32, ptr %10, align 4, !tbaa !9
  %107 = load i32, ptr %8, align 4, !tbaa !9
  %108 = icmp eq i32 %106, %107
  br i1 %108, label %109, label %110

109:                                              ; preds = %97
  store i32 3, ptr %14, align 4
  br label %116

110:                                              ; preds = %97
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = call i32 @stb_vorbis_get_frame_float(ptr noundef %111, ptr noundef null, ptr noundef %9)
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %115, label %114

114:                                              ; preds = %110
  store i32 3, ptr %14, align 4
  br label %116

115:                                              ; preds = %110
  store i32 0, ptr %14, align 4
  br label %116

116:                                              ; preds = %115, %114, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  %117 = load i32, ptr %14, align 4
  switch i32 %117, label %121 [
    i32 0, label %118
    i32 3, label %119
  ]

118:                                              ; preds = %116
  br label %24, !llvm.loop !20

119:                                              ; preds = %116, %24
  %120 = load i32, ptr %10, align 4, !tbaa !9
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  ret i32 %120

121:                                              ; preds = %116
  unreachable
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 4}
!12 = !{!"stb_vorbis", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !6, i64 24, !10, i64 32, !10, i64 36, !6, i64 40, !6, i64 48, !6, i64 56, !10, i64 64, !7, i64 68, !10, i64 72, !13, i64 76, !13, i64 96, !14, i64 120, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !7, i64 152, !10, i64 160, !10, i64 164, !10, i64 168, !6, i64 176, !10, i64 184, !7, i64 188, !6, i64 320, !10, i64 328, !7, i64 332, !6, i64 464, !10, i64 472, !6, i64 480, !10, i64 488, !7, i64 492, !10, i64 876, !7, i64 880, !7, i64 1008, !7, i64 1136, !10, i64 1264, !7, i64 1272, !10, i64 1400, !10, i64 1404, !7, i64 1408, !7, i64 1424, !7, i64 1440, !7, i64 1456, !7, i64 1472, !10, i64 1488, !10, i64 1492, !10, i64 1496, !7, i64 1500, !7, i64 1755, !7, i64 1756, !7, i64 1757, !10, i64 1760, !10, i64 1764, !10, i64 1768, !10, i64 1772, !10, i64 1776, !10, i64 1780, !10, i64 1784, !10, i64 1788, !10, i64 1792, !10, i64 1796, !10, i64 1800, !7, i64 1804, !10, i64 1884, !10, i64 1888}
!13 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}
!14 = !{!"", !6, i64 0, !10, i64 8}
!15 = !{!12, !10, i64 1888}
!16 = !{!12, !10, i64 1884}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !18}


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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @stb_vorbis_get_frame_float(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local i32 @stb_vorbis_get_samples_float(ptr noundef %0, i32 noundef %1, ptr nocapture noundef readonly %2, i32 noundef %3) local_unnamed_addr #2 {
  %5 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %6 = getelementptr inbounds i8, ptr %0, i64 4
  %7 = load i32, ptr %6, align 4, !tbaa !5
  %.fr = freeze i32 %7
  %spec.select = tail call i32 @llvm.smin.i32(i32 %.fr, i32 %1)
  %8 = getelementptr inbounds i8, ptr %0, i64 1888
  %9 = getelementptr inbounds i8, ptr %0, i64 1884
  %10 = icmp sgt i32 %spec.select, 0
  %11 = getelementptr inbounds i8, ptr %0, i64 880
  br i1 %10, label %.split.us.preheader, label %.split

.split.us.preheader:                              ; preds = %4
  %wide.trip.count75 = zext nneg i32 %spec.select to i64
  %12 = icmp slt i32 %.fr, %1
  %xtraiter95 = and i64 %wide.trip.count75, 1
  %13 = icmp eq i32 %spec.select, 1
  %unroll_iter99 = and i64 %wide.trip.count75, 2147483646
  %lcmp.mod97.not = icmp eq i64 %xtraiter95, 0
  br label %.split.us

.split.us:                                        ; preds = %.split.us.preheader, %42
  %.041.us = phi i32 [ %38, %42 ], [ 0, %.split.us.preheader ]
  %14 = icmp slt i32 %.041.us, %3
  br i1 %14, label %15, label %.thread

15:                                               ; preds = %.split.us
  %16 = load i32, ptr %8, align 8, !tbaa !13
  %17 = load i32, ptr %9, align 4, !tbaa !14
  %18 = sub nsw i32 %16, %17
  %19 = add nsw i32 %18, %.041.us
  %.not.us = icmp slt i32 %19, %3
  %20 = sub nsw i32 %3, %.041.us
  %spec.select48.us = select i1 %.not.us, i32 %18, i32 %20
  %.not46.us = icmp eq i32 %spec.select48.us, 0
  br i1 %.not46.us, label %.loopexit.us, label %.preheader51.us

.lr.ph54.us:                                      ; preds = %..preheader_crit_edge.us, %.lr.ph54.us
  %indvars.iv79 = phi i64 [ %indvars.iv.next80, %.lr.ph54.us ], [ %indvars.iv77.lcssa, %..preheader_crit_edge.us ]
  %21 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv79
  %22 = load ptr, ptr %21, align 8, !tbaa !15
  %23 = getelementptr inbounds float, ptr %22, i64 %44
  call void @llvm.memset.p0.i64(ptr align 4 %23, i8 0, i64 %46, i1 false)
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %24 = trunc nuw i64 %indvars.iv.next80 to i32
  %25 = icmp slt i32 %24, %1
  br i1 %25, label %.lr.ph54.us, label %.loopexit.us, !llvm.loop !16

.preheader51.us.new:                              ; preds = %.preheader51.us, %.preheader51.us.new
  %indvars.iv77 = phi i64 [ %indvars.iv.next78.1, %.preheader51.us.new ], [ 1, %.preheader51.us ]
  %indvars.iv72 = phi i64 [ %indvars.iv.next73.1, %.preheader51.us.new ], [ 0, %.preheader51.us ]
  %niter100 = phi i64 [ %niter100.next.1, %.preheader51.us.new ], [ 0, %.preheader51.us ]
  %26 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv72
  %27 = load ptr, ptr %26, align 8, !tbaa !15
  %28 = getelementptr inbounds float, ptr %27, i64 %44
  %29 = load i32, ptr %9, align 4, !tbaa !14
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds ptr, ptr %11, i64 %30
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr nonnull align 8 %31, i64 %46, i1 false)
  %indvars.iv.next73 = or disjoint i64 %indvars.iv72, 1
  %32 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv.next73
  %33 = load ptr, ptr %32, align 8, !tbaa !15
  %34 = getelementptr inbounds float, ptr %33, i64 %44
  %35 = load i32, ptr %9, align 4, !tbaa !14
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds ptr, ptr %11, i64 %36
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr nonnull align 8 %37, i64 %46, i1 false)
  %indvars.iv.next73.1 = add nuw nsw i64 %indvars.iv72, 2
  %indvars.iv.next78.1 = add nuw nsw i64 %indvars.iv77, 2
  %niter100.next.1 = add i64 %niter100, 2
  %niter100.ncmp.1 = icmp eq i64 %niter100.next.1, %unroll_iter99
  br i1 %niter100.ncmp.1, label %..preheader_crit_edge.us.unr-lcssa.loopexit, label %.preheader51.us.new, !llvm.loop !18

.loopexit.us:                                     ; preds = %.lr.ph54.us, %..preheader_crit_edge.us, %15
  %38 = add nsw i32 %spec.select48.us, %.041.us
  %39 = load i32, ptr %9, align 4, !tbaa !14
  %40 = add nsw i32 %39, %spec.select48.us
  store i32 %40, ptr %9, align 4, !tbaa !14
  %41 = icmp eq i32 %38, %3
  br i1 %41, label %.thread, label %42

42:                                               ; preds = %.loopexit.us
  %43 = call i32 @stb_vorbis_get_frame_float(ptr noundef nonnull %0, ptr noundef null, ptr noundef nonnull %5)
  %.not47.us = icmp eq i32 %43, 0
  br i1 %.not47.us, label %.thread, label %.split.us

.preheader51.us:                                  ; preds = %15
  %44 = sext i32 %.041.us to i64
  %45 = sext i32 %spec.select48.us to i64
  %46 = shl nsw i64 %45, 2
  br i1 %13, label %..preheader_crit_edge.us.unr-lcssa, label %.preheader51.us.new

..preheader_crit_edge.us.unr-lcssa.loopexit:      ; preds = %.preheader51.us.new
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  br label %..preheader_crit_edge.us.unr-lcssa

..preheader_crit_edge.us.unr-lcssa:               ; preds = %..preheader_crit_edge.us.unr-lcssa.loopexit, %.preheader51.us
  %indvars.iv77.lcssa.ph = phi i64 [ poison, %.preheader51.us ], [ %indvars.iv.next78, %..preheader_crit_edge.us.unr-lcssa.loopexit ]
  %indvars.iv77.unr = phi i64 [ 1, %.preheader51.us ], [ %indvars.iv.next78.1, %..preheader_crit_edge.us.unr-lcssa.loopexit ]
  %indvars.iv72.unr = phi i64 [ 0, %.preheader51.us ], [ %indvars.iv.next73.1, %..preheader_crit_edge.us.unr-lcssa.loopexit ]
  br i1 %lcmp.mod97.not, label %..preheader_crit_edge.us, label %..preheader_crit_edge.us.epilog-lcssa

..preheader_crit_edge.us.epilog-lcssa:            ; preds = %..preheader_crit_edge.us.unr-lcssa
  %47 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv72.unr
  %48 = load ptr, ptr %47, align 8, !tbaa !15
  %49 = getelementptr inbounds float, ptr %48, i64 %44
  %50 = load i32, ptr %9, align 4, !tbaa !14
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds ptr, ptr %11, i64 %51
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %49, ptr nonnull align 8 %52, i64 %46, i1 false)
  br label %..preheader_crit_edge.us

..preheader_crit_edge.us:                         ; preds = %..preheader_crit_edge.us.unr-lcssa, %..preheader_crit_edge.us.epilog-lcssa
  %indvars.iv77.lcssa = phi i64 [ %indvars.iv77.lcssa.ph, %..preheader_crit_edge.us.unr-lcssa ], [ %indvars.iv77.unr, %..preheader_crit_edge.us.epilog-lcssa ]
  br i1 %12, label %.lr.ph54.us, label %.loopexit.us

.split:                                           ; preds = %4
  %53 = icmp sgt i32 %1, 0
  br i1 %53, label %.split.split.us.preheader, label %.split.split

.split.split.us.preheader:                        ; preds = %.split
  %wide.trip.count = zext nneg i32 %1 to i64
  %xtraiter = and i64 %wide.trip.count, 7
  %54 = icmp ult i32 %1, 8
  %unroll_iter = and i64 %wide.trip.count, 2147483640
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.split.split.us

.split.split.us:                                  ; preds = %.split.split.us.preheader, %93
  %.041.us55 = phi i32 [ %90, %93 ], [ 0, %.split.split.us.preheader ]
  %55 = icmp slt i32 %.041.us55, %3
  br i1 %55, label %56, label %.thread

56:                                               ; preds = %.split.split.us
  %57 = load i32, ptr %8, align 8, !tbaa !13
  %58 = load i32, ptr %9, align 4, !tbaa !14
  %59 = sub nsw i32 %57, %58
  %60 = add nsw i32 %59, %.041.us55
  %.not.us56 = icmp slt i32 %60, %3
  %61 = sub nsw i32 %3, %.041.us55
  %spec.select48.us57 = select i1 %.not.us56, i32 %59, i32 %61
  %.not46.us58 = icmp eq i32 %spec.select48.us57, 0
  br i1 %.not46.us58, label %..loopexit_crit_edge.us64, label %.preheader51.us62

.preheader51.us62.new:                            ; preds = %.preheader51.us62, %.preheader51.us62.new
  %indvars.iv = phi i64 [ %indvars.iv.next.7, %.preheader51.us62.new ], [ 0, %.preheader51.us62 ]
  %niter = phi i64 [ %niter.next.7, %.preheader51.us62.new ], [ 0, %.preheader51.us62 ]
  %62 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv
  %63 = load ptr, ptr %62, align 8, !tbaa !15
  %64 = getelementptr inbounds float, ptr %63, i64 %95
  call void @llvm.memset.p0.i64(ptr align 4 %64, i8 0, i64 %97, i1 false)
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %65 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv.next
  %66 = load ptr, ptr %65, align 8, !tbaa !15
  %67 = getelementptr inbounds float, ptr %66, i64 %95
  call void @llvm.memset.p0.i64(ptr align 4 %67, i8 0, i64 %97, i1 false)
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %68 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv.next.1
  %69 = load ptr, ptr %68, align 8, !tbaa !15
  %70 = getelementptr inbounds float, ptr %69, i64 %95
  call void @llvm.memset.p0.i64(ptr align 4 %70, i8 0, i64 %97, i1 false)
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %71 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv.next.2
  %72 = load ptr, ptr %71, align 8, !tbaa !15
  %73 = getelementptr inbounds float, ptr %72, i64 %95
  call void @llvm.memset.p0.i64(ptr align 4 %73, i8 0, i64 %97, i1 false)
  %indvars.iv.next.3 = or disjoint i64 %indvars.iv, 4
  %74 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv.next.3
  %75 = load ptr, ptr %74, align 8, !tbaa !15
  %76 = getelementptr inbounds float, ptr %75, i64 %95
  call void @llvm.memset.p0.i64(ptr align 4 %76, i8 0, i64 %97, i1 false)
  %indvars.iv.next.4 = or disjoint i64 %indvars.iv, 5
  %77 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv.next.4
  %78 = load ptr, ptr %77, align 8, !tbaa !15
  %79 = getelementptr inbounds float, ptr %78, i64 %95
  call void @llvm.memset.p0.i64(ptr align 4 %79, i8 0, i64 %97, i1 false)
  %indvars.iv.next.5 = or disjoint i64 %indvars.iv, 6
  %80 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv.next.5
  %81 = load ptr, ptr %80, align 8, !tbaa !15
  %82 = getelementptr inbounds float, ptr %81, i64 %95
  call void @llvm.memset.p0.i64(ptr align 4 %82, i8 0, i64 %97, i1 false)
  %indvars.iv.next.6 = or disjoint i64 %indvars.iv, 7
  %83 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv.next.6
  %84 = load ptr, ptr %83, align 8, !tbaa !15
  %85 = getelementptr inbounds float, ptr %84, i64 %95
  call void @llvm.memset.p0.i64(ptr align 4 %85, i8 0, i64 %97, i1 false)
  %indvars.iv.next.7 = add nuw nsw i64 %indvars.iv, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %..loopexit_crit_edge.us64.loopexit.unr-lcssa, label %.preheader51.us62.new, !llvm.loop !16

..loopexit_crit_edge.us64.loopexit.unr-lcssa:     ; preds = %.preheader51.us62.new, %.preheader51.us62
  %indvars.iv.unr = phi i64 [ 0, %.preheader51.us62 ], [ %indvars.iv.next.7, %.preheader51.us62.new ]
  br i1 %lcmp.mod.not, label %..loopexit_crit_edge.us64.loopexit, label %.epil.preheader

.epil.preheader:                                  ; preds = %..loopexit_crit_edge.us64.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %..loopexit_crit_edge.us64.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %..loopexit_crit_edge.us64.loopexit.unr-lcssa ]
  %86 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv.epil
  %87 = load ptr, ptr %86, align 8, !tbaa !15
  %88 = getelementptr inbounds float, ptr %87, i64 %95
  call void @llvm.memset.p0.i64(ptr align 4 %88, i8 0, i64 %97, i1 false)
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %..loopexit_crit_edge.us64.loopexit, label %.epil.preheader, !llvm.loop !19

..loopexit_crit_edge.us64.loopexit:               ; preds = %.epil.preheader, %..loopexit_crit_edge.us64.loopexit.unr-lcssa
  %.pre = load i32, ptr %9, align 4, !tbaa !14
  br label %..loopexit_crit_edge.us64

..loopexit_crit_edge.us64:                        ; preds = %..loopexit_crit_edge.us64.loopexit, %56
  %89 = phi i32 [ %.pre, %..loopexit_crit_edge.us64.loopexit ], [ %58, %56 ]
  %90 = add nsw i32 %spec.select48.us57, %.041.us55
  %91 = add nsw i32 %89, %spec.select48.us57
  store i32 %91, ptr %9, align 4, !tbaa !14
  %92 = icmp eq i32 %90, %3
  br i1 %92, label %.thread, label %93

93:                                               ; preds = %..loopexit_crit_edge.us64
  %94 = call i32 @stb_vorbis_get_frame_float(ptr noundef nonnull %0, ptr noundef null, ptr noundef nonnull %5)
  %.not47.us60 = icmp eq i32 %94, 0
  br i1 %.not47.us60, label %.thread, label %.split.split.us

.preheader51.us62:                                ; preds = %56
  %95 = sext i32 %.041.us55 to i64
  %96 = sext i32 %spec.select48.us57 to i64
  %97 = shl nsw i64 %96, 2
  br i1 %54, label %..loopexit_crit_edge.us64.loopexit.unr-lcssa, label %.preheader51.us62.new

.split.split:                                     ; preds = %.split, %107
  %.041 = phi i32 [ %104, %107 ], [ 0, %.split ]
  %98 = icmp slt i32 %.041, %3
  br i1 %98, label %.preheader51, label %.thread

.preheader51:                                     ; preds = %.split.split
  %99 = load i32, ptr %8, align 8, !tbaa !13
  %100 = load i32, ptr %9, align 4, !tbaa !14
  %101 = sub nsw i32 %99, %100
  %102 = add nsw i32 %101, %.041
  %.not = icmp slt i32 %102, %3
  %103 = sub nsw i32 %3, %.041
  %spec.select48 = select i1 %.not, i32 %101, i32 %103
  %104 = add nsw i32 %spec.select48, %.041
  %105 = add nsw i32 %100, %spec.select48
  store i32 %105, ptr %9, align 4, !tbaa !14
  %106 = icmp eq i32 %104, %3
  br i1 %106, label %.thread, label %107

107:                                              ; preds = %.preheader51
  %108 = call i32 @stb_vorbis_get_frame_float(ptr noundef nonnull %0, ptr noundef null, ptr noundef nonnull %5)
  %.not47 = icmp eq i32 %108, 0
  br i1 %.not47, label %.thread, label %.split.split

.thread:                                          ; preds = %107, %.preheader51, %.split.split, %93, %..loopexit_crit_edge.us64, %.split.split.us, %.split.us, %.loopexit.us, %42
  %.us-phi = phi i32 [ %.041.us, %.split.us ], [ %3, %.loopexit.us ], [ %38, %42 ], [ %.041.us55, %.split.split.us ], [ %3, %..loopexit_crit_edge.us64 ], [ %90, %93 ], [ %.041, %.split.split ], [ %3, %.preheader51 ], [ %104, %107 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  ret i32 %.us-phi
}

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 4}
!6 = !{!"stb_vorbis", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !10, i64 24, !7, i64 32, !7, i64 36, !10, i64 40, !10, i64 48, !10, i64 56, !7, i64 64, !8, i64 68, !7, i64 72, !11, i64 76, !11, i64 96, !12, i64 120, !7, i64 136, !7, i64 140, !7, i64 144, !7, i64 148, !8, i64 152, !7, i64 160, !7, i64 164, !7, i64 168, !10, i64 176, !7, i64 184, !8, i64 188, !10, i64 320, !7, i64 328, !8, i64 332, !10, i64 464, !7, i64 472, !10, i64 480, !7, i64 488, !8, i64 492, !7, i64 876, !8, i64 880, !8, i64 1008, !8, i64 1136, !7, i64 1264, !8, i64 1272, !7, i64 1400, !7, i64 1404, !8, i64 1408, !8, i64 1424, !8, i64 1440, !8, i64 1456, !8, i64 1472, !7, i64 1488, !7, i64 1492, !7, i64 1496, !8, i64 1500, !8, i64 1755, !8, i64 1756, !8, i64 1757, !7, i64 1760, !7, i64 1764, !7, i64 1768, !7, i64 1772, !7, i64 1776, !7, i64 1780, !7, i64 1784, !7, i64 1788, !7, i64 1792, !7, i64 1796, !7, i64 1800, !8, i64 1804, !7, i64 1884, !7, i64 1888}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16}
!12 = !{!"", !10, i64 0, !7, i64 8}
!13 = !{!6, !7, i64 1888}
!14 = !{!6, !7, i64 1884}
!15 = !{!10, !10, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.unroll.disable"}


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