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

; 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.ggml_tensor = type { i32, ptr, [4 x i64], [4 x i64], i32, [16 x i32], i32, [10 x ptr], ptr, i64, ptr, [64 x i8], ptr, [8 x i8] }

@g_userdata = external dso_local global [5 x i8], align 1
@g_custom2_count = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [69 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [22 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: noreturn
declare void @ggml_abort(ptr noundef, i32 noundef, ptr noundef, ...) #1

declare zeroext i1 @ggml_are_same_shape(ptr noundef, ptr noundef) #2

declare ptr @ggml_get_data_f32(ptr noundef) #2

declare zeroext i1 @ggml_is_contiguous(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @custom2(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5) #3 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store i32 %3, ptr %10, align 4, !tbaa !9
  store i32 %4, ptr %11, align 4, !tbaa !9
  store ptr %5, ptr %12, align 8, !tbaa !5
  %27 = load ptr, ptr %12, align 8, !tbaa !5
  %28 = icmp eq ptr %27, @g_userdata
  br i1 %28, label %30, label %29

29:                                               ; preds = %6
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str, i32 noundef 63, ptr noundef @.str.1, ptr noundef @.str.6) #5
  unreachable

30:                                               ; preds = %6
  %31 = load ptr, ptr %12, align 8, !tbaa !5
  %32 = call i32 @strcmp(ptr noundef %31, ptr noundef @.str.7) #6
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str, i32 noundef 64, ptr noundef @.str.1, ptr noundef @.str.8) #5
  unreachable

35:                                               ; preds = %30
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = call zeroext i1 @ggml_are_same_shape(ptr noundef %36, ptr noundef %37)
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str, i32 noundef 65, ptr noundef @.str.1, ptr noundef @.str.3) #5
  unreachable

40:                                               ; preds = %35
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = call zeroext i1 @ggml_are_same_shape(ptr noundef %41, ptr noundef %42)
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str, i32 noundef 66, ptr noundef @.str.1, ptr noundef @.str.9) #5
  unreachable

45:                                               ; preds = %40
  store i32 1, ptr %13, align 4, !tbaa !9
  %46 = load i32, ptr %13, align 4
  %47 = atomicrmw add ptr @g_custom2_count, i32 %46 seq_cst, align 4
  store i32 %47, ptr %14, align 4
  %48 = load i32, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = call ptr @ggml_get_data_f32(ptr noundef %49)
  store ptr %50, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = call ptr @ggml_get_data_f32(ptr noundef %51)
  store ptr %52, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = call ptr @ggml_get_data_f32(ptr noundef %53)
  store ptr %54, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = call i64 @ggml_nrows(ptr noundef %55)
  %57 = trunc i64 %56 to i32
  store i32 %57, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %58 = load i32, ptr %18, align 4, !tbaa !9
  %59 = load i32, ptr %11, align 4, !tbaa !9
  %60 = add nsw i32 %58, %59
  %61 = sub nsw i32 %60, 1
  %62 = load i32, ptr %11, align 4, !tbaa !9
  %63 = sdiv i32 %61, %62
  store i32 %63, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %64 = load i32, ptr %19, align 4, !tbaa !9
  %65 = load i32, ptr %10, align 4, !tbaa !9
  %66 = mul nsw i32 %64, %65
  store i32 %66, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %67 = load i32, ptr %20, align 4, !tbaa !9
  %68 = load i32, ptr %19, align 4, !tbaa !9
  %69 = add nsw i32 %67, %68
  %70 = load i32, ptr %18, align 4, !tbaa !9
  %71 = icmp slt i32 %69, %70
  br i1 %71, label %72, label %76

72:                                               ; preds = %45
  %73 = load i32, ptr %20, align 4, !tbaa !9
  %74 = load i32, ptr %19, align 4, !tbaa !9
  %75 = add nsw i32 %73, %74
  br label %78

76:                                               ; preds = %45
  %77 = load i32, ptr %18, align 4, !tbaa !9
  br label %78

