; LLVM IR from dbry/wavpack-stream :: src (pack_utils)

; 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.WavpackContext = type { %struct.WavpackStreamConfig, ptr, i32, i32, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64, i64, i64, i64, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i8, ptr, ptr, i32, i32, ptr, [8 x i8], ptr, [80 x i8] }
%struct.WavpackStreamConfig = type { float, float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [16 x i8], i8, i32, ptr }

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @WavpackStreamSetChannelLayout(ptr noundef %0, i32 noundef %1, ptr noundef %2) #2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = 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
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %12 = load i32, ptr %6, align 4, !tbaa !9
  %13 = and i32 %12, 255
  store i32 %13, ptr %8, align 4, !tbaa !9
  %14 = load i32, ptr %6, align 4, !tbaa !9
  %15 = and i32 %14, -16711936
  %16 = icmp ne i32 %15, 0
  br i1 %16, label %24, label %17

17:                                               ; preds = %3
  %18 = load i32, ptr %8, align 4, !tbaa !9
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.WavpackContext, ptr %19, i32 0, i32 0
  %21 = getelementptr inbounds %struct.WavpackStreamConfig, ptr %20, i32 0, i32 7
  %22 = load i32, ptr %21, align 4, !tbaa !11
  %23 = icmp sgt i32 %18, %22
  br i1 %23, label %24, label %25

24:                                               ; preds = %17, %3
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %107

25:                                               ; preds = %17
  %26 = load i32, ptr %6, align 4, !tbaa !9
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.WavpackContext, ptr %27, i32 0, i32 41
  store i32 %26, ptr %28, align 8, !tbaa !16
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.WavpackContext, ptr %29, i32 0, i32 39
  %31 = load ptr, ptr %30, align 8, !tbaa !17
  %32 = icmp ne ptr %31, null
  br i1 %32, label %33, label %39

33:                                               ; preds = %25
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.WavpackContext, ptr %34, i32 0, i32 39
  %36 = load ptr, ptr %35, align 8, !tbaa !17
  call void @free(ptr noundef %36) #4
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.WavpackContext, ptr %37, i32 0, i32 39
  store ptr null, ptr %38, align 8, !tbaa !17
  br label %39

39:                                               ; preds = %33, %25
  %40 = load i32, ptr %8, align 4, !tbaa !9
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %106

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

45:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 256, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %67, %45
  %47 = load i32, ptr %11, align 4, !tbaa !9
  %48 = load i32, ptr %8, align 4, !tbaa !9
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %50, label %70

50:                                               ; preds = %46
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = load i32, ptr %11, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds i8, ptr %51, i64 %53
  %55 = load i8, ptr %54, align 1, !tbaa !18
  %56 = zext i8 %55 to i32
  %57 = load i32, ptr %10, align 4, !tbaa !9
  %58 = icmp slt i32 %56, %57
  br i1 %58, label %59, label %66

59:                                               ; preds = %50
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = load i32, ptr %11, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds i8, ptr %60, i64 %62
  %64 = load i8, ptr %63, align 1, !tbaa !18
  %65 = zext i8 %64 to i32
  store i32 %65, ptr %10, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %59, %50
  br label %67

67:                                               ; preds = %66
  %68 = load i32, ptr %11, align 4, !tbaa !9
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %11, align 4, !tbaa !9
  br label %46, !llvm.loop !19

70:                                               ; preds = %46
  %71 = load i32, ptr %8, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = call noalias ptr @malloc(i64 noundef %72) #5
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.WavpackContext, ptr %74, i32 0, i32 39
  store ptr %73, ptr %75, align 8, !tbaa !17
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.WavpackContext, ptr %76, i32 0, i32 39
  %78 = load ptr, ptr %77, align 8, !tbaa !17
  %79 = icmp ne ptr %78, null
  br i1 %79, label %80, label %105

80:                                               ; preds = %70
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %81

81:                                               ; preds = %101, %80
  %82 = load i32, ptr %11, align 4, !tbaa !9
  %83 = load i32, ptr %8, align 4, !tbaa !9
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %85, label %104

