; LLVM IR from glaretechnologies/substrata :: opus/opus-1.3.1/silk (NLSF2A)

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

@silk_NLSF2A.ordering16 = external hidden constant [16 x i8], align 16
@silk_NLSF2A.ordering10 = external hidden constant [10 x i8], align 1
@silk_LSFCosTab_FIX_Q12 = external constant [129 x i16], align 16

; Function Attrs: nounwind uwtable
define dso_local void @silk_NLSF2A(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %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 [24 x i32], align 16
  %14 = alloca [13 x i32], align 16
  %15 = alloca [13 x i32], align 16
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca [24 x i32], align 16
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  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
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 96, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 52, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 52, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 96, ptr %22) #4
  %23 = load i32, ptr %7, align 4, !tbaa !9
  %24 = icmp eq i32 %23, 16
  %25 = zext i1 %24 to i64
  %26 = select i1 %24, ptr @silk_NLSF2A.ordering16, ptr @silk_NLSF2A.ordering10
  store ptr %26, ptr %9, align 8, !tbaa !5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %27

27:                                               ; preds = %77, %4
  %28 = load i32, ptr %10, align 4, !tbaa !9
  %29 = load i32, ptr %7, align 4, !tbaa !9
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %31, label %80

31:                                               ; preds = %27
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = load i32, ptr %10, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds i16, ptr %32, i64 %34
  %36 = load i16, ptr %35, align 2, !tbaa !11
  %37 = sext i16 %36 to i32
  %38 = ashr i32 %37, 8
  store i32 %38, ptr %18, align 4, !tbaa !9
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = load i32, ptr %10, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds i16, ptr %39, i64 %41
  %43 = load i16, ptr %42, align 2, !tbaa !11
  %44 = sext i16 %43 to i32
  %45 = load i32, ptr %18, align 4, !tbaa !9
  %46 = shl i32 %45, 8
  %47 = sub nsw i32 %44, %46
  store i32 %47, ptr %19, align 4, !tbaa !9
  %48 = load i32, ptr %18, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [129 x i16], ptr @silk_LSFCosTab_FIX_Q12, i64 0, i64 %49
  %51 = load i16, ptr %50, align 2, !tbaa !11
  %52 = sext i16 %51 to i32
  store i32 %52, ptr %20, align 4, !tbaa !9
  %53 = load i32, ptr %18, align 4, !tbaa !9
  %54 = add nsw i32 %53, 1
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [129 x i16], ptr @silk_LSFCosTab_FIX_Q12, i64 0, i64 %55
  %57 = load i16, ptr %56, align 2, !tbaa !11
  %58 = sext i16 %57 to i32
  %59 = load i32, ptr %20, align 4, !tbaa !9
  %60 = sub nsw i32 %58, %59
  store i32 %60, ptr %21, align 4, !tbaa !9
  %61 = load i32, ptr %20, align 4, !tbaa !9
  %62 = shl i32 %61, 8
  %63 = load i32, ptr %21, align 4, !tbaa !9
  %64 = load i32, ptr %19, align 4, !tbaa !9
  %65 = mul nsw i32 %63, %64
  %66 = add nsw i32 %62, %65
  %67 = ashr i32 %66, 3
  %68 = add nsw i32 %67, 1
  %69 = ashr i32 %68, 1
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  %71 = load i32, ptr %10, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds i8, ptr %70, i64 %72
  %74 = load i8, ptr %73, align 1, !tbaa !13
  %75 = zext i8 %74 to i64
  %76 = getelementptr inbounds [24 x i32], ptr %13, i64 0, i64 %75
  store i32 %69, ptr %76, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %31
  %78 = load i32, ptr %10, align 4, !tbaa !9
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %10, align 4, !tbaa !9
  br label %27, !llvm.loop !14

80:                                               ; preds = %27
  %81 = load i32, ptr %7, align 4, !tbaa !9
  %82 = ashr i32 %81, 1
  store i32 %82, ptr %12, align 4, !tbaa !9
  %83 = getelementptr inbounds [13 x i32], ptr %14, i64 0, i64 0
  %84 = getelementptr inbounds [24 x i32], ptr %13, i64 0, i64 0
  %85 = load i32, ptr %12, align 4, !tbaa !9
  call void @silk_NLSF2A_find_poly(ptr noundef %83, ptr noundef %84, i32 noundef %85)
  %86 = getelementptr inbounds [13 x i32], ptr %15, i64 0, i64 0
  %87 = getelementptr inbounds [24 x i32], ptr %13, i64 0, i64 1
  %88 = load i32, ptr %12, align 4, !tbaa !9
  call void @silk_NLSF2A_find_poly(ptr noundef %86, ptr noundef %87, i32 noundef %88)
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %89