78:                                               ; preds = %76, %72
  %79 = phi i32 [ %75, %72 ], [ %77, %76 ]
  store i32 %79, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.ggml_tensor, ptr %80, i32 0, i32 2
  %82 = getelementptr inbounds [4 x i64], ptr %81, i64 0, i64 0
  %83 = load i64, ptr %82, align 8, !tbaa !11
  %84 = trunc i64 %83 to i32
  store i32 %84, ptr %22, align 4, !tbaa !9
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = call zeroext i1 @ggml_is_contiguous(ptr noundef %85)
  br i1 %86, label %88, label %87

87:                                               ; preds = %78
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str, i32 noundef 86, ptr noundef @.str.1, ptr noundef @.str.4) #5
  unreachable

88:                                               ; preds = %78
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = call zeroext i1 @ggml_is_contiguous(ptr noundef %89)
  br i1 %90, label %92, label %91

91:                                               ; preds = %88
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str, i32 noundef 87, ptr noundef @.str.1, ptr noundef @.str.5) #5
  unreachable

92:                                               ; preds = %88
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = call zeroext i1 @ggml_is_contiguous(ptr noundef %93)
  br i1 %94, label %96, label %95

95:                                               ; preds = %92
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str, i32 noundef 88, ptr noundef @.str.1, ptr noundef @.str.10) #5
  unreachable

96:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %97 = load i32, ptr %20, align 4, !tbaa !9
  store i32 %97, ptr %23, align 4, !tbaa !9
  br label %98

98:                                               ; preds = %134, %96
  %99 = load i32, ptr %23, align 4, !tbaa !9
  %100 = load i32, ptr %21, align 4, !tbaa !9
  %101 = icmp slt i32 %99, %100
  br i1 %101, label %103, label %102

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

103:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %104

104:                                              ; preds = %130, %103
  %105 = load i32, ptr %25, align 4, !tbaa !9
  %106 = load i32, ptr %22, align 4, !tbaa !9
  %107 = icmp slt i32 %105, %106
  br i1 %107, label %109, label %108

108:                                              ; preds = %104
  store i32 5, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %133

109:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %110 = load i32, ptr %23, align 4, !tbaa !9
  %111 = load i32, ptr %22, align 4, !tbaa !9
  %112 = mul nsw i32 %110, %111
  %113 = load i32, ptr %25, align 4, !tbaa !9
  %114 = add nsw i32 %112, %113
  store i32 %114, ptr %26, align 4, !tbaa !9
  %115 = load ptr, ptr %15, align 8, !tbaa !5
  %116 = load i32, ptr %26, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds float, ptr %115, i64 %117
  %119 = load float, ptr %118, align 4, !tbaa !13
  %120 = load ptr, ptr %16, align 8, !tbaa !5
  %121 = load i32, ptr %26, align 4, !tbaa !9
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds float, ptr %120, i64 %122
  %124 = load float, ptr %123, align 4, !tbaa !13
  %125 = fadd float %119, %124
  %126 = load ptr, ptr %17, align 8, !tbaa !5
  %127 = load i32, ptr %26, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds float, ptr %126, i64 %128
  store float %125, ptr %129, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %130

130:                                              ; preds = %109
  %131 = load i32, ptr %25, align 4, !tbaa !9
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %25, align 4, !tbaa !9
  br label %104, !llvm.loop !15

133:                                              ; preds = %108
  br label %134

134:                                              ; preds = %133
  %135 = load i32, ptr %23, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %23, align 4, !tbaa !9
  br label %98, !llvm.loop !17

137:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  ret void
}

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #4

