; LLVM IR from ggml-org/ggml :: tests (test-mul-mat2)

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

@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@__PRETTY_FUNCTION__.quantize_2_row = external hidden unnamed_addr constant [64 x i8], align 1

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

29:                                               ; preds = %3
  br label %31

30:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 301, ptr noundef @__PRETTY_FUNCTION__.quantize_2_row) #7
  unreachable

31:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %32 = load i32, ptr %6, align 4, !tbaa !9
  %33 = call i32 @quantize_2_blocks_per_row(i32 noundef %32)
  store i32 %33, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %34 = call i32 @quantize_2_quants_per_block()
  store i32 %34, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %35, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  %37 = load i32, ptr %7, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds float, ptr %36, i64 %38
  store ptr %39, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  %41 = load i32, ptr %7, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds float, ptr %40, i64 %42
  store ptr %43, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %180, %31
  %45 = load i32, ptr %13, align 4, !tbaa !9
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  store i32 2, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %183

49:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store float 0x47EFFFFFE0000000, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store float 0xC7EFFFFFE0000000, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %50

50:                                               ; preds = %75, %49
  %51 = load i32, ptr %17, align 4, !tbaa !9
  %52 = icmp slt i32 %51, 64
  br i1 %52, label %54, label %53

53:                                               ; preds = %50
  store i32 5, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %78

54:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = load i32, ptr %13, align 4, !tbaa !9
  %57 = mul nsw i32 %56, 64
  %58 = load i32, ptr %17, align 4, !tbaa !9
  %59 = add nsw i32 %57, %58
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds float, ptr %55, i64 %60
  %62 = load float, ptr %61, align 4, !tbaa !11
  store float %62, ptr %18, align 4, !tbaa !11
  %63 = load float, ptr %18, align 4, !tbaa !11
  %64 = load float, ptr %15, align 4, !tbaa !11
  %65 = fcmp olt float %63, %64
  br i1 %65, label %66, label %68

66:                                               ; preds = %54
  %67 = load float, ptr %18, align 4, !tbaa !11
  store float %67, ptr %15, align 4, !tbaa !11
  br label %68

68:                                               ; preds = %66, %54
  %69 = load float, ptr %18, align 4, !tbaa !11
  %70 = load float, ptr %16, align 4, !tbaa !11
  %71 = fcmp ogt float %69, %70
  br i1 %71, label %72, label %74

72:                                               ; preds = %68
  %73 = load float, ptr %18, align 4, !tbaa !11
  store float %73, ptr %16, align 4, !tbaa !11
  br label %74

74:                                               ; preds = %72, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %75

75:                                               ; preds = %74
  %76 = load i32, ptr %17, align 4, !tbaa !9
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %17, align 4, !tbaa !9
  br label %50, !llvm.loop !13

78:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %79 = load float, ptr %16, align 4, !tbaa !11
  %80 = load float, ptr %15, align 4, !tbaa !11
  %81 = fsub float %79, %80
  %82 = fdiv float %81, 1.500000e+01
  store float %82, ptr %19, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %83 = load float, ptr %19, align 4, !tbaa !11
  %84 = fcmp une float %83, 0.000000e+00
  br i1 %84, label %85, label %89

85:                                               ; preds = %78
  %86 = load float, ptr %19, align 4, !tbaa !11
  %87 = fpext float %86 to double
  %88 = fdiv double 1.000000e+00, %87
  br label %90

89:                                               ; preds = %78
  br label %90

90:                                               ; preds = %89, %85
  %91 = phi double [ %88, %85 ], [ 0.000000e+00, %89 ]
  %92 = fptrunc double %91 to float
  store float %92, ptr %20, align 4, !tbaa !11
  %93 = load float, ptr %15, align 4, !tbaa !11
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  %95 = load i32, ptr %13, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds float, ptr %94, i64 %96
  store float %93, ptr %97, align 4, !tbaa !11
  %98 = load float, ptr %19, align 4, !tbaa !11
  %99 = load ptr, ptr %10, align 8, !tbaa !5
  %100 = load i32, ptr %13, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds float, ptr %99, i64 %101
  store float %98, ptr %102, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %103

103:                                              ; preds = %176, %90
  %104 = load i32, ptr %21, align 4, !tbaa !9
  %105 = load i32, ptr %8, align 4, !tbaa !9
  %106 = icmp slt i32 %104, %105
  br i1 %106, label %108, label %107

107:                                              ; preds = %103
  store i32 8, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %179

