; 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_3_row = external hidden unnamed_addr constant [64 x i8], align 1

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @quantize_3_row(ptr noalias noundef %0, ptr noalias noundef %1, i32 noundef %2) #4 {
  %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 [4 x i64], align 16
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca float, align 4
  %15 = alloca i32, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, 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 i32 %2, ptr %6, align 4, !tbaa !9
  %20 = load i32, ptr %6, align 4, !tbaa !9
  %21 = srem i32 %20, 64
  %22 = icmp eq i32 %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, ptr noundef @.str.1, i32 noundef 698, ptr noundef @__PRETTY_FUNCTION__.quantize_3_row) #7
  unreachable

25:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %26 = load i32, ptr %6, align 4, !tbaa !9
  %27 = call i32 @quantize_3_blocks_per_row(i32 noundef %26)
  store i32 %27, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %28 = call i32 @quantize_3_quants_per_block()
  store i32 %28, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %29, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  %31 = load i32, ptr %7, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds float, ptr %30, i64 %32
  store ptr %33, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %34

34:                                               ; preds = %108, %25
  %35 = load i32, ptr %12, align 4, !tbaa !9
  %36 = load i32, ptr %7, align 4, !tbaa !9
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %34
  store i32 2, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %111

39:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store float 0.000000e+00, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %64, %39
  %41 = load i32, ptr %15, align 4, !tbaa !9
  %42 = icmp slt i32 %41, 64
  br i1 %42, label %44, label %43

43:                                               ; preds = %40
  store i32 5, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %67

44:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = load i32, ptr %12, align 4, !tbaa !9
  %47 = mul nsw i32 %46, 64
  %48 = load i32, ptr %15, align 4, !tbaa !9
  %49 = add nsw i32 %47, %48
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds float, ptr %45, i64 %50
  %52 = load float, ptr %51, align 4, !tbaa !11
  store float %52, ptr %16, align 4, !tbaa !11
  %53 = load float, ptr %14, align 4, !tbaa !11
  %54 = load float, ptr %16, align 4, !tbaa !11
  %55 = call float @llvm.fabs.f32(float %54)
  %56 = fcmp ogt float %53, %55
  br i1 %56, label %57, label %59

57:                                               ; preds = %44
  %58 = load float, ptr %14, align 4, !tbaa !11
  br label %62

59:                                               ; preds = %44
  %60 = load float, ptr %16, align 4, !tbaa !11
  %61 = call float @llvm.fabs.f32(float %60)
  br label %62

62:                                               ; preds = %59, %57
  %63 = phi float [ %58, %57 ], [ %61, %59 ]
  store float %63, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %64

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

67:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %68 = load float, ptr %14, align 4, !tbaa !11
  %69 = fdiv float %68, 7.000000e+00
  store float %69, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %70 = load float, ptr %17, align 4, !tbaa !11
  %71 = fcmp une float %70, 0.000000e+00
  br i1 %71, label %72, label %76

72:                                               ; preds = %67
  %73 = load float, ptr %17, align 4, !tbaa !11
  %74 = fpext float %73 to double
  %75 = fdiv double 1.000000e+00, %74
  br label %77

76:                                               ; preds = %67
  br label %77

77:                                               ; preds = %76, %72
  %78 = phi double [ %75, %72 ], [ 0.000000e+00, %76 ]
  %79 = fptrunc double %78 to float
  store float %79, ptr %18, align 4, !tbaa !11
  %80 = load float, ptr %17, align 4, !tbaa !11
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = load i32, ptr %12, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds float, ptr %81, i64 %83
  store float %80, ptr %84, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %85

85:                                               ; preds = %104, %77
  %86 = load i32, ptr %19, align 4, !tbaa !9
  %87 = load i32, ptr %8, align 4, !tbaa !9
  %88 = icmp slt i32 %86, %87
  br i1 %88, label %90, label %89

89:                                               ; preds = %85
  store i32 8, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %107

90:                                               ; preds = %85
  %91 = getelementptr inbounds [4 x i64], ptr %11, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %91, i8 0, i64 32, i1 false)
  %92 = load ptr, ptr %10, align 8, !tbaa !5
  %93 = load i32, ptr %12, align 4, !tbaa !9
  %94 = load i32, ptr %8, align 4, !tbaa !9
  %95 = mul nsw i32 %93, %94
  %96 = mul nsw i32 %95, 4
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds i64, ptr %92, i64 %97
  %99 = load i32, ptr %19, align 4, !tbaa !9
  %100 = mul nsw i32 %99, 4
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds i64, ptr %98, i64 %101
  %103 = getelementptr inbounds [4 x i64], ptr %11, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %102, ptr align 16 %103, i64 32, i1 false)
  br label %104

