; 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_q8_K = type { float, [256 x i8], [16 x i16] }
%struct.block_iq1_s = type { i16, [32 x i8], [8 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_iq1_s_q8_K = external hidden unnamed_addr constant [124 x i8], align 1
@iq1s_grid = external hidden constant [2048 x i64], align 16

; 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: nounwind uwtable
define dso_local void @ggml_vec_dot_iq1_s_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) #4 {
  %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 float, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %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 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
  %35 = load i32, ptr %9, align 4, !tbaa !5
  %36 = srem i32 %35, 256
  %37 = icmp eq i32 %36, 0
  br i1 %37, label %38, label %39

38:                                               ; preds = %8
  br label %40

39:                                               ; preds = %8
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 11794, ptr noundef @__PRETTY_FUNCTION__.ggml_vec_dot_iq1_s_q8_K) #5
  unreachable

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

43:                                               ; preds = %40
  br label %45

44:                                               ; preds = %40
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 11795, ptr noundef @__PRETTY_FUNCTION__.ggml_vec_dot_iq1_s_q8_K) #5
  unreachable

45:                                               ; preds = %43
  %46 = load i32, ptr %16, align 4, !tbaa !5
  %47 = load i64, ptr %13, align 8, !tbaa !11
  %48 = load i64, ptr %15, align 8, !tbaa !11
  %49 = load i64, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %50 = load ptr, ptr %12, align 8, !tbaa !9
  store ptr %50, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %51 = load ptr, ptr %14, align 8, !tbaa !9
  store ptr %51, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %52 = load i32, ptr %9, align 4, !tbaa !5
  %53 = sdiv i32 %52, 256
  store i32 %53, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store float 0.000000e+00, ptr %20, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %221, %45
  %55 = load i32, ptr %21, align 4, !tbaa !5
  %56 = load i32, ptr %19, align 4, !tbaa !5
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  store i32 2, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %224

59:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %60 = load ptr, ptr %18, align 8, !tbaa !9
  %61 = load i32, ptr %21, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds %struct.block_q8_K, ptr %60, i64 %62
  %64 = getelementptr inbounds %struct.block_q8_K, ptr %63, i32 0, i32 1
  %65 = getelementptr inbounds [256 x i8], ptr %64, i64 0, i64 0
  store ptr %65, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %66 = load ptr, ptr %17, align 8, !tbaa !9
  %67 = load i32, ptr %21, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds %struct.block_iq1_s, ptr %66, i64 %68
  %70 = getelementptr inbounds %struct.block_iq1_s, ptr %69, i32 0, i32 1
  %71 = getelementptr inbounds [32 x i8], ptr %70, i64 0, i64 0
  store ptr %71, ptr %24, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %72 = load ptr, ptr %17, align 8, !tbaa !9
  %73 = load i32, ptr %21, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds %struct.block_iq1_s, ptr %72, i64 %74
  %76 = getelementptr inbounds %struct.block_iq1_s, ptr %75, i32 0, i32 2
  %77 = getelementptr inbounds [8 x i16], ptr %76, i64 0, i64 0
  store ptr %77, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  store i32 0, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  store i32 0, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %196, %59
  %79 = load i32, ptr %28, align 4, !tbaa !5
  %80 = icmp slt i32 %79, 8
  br i1 %80, label %82, label %81

81:                                               ; preds = %78
  store i32 5, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  br label %199

82:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  %83 = load ptr, ptr %25, align 8, !tbaa !9
  %84 = load i32, ptr %28, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i16, ptr %83, i64 %85
  %87 = load i16, ptr %86, align 2, !tbaa !15
  %88 = zext i16 %87 to i32
  %89 = ashr i32 %88, 12
  %90 = and i32 %89, 7
  %91 = mul nsw i32 2, %90
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  %93 = load ptr, ptr %25, align 8, !tbaa !9
  %94 = load i32, ptr %28, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds i16, ptr %93, i64 %95
  %97 = load i16, ptr %96, align 2, !tbaa !15
  %98 = zext i16 %97 to i32
  %99 = and i32 %98, 32768
  %100 = icmp ne i32 %99, 0
  %101 = zext i1 %100 to i64
  %102 = select i1 %100, i32 -1, i32 1
  store i32 %102, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  store i32 0, ptr %31, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  store i32 0, ptr %32, align 4, !tbaa !5
  br label %103

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