108:                                              ; preds = %103
  %109 = getelementptr inbounds [4 x i64], ptr %12, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %109, i8 0, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %160, %108
  %111 = load i32, ptr %22, align 4, !tbaa !9
  %112 = icmp slt i32 %111, 64
  br i1 %112, label %114, label %113

113:                                              ; preds = %110
  store i32 11, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %163

114:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = load i32, ptr %13, align 4, !tbaa !9
  %117 = mul nsw i32 %116, 64
  %118 = load i32, ptr %21, align 4, !tbaa !9
  %119 = mul nsw i32 %118, 64
  %120 = add nsw i32 %117, %119
  %121 = load i32, ptr %22, align 4, !tbaa !9
  %122 = add nsw i32 %120, %121
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds float, ptr %115, i64 %123
  %125 = load float, ptr %124, align 4, !tbaa !11
  store float %125, ptr %23, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #8
  %126 = load float, ptr %23, align 4, !tbaa !11
  %127 = load float, ptr %15, align 4, !tbaa !11
  %128 = fsub float %126, %127
  %129 = load float, ptr %20, align 4, !tbaa !11
  %130 = call float @frand()
  %131 = call float @llvm.fmuladd.f32(float %128, float %129, float %130)
  %132 = fptoui float %131 to i8
  store i8 %132, ptr %24, align 1, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %133

133:                                              ; preds = %156, %114
  %134 = load i32, ptr %25, align 4, !tbaa !9
  %135 = icmp slt i32 %134, 4
  br i1 %135, label %137, label %136

136:                                              ; preds = %133
  store i32 14, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %159

137:                                              ; preds = %133
  %138 = load i8, ptr %24, align 1, !tbaa !15
  %139 = zext i8 %138 to i32
  %140 = load i32, ptr %25, align 4, !tbaa !9
  %141 = shl i32 1, %140
  %142 = and i32 %139, %141
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %144, label %148

144:                                              ; preds = %137
  %145 = load i32, ptr %22, align 4, !tbaa !9
  %146 = zext i32 %145 to i64
  %147 = shl i64 1, %146
  br label %149

148:                                              ; preds = %137
  br label %149

149:                                              ; preds = %148, %144
  %150 = phi i64 [ %147, %144 ], [ 0, %148 ]
  %151 = load i32, ptr %25, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [4 x i64], ptr %12, i64 0, i64 %152
  %154 = load i64, ptr %153, align 8, !tbaa !16
  %155 = or i64 %154, %150
  store i64 %155, ptr %153, align 8, !tbaa !16
  br label %156

156:                                              ; preds = %149
  %157 = load i32, ptr %25, align 4, !tbaa !9
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %25, align 4, !tbaa !9
  br label %133, !llvm.loop !18

159:                                              ; preds = %136
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %160

160:                                              ; preds = %159
  %161 = load i32, ptr %22, align 4, !tbaa !9
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %22, align 4, !tbaa !9
  br label %110, !llvm.loop !19

163:                                              ; preds = %113
  %164 = load ptr, ptr %11, align 8, !tbaa !5
  %165 = load i32, ptr %13, align 4, !tbaa !9
  %166 = load i32, ptr %8, align 4, !tbaa !9
  %167 = mul nsw i32 %165, %166
  %168 = mul nsw i32 %167, 4
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds i64, ptr %164, i64 %169
  %171 = load i32, ptr %21, align 4, !tbaa !9
  %172 = mul nsw i32 %171, 4
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds i64, ptr %170, i64 %173
  %175 = getelementptr inbounds [4 x i64], ptr %12, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %174, ptr align 16 %175, i64 32, i1 false)
  br label %176

176:                                              ; preds = %163
  %177 = load i32, ptr %21, align 4, !tbaa !9
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %21, align 4, !tbaa !9
  br label %103, !llvm.loop !20

179:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %180

180:                                              ; preds = %179
  %181 = load i32, ptr %13, align 4, !tbaa !9
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %13, align 4, !tbaa !9
  br label %44, !llvm.loop !21

183:                                              ; preds = %48
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  ret void
}

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @quantize_2_blocks_per_row(i32 noundef) #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @quantize_2_quants_per_block() #6

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


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