declare i64 @ggml_nrows(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn "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 = { "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 = { 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 = { nounwind willreturn memory(read) "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 }
attributes #6 = { nounwind willreturn memory(read) }
attributes #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@g_userdata = external dso_local global [5 x i8], align 1
@g_custom2_count = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [69 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: noreturn
declare void @ggml_abort(ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #0

declare zeroext i1 @ggml_are_same_shape(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @ggml_get_data_f32(ptr noundef) local_unnamed_addr #1

declare zeroext i1 @ggml_is_contiguous(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @custom2(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef readnone %5) local_unnamed_addr #2 {
  %7 = icmp eq ptr %5, @g_userdata
  br i1 %7, label %9, label %8

8:                                                ; preds = %6
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str, i32 noundef 63, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.6) #5
  unreachable

9:                                                ; preds = %6
  %10 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @g_userdata, ptr noundef nonnull dereferenceable(1) @.str.7) #6
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %13, label %12

12:                                               ; preds = %9
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str, i32 noundef 64, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.8) #5
  unreachable

13:                                               ; preds = %9
  %14 = tail call zeroext i1 @ggml_are_same_shape(ptr noundef %0, ptr noundef %1) #7
  br i1 %14, label %16, label %15

15:                                               ; preds = %13
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str, i32 noundef 65, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.3) #5
  unreachable

16:                                               ; preds = %13
  %17 = tail call zeroext i1 @ggml_are_same_shape(ptr noundef %0, ptr noundef %2) #7
  br i1 %17, label %19, label %18

18:                                               ; preds = %16
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str, i32 noundef 66, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.9) #5
  unreachable

19:                                               ; preds = %16
  %20 = atomicrmw add ptr @g_custom2_count, i32 1 seq_cst, align 4
  %21 = tail call ptr @ggml_get_data_f32(ptr noundef %1) #7
  %22 = ptrtoint ptr %21 to i64
  %23 = tail call ptr @ggml_get_data_f32(ptr noundef %2) #7
  %24 = ptrtoint ptr %23 to i64
  %25 = tail call ptr @ggml_get_data_f32(ptr noundef %0) #7
  %26 = ptrtoint ptr %25 to i64
  %27 = tail call i64 @ggml_nrows(ptr noundef %0) #7
  %28 = trunc i64 %27 to i32
  %29 = add i32 %4, -1
  %30 = add i32 %29, %28
  %31 = sdiv i32 %30, %4
  %32 = mul i32 %31, %3
  %33 = add i32 %32, %31
  %34 = tail call i32 @llvm.smin.i32(i32 %33, i32 %28)
  %35 = getelementptr inbounds i8, ptr %0, i64 16
  %36 = load i64, ptr %35, align 8, !tbaa !5
  %37 = trunc i64 %36 to i32
  %38 = tail call zeroext i1 @ggml_is_contiguous(ptr noundef %0) #7
  br i1 %38, label %40, label %39

39:                                               ; preds = %19
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str, i32 noundef 86, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.4) #5
  unreachable

40:                                               ; preds = %19
  %41 = tail call zeroext i1 @ggml_is_contiguous(ptr noundef %1) #7
  br i1 %41, label %43, label %42

42:                                               ; preds = %40
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str, i32 noundef 87, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.5) #5
  unreachable

43:                                               ; preds = %40
  %44 = tail call zeroext i1 @ggml_is_contiguous(ptr noundef %2) #7
  br i1 %44, label %.preheader45, label %85

.preheader45:                                     ; preds = %43
  %45 = icmp slt i32 %32, %34
  %46 = icmp sgt i32 %37, 0
  %or.cond = select i1 %45, i1 %46, i1 false
  br i1 %or.cond, label %.preheader.us.preheader, label %._crit_edge48

