; LLVM IR from ggml-org/ggml :: src/ggml-cpu (ggml-cpu-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_iq2_xxs = type { i16, [32 x i16] }
%struct.block_q8_K = type { float, [256 x i8], [16 x i16] }

@.str.1 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__.ggml_vec_dot_iq2_xxs_q8_K = external hidden unnamed_addr constant [126 x i8], align 1
@iq2xxs_grid = external hidden constant [256 x i64], align 16
@ksigns_iq2xs = external hidden constant [128 x i8], align 16
@kmask_iq2xs = external hidden constant [8 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 float @ggml_lookup_fp16_to_fp32(i16 noundef zeroext) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #3

; 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) #4

; Function Attrs: nounwind uwtable
define dso_local void @ggml_vec_dot_iq2_xxs_q8_K(i32 noundef %0, ptr noalias noundef %1, i64 noundef %2, ptr noalias noundef %3, i64 noundef %4, ptr noalias noundef %5, i64 noundef %6, i32 noundef %7) #5 {
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca [2 x i32], align 4
  %21 = alloca ptr, align 8
  %22 = alloca float, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca float, align 4
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca ptr, align 8
  %34 = alloca i8, align 1
  %35 = alloca i32, align 4
  store i32 %0, ptr %9, align 4, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !9
  store i64 %2, ptr %11, align 8, !tbaa !11
  store ptr %3, ptr %12, align 8, !tbaa !9
  store i64 %4, ptr %13, align 8, !tbaa !11
  store ptr %5, ptr %14, align 8, !tbaa !9
  store i64 %6, ptr %15, align 8, !tbaa !11
  store i32 %7, ptr %16, align 4, !tbaa !5
  %36 = load i32, ptr %9, align 4, !tbaa !5
  %37 = srem i32 %36, 256
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %39, label %40

39:                                               ; preds = %8
  br label %41

40:                                               ; preds = %8
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 9506, ptr noundef @__PRETTY_FUNCTION__.ggml_vec_dot_iq2_xxs_q8_K) #6
  unreachable

41:                                               ; preds = %39
  %42 = load i32, ptr %16, align 4, !tbaa !5
  %43 = icmp eq i32 %42, 1
  br i1 %43, label %44, label %45

44:                                               ; preds = %41
  br label %46

45:                                               ; preds = %41
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 9507, ptr noundef @__PRETTY_FUNCTION__.ggml_vec_dot_iq2_xxs_q8_K) #6
  unreachable

46:                                               ; preds = %44
  %47 = load i32, ptr %16, align 4, !tbaa !5
  %48 = load i64, ptr %13, align 8, !tbaa !11
  %49 = load i64, ptr %15, align 8, !tbaa !11
  %50 = load i64, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %51 = load ptr, ptr %12, align 8, !tbaa !9
  store ptr %51, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %52 = load ptr, ptr %14, align 8, !tbaa !9
  store ptr %52, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %53 = load i32, ptr %9, align 4, !tbaa !5
  %54 = sdiv i32 %53, 256
  store i32 %54, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %55 = getelementptr inbounds [2 x i32], ptr %20, i64 0, i64 0
  store ptr %55, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store float 0.000000e+00, ptr %22, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %180, %46
  %57 = load i32, ptr %23, align 4, !tbaa !5
  %58 = load i32, ptr %19, align 4, !tbaa !5
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  store i32 2, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %183

61:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %62 = load ptr, ptr %17, align 8, !tbaa !9
  %63 = load i32, ptr %23, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds %struct.block_iq2_xxs, ptr %62, i64 %64
  %66 = getelementptr inbounds %struct.block_iq2_xxs, ptr %65, i32 0, i32 0
  %67 = load i16, ptr %66, align 2, !tbaa !15
  %68 = call float @ggml_lookup_fp16_to_fp32(i16 noundef zeroext %67)
  %69 = load ptr, ptr %18, align 8, !tbaa !9
  %70 = load i32, ptr %23, align 4, !tbaa !5
  %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 0
  %74 = load float, ptr %73, align 4, !tbaa !18
  %75 = fmul float %68, %74
  store float %75, ptr %25, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %76 = load ptr, ptr %17, align 8, !tbaa !9
  %77 = load i32, ptr %23, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds %struct.block_iq2_xxs, ptr %76, i64 %78
  %80 = getelementptr inbounds %struct.block_iq2_xxs, ptr %79, i32 0, i32 1
  %81 = getelementptr inbounds [32 x i16], ptr %80, i64 0, i64 0
  store ptr %81, ptr %26, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %82 = load ptr, ptr %18, align 8, !tbaa !9
  %83 = load i32, ptr %23, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds %struct.block_q8_K, ptr %82, i64 %84
  %86 = getelementptr inbounds %struct.block_q8_K, ptr %85, i32 0, i32 1
  %87 = getelementptr inbounds [256 x i8], ptr %86, i64 0, i64 0
  store ptr %87, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  store i32 0, ptr %28, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  store i32 0, ptr %29, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %171, %61
  %89 = load i32, ptr %29, align 4, !tbaa !5
  %90 = icmp slt i32 %89, 8
  br i1 %90, label %92, label %91

91:                                               ; preds = %88
  store i32 5, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  br label %174

92:                                               ; preds = %88
  %93 = getelementptr inbounds [2 x i32], ptr %20, i64 0, i64 0
  %94 = load ptr, ptr %26, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %93, ptr align 2 %94, i64 8, i1 false)
  %95 = load ptr, ptr %26, align 8, !tbaa !9
  %96 = getelementptr inbounds i16, ptr %95, i64 4
  store ptr %96, ptr %26, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  %97 = getelementptr inbounds [2 x i32], ptr %20, i64 0, i64 1
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = lshr i32 %98, 28
  %100 = mul i32 2, %99
  %101 = add i32 %100, 1
  store i32 %101, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  store i32 0, ptr %31, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  store i32 0, ptr %32, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %162, %92
  %103 = load i32, ptr %32, align 4, !tbaa !5
  %104 = icmp slt i32 %103, 4
  br i1 %104, label %106, label %105

105:                                              ; preds = %102
  store i32 8, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  br label %165

106:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  %107 = load ptr, ptr %21, align 8, !tbaa !9
  %108 = load i32, ptr %32, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds i8, ptr %107, i64 %109
  %111 = load i8, ptr %110, align 1, !tbaa !20
  %112 = zext i8 %111 to i32
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds i64, ptr @iq2xxs_grid, i64 %113
  store ptr %114, ptr %33, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #7
  %115 = getelementptr inbounds [2 x i32], ptr %20, i64 0, i64 1
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = load i32, ptr %32, align 4, !tbaa !5
  %118 = mul nsw i32 7, %117
  %119 = lshr i32 %116, %118
  %120 = and i32 %119, 127
  %121 = zext i32 %120 to i64
  %122 = getelementptr inbounds [128 x i8], ptr @ksigns_iq2xs, i64 0, i64 %121
  %123 = load i8, ptr %122, align 1, !tbaa !20
  store i8 %123, ptr %34, align 1, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #7
  store i32 0, ptr %35, align 4, !tbaa !5
  br label %124

124:                                              ; preds = %156, %106
  %125 = load i32, ptr %35, align 4, !tbaa !5
  %126 = icmp slt i32 %125, 8
  br i1 %126, label %128, label %127

127:                                              ; preds = %124
  store i32 11, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #7
  br label %159

128:                                              ; preds = %124
  %129 = load ptr, ptr %33, align 8, !tbaa !9
  %130 = load i32, ptr %35, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds i8, ptr %129, i64 %131
  %133 = load i8, ptr %132, align 1, !tbaa !20
  %134 = zext i8 %133 to i32
  %135 = load ptr, ptr %27, align 8, !tbaa !9
  %136 = load i32, ptr %35, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds i8, ptr %135, i64 %137
  %139 = load i8, ptr %138, align 1, !tbaa !20
  %140 = sext i8 %139 to i32
  %141 = mul nsw i32 %134, %140
  %142 = load i8, ptr %34, align 1, !tbaa !20
  %143 = zext i8 %142 to i32
  %144 = load i32, ptr %35, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [8 x i8], ptr @kmask_iq2xs, i64 0, i64 %145
  %147 = load i8, ptr %146, align 1, !tbaa !20
  %148 = zext i8 %147 to i32
  %149 = and i32 %143, %148
  %150 = icmp ne i32 %149, 0
  %151 = zext i1 %150 to i64
  %152 = select i1 %150, i32 -1, i32 1
  %153 = mul nsw i32 %141, %152
  %154 = load i32, ptr %31, align 4, !tbaa !5
  %155 = add nsw i32 %154, %153
  store i32 %155, ptr %31, align 4, !tbaa !5
  br label %156

156:                                              ; preds = %128
  %157 = load i32, ptr %35, align 4, !tbaa !5
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %35, align 4, !tbaa !5
  br label %124, !llvm.loop !21

159:                                              ; preds = %127
  %160 = load ptr, ptr %27, align 8, !tbaa !9
  %161 = getelementptr inbounds i8, ptr %160, i64 8
  store ptr %161, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  br label %162

162:                                              ; preds = %159
  %163 = load i32, ptr %32, align 4, !tbaa !5
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %32, align 4, !tbaa !5
  br label %102, !llvm.loop !23

165:                                              ; preds = %105
  %166 = load i32, ptr %31, align 4, !tbaa !5
  %167 = load i32, ptr %30, align 4, !tbaa !5
  %168 = mul i32 %166, %167
  %169 = load i32, ptr %28, align 4, !tbaa !5
  %170 = add i32 %169, %168
  store i32 %170, ptr %28, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  br label %171

171:                                              ; preds = %165
  %172 = load i32, ptr %29, align 4, !tbaa !5
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr %29, align 4, !tbaa !5
  br label %88, !llvm.loop !24

174:                                              ; preds = %91
  %175 = load float, ptr %25, align 4, !tbaa !13
  %176 = load i32, ptr %28, align 4, !tbaa !5
  %177 = sitofp i32 %176 to float
  %178 = load float, ptr %22, align 4, !tbaa !13
  %179 = call float @llvm.fmuladd.f32(float %175, float %177, float %178)
  store float %179, ptr %22, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %180

180:                                              ; preds = %174
  %181 = load i32, ptr %23, align 4, !tbaa !5
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %23, align 4, !tbaa !5
  br label %56, !llvm.loop !25

183:                                              ; preds = %60
  %184 = load float, ptr %22, align 4, !tbaa !13
  %185 = fmul float 1.250000e-01, %184
  %186 = load ptr, ptr %10, align 8, !tbaa !9
  store float %185, ptr %186, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  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 nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{!16, !17, i64 0}
!16 = !{!"", !17, i64 0, !7, i64 2}
!17 = !{!"short", !7, i64 0}
!18 = !{!19, !14, i64 0}
!19 = !{!"", !14, i64 0, !7, i64 4, !7, i64 260}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = distinct !{!24, !22}
!25 = distinct !{!25, !22}


; 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_iq2_xxs = type { i16, [32 x i16] }
%struct.block_q8_K = type { float, [256 x i8], [16 x i16] }

@.str.1 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__.ggml_vec_dot_iq2_xxs_q8_K = external hidden unnamed_addr constant [126 x i8], align 1
@iq2xxs_grid = external hidden local_unnamed_addr constant [256 x i64], align 16
@ksigns_iq2xs = external hidden local_unnamed_addr constant [128 x i8], align 16
@kmask_iq2xs = external hidden local_unnamed_addr constant [8 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 float @ggml_lookup_fp16_to_fp32(i16 noundef zeroext) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #2

; Function Attrs: nounwind uwtable
define dso_local void @ggml_vec_dot_iq2_xxs_q8_K(i32 noundef %0, ptr noalias nocapture noundef writeonly %1, i64 noundef %2, ptr noalias nocapture noundef readonly %3, i64 noundef %4, ptr noalias nocapture noundef readonly %5, i64 noundef %6, i32 noundef %7) local_unnamed_addr #3 {
  %9 = and i32 %0, 255
  %10 = icmp eq i32 %9, 0
  br i1 %10, label %12, label %11

11:                                               ; preds = %8
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 9506, ptr noundef nonnull @__PRETTY_FUNCTION__.ggml_vec_dot_iq2_xxs_q8_K) #5
  unreachable

12:                                               ; preds = %8
  %13 = icmp eq i32 %7, 1
  br i1 %13, label %15, label %14

14:                                               ; preds = %12
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 9507, ptr noundef nonnull @__PRETTY_FUNCTION__.ggml_vec_dot_iq2_xxs_q8_K) #5
  unreachable

15:                                               ; preds = %12
  %16 = ashr exact i32 %0, 8
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %15
  %wide.trip.count = zext nneg i32 %16 to i64
  %18 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @kmask_iq2xs, i64 1), align 1, !tbaa !5
  %.pre79.pre = load i8, ptr getelementptr inbounds (i8, ptr @kmask_iq2xs, i64 5), align 1, !tbaa !5
  %19 = load <2 x i8>, ptr getelementptr inbounds (i8, ptr @kmask_iq2xs, i64 6), align 1
  %20 = load <8 x i8>, ptr @kmask_iq2xs, align 1
  %21 = extractelement <8 x i8> %20, i64 5
  %22 = shufflevector <8 x i8> %20, <8 x i8> poison, <4 x i32> <i32 1, i32 2, i32 3, i32 4>
  %23 = shufflevector <2 x i8> %19, <2 x i8> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
  %24 = shufflevector <8 x i8> %20, <8 x i8> %23, <8 x i32> <i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 8, i32 9>
  %25 = shufflevector <8 x i8> %20, <8 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
  br label %27

._crit_edge.loopexit:                             ; preds = %36
  %26 = fmul float %39, 1.250000e-01
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %15
  %.046.lcssa = phi float [ 0.000000e+00, %15 ], [ %26, %._crit_edge.loopexit ]
  store float %.046.lcssa, ptr %1, align 4, !tbaa !8
  ret void

27:                                               ; preds = %.lr.ph, %36
  %.pre79 = phi i8 [ %.pre79.pre, %.lr.ph ], [ %21, %36 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %36 ]
  %.04665 = phi float [ 0.000000e+00, %.lr.ph ], [ %39, %36 ]
  %28 = phi <4 x i8> [ %18, %.lr.ph ], [ %22, %36 ]
  %29 = getelementptr inbounds %struct.block_iq2_xxs, ptr %3, i64 %indvars.iv
  %30 = load i16, ptr %29, align 2, !tbaa !10
  %31 = tail call float @ggml_lookup_fp16_to_fp32(i16 noundef zeroext %30)
  %32 = getelementptr inbounds %struct.block_q8_K, ptr %5, i64 %indvars.iv
  %33 = load float, ptr %32, align 4, !tbaa !13
  %34 = getelementptr inbounds i8, ptr %29, i64 2
  %35 = getelementptr inbounds i8, ptr %32, i64 4
  br label %40

36:                                               ; preds = %40
  %37 = fmul float %31, %33
  %38 = sitofp i32 %115 to float
  %39 = tail call float @llvm.fmuladd.f32(float %37, float %38, float %.04665)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond75.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond75.not, label %._crit_edge.loopexit, label %27, !llvm.loop !15

40:                                               ; preds = %27, %40
  %41 = phi i8 [ %.pre79, %27 ], [ %21, %40 ]
  %.05063 = phi i32 [ 0, %27 ], [ %116, %40 ]
  %.05162 = phi i32 [ 0, %27 ], [ %115, %40 ]
  %.05261 = phi ptr [ %35, %27 ], [ %scevgep, %40 ]
  %.05460 = phi ptr [ %34, %27 ], [ %113, %40 ]
  %42 = phi <4 x i8> [ %28, %27 ], [ %22, %40 ]
  %43 = load i64, ptr %.05460, align 2
  %.sroa.4.0.extract.shift = lshr i64 %43, 8
  %.sroa.5.0.extract.shift = lshr i64 %43, 16
  %.sroa.6.0.extract.shift = lshr i64 %43, 24
  %.sroa.7.0.extract.shift = lshr i64 %43, 32
  %sum.shift = lshr i64 %43, 59
  %44 = trunc nuw nsw i64 %sum.shift to i32
  %45 = or i32 %44, 1
  %46 = and i64 %43, 255
  %47 = getelementptr inbounds i64, ptr @iq2xxs_grid, i64 %46
  %48 = and i64 %.sroa.7.0.extract.shift, 127
  %49 = getelementptr inbounds [128 x i8], ptr @ksigns_iq2xs, i64 0, i64 %48
  %50 = load i8, ptr %49, align 1, !tbaa !5
  %51 = load <8 x i8>, ptr %47, align 8, !tbaa !5
  %52 = zext <8 x i8> %51 to <8 x i32>
  %53 = load <8 x i8>, ptr %.05261, align 1, !tbaa !5
  %54 = sext <8 x i8> %53 to <8 x i32>
  %55 = mul nsw <8 x i32> %54, %52
  %56 = shufflevector <4 x i8> %42, <4 x i8> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison>
  %57 = shufflevector <8 x i8> %24, <8 x i8> %56, <8 x i32> <i32 0, i32 8, i32 9, i32 10, i32 11, i32 poison, i32 6, i32 7>
  %58 = insertelement <8 x i8> %57, i8 %41, i64 5
  %59 = insertelement <8 x i8> poison, i8 %50, i64 0
  %60 = shufflevector <8 x i8> %59, <8 x i8> poison, <8 x i32> zeroinitializer
  %61 = and <8 x i8> %58, %60
  %62 = icmp eq <8 x i8> %61, zeroinitializer
  %63 = sub nsw <8 x i32> zeroinitializer, %55
  %64 = select <8 x i1> %62, <8 x i32> %55, <8 x i32> %63
  %65 = getelementptr inbounds i8, ptr %.05261, i64 8
  %66 = and i64 %.sroa.4.0.extract.shift, 255
  %67 = getelementptr inbounds i64, ptr @iq2xxs_grid, i64 %66
  %68 = lshr i64 %43, 39
  %69 = and i64 %68, 127
  %70 = getelementptr inbounds [128 x i8], ptr @ksigns_iq2xs, i64 0, i64 %69
  %71 = load i8, ptr %70, align 1, !tbaa !5
  %72 = load <8 x i8>, ptr %67, align 8, !tbaa !5
  %73 = and i64 %.sroa.5.0.extract.shift, 255
  %74 = getelementptr inbounds i64, ptr @iq2xxs_grid, i64 %73
  %75 = lshr i64 %43, 46
  %76 = and i64 %75, 127
  %77 = getelementptr inbounds [128 x i8], ptr @ksigns_iq2xs, i64 0, i64 %76
  %78 = load i8, ptr %77, align 1, !tbaa !5
  %79 = load <8 x i8>, ptr %74, align 8, !tbaa !5
  %80 = shufflevector <8 x i8> %72, <8 x i8> %79, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
  %81 = zext <16 x i8> %80 to <16 x i32>
  %82 = load <16 x i8>, ptr %65, align 1, !tbaa !5
  %83 = sext <16 x i8> %82 to <16 x i32>
  %84 = mul nsw <16 x i32> %83, %81
  %85 = insertelement <16 x i8> poison, i8 %71, i64 0
  %86 = insertelement <16 x i8> %85, i8 %78, i64 1
  %87 = shufflevector <16 x i8> %86, <16 x i8> poison, <16 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>
  %88 = and <16 x i8> %25, %87
  %89 = icmp eq <16 x i8> %88, zeroinitializer
  %90 = sub nsw <16 x i32> zeroinitializer, %84
  %91 = select <16 x i1> %89, <16 x i32> %84, <16 x i32> %90
  %92 = getelementptr inbounds i8, ptr %.05261, i64 24
  %93 = and i64 %.sroa.6.0.extract.shift, 255
  %94 = getelementptr inbounds i64, ptr @iq2xxs_grid, i64 %93
  %95 = lshr i64 %43, 53
  %96 = and i64 %95, 127
  %97 = getelementptr inbounds [128 x i8], ptr @ksigns_iq2xs, i64 0, i64 %96
  %98 = load i8, ptr %97, align 1, !tbaa !5
  %99 = load <8 x i8>, ptr %94, align 8, !tbaa !5
  %100 = zext <8 x i8> %99 to <8 x i32>
  %101 = load <8 x i8>, ptr %92, align 1, !tbaa !5
  %102 = sext <8 x i8> %101 to <8 x i32>
  %103 = mul nsw <8 x i32> %102, %100
  %104 = insertelement <8 x i8> poison, i8 %98, i64 0
  %105 = shufflevector <8 x i8> %104, <8 x i8> poison, <8 x i32> zeroinitializer
  %106 = and <8 x i8> %20, %105
  %107 = icmp eq <8 x i8> %106, zeroinitializer
  %108 = sub nsw <8 x i32> zeroinitializer, %103
  %109 = select <8 x i1> %107, <8 x i32> %103, <8 x i32> %108
  %110 = tail call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> %91)
  %111 = tail call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> %109)
  %112 = tail call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> %64)
  %op.rdx100 = add i32 %112, %111
  %op.rdx101 = add i32 %op.rdx100, %110
  %113 = getelementptr inbounds i8, ptr %.05460, i64 8
  %scevgep = getelementptr i8, ptr %.05261, i64 32
  %114 = mul nsw i32 %op.rdx101, %45
  %115 = add i32 %114, %.05162
  %116 = add nuw nsw i32 %.05063, 1
  %exitcond.not = icmp eq i32 %116, 8
  br i1 %exitcond.not, label %36, label %40, !llvm.loop !17
}

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

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

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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = !{!11, !12, i64 0}
!11 = !{!"", !12, i64 0, !6, i64 2}
!12 = !{!"short", !6, i64 0}
!13 = !{!14, !9, i64 0}
!14 = !{!"", !9, i64 0, !6, i64 4, !6, i64 260}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


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