; LLVM IR from SelfishOlex/MiniAudioO3DE :: MiniAudio/Code/Source/Clients (MiniAudioImplementation)

; 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, i64 noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %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 i64 %2, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  store i64 0, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %17 = load i64, ptr %6, align 8, !tbaa !9
  %18 = and i64 %17, -8
  store i64 %18, ptr %8, align 8, !tbaa !9
  br label %19

19:                                               ; preds = %124, %3
  %20 = load i64, ptr %7, align 8, !tbaa !9
  %21 = load i64, ptr %8, align 8, !tbaa !9
  %22 = icmp ult i64 %20, %21
  br i1 %22, label %23, label %127

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

124:                                              ; preds = %23
  %125 = load i64, ptr %7, align 8, !tbaa !9
  %126 = add i64 %125, 8
  store i64 %126, ptr %7, align 8, !tbaa !9
  br label %19, !llvm.loop !14

127:                                              ; preds = %19
  br label %128

128:                                              ; preds = %171, %127
  %129 = load i64, ptr %7, align 8, !tbaa !9
  %130 = load i64, ptr %6, align 8, !tbaa !9
  %131 = icmp ult i64 %129, %130
  br i1 %131, label %132, label %174

132:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = load i64, ptr %7, align 8, !tbaa !9
  %135 = getelementptr inbounds float, ptr %133, i64 %134
  %136 = load float, ptr %135, align 4, !tbaa !16
  %137 = fmul float %136, 3.276800e+04
  store float %137, ptr %15, align 4, !tbaa !16
  %138 = load float, ptr %15, align 4, !tbaa !16
  %139 = fpext float %138 to double
  %140 = fcmp oge double %139, 3.276650e+04
  br i1 %140, label %141, label %145

141:                                              ; preds = %132
  %142 = load ptr, ptr %5, align 8, !tbaa !5
  %143 = load i64, ptr %7, align 8, !tbaa !9
  %144 = getelementptr inbounds i16, ptr %142, i64 %143
  store i16 32767, ptr %144, align 2, !tbaa !12
  br label %170

145:                                              ; preds = %132
  %146 = load float, ptr %15, align 4, !tbaa !16
  %147 = fpext float %146 to double
  %148 = fcmp ole double %147, -3.276750e+04
  br i1 %148, label %149, label %153

149:                                              ; preds = %145
  %150 = load ptr, ptr %5, align 8, !tbaa !5
  %151 = load i64, ptr %7, align 8, !tbaa !9
  %152 = getelementptr inbounds i16, ptr %150, i64 %151
  store i16 -32768, ptr %152, align 2, !tbaa !12
  br label %169

153:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 2, ptr %16) #3
  %154 = load float, ptr %15, align 4, !tbaa !16
  %155 = fadd float %154, 5.000000e-01
  %156 = fptosi float %155 to i16
  store i16 %156, ptr %16, align 2, !tbaa !12
  %157 = load i16, ptr %16, align 2, !tbaa !12
  %158 = sext i16 %157 to i32
  %159 = icmp slt i32 %158, 0
  %160 = zext i1 %159 to i32
  %161 = load i16, ptr %16, align 2, !tbaa !12
  %162 = sext i16 %161 to i32
  %163 = sub nsw i32 %162, %160
  %164 = trunc i32 %163 to i16
  store i16 %164, ptr %16, align 2, !tbaa !12
  %165 = load i16, ptr %16, align 2, !tbaa !12
  %166 = load ptr, ptr %5, align 8, !tbaa !5
  %167 = load i64, ptr %7, align 8, !tbaa !9
  %168 = getelementptr inbounds i16, ptr %166, i64 %167
  store i16 %165, ptr %168, align 2, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 2, ptr %16) #3
  br label %169

169:                                              ; preds = %153, %149
  br label %170

170:                                              ; preds = %169, %141
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  br label %171

171:                                              ; preds = %170
  %172 = load i64, ptr %7, align 8, !tbaa !9
  %173 = add i64 %172, 1
  store i64 %173, ptr %7, align 8, !tbaa !9
  br label %128, !llvm.loop !18

174:                                              ; preds = %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #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 = !{!"long", !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, i64 noundef %2) local_unnamed_addr #0 {
  %4 = and i64 %2, -8
  %.not = icmp eq i64 %4, 0
  br i1 %.not, label %.preheader, label %.lr.ph

.preheader:                                       ; preds = %.lr.ph, %3
  %.0.lcssa = phi i64 [ 0, %3 ], [ %35, %.lr.ph ]
  %5 = icmp ult i64 %.0.lcssa, %2
  br i1 %5, label %.lr.ph59.preheader, label %._crit_edge

.lr.ph59.preheader:                               ; preds = %.preheader
  %6 = sub i64 %2, %.0.lcssa
  %min.iters.check = icmp ult i64 %6, 4
  br i1 %min.iters.check, label %.lr.ph59.preheader62, label %vector.ph

.lr.ph59.preheader62:                             ; preds = %middle.block, %.lr.ph59.preheader
  %.158.ph = phi i64 [ %.0.lcssa, %.lr.ph59.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph59

vector.ph:                                        ; preds = %.lr.ph59.preheader
  %n.vec = and i64 %6, -4
  %ind.end = add i64 %.0.lcssa, %n.vec
  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 %.0.lcssa, %index
  %7 = getelementptr inbounds float, ptr %0, i64 %offset.idx
  %wide.load = load <4 x float>, ptr %7, align 4, !tbaa !5
  %8 = fmul <4 x float> %wide.load, <float 3.276800e+04, float 3.276800e+04, float 3.276800e+04, float 3.276800e+04>
  %9 = fcmp ult <4 x float> %8, <float 3.276650e+04, float 3.276650e+04, float 3.276650e+04, float 3.276650e+04>
  %10 = fcmp ole <4 x float> %8, <float -3.276750e+04, float -3.276750e+04, float -3.276750e+04, float -3.276750e+04>
  %11 = fadd <4 x float> %8, <float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01>
  %12 = fptosi <4 x float> %11 to <4 x i16>
  %13 = ashr <4 x i16> %12, <i16 15, i16 15, i16 15, i16 15>
  %14 = add <4 x i16> %13, %12
  %predphi = select <4 x i1> %10, <4 x i16> <i16 -32768, i16 -32768, i16 -32768, i16 -32768>, <4 x i16> %14
  %predphi61 = select <4 x i1> %9, <4 x i16> %predphi, <4 x i16> <i16 32767, i16 32767, i16 32767, i16 32767>
  %15 = getelementptr inbounds i16, ptr %1, i64 %offset.idx
  store <4 x i16> %predphi61, ptr %15, align 2, !tbaa !9
  %index.next = add nuw i64 %index, 4
  %16 = icmp eq i64 %index.next, %n.vec
  br i1 %16, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %6, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph59.preheader62

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

.lr.ph59:                                         ; preds = %.lr.ph59.preheader62, %47
  %.158 = phi i64 [ %49, %47 ], [ %.158.ph, %.lr.ph59.preheader62 ]
  %37 = getelementptr inbounds float, ptr %0, i64 %.158
  %38 = load float, ptr %37, align 4, !tbaa !5
  %39 = fmul float %38, 3.276800e+04
  %40 = fcmp ult float %39, 3.276650e+04
  br i1 %40, label %41, label %47

41:                                               ; preds = %.lr.ph59
  %42 = fcmp ugt float %39, -3.276750e+04
  br i1 %42, label %43, label %47

43:                                               ; preds = %41
  %44 = fadd float %39, 5.000000e-01
  %45 = fptosi float %44 to i16
  %.lobit.neg = ashr i16 %45, 15
  %46 = add i16 %.lobit.neg, %45
  br label %47

47:                                               ; preds = %41, %.lr.ph59, %43
  %.sink = phi i16 [ %46, %43 ], [ 32767, %.lr.ph59 ], [ -32768, %41 ]
  %48 = getelementptr inbounds i16, ptr %1, i64 %.158
  store i16 %.sink, ptr %48, align 2, !tbaa !9
  %49 = add nuw i64 %.158, 1
  %exitcond.not = icmp eq i64 %49, %2
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph59, !llvm.loop !16

._crit_edge:                                      ; preds = %47, %middle.block, %.preheader
  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: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass