; LLVM IR from merpheus-dev/LavaEngine :: src/Utils/soloud/src/audiosource/wav (dr_impl)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; 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: mustprogress uwtable
define dso_local void @drmp3dec_f32_to_s16(ptr noundef %0, ptr noundef %1, i32 noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca <4 x float>, align 16
  %10 = alloca <4 x float>, align 16
  %11 = alloca <4 x float>, align 16
  %12 = alloca <4 x float>, align 16
  %13 = alloca <4 x float>, align 16
  %14 = alloca <2 x i64>, align 16
  %15 = alloca float, align 4
  %16 = alloca i16, align 2
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %17 = load i32, ptr %6, align 4, !tbaa !9
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %19, label %192

19:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %20 = load i32, ptr %6, align 4, !tbaa !9
  %21 = and i32 %20, -8
  store i32 %21, ptr %8, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %137, %19
  %23 = load i32, ptr %7, align 4, !tbaa !9
  %24 = load i32, ptr %8, align 4, !tbaa !9
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %26, label %140

26:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #3
  %27 = call noundef <4 x float> @_ZL11_mm_set1_psf(float noundef 3.276800e+04)
  store <4 x float> %27, ptr %9, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #3
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = load i32, ptr %7, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds float, ptr %28, i64 %30
  %32 = call noundef <4 x float> @_ZL12_mm_loadu_psPKf(ptr noundef %31)
  %33 = load <4 x float>, ptr %9, align 16, !tbaa !11
  %34 = call noundef <4 x float> @_ZL10_mm_mul_psDv4_fS_(<4 x float> noundef %32, <4 x float> noundef %33)
  store <4 x float> %34, ptr %10, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #3
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = load i32, ptr %7, align 4, !tbaa !9
  %37 = add nsw i32 %36, 4
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds float, ptr %35, i64 %38
  %40 = call noundef <4 x float> @_ZL12_mm_loadu_psPKf(ptr noundef %39)
  %41 = load <4 x float>, ptr %9, align 16, !tbaa !11
  %42 = call noundef <4 x float> @_ZL10_mm_mul_psDv4_fS_(<4 x float> noundef %40, <4 x float> noundef %41)
  store <4 x float> %42, ptr %11, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #3
  %43 = call noundef <4 x float> @_ZL11_mm_set1_psf(float noundef 3.276700e+04)
  store <4 x float> %43, ptr %12, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #3
  %44 = call noundef <4 x float> @_ZL11_mm_set1_psf(float noundef -3.276800e+04)
  store <4 x float> %44, ptr %13, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #3
  %45 = load <4 x float>, ptr %10, align 16, !tbaa !11
  %46 = load <4 x float>, ptr %12, align 16, !tbaa !11
  %47 = call noundef <4 x float> @_ZL10_mm_min_psDv4_fS_(<4 x float> noundef %45, <4 x float> noundef %46)
  %48 = load <4 x float>, ptr %13, align 16, !tbaa !11
  %49 = call noundef <4 x float> @_ZL10_mm_max_psDv4_fS_(<4 x float> noundef %47, <4 x float> noundef %48)
  %50 = call noundef <2 x i64> @_ZL15_mm_cvtps_epi32Dv4_f(<4 x float> noundef %49)
  %51 = load <4 x float>, ptr %11, align 16, !tbaa !11
  %52 = load <4 x float>, ptr %12, align 16, !tbaa !11
  %53 = call noundef <4 x float> @_ZL10_mm_min_psDv4_fS_(<4 x float> noundef %51, <4 x float> noundef %52)
  %54 = load <4 x float>, ptr %13, align 16, !tbaa !11
  %55 = call noundef <4 x float> @_ZL10_mm_max_psDv4_fS_(<4 x float> noundef %53, <4 x float> noundef %54)
  %56 = call noundef <2 x i64> @_ZL15_mm_cvtps_epi32Dv4_f(<4 x float> noundef %55)
  %57 = call noundef <2 x i64> @_ZL15_mm_packs_epi32Dv2_xS_(<2 x i64> noundef %50, <2 x i64> noundef %56)
  store <2 x i64> %57, ptr %14, align 16, !tbaa !11
  %58 = load <2 x i64>, ptr %14, align 16, !tbaa !11
  %59 = bitcast <2 x i64> %58 to <8 x i16>
  %60 = extractelement <8 x i16> %59, i64 0
  %61 = zext i16 %60 to i32
  %62 = trunc i32 %61 to i16
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = load i32, ptr %7, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds i16, ptr %63, i64 %65
  store i16 %62, ptr %66, align 2, !tbaa !12
  %67 = load <2 x i64>, ptr %14, align 16, !tbaa !11
  %68 = bitcast <2 x i64> %67 to <8 x i16>
  %69 = extractelement <8 x i16> %68, i64 1
  %70 = zext i16 %69 to i32
  %71 = trunc i32 %70 to i16
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = load i32, ptr %7, align 4, !tbaa !9
  %74 = add nsw i32 %73, 1
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i16, ptr %72, i64 %75
  store i16 %71, ptr %76, align 2, !tbaa !12
  %77 = load <2 x i64>, ptr %14, align 16, !tbaa !11
  %78 = bitcast <2 x i64> %77 to <8 x i16>
  %79 = extractelement <8 x i16> %78, i64 2
  %80 = zext i16 %79 to i32
  %81 = trunc i32 %80 to i16
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = load i32, ptr %7, align 4, !tbaa !9
  %84 = add nsw i32 %83, 2
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i16, ptr %82, i64 %85
  store i16 %81, ptr %86, align 2, !tbaa !12
  %87 = load <2 x i64>, ptr %14, align 16, !tbaa !11
  %88 = bitcast <2 x i64> %87 to <8 x i16>
  %89 = extractelement <8 x i16> %88, i64 3
  %90 = zext i16 %89 to i32
  %91 = trunc i32 %90 to i16
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = load i32, ptr %7, align 4, !tbaa !9
  %94 = add nsw i32 %93, 3
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds i16, ptr %92, i64 %95
  store i16 %91, ptr %96, align 2, !tbaa !12
  %97 = load <2 x i64>, ptr %14, align 16, !tbaa !11
  %98 = bitcast <2 x i64> %97 to <8 x i16>
  %99 = extractelement <8 x i16> %98, i64 4
  %100 = zext i16 %99 to i32
  %101 = trunc i32 %100 to i16
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = load i32, ptr %7, align 4, !tbaa !9
  %104 = add nsw i32 %103, 4
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds i16, ptr %102, i64 %105
  store i16 %101, ptr %106, align 2, !tbaa !12
  %107 = load <2 x i64>, ptr %14, align 16, !tbaa !11
  %108 = bitcast <2 x i64> %107 to <8 x i16>
  %109 = extractelement <8 x i16> %108, i64 5
  %110 = zext i16 %109 to i32
  %111 = trunc i32 %110 to i16
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = load i32, ptr %7, align 4, !tbaa !9
  %114 = add nsw i32 %113, 5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds i16, ptr %112, i64 %115
  store i16 %111, ptr %116, align 2, !tbaa !12
  %117 = load <2 x i64>, ptr %14, align 16, !tbaa !11
  %118 = bitcast <2 x i64> %117 to <8 x i16>
  %119 = extractelement <8 x i16> %118, i64 6
  %120 = zext i16 %119 to i32
  %121 = trunc i32 %120 to i16
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = load i32, ptr %7, align 4, !tbaa !9
  %124 = add nsw i32 %123, 6
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds i16, ptr %122, i64 %125
  store i16 %121, ptr %126, align 2, !tbaa !12
  %127 = load <2 x i64>, ptr %14, align 16, !tbaa !11
  %128 = bitcast <2 x i64> %127 to <8 x i16>
  %129 = extractelement <8 x i16> %128, i64 7
  %130 = zext i16 %129 to i32
  %131 = trunc i32 %130 to i16
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = load i32, ptr %7, align 4, !tbaa !9
  %134 = add nsw i32 %133, 7
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds i16, ptr %132, i64 %135
  store i16 %131, ptr %136, align 2, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #3
  br label %137

137:                                              ; preds = %26
  %138 = load i32, ptr %7, align 4, !tbaa !9
  %139 = add nsw i32 %138, 8
  store i32 %139, ptr %7, align 4, !tbaa !9
  br label %22, !llvm.loop !14

140:                                              ; preds = %22
  br label %141

141:                                              ; preds = %188, %140
  %142 = load i32, ptr %7, align 4, !tbaa !9
  %143 = load i32, ptr %6, align 4, !tbaa !9
  %144 = icmp slt i32 %142, %143
  br i1 %144, label %145, label %191

145:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %146 = load ptr, ptr %4, align 8, !tbaa !5
  %147 = load i32, ptr %7, align 4, !tbaa !9
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds float, ptr %146, i64 %148
  %150 = load float, ptr %149, align 4, !tbaa !16
  %151 = fmul float %150, 3.276800e+04
  store float %151, ptr %15, align 4, !tbaa !16
  %152 = load float, ptr %15, align 4, !tbaa !16
  %153 = fpext float %152 to double
  %154 = fcmp oge double %153, 3.276650e+04
  br i1 %154, label %155, label %160

155:                                              ; preds = %145
  %156 = load ptr, ptr %5, align 8, !tbaa !5
  %157 = load i32, ptr %7, align 4, !tbaa !9
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds i16, ptr %156, i64 %158
  store i16 32767, ptr %159, align 2, !tbaa !12
  br label %187

160:                                              ; preds = %145
  %161 = load float, ptr %15, align 4, !tbaa !16
  %162 = fpext float %161 to double
  %163 = fcmp ole double %162, -3.276750e+04
  br i1 %163, label %164, label %169

164:                                              ; preds = %160
  %165 = load ptr, ptr %5, align 8, !tbaa !5
  %166 = load i32, ptr %7, align 4, !tbaa !9
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds i16, ptr %165, i64 %167
  store i16 -32768, ptr %168, align 2, !tbaa !12
  br label %186

169:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 2, ptr %16) #3
  %170 = load float, ptr %15, align 4, !tbaa !16
  %171 = fadd float %170, 5.000000e-01
  %172 = fptosi float %171 to i16
  store i16 %172, ptr %16, align 2, !tbaa !12
  %173 = load i16, ptr %16, align 2, !tbaa !12
  %174 = sext i16 %173 to i32
  %175 = icmp slt i32 %174, 0
  %176 = zext i1 %175 to i32
  %177 = load i16, ptr %16, align 2, !tbaa !12
  %178 = sext i16 %177 to i32
  %179 = sub nsw i32 %178, %176
  %180 = trunc i32 %179 to i16
  store i16 %180, ptr %16, align 2, !tbaa !12
  %181 = load i16, ptr %16, align 2, !tbaa !12
  %182 = load ptr, ptr %5, align 8, !tbaa !5
  %183 = load i32, ptr %7, align 4, !tbaa !9
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds i16, ptr %182, i64 %184
  store i16 %181, ptr %185, align 2, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 2, ptr %16) #3
  br label %186

186:                                              ; preds = %169, %164
  br label %187

187:                                              ; preds = %186, %155
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  br label %188

188:                                              ; preds = %187
  %189 = load i32, ptr %7, align 4, !tbaa !9
  %190 = add nsw i32 %189, 1
  store i32 %190, ptr %7, align 4, !tbaa !9
  br label %141, !llvm.loop !18

191:                                              ; preds = %141
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %192

192:                                              ; preds = %191, %3
  ret void
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <4 x float> @_ZL11_mm_set1_psf(float noundef) #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <4 x float> @_ZL10_mm_mul_psDv4_fS_(<4 x float> noundef, <4 x float> noundef) #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <4 x float> @_ZL12_mm_loadu_psPKf(ptr noundef) #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <2 x i64> @_ZL15_mm_packs_epi32Dv2_xS_(<2 x i64> noundef, <2 x i64> noundef) #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <2 x i64> @_ZL15_mm_cvtps_epi32Dv4_f(<4 x float> noundef) #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <4 x float> @_ZL10_mm_max_psDv4_fS_(<4 x float> noundef, <4 x float> noundef) #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <4 x float> @_ZL10_mm_min_psDv4_fS_(<4 x float> noundef, <4 x float> noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="128" "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 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="128" "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 }

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @drmp3dec_f32_to_s16(ptr noundef %0, ptr nocapture noundef writeonly %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = icmp sgt i32 %2, 0
  br i1 %4, label %5, label %.loopexit

5:                                                ; preds = %3
  %6 = and i32 %2, 2147483640
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %.preheader, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %5
  %7 = zext nneg i32 %6 to i64
  br label %.lr.ph

.preheader.loopexit:                              ; preds = %.lr.ph
  %8 = trunc nuw nsw i64 %indvars.iv.next to i32
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %5
  %.0.lcssa = phi i32 [ 0, %5 ], [ %8, %.preheader.loopexit ]
  %9 = icmp slt i32 %.0.lcssa, %2
  br i1 %9, label %.lr.ph61.preheader, label %.loopexit

.lr.ph61.preheader:                               ; preds = %.preheader
  %10 = zext i32 %.0.lcssa to i64
  %wide.trip.count = zext nneg i32 %2 to i64
  %11 = sub nsw i64 %wide.trip.count, %10
  %min.iters.check = icmp ult i64 %11, 4
  br i1 %min.iters.check, label %.lr.ph61.preheader68, label %vector.ph

.lr.ph61.preheader68:                             ; preds = %middle.block, %.lr.ph61.preheader
  %indvars.iv63.ph = phi i64 [ %10, %.lr.ph61.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph61

vector.ph:                                        ; preds = %.lr.ph61.preheader
  %n.vec = and i64 %11, -4
  %ind.end = add nsw i64 %n.vec, %10
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = add i64 %index, %10
  %12 = getelementptr inbounds float, ptr %0, i64 %offset.idx
  %wide.load = load <4 x float>, ptr %12, align 4, !tbaa !5
  %13 = fmul <4 x float> %wide.load, <float 3.276800e+04, float 3.276800e+04, float 3.276800e+04, float 3.276800e+04>
  %14 = fcmp ult <4 x float> %13, <float 3.276650e+04, float 3.276650e+04, float 3.276650e+04, float 3.276650e+04>
  %15 = fcmp ole <4 x float> %13, <float -3.276750e+04, float -3.276750e+04, float -3.276750e+04, float -3.276750e+04>
  %16 = fadd <4 x float> %13, <float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01>
  %17 = fptosi <4 x float> %16 to <4 x i16>
  %18 = ashr <4 x i16> %17, <i16 15, i16 15, i16 15, i16 15>
  %19 = add <4 x i16> %18, %17
  %predphi = select <4 x i1> %15, <4 x i16> <i16 -32768, i16 -32768, i16 -32768, i16 -32768>, <4 x i16> %19
  %predphi67 = select <4 x i1> %14, <4 x i16> %predphi, <4 x i16> <i16 32767, i16 32767, i16 32767, i16 32767>
  %20 = getelementptr inbounds i16, ptr %1, i64 %offset.idx
  store <4 x i16> %predphi67, ptr %20, align 2, !tbaa !9
  %index.next = add nuw i64 %index, 4
  %21 = icmp eq i64 %index.next, %n.vec
  br i1 %21, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %11, %n.vec
  br i1 %cmp.n, label %.loopexit, label %.lr.ph61.preheader68

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %22 = tail call noundef <4 x float> @_ZL11_mm_set1_psf(float noundef 3.276800e+04)
  %23 = getelementptr inbounds float, ptr %0, i64 %indvars.iv
  %24 = tail call noundef <4 x float> @_ZL12_mm_loadu_psPKf(ptr noundef %23)
  %25 = tail call noundef <4 x float> @_ZL10_mm_mul_psDv4_fS_(<4 x float> noundef %24, <4 x float> noundef %22)
  %26 = or disjoint i64 %indvars.iv, 4
  %27 = getelementptr inbounds float, ptr %0, i64 %26
  %28 = tail call noundef <4 x float> @_ZL12_mm_loadu_psPKf(ptr noundef nonnull %27)
  %29 = tail call noundef <4 x float> @_ZL10_mm_mul_psDv4_fS_(<4 x float> noundef %28, <4 x float> noundef %22)
  %30 = tail call noundef <4 x float> @_ZL11_mm_set1_psf(float noundef 3.276700e+04)
  %31 = tail call noundef <4 x float> @_ZL11_mm_set1_psf(float noundef -3.276800e+04)
  %32 = tail call noundef <4 x float> @_ZL10_mm_min_psDv4_fS_(<4 x float> noundef %25, <4 x float> noundef %30)
  %33 = tail call noundef <4 x float> @_ZL10_mm_max_psDv4_fS_(<4 x float> noundef %32, <4 x float> noundef %31)
  %34 = tail call noundef <2 x i64> @_ZL15_mm_cvtps_epi32Dv4_f(<4 x float> noundef %33)
  %35 = tail call noundef <4 x float> @_ZL10_mm_min_psDv4_fS_(<4 x float> noundef %29, <4 x float> noundef %30)
  %36 = tail call noundef <4 x float> @_ZL10_mm_max_psDv4_fS_(<4 x float> noundef %35, <4 x float> noundef %31)
  %37 = tail call noundef <2 x i64> @_ZL15_mm_cvtps_epi32Dv4_f(<4 x float> noundef %36)
  %38 = tail call noundef <2 x i64> @_ZL15_mm_packs_epi32Dv2_xS_(<2 x i64> noundef %34, <2 x i64> noundef %37)
  %39 = getelementptr inbounds i16, ptr %1, i64 %indvars.iv
  store <2 x i64> %38, ptr %39, align 2, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 8
  %40 = icmp ult i64 %indvars.iv.next, %7
  br i1 %40, label %.lr.ph, label %.preheader.loopexit, !llvm.loop !15

.lr.ph61:                                         ; preds = %.lr.ph61.preheader68, %51
  %indvars.iv63 = phi i64 [ %indvars.iv.next64, %51 ], [ %indvars.iv63.ph, %.lr.ph61.preheader68 ]
  %41 = getelementptr inbounds float, ptr %0, i64 %indvars.iv63
  %42 = load float, ptr %41, align 4, !tbaa !5
  %43 = fmul float %42, 3.276800e+04
  %44 = fcmp ult float %43, 3.276650e+04
  br i1 %44, label %45, label %51

45:                                               ; preds = %.lr.ph61
  %46 = fcmp ugt float %43, -3.276750e+04
  br i1 %46, label %47, label %51

47:                                               ; preds = %45
  %48 = fadd float %43, 5.000000e-01
  %49 = fptosi float %48 to i16
  %.lobit.neg = ashr i16 %49, 15
  %50 = add i16 %.lobit.neg, %49
  br label %51

51:                                               ; preds = %45, %.lr.ph61, %47
  %.sink = phi i16 [ %50, %47 ], [ 32767, %.lr.ph61 ], [ -32768, %45 ]
  %52 = getelementptr inbounds i16, ptr %1, i64 %indvars.iv63
  store i16 %.sink, ptr %52, align 2, !tbaa !9
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next64, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph61, !llvm.loop !16

.loopexit:                                        ; preds = %51, %middle.block, %.preheader, %3
  ret void
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <4 x float> @_ZL11_mm_set1_psf(float noundef) local_unnamed_addr #1

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <4 x float> @_ZL10_mm_mul_psDv4_fS_(<4 x float> noundef, <4 x float> noundef) local_unnamed_addr #1

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <4 x float> @_ZL12_mm_loadu_psPKf(ptr noundef) local_unnamed_addr #1

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <2 x i64> @_ZL15_mm_packs_epi32Dv2_xS_(<2 x i64> noundef, <2 x i64> noundef) local_unnamed_addr #1

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <2 x i64> @_ZL15_mm_cvtps_epi32Dv4_f(<4 x float> noundef) local_unnamed_addr #1

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <4 x float> @_ZL10_mm_max_psDv4_fS_(<4 x float> noundef, <4 x float> noundef) local_unnamed_addr #1

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <4 x float> @_ZL10_mm_min_psDv4_fS_(<4 x float> noundef, <4 x float> noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="128" "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 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="128" "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" }

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


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