@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@__PRETTY_FUNCTION__.quantize_2_row = external hidden unnamed_addr constant [64 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local float @frand() local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local void @quantize_2_row(ptr noalias nocapture noundef readonly %0, ptr noalias nocapture noundef writeonly %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = and i32 %2, 63
  %5 = icmp eq i32 %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 301, ptr noundef nonnull @__PRETTY_FUNCTION__.quantize_2_row) #4
  unreachable

7:                                                ; preds = %3
  %8 = tail call i32 @quantize_2_blocks_per_row(i32 noundef %2)
  %9 = tail call i32 @quantize_2_quants_per_block()
  %10 = sext i32 %8 to i64
  %11 = getelementptr inbounds float, ptr %1, i64 %10
  %12 = getelementptr inbounds float, ptr %11, i64 %10
  %factor.op.mul68 = shl i32 %9, 2
  %13 = icmp sgt i32 %8, 0
  br i1 %13, label %.preheader.lr.ph, label %._crit_edge70

.preheader.lr.ph:                                 ; preds = %7
  %14 = icmp sgt i32 %9, 0
  %wide.trip.count97 = zext nneg i32 %8 to i64
  br i1 %14, label %.preheader.us.preheader, label %.preheader

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %wide.trip.count92 = zext nneg i32 %9 to i64
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us
  %indvars.iv94 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next95, %._crit_edge.us ]
  %.idx102 = shl nsw i64 %indvars.iv94, 8
  %invariant.gep108 = getelementptr inbounds i8, ptr %0, i64 %.idx102
  br label %49

.lr.ph.us:                                        ; preds = %49
  %15 = fsub float %.157.us.1, %.1.us.1
  %16 = fdiv float %15, 1.500000e+01
  %17 = fcmp une float %16, 0.000000e+00
  %18 = fdiv float 1.000000e+00, %16
  %19 = select i1 %17, float %18, float 0.000000e+00
  %20 = getelementptr inbounds float, ptr %1, i64 %indvars.iv94
  store float %.1.us.1, ptr %20, align 4, !tbaa !5
  %21 = getelementptr inbounds float, ptr %11, i64 %indvars.iv94
  store float %16, ptr %21, align 4, !tbaa !5
  %22 = trunc nuw nsw i64 %indvars.iv94 to i32
  %factor.op.mul.reass.us = mul i32 %factor.op.mul68, %22
  %23 = sext i32 %factor.op.mul.reass.us to i64
  %24 = getelementptr inbounds i64, ptr %12, i64 %23
  br label %25

25:                                               ; preds = %.lr.ph.us, %30
  %indvars.iv89 = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next90, %30 ]
  %26 = add nuw nsw i64 %indvars.iv89, %indvars.iv94
  %27 = trunc nuw i64 %26 to i32
  %28 = shl i32 %27, 6
  %29 = sext i32 %28 to i64
  %invariant.gep110 = getelementptr float, ptr %0, i64 %29
  br label %32

30:                                               ; preds = %32
  %.idx103 = shl nsw i64 %indvars.iv89, 5
  %31 = getelementptr inbounds i8, ptr %24, i64 %.idx103
  store <4 x i64> %48, ptr %31, align 8
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %exitcond93.not = icmp eq i64 %indvars.iv.next90, %wide.trip.count92
  br i1 %exitcond93.not, label %._crit_edge.us, label %25, !llvm.loop !9

32:                                               ; preds = %32, %25
  %indvars.iv85 = phi i64 [ 0, %25 ], [ %indvars.iv.next86, %32 ]
  %33 = phi <4 x i64> [ zeroinitializer, %25 ], [ %48, %32 ]
  %gep111 = getelementptr float, ptr %invariant.gep110, i64 %indvars.iv85
  %34 = load float, ptr %gep111, align 4, !tbaa !5
  %35 = fsub float %34, %.1.us.1
  %36 = tail call float @frand()
  %37 = tail call float @llvm.fmuladd.f32(float %35, float %19, float %36)
  %38 = fptoui float %37 to i8
  %39 = zext i8 %38 to i32
  %40 = shl nuw i64 1, %indvars.iv85
  %41 = insertelement <4 x i32> poison, i32 %39, i64 0
  %42 = shufflevector <4 x i32> %41, <4 x i32> poison, <4 x i32> zeroinitializer
  %43 = and <4 x i32> %42, <i32 1, i32 2, i32 4, i32 8>
  %44 = icmp eq <4 x i32> %43, zeroinitializer
  %45 = insertelement <4 x i64> poison, i64 %40, i64 0
  %46 = shufflevector <4 x i64> %45, <4 x i64> poison, <4 x i32> zeroinitializer
  %47 = select <4 x i1> %44, <4 x i64> zeroinitializer, <4 x i64> %46
  %48 = or <4 x i64> %33, %47
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %exitcond88.not = icmp eq i64 %indvars.iv.next86, 64
  br i1 %exitcond88.not, label %30, label %32, !llvm.loop !11

49:                                               ; preds = %49, %.preheader.us
  %indvars.iv77 = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next78.1, %49 ]
  %.05564.us = phi float [ 0x47EFFFFFE0000000, %.preheader.us ], [ %.1.us.1, %49 ]
  %.05663.us = phi float [ 0xC7EFFFFFE0000000, %.preheader.us ], [ %.157.us.1, %49 ]
  %gep109 = getelementptr inbounds float, ptr %invariant.gep108, i64 %indvars.iv77
  %50 = load float, ptr %gep109, align 4, !tbaa !5
  %51 = fcmp olt float %50, %.05564.us
  %.1.us = select i1 %51, float %50, float %.05564.us
  %52 = fcmp ogt float %50, %.05663.us
  %.157.us = select i1 %52, float %50, float %.05663.us
  %indvars.iv.next78 = or disjoint i64 %indvars.iv77, 1
  %gep109.1 = getelementptr inbounds float, ptr %invariant.gep108, i64 %indvars.iv.next78
  %53 = load float, ptr %gep109.1, align 4, !tbaa !5
  %54 = fcmp olt float %53, %.1.us
  %.1.us.1 = select i1 %54, float %53, float %.1.us
  %55 = fcmp ogt float %53, %.157.us
  %.157.us.1 = select i1 %55, float %53, float %.157.us
  %indvars.iv.next78.1 = add nuw nsw i64 %indvars.iv77, 2
  %exitcond80.not.1 = icmp eq i64 %indvars.iv.next78.1, 64
  br i1 %exitcond80.not.1, label %.lr.ph.us, label %49, !llvm.loop !12

._crit_edge.us:                                   ; preds = %30
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %exitcond98.not = icmp eq i64 %indvars.iv.next95, %wide.trip.count97
  br i1 %exitcond98.not, label %._crit_edge70, label %.preheader.us, !llvm.loop !13

.preheader:                                       ; preds = %.preheader.lr.ph, %56
  %indvars.iv73 = phi i64 [ %indvars.iv.next74, %56 ], [ 0, %.preheader.lr.ph ]
  %.idx = shl nsw i64 %indvars.iv73, 8
  %invariant.gep = getelementptr inbounds i8, ptr %0, i64 %.idx
  br label %61

._crit_edge70:                                    ; preds = %56, %._crit_edge.us, %7
  ret void

56:                                               ; preds = %61
  %57 = fsub float %.157.1, %.1.1
  %58 = fdiv float %57, 1.500000e+01
  %59 = getelementptr inbounds float, ptr %1, i64 %indvars.iv73
  store float %.1.1, ptr %59, align 4, !tbaa !5
  %60 = getelementptr inbounds float, ptr %11, i64 %indvars.iv73
  store float %58, ptr %60, align 4, !tbaa !5
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %exitcond76.not = icmp eq i64 %indvars.iv.next74, %wide.trip.count97
  br i1 %exitcond76.not, label %._crit_edge70, label %.preheader, !llvm.loop !13

61:                                               ; preds = %61, %.preheader
  %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next.1, %61 ]
  %.05564 = phi float [ 0x47EFFFFFE0000000, %.preheader ], [ %.1.1, %61 ]
  %.05663 = phi float [ 0xC7EFFFFFE0000000, %.preheader ], [ %.157.1, %61 ]
  %gep = getelementptr inbounds float, ptr %invariant.gep, i64 %indvars.iv
  %62 = load float, ptr %gep, align 4, !tbaa !5
  %63 = fcmp olt float %62, %.05564
  %.1 = select i1 %63, float %62, float %.05564
  %64 = fcmp ogt float %62, %.05663
  %.157 = select i1 %64, float %62, float %.05663
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %gep.1 = getelementptr inbounds float, ptr %invariant.gep, i64 %indvars.iv.next
  %65 = load float, ptr %gep.1, align 4, !tbaa !5
  %66 = fcmp olt float %65, %.1
  %.1.1 = select i1 %66, float %65, float %.1
  %67 = fcmp ogt float %65, %.157
  %.157.1 = select i1 %67, float %65, float %.157
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, 64
  br i1 %exitcond.not.1, label %56, label %61, !llvm.loop !12
}

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @quantize_2_blocks_per_row(i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @quantize_2_quants_per_block() local_unnamed_addr #3

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #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 = { 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 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


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