104:                                              ; preds = %90
  %105 = load i32, ptr %19, align 4, !tbaa !9
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %19, align 4, !tbaa !9
  br label %85, !llvm.loop !15

107:                                              ; preds = %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %108

108:                                              ; preds = %107
  %109 = load i32, ptr %12, align 4, !tbaa !9
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %12, align 4, !tbaa !9
  br label %34, !llvm.loop !16

111:                                              ; preds = %38
  call void @llvm.lifetime.end.p0(i64 32, 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: inlinehint nounwind uwtable
declare hidden i32 @quantize_3_blocks_per_row(i32 noundef) #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @quantize_3_quants_per_block() #5

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 #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 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = distinct !{!15, !14}
!16 = distinct !{!16, !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_3_row = external hidden unnamed_addr constant [64 x i8], align 1

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

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

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

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

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

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %wide.trip.count53 = zext nneg i32 %9 to i64
  %xtraiter = and i64 %wide.trip.count53, 7
  %14 = icmp ult i32 %9, 8
  %unroll_iter = and i64 %wide.trip.count53, 2147483640
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us
  %indvars.iv55 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next56, %._crit_edge.us ]
  %.idx60 = shl nsw i64 %indvars.iv55, 8
  %invariant.gep64 = getelementptr inbounds i8, ptr %0, i64 %.idx60
  br label %28

.lr.ph.us:                                        ; preds = %28
  %15 = fdiv float %36, 7.000000e+00
  %16 = getelementptr inbounds float, ptr %1, i64 %indvars.iv55
  store float %15, ptr %16, align 4, !tbaa !5
  %17 = trunc nuw nsw i64 %indvars.iv55 to i32
  %factor.op.mul.reass.us = mul i32 %factor.op.mul36, %17
  %18 = sext i32 %factor.op.mul.reass.us to i64
  %19 = getelementptr inbounds i64, ptr %11, i64 %18
  br i1 %14, label %._crit_edge.us.unr-lcssa, label %.lr.ph.us.new

.lr.ph.us.new:                                    ; preds = %.lr.ph.us, %.lr.ph.us.new
  %indvars.iv50 = phi i64 [ %indvars.iv.next51.7, %.lr.ph.us.new ], [ 0, %.lr.ph.us ]
  %niter = phi i64 [ %niter.next.7, %.lr.ph.us.new ], [ 0, %.lr.ph.us ]
  %.idx61 = shl nsw i64 %indvars.iv50, 5
  %20 = getelementptr inbounds i8, ptr %19, i64 %.idx61
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %20, i8 0, i64 32, i1 false)
  %indvars.iv.next51 = shl i64 %indvars.iv50, 5
  %.idx61.1 = or disjoint i64 %indvars.iv.next51, 32
  %21 = getelementptr inbounds i8, ptr %19, i64 %.idx61.1
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %21, i8 0, i64 32, i1 false)
  %indvars.iv.next51.1 = shl i64 %indvars.iv50, 5
  %.idx61.2 = or disjoint i64 %indvars.iv.next51.1, 64
  %22 = getelementptr inbounds i8, ptr %19, i64 %.idx61.2
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %22, i8 0, i64 32, i1 false)
  %indvars.iv.next51.2 = shl i64 %indvars.iv50, 5
  %.idx61.3 = or disjoint i64 %indvars.iv.next51.2, 96
  %23 = getelementptr inbounds i8, ptr %19, i64 %.idx61.3
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %23, i8 0, i64 32, i1 false)
  %indvars.iv.next51.3 = shl i64 %indvars.iv50, 5
  %.idx61.4 = or disjoint i64 %indvars.iv.next51.3, 128
  %24 = getelementptr inbounds i8, ptr %19, i64 %.idx61.4
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %24, i8 0, i64 32, i1 false)
  %indvars.iv.next51.4 = shl i64 %indvars.iv50, 5
  %.idx61.5 = or disjoint i64 %indvars.iv.next51.4, 160
  %25 = getelementptr inbounds i8, ptr %19, i64 %.idx61.5
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %25, i8 0, i64 32, i1 false)
  %indvars.iv.next51.5 = shl i64 %indvars.iv50, 5
  %.idx61.6 = or disjoint i64 %indvars.iv.next51.5, 192
  %26 = getelementptr inbounds i8, ptr %19, i64 %.idx61.6
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %26, i8 0, i64 32, i1 false)
  %indvars.iv.next51.6 = shl i64 %indvars.iv50, 5
  %.idx61.7 = or disjoint i64 %indvars.iv.next51.6, 224
  %27 = getelementptr inbounds i8, ptr %19, i64 %.idx61.7
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %27, i8 0, i64 32, i1 false)
  %indvars.iv.next51.7 = add nuw nsw i64 %indvars.iv50, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %._crit_edge.us.unr-lcssa, label %.lr.ph.us.new, !llvm.loop !9