85:                                               ; preds = %81
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = load i32, ptr %11, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i8, ptr %86, i64 %88
  %90 = load i8, ptr %89, align 1, !tbaa !18
  %91 = zext i8 %90 to i32
  %92 = load i32, ptr %10, align 4, !tbaa !9
  %93 = sub nsw i32 %91, %92
  %94 = trunc i32 %93 to i8
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.WavpackContext, ptr %95, i32 0, i32 39
  %97 = load ptr, ptr %96, align 8, !tbaa !17
  %98 = load i32, ptr %11, align 4, !tbaa !9
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds i8, ptr %97, i64 %99
  store i8 %94, ptr %100, align 1, !tbaa !18
  br label %101

101:                                              ; preds = %85
  %102 = load i32, ptr %11, align 4, !tbaa !9
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %11, align 4, !tbaa !9
  br label %81, !llvm.loop !21

104:                                              ; preds = %81
  br label %105

105:                                              ; preds = %104, %70
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %106

106:                                              ; preds = %105, %42, %39
  store i32 1, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %107

107:                                              ; preds = %106, %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  %108 = load i32, ptr %4, align 4
  ret i32 %108
}

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind 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 = { 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 = { 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 = { nounwind }
attributes #5 = { nounwind 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 28}
!12 = !{!"WavpackContext", !13, i64 0, !6, i64 88, !10, i64 96, !10, i64 100, !6, i64 104, !10, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !15, i64 168, !15, i64 176, !15, i64 184, !15, i64 192, !15, i64 200, !15, i64 208, !10, i64 216, !10, i64 220, !10, i64 224, !10, i64 228, !10, i64 232, !10, i64 236, !10, i64 240, !10, i64 244, !10, i64 248, !10, i64 252, !10, i64 256, !10, i64 260, !10, i64 264, !10, i64 268, !10, i64 272, !10, i64 276, !10, i64 280, !10, i64 284, !6, i64 288, !6, i64 296, !7, i64 304, !6, i64 312, !6, i64 320, !10, i64 328, !10, i64 332, !6, i64 336, !7, i64 344, !6, i64 352, !7, i64 360}
!13 = !{!"", !14, i64 0, !14, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !7, i64 56, !7, i64 72, !10, i64 76, !6, i64 80}
!14 = !{!"float", !7, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!12, !10, i64 328}
!17 = !{!12, !6, i64 312}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}


; 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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @WavpackStreamSetChannelLayout(ptr nocapture noundef %0, i32 noundef %1, ptr noundef readonly %2) local_unnamed_addr #1 {
  %4 = and i32 %1, 255
  %5 = and i32 %1, -16711936
  %.not = icmp eq i32 %5, 0
  br i1 %.not, label %6, label %.loopexit

6:                                                ; preds = %3
  %7 = getelementptr inbounds i8, ptr %0, i64 28
  %8 = load i32, ptr %7, align 4, !tbaa !5
  %9 = icmp sgt i32 %4, %8
  br i1 %9, label %.loopexit, label %10

10:                                               ; preds = %6
  %11 = getelementptr inbounds i8, ptr %0, i64 328
  store i32 %1, ptr %11, align 8, !tbaa !14
  %12 = getelementptr inbounds i8, ptr %0, i64 312
  %13 = load ptr, ptr %12, align 8, !tbaa !15
  %.not38 = icmp eq ptr %13, null
  br i1 %.not38, label %15, label %14

14:                                               ; preds = %10
  tail call void @free(ptr noundef nonnull %13) #4
  store ptr null, ptr %12, align 8, !tbaa !15
  br label %15

15:                                               ; preds = %14, %10
  %16 = icmp ne i32 %4, 0
  %17 = icmp ne ptr %2, null
  %or.cond = and i1 %16, %17
  br i1 %or.cond, label %.preheader40.preheader, label %.loopexit

.preheader40.preheader:                           ; preds = %15
  %wide.trip.count = zext nneg i32 %4 to i64
  %min.iters.check = icmp ult i32 %4, 8
  br i1 %min.iters.check, label %.preheader40.preheader53, label %vector.ph

vector.ph:                                        ; preds = %.preheader40.preheader
  %n.vec = and i64 %wide.trip.count, 248
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ <i32 256, i32 256, i32 256, i32 256>, %vector.ph ], [ %22, %vector.body ]
  %vec.phi50 = phi <4 x i32> [ <i32 256, i32 256, i32 256, i32 256>, %vector.ph ], [ %23, %vector.body ]
  %18 = getelementptr inbounds i8, ptr %2, i64 %index
  %19 = getelementptr inbounds i8, ptr %18, i64 4
  %wide.load = load <4 x i8>, ptr %18, align 1, !tbaa !16
  %wide.load51 = load <4 x i8>, ptr %19, align 1, !tbaa !16
  %20 = zext <4 x i8> %wide.load to <4 x i32>
  %21 = zext <4 x i8> %wide.load51 to <4 x i32>
  %22 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %vec.phi, <4 x i32> %20)
  %23 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %vec.phi50, <4 x i32> %21)
  %index.next = add nuw i64 %index, 8
  %24 = icmp eq i64 %index.next, %n.vec
  br i1 %24, label %middle.block, label %vector.body, !llvm.loop !17