106:                                              ; preds = %103
  store i32 8, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  br label %157

107:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  %108 = load ptr, ptr %24, align 8, !tbaa !9
  %109 = load i32, ptr %32, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds i8, ptr %108, i64 %110
  %112 = load i8, ptr %111, align 1, !tbaa !17
  %113 = zext i8 %112 to i32
  %114 = load ptr, ptr %25, align 8, !tbaa !9
  %115 = load i32, ptr %28, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds i16, ptr %114, i64 %116
  %118 = load i16, ptr %117, align 2, !tbaa !15
  %119 = zext i16 %118 to i32
  %120 = load i32, ptr %32, align 4, !tbaa !5
  %121 = mul nsw i32 3, %120
  %122 = ashr i32 %119, %121
  %123 = and i32 %122, 7
  %124 = shl i32 %123, 8
  %125 = or i32 %113, %124
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds i64, ptr @iq1s_grid, i64 %126
  store ptr %127, ptr %33, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #6
  store i32 0, ptr %34, align 4, !tbaa !5
  br label %128

128:                                              ; preds = %148, %107
  %129 = load i32, ptr %34, align 4, !tbaa !5
  %130 = icmp slt i32 %129, 8
  br i1 %130, label %132, label %131

131:                                              ; preds = %128
  store i32 11, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  br label %151

132:                                              ; preds = %128
  %133 = load ptr, ptr %23, align 8, !tbaa !9
  %134 = load i32, ptr %34, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds i8, ptr %133, i64 %135
  %137 = load i8, ptr %136, align 1, !tbaa !17
  %138 = sext i8 %137 to i32
  %139 = load ptr, ptr %33, align 8, !tbaa !9
  %140 = load i32, ptr %34, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds i8, ptr %139, i64 %141
  %143 = load i8, ptr %142, align 1, !tbaa !17
  %144 = sext i8 %143 to i32
  %145 = mul nsw i32 %138, %144
  %146 = load i32, ptr %31, align 4, !tbaa !5
  %147 = add nsw i32 %146, %145
  store i32 %147, ptr %31, align 4, !tbaa !5
  br label %148

148:                                              ; preds = %132
  %149 = load i32, ptr %34, align 4, !tbaa !5
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %34, align 4, !tbaa !5
  br label %128, !llvm.loop !18

151:                                              ; preds = %131
  %152 = load ptr, ptr %23, align 8, !tbaa !9
  %153 = getelementptr inbounds i8, ptr %152, i64 8
  store ptr %153, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  br label %154

154:                                              ; preds = %151
  %155 = load i32, ptr %32, align 4, !tbaa !5
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %32, align 4, !tbaa !5
  br label %103, !llvm.loop !20

157:                                              ; preds = %106
  %158 = load i32, ptr %29, align 4, !tbaa !5
  %159 = load i32, ptr %31, align 4, !tbaa !5
  %160 = mul nsw i32 %158, %159
  %161 = load i32, ptr %26, align 4, !tbaa !5
  %162 = add nsw i32 %161, %160
  store i32 %162, ptr %26, align 4, !tbaa !5
  %163 = load i32, ptr %29, align 4, !tbaa !5
  %164 = load i32, ptr %30, align 4, !tbaa !5
  %165 = mul nsw i32 %163, %164
  %166 = load ptr, ptr %18, align 8, !tbaa !9
  %167 = load i32, ptr %21, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds %struct.block_q8_K, ptr %166, i64 %168
  %170 = getelementptr inbounds %struct.block_q8_K, ptr %169, i32 0, i32 2
  %171 = load i32, ptr %28, align 4, !tbaa !5
  %172 = mul nsw i32 2, %171
  %173 = add nsw i32 %172, 0
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [16 x i16], ptr %170, i64 0, i64 %174
  %176 = load i16, ptr %175, align 2, !tbaa !15
  %177 = sext i16 %176 to i32
  %178 = load ptr, ptr %18, align 8, !tbaa !9
  %179 = load i32, ptr %21, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds %struct.block_q8_K, ptr %178, i64 %180
  %182 = getelementptr inbounds %struct.block_q8_K, ptr %181, i32 0, i32 2
  %183 = load i32, ptr %28, align 4, !tbaa !5
  %184 = mul nsw i32 2, %183
  %185 = add nsw i32 %184, 1
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [16 x i16], ptr %182, i64 0, i64 %186
  %188 = load i16, ptr %187, align 2, !tbaa !15
  %189 = sext i16 %188 to i32
  %190 = add nsw i32 %177, %189
  %191 = mul nsw i32 %165, %190
  %192 = load i32, ptr %27, align 4, !tbaa !5
  %193 = add nsw i32 %192, %191
  store i32 %193, ptr %27, align 4, !tbaa !5
  %194 = load ptr, ptr %24, align 8, !tbaa !9
  %195 = getelementptr inbounds i8, ptr %194, i64 4
  store ptr %195, ptr %24, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %196

196:                                              ; preds = %157
  %197 = load i32, ptr %28, align 4, !tbaa !5
  %198 = add nsw i32 %197, 1
  store i32 %198, ptr %28, align 4, !tbaa !5
  br label %78, !llvm.loop !21

199:                                              ; preds = %81
  %200 = load ptr, ptr %17, align 8, !tbaa !9
  %201 = load i32, ptr %21, align 4, !tbaa !5
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds %struct.block_iq1_s, ptr %200, i64 %202
  %204 = getelementptr inbounds %struct.block_iq1_s, ptr %203, i32 0, i32 0
  %205 = load i16, ptr %204, align 2, !tbaa !22
  %206 = call float @ggml_lookup_fp16_to_fp32(i16 noundef zeroext %205)
  %207 = load ptr, ptr %18, align 8, !tbaa !9
  %208 = load i32, ptr %21, align 4, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds %struct.block_q8_K, ptr %207, i64 %209
  %211 = getelementptr inbounds %struct.block_q8_K, ptr %210, i32 0, i32 0
  %212 = load float, ptr %211, align 4, !tbaa !24
  %213 = fmul float %206, %212
  %214 = load i32, ptr %26, align 4, !tbaa !5
  %215 = sitofp i32 %214 to float
  %216 = load i32, ptr %27, align 4, !tbaa !5
  %217 = sitofp i32 %216 to float
  %218 = call float @llvm.fmuladd.f32(float 1.250000e-01, float %217, float %215)
  %219 = load float, ptr %20, align 4, !tbaa !13
  %220 = call float @llvm.fmuladd.f32(float %213, float %218, float %219)
  store float %220, ptr %20, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %221

221:                                              ; preds = %199
  %222 = load i32, ptr %21, align 4, !tbaa !5
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %21, align 4, !tbaa !5
  br label %54, !llvm.loop !26

224:                                              ; preds = %58
  %225 = load float, ptr %20, align 4, !tbaa !13
  %226 = load ptr, ptr %10, align 8, !tbaa !9
  store float %225, ptr %226, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  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 = { 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 = { noreturn nounwind }
attributes #6 = { 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, !16, i64 0}
!16 = !{!"short", !7, i64 0}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = !{!23, !16, i64 0}
!23 = !{!"", !16, i64 0, !7, i64 2, !7, i64 34}
!24 = !{!25, !14, i64 0}
!25 = !{!"", !14, i64 0, !7, i64 4, !7, i64 260}
!26 = distinct !{!26, !19}


; 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] }
%struct.block_iq1_s = type { i16, [32 x i8], [8 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_iq1_s_q8_K = external hidden unnamed_addr constant [124 x i8], align 1
@iq1s_grid = external hidden local_unnamed_addr constant [2048 x i64], align 16

; 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_iq1_s_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 11794, ptr noundef nonnull @__PRETTY_FUNCTION__.ggml_vec_dot_iq1_s_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 11795, ptr noundef nonnull @__PRETTY_FUNCTION__.ggml_vec_dot_iq1_s_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.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %15
  %wide.trip.count = zext nneg i32 %16 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %24, %15
  %.060.lcssa = phi float [ 0.000000e+00, %15 ], [ %32, %24 ]
  store float %.060.lcssa, ptr %1, align 4, !tbaa !5
  ret void

.lr.ph:                                           ; preds = %.lr.ph.preheader, %24
  %indvars.iv90 = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next91, %24 ]
  %.06082 = phi float [ 0.000000e+00, %.lr.ph.preheader ], [ %32, %24 ]
  %18 = getelementptr inbounds %struct.block_q8_K, ptr %5, i64 %indvars.iv90
  %19 = getelementptr inbounds i8, ptr %18, i64 4
  %20 = getelementptr inbounds %struct.block_iq1_s, ptr %3, i64 %indvars.iv90
  %21 = getelementptr inbounds i8, ptr %20, i64 2
  %22 = getelementptr inbounds i8, ptr %20, i64 34
  %23 = getelementptr inbounds i8, ptr %18, i64 260
  br label %33

24:                                               ; preds = %33
  %25 = load i16, ptr %20, align 2, !tbaa !9
  %26 = tail call float @ggml_lookup_fp16_to_fp32(i16 noundef zeroext %25)
  %27 = load float, ptr %18, align 4, !tbaa !12
  %28 = fmul float %26, %27
  %29 = sitofp i32 %100 to float
  %30 = sitofp i32 %113 to float
  %31 = tail call float @llvm.fmuladd.f32(float %30, float 1.250000e-01, float %29)
  %32 = tail call float @llvm.fmuladd.f32(float %28, float %31, float %.06082)
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %exitcond93.not = icmp eq i64 %indvars.iv.next91, %wide.trip.count
  br i1 %exitcond93.not, label %._crit_edge, label %.lr.ph, !llvm.loop !14

33:                                               ; preds = %.lr.ph, %33
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %33 ]
  %.06579 = phi i32 [ 0, %.lr.ph ], [ %113, %33 ]
  %.06678 = phi i32 [ 0, %.lr.ph ], [ %100, %33 ]
  %.06777 = phi ptr [ %19, %.lr.ph ], [ %scevgep, %33 ]
  %.06976 = phi ptr [ %21, %.lr.ph ], [ %114, %33 ]
  %34 = getelementptr inbounds i16, ptr %22, i64 %indvars.iv
  %35 = load i16, ptr %34, align 2, !tbaa !16
  %36 = lshr i16 %35, 11
  %37 = and i16 %36, 14
  %38 = or disjoint i16 %37, 1
  %39 = zext i16 %35 to i32
  %40 = load i8, ptr %.06976, align 1, !tbaa !17
  %41 = zext i8 %40 to i32
  %42 = shl nuw nsw i32 %39, 8
  %43 = and i32 %42, 1792
  %44 = or disjoint i32 %43, %41
  %45 = zext nneg i32 %44 to i64
  %46 = getelementptr inbounds i64, ptr @iq1s_grid, i64 %45
  %47 = load <8 x i8>, ptr %.06777, align 1, !tbaa !17
  %48 = sext <8 x i8> %47 to <8 x i32>
  %49 = load <8 x i8>, ptr %46, align 8, !tbaa !17
  %50 = sext <8 x i8> %49 to <8 x i32>
  %51 = mul nsw <8 x i32> %50, %48
  %52 = getelementptr inbounds i8, ptr %.06777, i64 8
  %53 = getelementptr inbounds i8, ptr %.06976, i64 1
  %54 = load i8, ptr %53, align 1, !tbaa !17
  %55 = zext i8 %54 to i32
  %56 = shl nuw nsw i32 %39, 5
  %57 = and i32 %56, 1792
  %58 = or disjoint i32 %57, %55
  %59 = zext nneg i32 %58 to i64
  %60 = getelementptr inbounds i64, ptr @iq1s_grid, i64 %59
  %61 = load <8 x i8>, ptr %52, align 1, !tbaa !17
  %62 = sext <8 x i8> %61 to <8 x i32>
  %63 = load <8 x i8>, ptr %60, align 8, !tbaa !17
  %64 = sext <8 x i8> %63 to <8 x i32>
  %65 = mul nsw <8 x i32> %64, %62
  %66 = getelementptr inbounds i8, ptr %.06777, i64 16
  %67 = getelementptr inbounds i8, ptr %.06976, i64 2
  %68 = load i8, ptr %67, align 1, !tbaa !17
  %69 = zext i8 %68 to i32
  %70 = shl nuw nsw i32 %39, 2
  %71 = and i32 %70, 1792
  %72 = or disjoint i32 %71, %69
  %73 = zext nneg i32 %72 to i64
  %74 = getelementptr inbounds i64, ptr @iq1s_grid, i64 %73
  %75 = load <8 x i8>, ptr %66, align 1, !tbaa !17
  %76 = sext <8 x i8> %75 to <8 x i32>
  %77 = load <8 x i8>, ptr %74, align 8, !tbaa !17
  %78 = sext <8 x i8> %77 to <8 x i32>
  %79 = mul nsw <8 x i32> %78, %76
  %80 = getelementptr inbounds i8, ptr %.06777, i64 24
  %81 = getelementptr inbounds i8, ptr %.06976, i64 3
  %82 = load i8, ptr %81, align 1, !tbaa !17
  %83 = zext i8 %82 to i32
  %84 = lshr i32 %39, 1
  %85 = and i32 %84, 1792
  %86 = or disjoint i32 %85, %83
  %87 = zext nneg i32 %86 to i64
  %88 = getelementptr inbounds i64, ptr @iq1s_grid, i64 %87
  %89 = load <8 x i8>, ptr %80, align 1, !tbaa !17
  %90 = sext <8 x i8> %89 to <8 x i32>
  %91 = load <8 x i8>, ptr %88, align 8, !tbaa !17
  %92 = sext <8 x i8> %91 to <8 x i32>
  %93 = mul nsw <8 x i32> %92, %90
  %94 = tail call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> %51)
  %95 = tail call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> %65)
  %op.rdx = add i32 %94, %95
  %96 = tail call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> %79)
  %op.rdx98 = add i32 %op.rdx, %96
  %97 = tail call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> %93)
  %op.rdx99 = add i32 %op.rdx98, %97
  %98 = zext nneg i16 %38 to i32
  %scevgep = getelementptr i8, ptr %.06777, i64 32
  %99 = mul nsw i32 %op.rdx99, %98
  %100 = add nsw i32 %99, %.06678
  %101 = sub nsw i32 0, %98
  %.not70 = icmp slt i16 %35, 0
  %102 = select i1 %.not70, i32 %101, i32 %98
  %103 = shl nuw nsw i64 %indvars.iv, 1
  %104 = getelementptr inbounds [16 x i16], ptr %23, i64 0, i64 %103
  %105 = load i16, ptr %104, align 2, !tbaa !16
  %106 = sext i16 %105 to i32
  %107 = or disjoint i64 %103, 1
  %108 = getelementptr inbounds [16 x i16], ptr %23, i64 0, i64 %107
  %109 = load i16, ptr %108, align 2, !tbaa !16
  %110 = sext i16 %109 to i32
  %111 = add nsw i32 %110, %106
  %112 = mul nsw i32 %111, %102
  %113 = add nsw i32 %112, %.06579
  %114 = getelementptr inbounds i8, ptr %.06976, i64 4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 8
  br i1 %exitcond.not, label %24, label %33, !llvm.loop !18
}

; 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"", !11, i64 0, !7, i64 2, !7, i64 34}
!11 = !{!"short", !7, i64 0}
!12 = !{!13, !6, i64 0}
!13 = !{!"", !6, i64 0, !7, i64 4, !7, i64 260}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!11, !11, i64 0}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !15}


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