28:                                               ; preds = %28, %.preheader.us
  %indvars.iv46 = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next47.1, %28 ]
  %.03034.us = phi float [ 0.000000e+00, %.preheader.us ], [ %36, %28 ]
  %gep65 = getelementptr inbounds float, ptr %invariant.gep64, i64 %indvars.iv46
  %29 = load float, ptr %gep65, align 4, !tbaa !5
  %30 = tail call float @llvm.fabs.f32(float %29)
  %31 = fcmp ogt float %.03034.us, %30
  %32 = select i1 %31, float %.03034.us, float %30
  %indvars.iv.next47 = or disjoint i64 %indvars.iv46, 1
  %gep65.1 = getelementptr inbounds float, ptr %invariant.gep64, i64 %indvars.iv.next47
  %33 = load float, ptr %gep65.1, align 4, !tbaa !5
  %34 = tail call float @llvm.fabs.f32(float %33)
  %35 = fcmp ogt float %32, %34
  %36 = select i1 %35, float %32, float %34
  %indvars.iv.next47.1 = add nuw nsw i64 %indvars.iv46, 2
  %exitcond49.not.1 = icmp eq i64 %indvars.iv.next47.1, 64
  br i1 %exitcond49.not.1, label %.lr.ph.us, label %28, !llvm.loop !11

._crit_edge.us.unr-lcssa:                         ; preds = %.lr.ph.us.new, %.lr.ph.us
  %indvars.iv50.unr = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next51.7, %.lr.ph.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.us.unr-lcssa, %.epil.preheader
  %indvars.iv50.epil = phi i64 [ %indvars.iv.next51.epil, %.epil.preheader ], [ %indvars.iv50.unr, %._crit_edge.us.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.us.unr-lcssa ]
  %.idx61.epil = shl nsw i64 %indvars.iv50.epil, 5
  %37 = getelementptr inbounds i8, ptr %19, i64 %.idx61.epil
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %37, i8 0, i64 32, i1 false)
  %indvars.iv.next51.epil = add nuw nsw i64 %indvars.iv50.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge.us, label %.epil.preheader, !llvm.loop !12

._crit_edge.us:                                   ; preds = %.epil.preheader, %._crit_edge.us.unr-lcssa
  %indvars.iv.next56 = add nuw nsw i64 %indvars.iv55, 1
  %exitcond59.not = icmp eq i64 %indvars.iv.next56, %wide.trip.count58
  br i1 %exitcond59.not, label %._crit_edge38, label %.preheader.us, !llvm.loop !14

.preheader:                                       ; preds = %.preheader.lr.ph, %38
  %indvars.iv42 = phi i64 [ %indvars.iv.next43, %38 ], [ 0, %.preheader.lr.ph ]
  %.idx = shl nsw i64 %indvars.iv42, 8
  %invariant.gep = getelementptr inbounds i8, ptr %0, i64 %.idx
  br label %41

._crit_edge38:                                    ; preds = %38, %._crit_edge.us, %7
  ret void

38:                                               ; preds = %41
  %39 = fdiv float %49, 7.000000e+00
  %40 = getelementptr inbounds float, ptr %1, i64 %indvars.iv42
  store float %39, ptr %40, align 4, !tbaa !5
  %indvars.iv.next43 = add nuw nsw i64 %indvars.iv42, 1
  %exitcond45.not = icmp eq i64 %indvars.iv.next43, %wide.trip.count58
  br i1 %exitcond45.not, label %._crit_edge38, label %.preheader, !llvm.loop !14

41:                                               ; preds = %41, %.preheader
  %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next.1, %41 ]
  %.03034 = phi float [ 0.000000e+00, %.preheader ], [ %49, %41 ]
  %gep = getelementptr inbounds float, ptr %invariant.gep, i64 %indvars.iv
  %42 = load float, ptr %gep, align 4, !tbaa !5
  %43 = tail call float @llvm.fabs.f32(float %42)
  %44 = fcmp ogt float %.03034, %43
  %45 = select i1 %44, float %.03034, float %43
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %gep.1 = getelementptr inbounds float, ptr %invariant.gep, i64 %indvars.iv.next
  %46 = load float, ptr %gep.1, align 4, !tbaa !5
  %47 = tail call float @llvm.fabs.f32(float %46)
  %48 = fcmp ogt float %45, %47
  %49 = select i1 %48, float %45, float %47
  %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 %38, label %41, !llvm.loop !11
}

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

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

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

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #1 = { 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 #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { mustprogress 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.unroll.disable"}
!14 = distinct !{!14, !10}


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