middle.block:                                     ; preds = %vector.body
  %rdx.minmax = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %22, <4 x i32> %23)
  %25 = tail call i32 @llvm.vector.reduce.smin.v4i32(<4 x i32> %rdx.minmax)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.loopexit52, label %.preheader40.preheader53

.preheader40.preheader53:                         ; preds = %middle.block, %.preheader40.preheader
  %indvars.iv.ph = phi i64 [ 0, %.preheader40.preheader ], [ %n.vec, %middle.block ]
  %.03141.ph = phi i32 [ 256, %.preheader40.preheader ], [ %25, %middle.block ]
  br label %.preheader40

.preheader40:                                     ; preds = %.preheader40.preheader53, %.preheader40
  %indvars.iv = phi i64 [ %indvars.iv.next, %.preheader40 ], [ %indvars.iv.ph, %.preheader40.preheader53 ]
  %.03141 = phi i32 [ %spec.select, %.preheader40 ], [ %.03141.ph, %.preheader40.preheader53 ]
  %26 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv
  %27 = load i8, ptr %26, align 1, !tbaa !16
  %28 = zext i8 %27 to i32
  %spec.select = tail call i32 @llvm.smin.i32(i32 %.03141, i32 %28)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit52, label %.preheader40, !llvm.loop !21

.loopexit52:                                      ; preds = %.preheader40, %middle.block
  %spec.select.lcssa = phi i32 [ %25, %middle.block ], [ %spec.select, %.preheader40 ]
  %29 = tail call noalias ptr @malloc(i64 noundef %wide.trip.count) #5
  store ptr %29, ptr %12, align 8, !tbaa !15
  %.not39 = icmp eq ptr %29, null
  br i1 %.not39, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %.loopexit52
  %30 = trunc nuw i32 %spec.select.lcssa to i8
  %xtraiter = and i64 %wide.trip.count, 3
  %31 = icmp ult i32 %4, 4
  br i1 %31, label %.loopexit.loopexit.unr-lcssa, label %.preheader.new

.preheader.new:                                   ; preds = %.preheader
  %unroll_iter = and i64 %wide.trip.count, 252
  br label %32

