; 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_q8_K = type { float, [256 x i8], [16 x i16] }

@.str.1 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__.quantize_row_q8_K_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 speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #2

; 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 i32 @nearest_int(float noundef) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

23:                                               ; preds = %3
  br label %25

24:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 2480, ptr noundef @__PRETTY_FUNCTION__.quantize_row_q8_K_ref) #6
  unreachable

25:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %26 = load i64, ptr %6, align 8, !tbaa !9
  %27 = sdiv i64 %26, 256
  store i64 %27, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !11
  br label %28

28:                                               ; preds = %168, %25
  %29 = load i32, ptr %8, align 4, !tbaa !11
  %30 = sext i32 %29 to i64
  %31 = load i64, ptr %7, align 8, !tbaa !9
  %32 = icmp slt i64 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %28
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %171

34:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store float 0.000000e+00, ptr %10, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store float 0.000000e+00, ptr %11, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !11
  br label %35

35:                                               ; preds = %57, %34
  %36 = load i32, ptr %12, align 4, !tbaa !11
  %37 = icmp slt i32 %36, 256
  br i1 %37, label %39, label %38

38:                                               ; preds = %35
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %60

39:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = load i32, ptr %12, align 4, !tbaa !11
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds float, ptr %40, i64 %42
  %44 = load float, ptr %43, align 4, !tbaa !13
  %45 = call float @llvm.fabs.f32(float %44)
  store float %45, ptr %13, align 4, !tbaa !13
  %46 = load float, ptr %13, align 4, !tbaa !13
  %47 = load float, ptr %11, align 4, !tbaa !13
  %48 = fcmp ogt float %46, %47
  br i1 %48, label %49, label %56

49:                                               ; preds = %39
  %50 = load float, ptr %13, align 4, !tbaa !13
  store float %50, ptr %11, align 4, !tbaa !13
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = load i32, ptr %12, align 4, !tbaa !11
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds float, ptr %51, i64 %53
  %55 = load float, ptr %54, align 4, !tbaa !13
  store float %55, ptr %10, align 4, !tbaa !13
  br label %56

56:                                               ; preds = %49, %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %57

57:                                               ; preds = %56
  %58 = load i32, ptr %12, align 4, !tbaa !11
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %12, align 4, !tbaa !11
  br label %35, !llvm.loop !15

60:                                               ; preds = %38
  %61 = load float, ptr %11, align 4, !tbaa !13
  %62 = fcmp une float %61, 0.000000e+00
  br i1 %62, label %77, label %63

63:                                               ; preds = %60
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = load i32, ptr %8, align 4, !tbaa !11
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds %struct.block_q8_K, ptr %64, i64 %66
  %68 = getelementptr inbounds %struct.block_q8_K, ptr %67, i32 0, i32 0
  store float 0.000000e+00, ptr %68, align 4, !tbaa !17
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = load i32, ptr %8, align 4, !tbaa !11
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds %struct.block_q8_K, ptr %69, i64 %71
  %73 = getelementptr inbounds %struct.block_q8_K, ptr %72, i32 0, i32 1
  %74 = getelementptr inbounds [256 x i8], ptr %73, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 4 %74, i8 0, i64 256, i1 false)
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds float, ptr %75, i64 256
  store ptr %76, ptr %4, align 8, !tbaa !5
  store i32 4, ptr %9, align 4
  br label %165

77:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %78 = load float, ptr %10, align 4, !tbaa !13
  %79 = fdiv float -1.270000e+02, %78
  store float %79, ptr %14, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !11
  br label %80

80:                                               ; preds = %109, %77
  %81 = load i32, ptr %15, align 4, !tbaa !11
  %82 = icmp slt i32 %81, 256
  br i1 %82, label %84, label %83

83:                                               ; preds = %80
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %112

84:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %85 = load float, ptr %14, align 4, !tbaa !13
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = load i32, ptr %15, align 4, !tbaa !11
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds float, ptr %86, i64 %88
  %90 = load float, ptr %89, align 4, !tbaa !13
  %91 = fmul float %85, %90
  %92 = call i32 @nearest_int(float noundef %91)
  store i32 %92, ptr %16, align 4, !tbaa !11
  %93 = load i32, ptr %16, align 4, !tbaa !11
  %94 = icmp slt i32 127, %93
  br i1 %94, label %95, label %96

95:                                               ; preds = %84
  br label %98

96:                                               ; preds = %84
  %97 = load i32, ptr %16, align 4, !tbaa !11
  br label %98