89:                                               ; preds = %130, %80
  %90 = load i32, ptr %10, align 4, !tbaa !9
  %91 = load i32, ptr %12, align 4, !tbaa !9
  %92 = icmp slt i32 %90, %91
  br i1 %92, label %93, label %133

93:                                               ; preds = %89
  %94 = load i32, ptr %10, align 4, !tbaa !9
  %95 = add nsw i32 %94, 1
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [13 x i32], ptr %14, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !9
  %99 = load i32, ptr %10, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [13 x i32], ptr %14, i64 0, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !9
  %103 = add nsw i32 %98, %102
  store i32 %103, ptr %16, align 4, !tbaa !9
  %104 = load i32, ptr %10, align 4, !tbaa !9
  %105 = add nsw i32 %104, 1
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [13 x i32], ptr %15, i64 0, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !9
  %109 = load i32, ptr %10, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [13 x i32], ptr %15, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !9
  %113 = sub nsw i32 %108, %112
  store i32 %113, ptr %17, align 4, !tbaa !9
  %114 = load i32, ptr %17, align 4, !tbaa !9
  %115 = sub nsw i32 0, %114
  %116 = load i32, ptr %16, align 4, !tbaa !9
  %117 = sub nsw i32 %115, %116
  %118 = load i32, ptr %10, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [24 x i32], ptr %22, i64 0, i64 %119
  store i32 %117, ptr %120, align 4, !tbaa !9
  %121 = load i32, ptr %17, align 4, !tbaa !9
  %122 = load i32, ptr %16, align 4, !tbaa !9
  %123 = sub nsw i32 %121, %122
  %124 = load i32, ptr %7, align 4, !tbaa !9
  %125 = load i32, ptr %10, align 4, !tbaa !9
  %126 = sub nsw i32 %124, %125
  %127 = sub nsw i32 %126, 1
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [24 x i32], ptr %22, i64 0, i64 %128
  store i32 %123, ptr %129, align 4, !tbaa !9
  br label %130

130:                                              ; preds = %93
  %131 = load i32, ptr %10, align 4, !tbaa !9
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %10, align 4, !tbaa !9
  br label %89, !llvm.loop !16

133:                                              ; preds = %89
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = getelementptr inbounds [24 x i32], ptr %22, i64 0, i64 0
  %136 = load i32, ptr %7, align 4, !tbaa !9
  call void @silk_LPC_fit(ptr noundef %134, ptr noundef %135, i32 noundef 12, i32 noundef 17, i32 noundef %136)
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %137

137:                                              ; preds = %175, %133
  %138 = load i32, ptr %8, align 4, !tbaa !9
  %139 = load ptr, ptr %5, align 8, !tbaa !5
  %140 = load i32, ptr %7, align 4, !tbaa !9
  %141 = call i32 @silk_LPC_inverse_pred_gain_c(ptr noundef %139, i32 noundef %140)
  %142 = icmp eq i32 %141, 0
  br i1 %142, label %143, label %146

143:                                              ; preds = %137
  %144 = load i32, ptr %11, align 4, !tbaa !9
  %145 = icmp slt i32 %144, 16
  br label %146

146:                                              ; preds = %143, %137
  %147 = phi i1 [ false, %137 ], [ %145, %143 ]
  br i1 %147, label %148, label %178

148:                                              ; preds = %146
  %149 = getelementptr inbounds [24 x i32], ptr %22, i64 0, i64 0
  %150 = load i32, ptr %7, align 4, !tbaa !9
  %151 = load i32, ptr %11, align 4, !tbaa !9
  %152 = shl i32 2, %151
  %153 = sub nsw i32 65536, %152
  call void @silk_bwexpander_32(ptr noundef %149, i32 noundef %150, i32 noundef %153)
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %154