32:                                               ; preds = %32, %.preheader.new
  %indvars.iv45 = phi i64 [ 0, %.preheader.new ], [ %indvars.iv.next46.3, %32 ]
  %niter = phi i64 [ 0, %.preheader.new ], [ %niter.next.3, %32 ]
  %33 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv45
  %34 = load i8, ptr %33, align 1, !tbaa !16
  %35 = sub i8 %34, %30
  %36 = load ptr, ptr %12, align 8, !tbaa !15
  %37 = getelementptr inbounds i8, ptr %36, i64 %indvars.iv45
  store i8 %35, ptr %37, align 1, !tbaa !16
  %indvars.iv.next46 = or disjoint i64 %indvars.iv45, 1
  %38 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv.next46
  %39 = load i8, ptr %38, align 1, !tbaa !16
  %40 = sub i8 %39, %30
  %41 = load ptr, ptr %12, align 8, !tbaa !15
  %42 = getelementptr inbounds i8, ptr %41, i64 %indvars.iv.next46
  store i8 %40, ptr %42, align 1, !tbaa !16
  %indvars.iv.next46.1 = or disjoint i64 %indvars.iv45, 2
  %43 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv.next46.1
  %44 = load i8, ptr %43, align 1, !tbaa !16
  %45 = sub i8 %44, %30
  %46 = load ptr, ptr %12, align 8, !tbaa !15
  %47 = getelementptr inbounds i8, ptr %46, i64 %indvars.iv.next46.1
  store i8 %45, ptr %47, align 1, !tbaa !16
  %indvars.iv.next46.2 = or disjoint i64 %indvars.iv45, 3
  %48 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv.next46.2
  %49 = load i8, ptr %48, align 1, !tbaa !16
  %50 = sub i8 %49, %30
  %51 = load ptr, ptr %12, align 8, !tbaa !15
  %52 = getelementptr inbounds i8, ptr %51, i64 %indvars.iv.next46.2
  store i8 %50, ptr %52, align 1, !tbaa !16
  %indvars.iv.next46.3 = add nuw nsw i64 %indvars.iv45, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %32, !llvm.loop !22

.loopexit.loopexit.unr-lcssa:                     ; preds = %32, %.preheader
  %indvars.iv45.unr = phi i64 [ 0, %.preheader ], [ %indvars.iv.next46.3, %32 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.epil.preheader

.epil.preheader:                                  ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv45.epil = phi i64 [ %indvars.iv.next46.epil, %.epil.preheader ], [ %indvars.iv45.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %53 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv45.epil
  %54 = load i8, ptr %53, align 1, !tbaa !16
  %55 = sub i8 %54, %30
  %56 = load ptr, ptr %12, align 8, !tbaa !15
  %57 = getelementptr inbounds i8, ptr %56, i64 %indvars.iv45.epil
  store i8 %55, ptr %57, align 1, !tbaa !16
  %indvars.iv.next46.epil = add nuw nsw i64 %indvars.iv45.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, label %.epil.preheader, !llvm.loop !23

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader, %15, %.loopexit52, %3, %6
  %.033 = phi i32 [ 0, %6 ], [ 0, %3 ], [ 1, %.loopexit52 ], [ 1, %15 ], [ 1, %.epil.preheader ], [ 1, %.loopexit.loopexit.unr-lcssa ]
  ret i32 %.033
}

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #2

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.smin.v4i32(<4 x i32>) #3

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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 #2 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { nounwind }
attributes #5 = { nounwind 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, !11, i64 28}
!6 = !{!"WavpackContext", !7, i64 0, !12, i64 88, !11, i64 96, !11, i64 100, !12, i64 104, !11, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !13, i64 168, !13, i64 176, !13, i64 184, !13, i64 192, !13, i64 200, !13, i64 208, !11, i64 216, !11, i64 220, !11, i64 224, !11, i64 228, !11, i64 232, !11, i64 236, !11, i64 240, !11, i64 244, !11, i64 248, !11, i64 252, !11, i64 256, !11, i64 260, !11, i64 264, !11, i64 268, !11, i64 272, !11, i64 276, !11, i64 280, !11, i64 284, !12, i64 288, !12, i64 296, !9, i64 304, !12, i64 312, !12, i64 320, !11, i64 328, !11, i64 332, !12, i64 336, !9, i64 344, !12, i64 352, !9, i64 360}
!7 = !{!"", !8, i64 0, !8, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !9, i64 56, !9, i64 72, !11, i64 76, !12, i64 80}
!8 = !{!"float", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"any pointer", !9, i64 0}
!13 = !{!"long", !9, i64 0}
!14 = !{!6, !11, i64 328}
!15 = !{!6, !12, i64 312}
!16 = !{!9, !9, i64 0}
!17 = distinct !{!17, !18, !19, !20}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !18, !20, !19}
!22 = distinct !{!22, !18}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.unroll.disable"}


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