.preheader.us.preheader:                          ; preds = %.preheader45
  %47 = sext i32 %32 to i64
  %48 = and i64 %36, 2147483647
  %wide.trip.count54 = sext i32 %34 to i64
  %wide.trip.count = and i64 %36, 2147483647
  %49 = sub i64 %26, %22
  %50 = sub i64 %26, %24
  %min.iters.check = icmp ult i64 %wide.trip.count, 8
  %diff.check = icmp ult i64 %49, 32
  %diff.check56 = icmp ult i64 %50, 32
  %conflict.rdx = or i1 %diff.check, %diff.check56
  %n.mod.vf = and i64 %36, 7
  %n.vec = sub nsw i64 %wide.trip.count, %n.mod.vf
  %cmp.n = icmp eq i64 %n.mod.vf, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us
  %indvars.iv51 = phi i64 [ %47, %.preheader.us.preheader ], [ %indvars.iv.next52, %._crit_edge.us ]
  %51 = mul nsw i64 %indvars.iv51, %48
  %brmerge = select i1 %min.iters.check, i1 true, i1 %conflict.rdx
  br i1 %brmerge, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %.preheader.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader.us ]
  %52 = add nsw i64 %index, %51
  %53 = getelementptr inbounds float, ptr %21, i64 %52
  %54 = getelementptr inbounds i8, ptr %53, i64 16
  %wide.load = load <4 x float>, ptr %53, align 4, !tbaa !9
  %wide.load57 = load <4 x float>, ptr %54, align 4, !tbaa !9
  %55 = getelementptr inbounds float, ptr %23, i64 %52
  %56 = getelementptr inbounds i8, ptr %55, i64 16
  %wide.load58 = load <4 x float>, ptr %55, align 4, !tbaa !9
  %wide.load59 = load <4 x float>, ptr %56, align 4, !tbaa !9
  %57 = fadd <4 x float> %wide.load, %wide.load58
  %58 = fadd <4 x float> %wide.load57, %wide.load59
  %59 = getelementptr inbounds float, ptr %25, i64 %52
  %60 = getelementptr inbounds i8, ptr %59, i64 16
  store <4 x float> %57, ptr %59, align 4, !tbaa !9
  store <4 x float> %58, ptr %60, align 4, !tbaa !9
  %index.next = add nuw i64 %index, 8
  %61 = icmp eq i64 %index.next, %n.vec
  br i1 %61, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %.preheader.us, %middle.block
  %indvars.iv.ph = phi i64 [ 0, %.preheader.us ], [ %n.vec, %middle.block ]
  %62 = sub i64 %36, %indvars.iv.ph
  %.neg = add nsw i64 %indvars.iv.ph, 1
  %xtraiter = and i64 %62, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %63 = add nsw i64 %indvars.iv.ph, %51
  %64 = getelementptr inbounds float, ptr %21, i64 %63
  %65 = load float, ptr %64, align 4, !tbaa !9
  %66 = getelementptr inbounds float, ptr %23, i64 %63
  %67 = load float, ptr %66, align 4, !tbaa !9
  %68 = fadd float %65, %67
  %69 = getelementptr inbounds float, ptr %25, i64 %63
  store float %68, ptr %69, align 4, !tbaa !9
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.ph, 1
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %70 = icmp eq i64 %48, %.neg
  br i1 %70, label %._crit_edge.us, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %71 = add nsw i64 %indvars.iv, %51
  %72 = getelementptr inbounds float, ptr %21, i64 %71
  %73 = load float, ptr %72, align 4, !tbaa !9
  %74 = getelementptr inbounds float, ptr %23, i64 %71
  %75 = load float, ptr %74, align 4, !tbaa !9
  %76 = fadd float %73, %75
  %77 = getelementptr inbounds float, ptr %25, i64 %71
  store float %76, ptr %77, align 4, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %78 = add nsw i64 %indvars.iv.next, %51
  %79 = getelementptr inbounds float, ptr %21, i64 %78
  %80 = load float, ptr %79, align 4, !tbaa !9
  %81 = getelementptr inbounds float, ptr %23, i64 %78
  %82 = load float, ptr %81, align 4, !tbaa !9
  %83 = fadd float %80, %82
  %84 = getelementptr inbounds float, ptr %25, i64 %78
  store float %83, ptr %84, align 4, !tbaa !9
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond.not.1, label %._crit_edge.us, label %scalar.ph, !llvm.loop !15

._crit_edge.us:                                   ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %indvars.iv.next52 = add nsw i64 %indvars.iv51, 1
  %exitcond55.not = icmp eq i64 %indvars.iv.next52, %wide.trip.count54
  br i1 %exitcond55.not, label %._crit_edge48, label %.preheader.us, !llvm.loop !16

85:                                               ; preds = %43
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str, i32 noundef 88, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.10) #5
  unreachable

._crit_edge48:                                    ; preds = %._crit_edge.us, %.preheader45
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #3

declare i64 @ggml_nrows(ptr noundef) local_unnamed_addr #1

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

attributes #0 = { noreturn "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 = { "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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 }
attributes #6 = { nounwind willreturn memory(read) }
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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = distinct !{!11, !12, !13, !14}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !12, !13}
!16 = distinct !{!16, !12}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass