; LLVM IR from ggml-org/ggml :: src (ggml-quants)

; 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.block_q5_1 = type { %union.anon.0, [4 x i8], [16 x i8] }
%union.anon.0 = type { i32 }
%struct.anon.1 = type { i16, i16 }

@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [65 x i8], align 1
@__PRETTY_FUNCTION__.quantize_row_q5_1_ref = external hidden unnamed_addr constant [81 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i16 @ggml_compute_fp32_to_fp16(float noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: nounwind uwtable
define dso_local void @quantize_row_q5_1_ref(ptr noalias noundef %0, ptr noalias noundef %1, i64 noundef %2) #4 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca i32, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca i8, align 1
  %22 = alloca i8, align 1
  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 4, ptr %7) #5
  store i32 32, ptr %7, align 4, !tbaa !11
  %23 = load i64, ptr %6, align 8, !tbaa !9
  %24 = srem i64 %23, 32
  %25 = icmp eq i64 %24, 0
  br i1 %25, label %26, label %27

26:                                               ; preds = %3
  br label %28

27:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 152, ptr noundef @__PRETTY_FUNCTION__.quantize_row_q5_1_ref) #6
  unreachable

28:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %29 = load i64, ptr %6, align 8, !tbaa !9
  %30 = sdiv i64 %29, 32
  %31 = trunc i64 %30 to i32
  store i32 %31, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !11
  br label %32

32:                                               ; preds = %176, %28
  %33 = load i32, ptr %9, align 4, !tbaa !11
  %34 = load i32, ptr %8, align 4, !tbaa !11
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %179

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store float 0x47EFFFFFE0000000, ptr %11, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store float 0xC7EFFFFFE0000000, ptr %12, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !11
  br label %38

38:                                               ; preds = %63, %37
  %39 = load i32, ptr %13, align 4, !tbaa !11
  %40 = icmp slt i32 %39, 32
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %66

42:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = load i32, ptr %9, align 4, !tbaa !11
  %45 = mul nsw i32 %44, 32
  %46 = load i32, ptr %13, align 4, !tbaa !11
  %47 = add nsw i32 %45, %46
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds float, ptr %43, i64 %48
  %50 = load float, ptr %49, align 4, !tbaa !13
  store float %50, ptr %14, align 4, !tbaa !13
  %51 = load float, ptr %14, align 4, !tbaa !13
  %52 = load float, ptr %11, align 4, !tbaa !13
  %53 = fcmp olt float %51, %52
  br i1 %53, label %54, label %56

54:                                               ; preds = %42
  %55 = load float, ptr %14, align 4, !tbaa !13
  store float %55, ptr %11, align 4, !tbaa !13
  br label %56

56:                                               ; preds = %54, %42
  %57 = load float, ptr %14, align 4, !tbaa !13
  %58 = load float, ptr %12, align 4, !tbaa !13
  %59 = fcmp ogt float %57, %58
  br i1 %59, label %60, label %62

60:                                               ; preds = %56
  %61 = load float, ptr %14, align 4, !tbaa !13
  store float %61, ptr %12, align 4, !tbaa !13
  br label %62

62:                                               ; preds = %60, %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %63

63:                                               ; preds = %62
  %64 = load i32, ptr %13, align 4, !tbaa !11
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %13, align 4, !tbaa !11
  br label %38, !llvm.loop !15

66:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %67 = load float, ptr %12, align 4, !tbaa !13
  %68 = load float, ptr %11, align 4, !tbaa !13
  %69 = fsub float %67, %68
  %70 = fdiv float %69, 3.100000e+01
  store float %70, ptr %15, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %71 = load float, ptr %15, align 4, !tbaa !13
  %72 = fcmp une float %71, 0.000000e+00
  br i1 %72, label %73, label %76

73:                                               ; preds = %66
  %74 = load float, ptr %15, align 4, !tbaa !13
  %75 = fdiv float 1.000000e+00, %74
  br label %77

76:                                               ; preds = %66
  br label %77

77:                                               ; preds = %76, %73
  %78 = phi float [ %75, %73 ], [ 0.000000e+00, %76 ]
  store float %78, ptr %16, align 4, !tbaa !13
  %79 = load float, ptr %15, align 4, !tbaa !13
  %80 = call zeroext i16 @ggml_compute_fp32_to_fp16(float noundef %79)
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = load i32, ptr %9, align 4, !tbaa !11
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds %struct.block_q5_1, ptr %81, i64 %83
  %85 = getelementptr inbounds %struct.block_q5_1, ptr %84, i32 0, i32 0
  %86 = getelementptr inbounds %struct.anon.1, ptr %85, i32 0, i32 0
  store i16 %80, ptr %86, align 4, !tbaa !17
  %87 = load float, ptr %11, align 4, !tbaa !13
  %88 = call zeroext i16 @ggml_compute_fp32_to_fp16(float noundef %87)
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = load i32, ptr %9, align 4, !tbaa !11
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds %struct.block_q5_1, ptr %89, i64 %91
  %93 = getelementptr inbounds %struct.block_q5_1, ptr %92, i32 0, i32 0
  %94 = getelementptr inbounds %struct.anon.1, ptr %93, i32 0, i32 1
  store i16 %88, ptr %94, align 2, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !11
  br label %95

95:                                               ; preds = %167, %77
  %96 = load i32, ptr %18, align 4, !tbaa !11
  %97 = icmp slt i32 %96, 16
  br i1 %97, label %99, label %98

98:                                               ; preds = %95
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %170

99:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = load i32, ptr %9, align 4, !tbaa !11
  %102 = mul nsw i32 %101, 32
  %103 = add nsw i32 %102, 0
  %104 = load i32, ptr %18, align 4, !tbaa !11
  %105 = add nsw i32 %103, %104
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds float, ptr %100, i64 %106
  %108 = load float, ptr %107, align 4, !tbaa !13
  %109 = load float, ptr %11, align 4, !tbaa !13
  %110 = fsub float %108, %109
  %111 = load float, ptr %16, align 4, !tbaa !13
  %112 = fmul float %110, %111
  store float %112, ptr %19, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = load i32, ptr %9, align 4, !tbaa !11
  %115 = mul nsw i32 %114, 32
  %116 = add nsw i32 %115, 16
  %117 = load i32, ptr %18, align 4, !tbaa !11
  %118 = add nsw i32 %116, %117
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds float, ptr %113, i64 %119
  %121 = load float, ptr %120, align 4, !tbaa !13
  %122 = load float, ptr %11, align 4, !tbaa !13
  %123 = fsub float %121, %122
  %124 = load float, ptr %16, align 4, !tbaa !13
  %125 = fmul float %123, %124
  store float %125, ptr %20, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #5
  %126 = load float, ptr %19, align 4, !tbaa !13
  %127 = fadd float %126, 5.000000e-01
  %128 = fptoui float %127 to i8
  store i8 %128, ptr %21, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #5
  %129 = load float, ptr %20, align 4, !tbaa !13
  %130 = fadd float %129, 5.000000e-01
  %131 = fptoui float %130 to i8
  store i8 %131, ptr %22, align 1, !tbaa !17
  %132 = load i8, ptr %21, align 1, !tbaa !17
  %133 = zext i8 %132 to i32
  %134 = and i32 %133, 15
  %135 = load i8, ptr %22, align 1, !tbaa !17
  %136 = zext i8 %135 to i32
  %137 = and i32 %136, 15
  %138 = shl i32 %137, 4
  %139 = or i32 %134, %138
  %140 = trunc i32 %139 to i8
  %141 = load ptr, ptr %5, align 8, !tbaa !5
  %142 = load i32, ptr %9, align 4, !tbaa !11
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds %struct.block_q5_1, ptr %141, i64 %143
  %145 = getelementptr inbounds %struct.block_q5_1, ptr %144, i32 0, i32 2
  %146 = load i32, ptr %18, align 4, !tbaa !11
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [16 x i8], ptr %145, i64 0, i64 %147
  store i8 %140, ptr %148, align 1, !tbaa !17
  %149 = load i8, ptr %21, align 1, !tbaa !17
  %150 = zext i8 %149 to i32
  %151 = and i32 %150, 16
  %152 = lshr i32 %151, 4
  %153 = load i32, ptr %18, align 4, !tbaa !11
  %154 = add nsw i32 %153, 0
  %155 = shl i32 %152, %154
  %156 = load i32, ptr %17, align 4, !tbaa !11
  %157 = or i32 %156, %155
  store i32 %157, ptr %17, align 4, !tbaa !11
  %158 = load i8, ptr %22, align 1, !tbaa !17
  %159 = zext i8 %158 to i32
  %160 = and i32 %159, 16
  %161 = lshr i32 %160, 4
  %162 = load i32, ptr %18, align 4, !tbaa !11
  %163 = add nsw i32 %162, 16
  %164 = shl i32 %161, %163
  %165 = load i32, ptr %17, align 4, !tbaa !11
  %166 = or i32 %165, %164
  store i32 %166, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %167

167:                                              ; preds = %99
  %168 = load i32, ptr %18, align 4, !tbaa !11
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %18, align 4, !tbaa !11
  br label %95, !llvm.loop !18

170:                                              ; preds = %98
  %171 = load ptr, ptr %5, align 8, !tbaa !5
  %172 = load i32, ptr %9, align 4, !tbaa !11
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds %struct.block_q5_1, ptr %171, i64 %173
  %175 = getelementptr inbounds %struct.block_q5_1, ptr %174, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %175, ptr align 4 %17, i64 4, i1 false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %176

176:                                              ; preds = %170
  %177 = load i32, ptr %9, align 4, !tbaa !11
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %9, align 4, !tbaa !11
  br label %32, !llvm.loop !19

179:                                              ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret void
}

attributes #0 = { noreturn 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { nounwind }
attributes #6 = { noreturn 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}


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

%struct.block_q5_1 = type { %union.anon.0, [4 x i8], [16 x i8] }
%union.anon.0 = type { i32 }

@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [65 x i8], align 1
@__PRETTY_FUNCTION__.quantize_row_q5_1_ref = external hidden unnamed_addr constant [81 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i16 @ggml_compute_fp32_to_fp16(float noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @quantize_row_q5_1_ref(ptr noalias nocapture noundef readonly %0, ptr noalias nocapture noundef writeonly %1, i64 noundef %2) local_unnamed_addr #2 {
  %4 = and i64 %2, 31
  %5 = icmp eq i64 %4, 0
  br i1 %5, label %7, label %6

6:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 152, ptr noundef nonnull @__PRETTY_FUNCTION__.quantize_row_q5_1_ref) #4
  unreachable

7:                                                ; preds = %3
  %8 = lshr exact i64 %2, 5
  %9 = trunc i64 %8 to i32
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.preheader.preheader, label %._crit_edge

.preheader.preheader:                             ; preds = %7
  %wide.trip.count = and i64 %8, 2147483647
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %vector.ph
  %indvars.iv71 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next72, %vector.ph ]
  %11 = shl nsw i64 %indvars.iv71, 5
  %invariant.gep = getelementptr inbounds float, ptr %0, i64 %11
  br label %120

._crit_edge:                                      ; preds = %vector.ph, %7
  ret void

vector.ph:                                        ; preds = %120
  %12 = fsub float %.154.1, %.1.1
  %13 = fdiv float %12, 3.100000e+01
  %14 = tail call zeroext i16 @ggml_compute_fp32_to_fp16(float noundef %13)
  %15 = getelementptr inbounds %struct.block_q5_1, ptr %1, i64 %indvars.iv71
  store i16 %14, ptr %15, align 4, !tbaa !5
  %16 = tail call zeroext i16 @ggml_compute_fp32_to_fp16(float noundef %.1.1)
  %17 = getelementptr inbounds i8, ptr %15, i64 2
  store i16 %16, ptr %17, align 2, !tbaa !5
  %18 = fcmp une float %13, 0.000000e+00
  %19 = fdiv float 1.000000e+00, %13
  %20 = select i1 %18, float %19, float 0.000000e+00
  %broadcast.splatinsert82 = insertelement <4 x float> poison, float %20, i64 0
  %broadcast.splat83 = shufflevector <4 x float> %broadcast.splatinsert82, <4 x float> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert = insertelement <4 x float> poison, float %.1.1, i64 0
  %broadcast.splat = shufflevector <4 x float> %broadcast.splatinsert, <4 x float> poison, <4 x i32> zeroinitializer
  %21 = getelementptr inbounds i8, ptr %15, i64 8
  %22 = getelementptr inbounds float, ptr %0, i64 %11
  %23 = getelementptr inbounds i8, ptr %22, i64 16
  %wide.load = load <4 x float>, ptr %22, align 4, !tbaa !8
  %wide.load81 = load <4 x float>, ptr %23, align 4, !tbaa !8
  %24 = fsub <4 x float> %wide.load, %broadcast.splat
  %25 = fsub <4 x float> %wide.load81, %broadcast.splat
  %26 = fmul <4 x float> %broadcast.splat83, %24
  %27 = fmul <4 x float> %broadcast.splat83, %25
  %28 = or disjoint i64 %11, 16
  %29 = getelementptr inbounds float, ptr %0, i64 %28
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  %wide.load84 = load <4 x float>, ptr %29, align 4, !tbaa !8
  %wide.load85 = load <4 x float>, ptr %30, align 4, !tbaa !8
  %31 = fsub <4 x float> %wide.load84, %broadcast.splat
  %32 = fsub <4 x float> %wide.load85, %broadcast.splat
  %33 = fmul <4 x float> %broadcast.splat83, %31
  %34 = fmul <4 x float> %broadcast.splat83, %32
  %35 = fadd <4 x float> %26, <float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01>
  %36 = fadd <4 x float> %27, <float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01>
  %37 = fptoui <4 x float> %35 to <4 x i8>
  %38 = fptoui <4 x float> %36 to <4 x i8>
  %39 = fadd <4 x float> %33, <float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01>
  %40 = fadd <4 x float> %34, <float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01>
  %41 = fptoui <4 x float> %39 to <4 x i8>
  %42 = fptoui <4 x float> %40 to <4 x i8>
  %43 = and <4 x i8> %37, <i8 15, i8 15, i8 15, i8 15>
  %44 = and <4 x i8> %38, <i8 15, i8 15, i8 15, i8 15>
  %45 = shl <4 x i8> %41, <i8 4, i8 4, i8 4, i8 4>
  %46 = shl <4 x i8> %42, <i8 4, i8 4, i8 4, i8 4>
  %47 = or disjoint <4 x i8> %45, %43
  %48 = or disjoint <4 x i8> %46, %44
  %49 = getelementptr inbounds i8, ptr %15, i64 12
  store <4 x i8> %47, ptr %21, align 1, !tbaa !5
  store <4 x i8> %48, ptr %49, align 1, !tbaa !5
  %50 = lshr <4 x i8> %37, <i8 4, i8 4, i8 4, i8 4>
  %51 = lshr <4 x i8> %38, <i8 4, i8 4, i8 4, i8 4>
  %52 = and <4 x i8> %50, <i8 1, i8 1, i8 1, i8 1>
  %53 = and <4 x i8> %51, <i8 1, i8 1, i8 1, i8 1>
  %54 = zext nneg <4 x i8> %52 to <4 x i32>
  %55 = zext nneg <4 x i8> %53 to <4 x i32>
  %56 = shl nuw nsw <4 x i32> %54, <i32 0, i32 1, i32 2, i32 3>
  %57 = shl nuw nsw <4 x i32> %55, <i32 4, i32 5, i32 6, i32 7>
  %58 = lshr <4 x i8> %41, <i8 4, i8 4, i8 4, i8 4>
  %59 = lshr <4 x i8> %42, <i8 4, i8 4, i8 4, i8 4>
  %60 = and <4 x i8> %58, <i8 1, i8 1, i8 1, i8 1>
  %61 = and <4 x i8> %59, <i8 1, i8 1, i8 1, i8 1>
  %62 = zext nneg <4 x i8> %60 to <4 x i32>
  %63 = zext nneg <4 x i8> %61 to <4 x i32>
  %64 = shl nuw nsw <4 x i32> %62, <i32 16, i32 17, i32 18, i32 19>
  %65 = shl nuw nsw <4 x i32> %63, <i32 20, i32 21, i32 22, i32 23>
  %66 = or disjoint <4 x i32> %64, %56
  %67 = or disjoint <4 x i32> %65, %57
  %68 = or disjoint i64 %11, 8
  %69 = getelementptr inbounds float, ptr %0, i64 %68
  %70 = getelementptr inbounds i8, ptr %69, i64 16
  %wide.load.1 = load <4 x float>, ptr %69, align 4, !tbaa !8
  %wide.load81.1 = load <4 x float>, ptr %70, align 4, !tbaa !8
  %71 = fsub <4 x float> %wide.load.1, %broadcast.splat
  %72 = fsub <4 x float> %wide.load81.1, %broadcast.splat
  %73 = fmul <4 x float> %broadcast.splat83, %71
  %74 = fmul <4 x float> %broadcast.splat83, %72
  %75 = or disjoint i64 %11, 24
  %76 = getelementptr inbounds float, ptr %0, i64 %75
  %77 = getelementptr inbounds i8, ptr %76, i64 16
  %wide.load84.1 = load <4 x float>, ptr %76, align 4, !tbaa !8
  %wide.load85.1 = load <4 x float>, ptr %77, align 4, !tbaa !8
  %78 = fsub <4 x float> %wide.load84.1, %broadcast.splat
  %79 = fsub <4 x float> %wide.load85.1, %broadcast.splat
  %80 = fmul <4 x float> %broadcast.splat83, %78
  %81 = fmul <4 x float> %broadcast.splat83, %79
  %82 = fadd <4 x float> %73, <float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01>
  %83 = fadd <4 x float> %74, <float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01>
  %84 = fptoui <4 x float> %82 to <4 x i8>
  %85 = fptoui <4 x float> %83 to <4 x i8>
  %86 = fadd <4 x float> %80, <float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01>
  %87 = fadd <4 x float> %81, <float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01>
  %88 = fptoui <4 x float> %86 to <4 x i8>
  %89 = fptoui <4 x float> %87 to <4 x i8>
  %90 = and <4 x i8> %84, <i8 15, i8 15, i8 15, i8 15>
  %91 = and <4 x i8> %85, <i8 15, i8 15, i8 15, i8 15>
  %92 = shl <4 x i8> %88, <i8 4, i8 4, i8 4, i8 4>
  %93 = shl <4 x i8> %89, <i8 4, i8 4, i8 4, i8 4>
  %94 = or disjoint <4 x i8> %92, %90
  %95 = or disjoint <4 x i8> %93, %91
  %96 = getelementptr inbounds i8, ptr %15, i64 16
  %97 = getelementptr inbounds i8, ptr %15, i64 20
  store <4 x i8> %94, ptr %96, align 1, !tbaa !5
  store <4 x i8> %95, ptr %97, align 1, !tbaa !5
  %98 = lshr <4 x i8> %84, <i8 4, i8 4, i8 4, i8 4>
  %99 = lshr <4 x i8> %85, <i8 4, i8 4, i8 4, i8 4>
  %100 = and <4 x i8> %98, <i8 1, i8 1, i8 1, i8 1>
  %101 = and <4 x i8> %99, <i8 1, i8 1, i8 1, i8 1>
  %102 = zext nneg <4 x i8> %100 to <4 x i32>
  %103 = zext nneg <4 x i8> %101 to <4 x i32>
  %104 = shl nuw nsw <4 x i32> %102, <i32 8, i32 9, i32 10, i32 11>
  %105 = shl nuw nsw <4 x i32> %103, <i32 12, i32 13, i32 14, i32 15>
  %106 = lshr <4 x i8> %88, <i8 4, i8 4, i8 4, i8 4>
  %107 = lshr <4 x i8> %89, <i8 4, i8 4, i8 4, i8 4>
  %108 = and <4 x i8> %106, <i8 1, i8 1, i8 1, i8 1>
  %109 = and <4 x i8> %107, <i8 1, i8 1, i8 1, i8 1>
  %110 = zext nneg <4 x i8> %108 to <4 x i32>
  %111 = zext nneg <4 x i8> %109 to <4 x i32>
  %112 = shl nuw nsw <4 x i32> %110, <i32 24, i32 25, i32 26, i32 27>
  %113 = shl nuw <4 x i32> %111, <i32 28, i32 29, i32 30, i32 31>
  %114 = or disjoint <4 x i32> %112, %104
  %115 = or disjoint <4 x i32> %113, %105
  %116 = or disjoint <4 x i32> %114, %66
  %117 = or disjoint <4 x i32> %115, %67
  %bin.rdx = or disjoint <4 x i32> %117, %116
  %118 = tail call i32 @llvm.vector.reduce.or.v4i32(<4 x i32> %bin.rdx)
  %119 = getelementptr inbounds i8, ptr %15, i64 4
  store i32 %118, ptr %119, align 4
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %exitcond74.not = icmp eq i64 %indvars.iv.next72, %wide.trip.count
  br i1 %exitcond74.not, label %._crit_edge, label %.preheader, !llvm.loop !10

120:                                              ; preds = %120, %.preheader
  %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next.1, %120 ]
  %.05262 = phi float [ 0x47EFFFFFE0000000, %.preheader ], [ %.1.1, %120 ]
  %.05361 = phi float [ 0xC7EFFFFFE0000000, %.preheader ], [ %.154.1, %120 ]
  %gep = getelementptr inbounds float, ptr %invariant.gep, i64 %indvars.iv
  %121 = load float, ptr %gep, align 4, !tbaa !8
  %122 = fcmp olt float %121, %.05262
  %.1 = select i1 %122, float %121, float %.05262
  %123 = fcmp ogt float %121, %.05361
  %.154 = select i1 %123, float %121, float %.05361
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %gep.1 = getelementptr inbounds float, ptr %invariant.gep, i64 %indvars.iv.next
  %124 = load float, ptr %gep.1, align 4, !tbaa !8
  %125 = fcmp olt float %124, %.1
  %.1.1 = select i1 %125, float %124, float %.1
  %126 = fcmp ogt float %124, %.154
  %.154.1 = select i1 %126, float %124, float %.154
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, 32
  br i1 %exitcond.not.1, label %vector.ph, label %120, !llvm.loop !12
}

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

attributes #0 = { noreturn 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 #1 = { 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 #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { noreturn 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"float", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}


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