154:                                              ; preds = %171, %148
  %155 = load i32, ptr %10, align 4, !tbaa !9
  %156 = load i32, ptr %7, align 4, !tbaa !9
  %157 = icmp slt i32 %155, %156
  br i1 %157, label %158, label %174

158:                                              ; preds = %154
  %159 = load i32, ptr %10, align 4, !tbaa !9
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [24 x i32], ptr %22, i64 0, i64 %160
  %162 = load i32, ptr %161, align 4, !tbaa !9
  %163 = ashr i32 %162, 4
  %164 = add nsw i32 %163, 1
  %165 = ashr i32 %164, 1
  %166 = trunc i32 %165 to i16
  %167 = load ptr, ptr %5, align 8, !tbaa !5
  %168 = load i32, ptr %10, align 4, !tbaa !9
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds i16, ptr %167, i64 %169
  store i16 %166, ptr %170, align 2, !tbaa !11
  br label %171

171:                                              ; preds = %158
  %172 = load i32, ptr %10, align 4, !tbaa !9
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr %10, align 4, !tbaa !9
  br label %154, !llvm.loop !17

174:                                              ; preds = %154
  br label %175

175:                                              ; preds = %174
  %176 = load i32, ptr %11, align 4, !tbaa !9
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %11, align 4, !tbaa !9
  br label %137, !llvm.loop !18

178:                                              ; preds = %146
  call void @llvm.lifetime.end.p0(i64 96, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 52, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 52, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 96, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #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 void
}

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @silk_NLSF2A_find_poly(ptr noundef, ptr noundef, i32 noundef) #2

declare void @silk_LPC_fit(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) #3

declare i32 @silk_LPC_inverse_pred_gain_c(ptr noundef, i32 noundef) #3

declare void @silk_bwexpander_32(ptr noundef, i32 noundef, i32 noundef) #3

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

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

!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, !12, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}


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

@silk_NLSF2A.ordering16 = external hidden local_unnamed_addr constant [16 x i8], align 16
@silk_NLSF2A.ordering10 = external hidden local_unnamed_addr constant [10 x i8], align 1
@silk_LSFCosTab_FIX_Q12 = external local_unnamed_addr constant [129 x i16], align 16

; Function Attrs: nounwind uwtable
define dso_local void @silk_NLSF2A(ptr noundef %0, ptr nocapture noundef readonly %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = alloca [24 x i32], align 16
  %6 = alloca [13 x i32], align 16
  %7 = alloca [13 x i32], align 16
  %8 = alloca [24 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 52, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 52, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %8) #4
  %9 = icmp eq i32 %2, 16
  %10 = select i1 %9, ptr @silk_NLSF2A.ordering16, ptr @silk_NLSF2A.ordering10
  %11 = icmp sgt i32 %2, 0
  br i1 %11, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %4
  %wide.trip.count = zext nneg i32 %2 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %12 = getelementptr inbounds i16, ptr %1, i64 %indvars.iv
  %13 = load i16, ptr %12, align 2, !tbaa !5
  %14 = sext i16 %13 to i32
  %15 = ashr i32 %14, 8
  %16 = and i32 %14, 255
  %17 = sext i32 %15 to i64
  %18 = getelementptr inbounds [129 x i16], ptr @silk_LSFCosTab_FIX_Q12, i64 0, i64 %17
  %19 = load i16, ptr %18, align 2, !tbaa !5
  %20 = sext i16 %19 to i32
  %21 = add nsw i32 %15, 1
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [129 x i16], ptr @silk_LSFCosTab_FIX_Q12, i64 0, i64 %22
  %24 = load i16, ptr %23, align 2, !tbaa !5
  %25 = sext i16 %24 to i32
  %26 = sub nsw i32 %25, %20
  %27 = shl nsw i32 %20, 8
  %28 = mul nsw i32 %26, %16
  %29 = add nsw i32 %28, %27
  %30 = ashr i32 %29, 3
  %31 = add nsw i32 %30, 1
  %32 = ashr i32 %31, 1
  %33 = getelementptr inbounds i8, ptr %10, i64 %indvars.iv
  %34 = load i8, ptr %33, align 1, !tbaa !9
  %35 = zext i8 %34 to i64
  %36 = getelementptr inbounds [24 x i32], ptr %5, i64 0, i64 %35
  store i32 %32, ptr %36, align 4, !tbaa !10
  %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 %._crit_edge, label %.lr.ph, !llvm.loop !12

._crit_edge:                                      ; preds = %.lr.ph, %4
  %37 = ashr i32 %2, 1
  call void @silk_NLSF2A_find_poly(ptr noundef nonnull %6, ptr noundef nonnull %5, i32 noundef %37)
  %38 = getelementptr inbounds i8, ptr %5, i64 4
  call void @silk_NLSF2A_find_poly(ptr noundef nonnull %7, ptr noundef nonnull %38, i32 noundef %37)
  %39 = icmp sgt i32 %37, 0
  br i1 %39, label %.lr.ph53.preheader, label %._crit_edge54

.lr.ph53.preheader:                               ; preds = %._crit_edge
  %wide.trip.count68 = zext nneg i32 %37 to i64
  %.pre = load i32, ptr %6, align 16, !tbaa !10
  %.pre75 = load i32, ptr %7, align 16, !tbaa !10
  br label %.lr.ph53

.lr.ph53:                                         ; preds = %.lr.ph53.preheader, %.lr.ph53
  %40 = phi i32 [ %.pre75, %.lr.ph53.preheader ], [ %46, %.lr.ph53 ]
  %41 = phi i32 [ %.pre, %.lr.ph53.preheader ], [ %43, %.lr.ph53 ]
  %indvars.iv65 = phi i64 [ 0, %.lr.ph53.preheader ], [ %indvars.iv.next66, %.lr.ph53 ]
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %42 = getelementptr inbounds [13 x i32], ptr %6, i64 0, i64 %indvars.iv.next66
  %43 = load i32, ptr %42, align 4, !tbaa !10
  %44 = add nsw i32 %41, %43
  %45 = getelementptr inbounds [13 x i32], ptr %7, i64 0, i64 %indvars.iv.next66
  %46 = load i32, ptr %45, align 4, !tbaa !10
  %47 = sub nsw i32 %46, %40
  %48 = add i32 %44, %47
  %49 = sub i32 0, %48
  %50 = getelementptr inbounds [24 x i32], ptr %8, i64 0, i64 %indvars.iv65
  store i32 %49, ptr %50, align 4, !tbaa !10
  %51 = sub nsw i32 %47, %44
  %52 = trunc i64 %indvars.iv65 to i32
  %53 = xor i32 %52, -1
  %54 = add i32 %53, %2
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [24 x i32], ptr %8, i64 0, i64 %55
  store i32 %51, ptr %56, align 4, !tbaa !10
  %exitcond69.not = icmp eq i64 %indvars.iv.next66, %wide.trip.count68
  br i1 %exitcond69.not, label %._crit_edge54, label %.lr.ph53, !llvm.loop !14

._crit_edge54:                                    ; preds = %.lr.ph53, %._crit_edge
  call void @silk_LPC_fit(ptr noundef %0, ptr noundef nonnull %8, i32 noundef 12, i32 noundef 17, i32 noundef %2) #4
  %57 = call i32 @silk_LPC_inverse_pred_gain_c(ptr noundef %0, i32 noundef %2) #4
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %.lr.ph61, label %._crit_edge62

.lr.ph61:                                         ; preds = %._crit_edge54
  br i1 %11, label %.lr.ph57.us.preheader, label %.lr.ph61.split

.lr.ph57.us.preheader:                            ; preds = %.lr.ph61
  %wide.trip.count73 = zext nneg i32 %2 to i64
  %min.iters.check = icmp ult i32 %2, 8
  %n.vec = and i64 %wide.trip.count73, 2147483640
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count73
  br label %.lr.ph57.us

.lr.ph57.us:                                      ; preds = %.lr.ph57.us.preheader, %._crit_edge58.us
  %.04859.us = phi i32 [ %80, %._crit_edge58.us ], [ 0, %.lr.ph57.us.preheader ]
  %.neg.us = shl nsw i32 -2, %.04859.us
  %59 = add nsw i32 %.neg.us, 65536
  call void @silk_bwexpander_32(ptr noundef nonnull %8, i32 noundef %2, i32 noundef %59) #4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %.lr.ph57.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.lr.ph57.us ]
  %60 = getelementptr inbounds [24 x i32], ptr %8, i64 0, i64 %index
  %61 = getelementptr inbounds i8, ptr %60, i64 16
  %wide.load = load <4 x i32>, ptr %60, align 16, !tbaa !10
  %wide.load78 = load <4 x i32>, ptr %61, align 16, !tbaa !10
  %62 = lshr <4 x i32> %wide.load, <i32 4, i32 4, i32 4, i32 4>
  %63 = lshr <4 x i32> %wide.load78, <i32 4, i32 4, i32 4, i32 4>
  %64 = add nuw nsw <4 x i32> %62, <i32 1, i32 1, i32 1, i32 1>
  %65 = add nuw nsw <4 x i32> %63, <i32 1, i32 1, i32 1, i32 1>
  %66 = lshr <4 x i32> %64, <i32 1, i32 1, i32 1, i32 1>
  %67 = lshr <4 x i32> %65, <i32 1, i32 1, i32 1, i32 1>
  %68 = trunc <4 x i32> %66 to <4 x i16>
  %69 = trunc <4 x i32> %67 to <4 x i16>
  %70 = getelementptr inbounds i16, ptr %0, i64 %index
  %71 = getelementptr inbounds i8, ptr %70, i64 8
  store <4 x i16> %68, ptr %70, align 2, !tbaa !5
  store <4 x i16> %69, ptr %71, align 2, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %72 = icmp eq i64 %index.next, %n.vec
  br i1 %72, label %middle.block, label %vector.body, !llvm.loop !15

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

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph57.us
  %indvars.iv70.ph = phi i64 [ 0, %.lr.ph57.us ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv70 = phi i64 [ %indvars.iv.next71, %scalar.ph ], [ %indvars.iv70.ph, %scalar.ph.preheader ]
  %73 = getelementptr inbounds [24 x i32], ptr %8, i64 0, i64 %indvars.iv70
  %74 = load i32, ptr %73, align 4, !tbaa !10
  %75 = lshr i32 %74, 4
  %76 = add nuw nsw i32 %75, 1
  %77 = lshr i32 %76, 1
  %78 = trunc i32 %77 to i16
  %79 = getelementptr inbounds i16, ptr %0, i64 %indvars.iv70
  store i16 %78, ptr %79, align 2, !tbaa !5
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %exitcond74.not = icmp eq i64 %indvars.iv.next71, %wide.trip.count73
  br i1 %exitcond74.not, label %._crit_edge58.us, label %scalar.ph, !llvm.loop !18

._crit_edge58.us:                                 ; preds = %scalar.ph, %middle.block
  %80 = add nuw nsw i32 %.04859.us, 1
  %81 = call i32 @silk_LPC_inverse_pred_gain_c(ptr noundef nonnull %0, i32 noundef %2) #4
  %82 = icmp eq i32 %81, 0
  %83 = icmp ult i32 %.04859.us, 15
  %84 = and i1 %82, %83
  br i1 %84, label %.lr.ph57.us, label %._crit_edge62, !llvm.loop !19

.lr.ph61.split:                                   ; preds = %.lr.ph61, %.lr.ph61.split
  %.04859 = phi i32 [ %86, %.lr.ph61.split ], [ 0, %.lr.ph61 ]
  %.neg = shl nsw i32 -2, %.04859
  %85 = add nsw i32 %.neg, 65536
  call void @silk_bwexpander_32(ptr noundef nonnull %8, i32 noundef %2, i32 noundef %85) #4
  %86 = add nuw nsw i32 %.04859, 1
  %87 = call i32 @silk_LPC_inverse_pred_gain_c(ptr noundef %0, i32 noundef %2) #4
  %88 = icmp eq i32 %87, 0
  %89 = icmp ult i32 %.04859, 15
  %90 = and i1 %88, %89
  br i1 %90, label %.lr.ph61.split, label %._crit_edge62, !llvm.loop !19

._crit_edge62:                                    ; preds = %.lr.ph61.split, %._crit_edge58.us, %._crit_edge54
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 52, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 52, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %5) #4
  ret void
}

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @silk_NLSF2A_find_poly(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @silk_LPC_fit(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare i32 @silk_LPC_inverse_pred_gain_c(ptr noundef, i32 noundef) local_unnamed_addr #3

declare void @silk_bwexpander_32(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

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

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

!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 = !{!"short", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13, !16, !17}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = distinct !{!18, !13, !17, !16}
!19 = distinct !{!19, !13}


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