98:                                               ; preds = %96, %95
  %99 = phi i32 [ 127, %95 ], [ %97, %96 ]
  %100 = trunc i32 %99 to i8
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = load i32, ptr %8, align 4, !tbaa !11
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds %struct.block_q8_K, ptr %101, i64 %103
  %105 = getelementptr inbounds %struct.block_q8_K, ptr %104, i32 0, i32 1
  %106 = load i32, ptr %15, align 4, !tbaa !11
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [256 x i8], ptr %105, i64 0, i64 %107
  store i8 %100, ptr %108, align 1, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %109

109:                                              ; preds = %98
  %110 = load i32, ptr %15, align 4, !tbaa !11
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %15, align 4, !tbaa !11
  br label %80, !llvm.loop !20

112:                                              ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !11
  br label %113

113:                                              ; preds = %152, %112
  %114 = load i32, ptr %17, align 4, !tbaa !11
  %115 = icmp slt i32 %114, 16
  br i1 %115, label %117, label %116

116:                                              ; preds = %113
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %155

117:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !11
  br label %118

118:                                              ; preds = %138, %117
  %119 = load i32, ptr %19, align 4, !tbaa !11
  %120 = icmp slt i32 %119, 16
  br i1 %120, label %122, label %121

121:                                              ; preds = %118
  store i32 14, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %141

122:                                              ; preds = %118
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = load i32, ptr %8, align 4, !tbaa !11
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds %struct.block_q8_K, ptr %123, i64 %125
  %127 = getelementptr inbounds %struct.block_q8_K, ptr %126, i32 0, i32 1
  %128 = load i32, ptr %17, align 4, !tbaa !11
  %129 = mul nsw i32 %128, 16
  %130 = load i32, ptr %19, align 4, !tbaa !11
  %131 = add nsw i32 %129, %130
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [256 x i8], ptr %127, i64 0, i64 %132
  %134 = load i8, ptr %133, align 1, !tbaa !19
  %135 = sext i8 %134 to i32
  %136 = load i32, ptr %18, align 4, !tbaa !11
  %137 = add nsw i32 %136, %135
  store i32 %137, ptr %18, align 4, !tbaa !11
  br label %138

138:                                              ; preds = %122
  %139 = load i32, ptr %19, align 4, !tbaa !11
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %19, align 4, !tbaa !11
  br label %118, !llvm.loop !21

141:                                              ; preds = %121
  %142 = load i32, ptr %18, align 4, !tbaa !11
  %143 = trunc i32 %142 to i16
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = load i32, ptr %8, align 4, !tbaa !11
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds %struct.block_q8_K, ptr %144, i64 %146
  %148 = getelementptr inbounds %struct.block_q8_K, ptr %147, i32 0, i32 2
  %149 = load i32, ptr %17, align 4, !tbaa !11
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [16 x i16], ptr %148, i64 0, i64 %150
  store i16 %143, ptr %151, align 2, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %152

152:                                              ; preds = %141
  %153 = load i32, ptr %17, align 4, !tbaa !11
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %17, align 4, !tbaa !11
  br label %113, !llvm.loop !24

155:                                              ; preds = %116
  %156 = load float, ptr %14, align 4, !tbaa !13
  %157 = fdiv float 1.000000e+00, %156
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  %159 = load i32, ptr %8, align 4, !tbaa !11
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds %struct.block_q8_K, ptr %158, i64 %160
  %162 = getelementptr inbounds %struct.block_q8_K, ptr %161, i32 0, i32 0
  store float %157, ptr %162, align 4, !tbaa !17
  %163 = load ptr, ptr %4, align 8, !tbaa !5
  %164 = getelementptr inbounds float, ptr %163, i64 256
  store ptr %164, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  store i32 0, ptr %9, align 4
  br label %165

165:                                              ; preds = %155, %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  %166 = load i32, ptr %9, align 4
  switch i32 %166, label %172 [
    i32 0, label %167
    i32 4, label %168
  ]

167:                                              ; preds = %165
  br label %168

168:                                              ; preds = %167, %165
  %169 = load i32, ptr %8, align 4, !tbaa !11
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %8, align 4, !tbaa !11
  br label %28, !llvm.loop !25

171:                                              ; preds = %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  ret void

172:                                              ; preds = %165
  unreachable
}

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #6 = { noreturn nounwind }
attributes #7 = { 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 = !{!18, !14, i64 0}
!18 = !{!"", !14, i64 0, !7, i64 4, !7, i64 260}
!19 = !{!7, !7, i64 0}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !16}
!22 = !{!23, !23, i64 0}
!23 = !{!"short", !7, i64 0}
!24 = distinct !{!24, !16}
!25 = distinct !{!25, !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_q8_K = type { float, [256 x i8], [16 x i16] }

@.str.1 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__.quantize_row_q8_K_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: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @nearest_int(float noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: nounwind uwtable
define dso_local void @quantize_row_q8_K_ref(ptr noalias nocapture noundef readonly %0, ptr noalias nocapture noundef %1, i64 noundef %2) local_unnamed_addr #4 {
  %4 = and i64 %2, 255
  %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.4, ptr noundef nonnull @.str.1, i32 noundef 2480, ptr noundef nonnull @__PRETTY_FUNCTION__.quantize_row_q8_K_ref) #6
  unreachable

7:                                                ; preds = %3
  %8 = ashr exact i64 %2, 8
  %9 = icmp sgt i64 %8, 0
  br i1 %9, label %.preheader60, label %._crit_edge

.preheader60:                                     ; preds = %7, %115
  %indvars.iv82 = phi i64 [ %indvars.iv.next83, %115 ], [ 0, %7 ]
  %.04969 = phi ptr [ %.1, %115 ], [ %0, %7 ]
  br label %12

._crit_edge:                                      ; preds = %115, %7
  ret void

10:                                               ; preds = %12
  %11 = fcmp une float %.154.1, 0.000000e+00
  br i1 %11, label %23, label %21

12:                                               ; preds = %12, %.preheader60
  %indvars.iv = phi i64 [ 0, %.preheader60 ], [ %indvars.iv.next.1, %12 ]
  %.05362 = phi float [ 0.000000e+00, %.preheader60 ], [ %.154.1, %12 ]
  %.05561 = phi float [ 0.000000e+00, %.preheader60 ], [ %.156.1, %12 ]
  %13 = getelementptr inbounds float, ptr %.04969, i64 %indvars.iv
  %14 = load float, ptr %13, align 4, !tbaa !5
  %15 = tail call float @llvm.fabs.f32(float %14)
  %16 = fcmp ogt float %15, %.05362
  %.156 = select i1 %16, float %14, float %.05561
  %.154 = select i1 %16, float %15, float %.05362
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %17 = getelementptr inbounds float, ptr %.04969, i64 %indvars.iv.next
  %18 = load float, ptr %17, align 4, !tbaa !5
  %19 = tail call float @llvm.fabs.f32(float %18)
  %20 = fcmp ogt float %19, %.154
  %.156.1 = select i1 %20, float %18, float %.156
  %.154.1 = select i1 %20, float %19, float %.154
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, 256
  br i1 %exitcond.not.1, label %10, label %12, !llvm.loop !9

21:                                               ; preds = %10
  %22 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(260) %22, i8 0, i64 260, i1 false)
  br label %115

23:                                               ; preds = %10
  %24 = fdiv float -1.270000e+02, %.156.1
  br label %25

25:                                               ; preds = %23, %25
  %indvars.iv71 = phi i64 [ 0, %23 ], [ %indvars.iv.next72, %25 ]
  %26 = getelementptr inbounds float, ptr %.04969, i64 %indvars.iv71
  %27 = load float, ptr %26, align 4, !tbaa !5
  %28 = fmul float %24, %27
  %29 = tail call i32 @nearest_int(float noundef %28)
  %30 = tail call i32 @llvm.smin.i32(i32 %29, i32 127)
  %31 = trunc i32 %30 to i8
  %32 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 1, i64 %indvars.iv71
  store i8 %31, ptr %32, align 1, !tbaa !11
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %exitcond74.not = icmp eq i64 %indvars.iv.next72, 256
  br i1 %exitcond74.not, label %.preheader, label %25, !llvm.loop !12

.preheader:                                       ; preds = %25
  %33 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 1, i64 0
  %34 = load <16 x i8>, ptr %33, align 1, !tbaa !11
  %35 = sext <16 x i8> %34 to <16 x i16>
  %36 = tail call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> %35)
  %37 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 2, i64 0
  store i16 %36, ptr %37, align 2, !tbaa !13
  %38 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 1, i64 16
  %39 = load <16 x i8>, ptr %38, align 1, !tbaa !11
  %40 = sext <16 x i8> %39 to <16 x i16>
  %41 = tail call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> %40)
  %42 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 2, i64 1
  store i16 %41, ptr %42, align 2, !tbaa !13
  %43 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 1, i64 32
  %44 = load <16 x i8>, ptr %43, align 1, !tbaa !11
  %45 = sext <16 x i8> %44 to <16 x i16>
  %46 = tail call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> %45)
  %47 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 2, i64 2
  store i16 %46, ptr %47, align 2, !tbaa !13
  %48 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 1, i64 48
  %49 = load <16 x i8>, ptr %48, align 1, !tbaa !11
  %50 = sext <16 x i8> %49 to <16 x i16>
  %51 = tail call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> %50)
  %52 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 2, i64 3
  store i16 %51, ptr %52, align 2, !tbaa !13
  %53 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 1, i64 64
  %54 = load <16 x i8>, ptr %53, align 1, !tbaa !11
  %55 = sext <16 x i8> %54 to <16 x i16>
  %56 = tail call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> %55)
  %57 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 2, i64 4
  store i16 %56, ptr %57, align 2, !tbaa !13
  %58 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 1, i64 80
  %59 = load <16 x i8>, ptr %58, align 1, !tbaa !11
  %60 = sext <16 x i8> %59 to <16 x i16>
  %61 = tail call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> %60)
  %62 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 2, i64 5
  store i16 %61, ptr %62, align 2, !tbaa !13
  %63 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 1, i64 96
  %64 = load <16 x i8>, ptr %63, align 1, !tbaa !11
  %65 = sext <16 x i8> %64 to <16 x i16>
  %66 = tail call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> %65)
  %67 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 2, i64 6
  store i16 %66, ptr %67, align 2, !tbaa !13
  %68 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 1, i64 112
  %69 = load <16 x i8>, ptr %68, align 1, !tbaa !11
  %70 = sext <16 x i8> %69 to <16 x i16>
  %71 = tail call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> %70)
  %72 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 2, i64 7
  store i16 %71, ptr %72, align 2, !tbaa !13
  %73 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 1, i64 128
  %74 = load <16 x i8>, ptr %73, align 1, !tbaa !11
  %75 = sext <16 x i8> %74 to <16 x i16>
  %76 = tail call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> %75)
  %77 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 2, i64 8
  store i16 %76, ptr %77, align 2, !tbaa !13
  %78 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 1, i64 144
  %79 = load <16 x i8>, ptr %78, align 1, !tbaa !11
  %80 = sext <16 x i8> %79 to <16 x i16>
  %81 = tail call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> %80)
  %82 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 2, i64 9
  store i16 %81, ptr %82, align 2, !tbaa !13
  %83 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 1, i64 160
  %84 = load <16 x i8>, ptr %83, align 1, !tbaa !11
  %85 = sext <16 x i8> %84 to <16 x i16>
  %86 = tail call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> %85)
  %87 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 2, i64 10
  store i16 %86, ptr %87, align 2, !tbaa !13
  %88 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 1, i64 176
  %89 = load <16 x i8>, ptr %88, align 1, !tbaa !11
  %90 = sext <16 x i8> %89 to <16 x i16>
  %91 = tail call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> %90)
  %92 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 2, i64 11
  store i16 %91, ptr %92, align 2, !tbaa !13
  %93 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 1, i64 192
  %94 = load <16 x i8>, ptr %93, align 1, !tbaa !11
  %95 = sext <16 x i8> %94 to <16 x i16>
  %96 = tail call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> %95)
  %97 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 2, i64 12
  store i16 %96, ptr %97, align 2, !tbaa !13
  %98 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 1, i64 208
  %99 = load <16 x i8>, ptr %98, align 1, !tbaa !11
  %100 = sext <16 x i8> %99 to <16 x i16>
  %101 = tail call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> %100)
  %102 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 2, i64 13
  store i16 %101, ptr %102, align 2, !tbaa !13
  %103 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 1, i64 224
  %104 = load <16 x i8>, ptr %103, align 1, !tbaa !11
  %105 = sext <16 x i8> %104 to <16 x i16>
  %106 = tail call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> %105)
  %107 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 2, i64 14
  store i16 %106, ptr %107, align 2, !tbaa !13
  %108 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 1, i64 240
  %109 = load <16 x i8>, ptr %108, align 1, !tbaa !11
  %110 = sext <16 x i8> %109 to <16 x i16>
  %111 = tail call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> %110)
  %112 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82, i32 2, i64 15
  store i16 %111, ptr %112, align 2, !tbaa !13
  %113 = fdiv float 1.000000e+00, %24
  %114 = getelementptr inbounds %struct.block_q8_K, ptr %1, i64 %indvars.iv82
  store float %113, ptr %114, align 4, !tbaa !15
  br label %115

115:                                              ; preds = %.preheader, %21
  %.1 = getelementptr inbounds i8, ptr %.04969, i64 1024
  %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1
  %exitcond85.not = icmp eq i64 %indvars.iv.next83, %8
  br i1 %exitcond85.not, label %._crit_edge, label %.preheader60, !llvm.loop !17
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i16 @llvm.vector.reduce.add.v16i16(<16 x i16>) #5

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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = !{!14, !14, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"", !6, i64 0, !7, i64 4, !7, i64 260}
!17 = distinct !{!17, !10}


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