; LLVM IR from ggml-org/ggml :: examples/sam/main.ll (Z11print_t_f32PKcP11ggml_tensori)

; 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] }

@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [11 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: mustprogress uwtable
define dso_local void @_Z11print_t_f32PKcP11ggml_tensori(ptr noundef %0, ptr noundef %1, i32 noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca double, align 8
  %13 = 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
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, ptr noundef %14)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.ggml_tensor, ptr %16, i32 0, i32 10
  %18 = load ptr, ptr %17, align 8, !tbaa !11
  store ptr %18, ptr %7, align 8, !tbaa !5
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.ggml_tensor, ptr %19, i32 0, i32 2
  %21 = getelementptr inbounds [4 x i64], ptr %20, i64 0, i64 0
  %22 = load i64, ptr %21, align 8, !tbaa !16
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.ggml_tensor, ptr %23, i32 0, i32 2
  %25 = getelementptr inbounds [4 x i64], ptr %24, i64 0, i64 1
  %26 = load i64, ptr %25, align 8, !tbaa !16
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.ggml_tensor, ptr %27, i32 0, i32 2
  %29 = getelementptr inbounds [4 x i64], ptr %28, i64 0, i64 2
  %30 = load i64, ptr %29, align 8, !tbaa !16
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.ggml_tensor, ptr %31, i32 0, i32 2
  %33 = getelementptr inbounds [4 x i64], ptr %32, i64 0, i64 3
  %34 = load i64, ptr %33, align 8, !tbaa !16
  %35 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, i64 noundef %22, i64 noundef %26, i64 noundef %30, i64 noundef %34)
  %36 = load i32, ptr %6, align 4, !tbaa !9
  %37 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, i32 noundef %36)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %76, %3
  %39 = load i32, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.ggml_tensor, ptr %40, i32 0, i32 2
  %42 = getelementptr inbounds [4 x i64], ptr %41, i64 0, i64 0
  %43 = load i64, ptr %42, align 8, !tbaa !16
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.ggml_tensor, ptr %44, i32 0, i32 2
  %46 = getelementptr inbounds [4 x i64], ptr %45, i64 0, i64 1
  %47 = load i64, ptr %46, align 8, !tbaa !16
  %48 = mul nsw i64 %43, %47
  %49 = trunc i64 %48 to i32
  store i32 %49, ptr %9, align 4, !tbaa !9
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %51 = load i32, ptr %50, align 4, !tbaa !9
  %52 = icmp slt i32 %39, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br i1 %52, label %54, label %53

53:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %79

54:                                               ; preds = %38
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = load i32, ptr %8, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds float, ptr %55, i64 %57
  %59 = load float, ptr %58, align 4, !tbaa !17
  %60 = fpext float %59 to double
  %61 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, double noundef %60)
  %62 = load i32, ptr %8, align 4, !tbaa !9
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %64, label %75

64:                                               ; preds = %54
  %65 = load i32, ptr %8, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.ggml_tensor, ptr %67, i32 0, i32 2
  %69 = getelementptr inbounds [4 x i64], ptr %68, i64 0, i64 0
  %70 = load i64, ptr %69, align 8, !tbaa !16
  %71 = srem i64 %66, %70
  %72 = icmp eq i64 %71, 0
  br i1 %72, label %73, label %75

73:                                               ; preds = %64
  %74 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  br label %75

75:                                               ; preds = %73, %64, %54
  br label %76

76:                                               ; preds = %75
  %77 = load i32, ptr %8, align 4, !tbaa !9
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %8, align 4, !tbaa !9
  br label %38, !llvm.loop !19

79:                                               ; preds = %53
  %80 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %81

81:                                               ; preds = %128, %79
  %82 = load i32, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.ggml_tensor, ptr %83, i32 0, i32 2
  %85 = getelementptr inbounds [4 x i64], ptr %84, i64 0, i64 0
  %86 = load i64, ptr %85, align 8, !tbaa !16
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.ggml_tensor, ptr %87, i32 0, i32 2
  %89 = getelementptr inbounds [4 x i64], ptr %88, i64 0, i64 1
  %90 = load i64, ptr %89, align 8, !tbaa !16
  %91 = mul nsw i64 %86, %90
  %92 = trunc i64 %91 to i32
  store i32 %92, ptr %11, align 4, !tbaa !9
  %93 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %94 = load i32, ptr %93, align 4, !tbaa !9
  %95 = icmp slt i32 %82, %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br i1 %95, label %97, label %96

96:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %131

97:                                               ; preds = %81
  %98 = load ptr, ptr %7, align 8, !tbaa !5
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = call i64 @ggml_nelements(ptr noundef %99)
  %101 = load i32, ptr %6, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = sub nsw i64 %100, %102
  %104 = load i32, ptr %10, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = add nsw i64 %103, %105
  %107 = getelementptr inbounds float, ptr %98, i64 %106
  %108 = load float, ptr %107, align 4, !tbaa !17
  %109 = fpext float %108 to double
  %110 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, double noundef %109)
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = call i64 @ggml_nelements(ptr noundef %111)
  %113 = load i32, ptr %6, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = sub nsw i64 %112, %114
  %116 = load i32, ptr %10, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = add nsw i64 %115, %117
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.ggml_tensor, ptr %119, i32 0, i32 2
  %121 = getelementptr inbounds [4 x i64], ptr %120, i64 0, i64 0
  %122 = load i64, ptr %121, align 8, !tbaa !16
  %123 = srem i64 %118, %122
  %124 = icmp eq i64 %123, 0
  br i1 %124, label %125, label %127

125:                                              ; preds = %97
  %126 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  br label %127

127:                                              ; preds = %125, %97
  br label %128

128:                                              ; preds = %127
  %129 = load i32, ptr %10, align 4, !tbaa !9
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %10, align 4, !tbaa !9
  br label %81, !llvm.loop !21

131:                                              ; preds = %96
  %132 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store double 0.000000e+00, ptr %12, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %133

133:                                              ; preds = %149, %131
  %134 = load i32, ptr %13, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = call i64 @ggml_nelements(ptr noundef %136)
  %138 = icmp slt i64 %135, %137
  br i1 %138, label %140, label %139

139:                                              ; preds = %133
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %152

140:                                              ; preds = %133
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  %142 = load i32, ptr %13, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds float, ptr %141, i64 %143
  %145 = load float, ptr %144, align 4, !tbaa !17
  %146 = fpext float %145 to double
  %147 = load double, ptr %12, align 8, !tbaa !22
  %148 = fadd double %147, %146
  store double %148, ptr %12, align 8, !tbaa !22
  br label %149

149:                                              ; preds = %140
  %150 = load i32, ptr %13, align 4, !tbaa !9
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %13, align 4, !tbaa !9
  br label %133, !llvm.loop !24

152:                                              ; preds = %139
  %153 = load double, ptr %12, align 8, !tbaa !22
  %154 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, double noundef %153)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  ret void
}

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

declare i64 @ggml_nelements(ptr noundef) #2

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

!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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 248}
!12 = !{!"_ZTS11ggml_tensor", !13, i64 0, !6, i64 8, !7, i64 16, !7, i64 48, !14, i64 80, !7, i64 84, !10, i64 148, !7, i64 152, !6, i64 232, !15, i64 240, !6, i64 248, !7, i64 256, !6, i64 320, !7, i64 328}
!13 = !{!"_ZTS9ggml_type", !7, i64 0}
!14 = !{!"_ZTS7ggml_op", !7, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!15, !15, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"float", !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = !{!23, !23, i64 0}
!23 = !{!"double", !7, i64 0}
!24 = distinct !{!24, !20}


; 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.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [11 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11print_t_f32PKcP11ggml_tensori(ptr noundef %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #1 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  store i32 %2, ptr %4, align 4, !tbaa !5
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef %0)
  %8 = getelementptr inbounds i8, ptr %1, i64 248
  %9 = load ptr, ptr %8, align 8, !tbaa !9
  %10 = getelementptr inbounds i8, ptr %1, i64 16
  %11 = load i64, ptr %10, align 8, !tbaa !15
  %12 = getelementptr inbounds i8, ptr %1, i64 24
  %13 = load i64, ptr %12, align 8, !tbaa !15
  %14 = getelementptr inbounds i8, ptr %1, i64 32
  %15 = load i64, ptr %14, align 8, !tbaa !15
  %16 = getelementptr inbounds i8, ptr %1, i64 40
  %17 = load i64, ptr %16, align 8, !tbaa !15
  %18 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, i64 noundef %11, i64 noundef %13, i64 noundef %15, i64 noundef %17)
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i32 noundef %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %20 = load i64, ptr %10, align 8, !tbaa !15
  %21 = load i64, ptr %12, align 8, !tbaa !15
  %22 = mul nsw i64 %21, %20
  %23 = trunc i64 %22 to i32
  store i32 %23, ptr %5, align 4, !tbaa !5
  %24 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = icmp sgt i32 %25, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br i1 %26, label %27, label %._crit_edge

27:                                               ; preds = %3
  %28 = load float, ptr %9, align 4, !tbaa !16
  %29 = fpext float %28 to double
  %30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %29)
  %.pre = load i64, ptr %10, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %31 = load i64, ptr %12, align 8, !tbaa !15
  %32 = mul nsw i64 %31, %.pre
  %33 = trunc i64 %32 to i32
  store i32 %33, ptr %5, align 4, !tbaa !5
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = icmp sgt i32 %35, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br i1 %36, label %.lr.ph.peel.next, label %._crit_edge

._crit_edge:                                      ; preds = %54, %27, %3
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %38 = load i64, ptr %10, align 8, !tbaa !15
  %39 = load i64, ptr %12, align 8, !tbaa !15
  %40 = mul nsw i64 %39, %38
  %41 = trunc i64 %40 to i32
  store i32 %41, ptr %6, align 4, !tbaa !5
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = icmp sgt i32 %43, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  br i1 %44, label %.lr.ph38, label %._crit_edge39

.lr.ph.peel.next:                                 ; preds = %27, %54
  %indvars.iv = phi i64 [ %indvars.iv.next, %54 ], [ 1, %27 ]
  %45 = getelementptr inbounds float, ptr %9, i64 %indvars.iv
  %46 = load float, ptr %45, align 4, !tbaa !16
  %47 = fpext float %46 to double
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %47)
  %49 = load i64, ptr %10, align 8, !tbaa !15
  %50 = srem i64 %indvars.iv, %49
  %51 = icmp eq i64 %50, 0
  br i1 %51, label %52, label %54

52:                                               ; preds = %.lr.ph.peel.next
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  br label %54

54:                                               ; preds = %.lr.ph.peel.next, %52
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %55 = load i64, ptr %10, align 8, !tbaa !15
  %56 = load i64, ptr %12, align 8, !tbaa !15
  %57 = mul nsw i64 %56, %55
  %58 = trunc i64 %57 to i32
  store i32 %58, ptr %5, align 4, !tbaa !5
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = icmp slt i64 %indvars.iv.next, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br i1 %62, label %.lr.ph.peel.next, label %._crit_edge, !llvm.loop !18

._crit_edge39:                                    ; preds = %85, %._crit_edge
  %63 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  %64 = call i64 @ggml_nelements(ptr noundef nonnull %1)
  %65 = icmp sgt i64 %64, 0
  br i1 %65, label %.lr.ph43, label %._crit_edge44

.lr.ph38:                                         ; preds = %._crit_edge, %85
  %indvars.iv47 = phi i64 [ %indvars.iv.next48, %85 ], [ 0, %._crit_edge ]
  %66 = call i64 @ggml_nelements(ptr noundef nonnull %1)
  %67 = load i32, ptr %4, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = sub nsw i64 %66, %68
  %70 = getelementptr float, ptr %9, i64 %69
  %71 = getelementptr float, ptr %70, i64 %indvars.iv47
  %72 = load float, ptr %71, align 4, !tbaa !16
  %73 = fpext float %72 to double
  %74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %73)
  %75 = call i64 @ggml_nelements(ptr noundef nonnull %1)
  %76 = load i32, ptr %4, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = add i64 %75, %indvars.iv47
  %79 = sub i64 %78, %77
  %80 = load i64, ptr %10, align 8, !tbaa !15
  %81 = srem i64 %79, %80
  %82 = icmp eq i64 %81, 0
  br i1 %82, label %83, label %85

83:                                               ; preds = %.lr.ph38
  %84 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  %.pre54 = load i64, ptr %10, align 8, !tbaa !15
  br label %85

85:                                               ; preds = %.lr.ph38, %83
  %86 = phi i64 [ %80, %.lr.ph38 ], [ %.pre54, %83 ]
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %87 = load i64, ptr %12, align 8, !tbaa !15
  %88 = mul nsw i64 %87, %86
  %89 = trunc i64 %88 to i32
  store i32 %89, ptr %6, align 4, !tbaa !5
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = icmp slt i64 %indvars.iv.next48, %92
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  br i1 %93, label %.lr.ph38, label %._crit_edge39, !llvm.loop !21

._crit_edge44:                                    ; preds = %.lr.ph43, %._crit_edge39
  %.031.lcssa = phi double [ 0.000000e+00, %._crit_edge39 ], [ %98, %.lr.ph43 ]
  %94 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, double noundef %.031.lcssa)
  ret void

.lr.ph43:                                         ; preds = %._crit_edge39, %.lr.ph43
  %indvars.iv50 = phi i64 [ %indvars.iv.next51, %.lr.ph43 ], [ 0, %._crit_edge39 ]
  %.03140 = phi double [ %98, %.lr.ph43 ], [ 0.000000e+00, %._crit_edge39 ]
  %95 = getelementptr inbounds float, ptr %9, i64 %indvars.iv50
  %96 = load float, ptr %95, align 4, !tbaa !16
  %97 = fpext float %96 to double
  %98 = fadd double %.03140, %97
  %indvars.iv.next51 = add nuw nsw i64 %indvars.iv50, 1
  %99 = call i64 @ggml_nelements(ptr noundef %1)
  %100 = icmp sgt i64 %99, %indvars.iv.next51
  br i1 %100, label %.lr.ph43, label %._crit_edge44, !llvm.loop !22
}

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

declare i64 @ggml_nelements(ptr noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 = { nofree 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 mustprogress 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 = { "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 = { 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++ TBAA"}
!9 = !{!10, !12, i64 248}
!10 = !{!"_ZTS11ggml_tensor", !11, i64 0, !12, i64 8, !7, i64 16, !7, i64 48, !13, i64 80, !7, i64 84, !6, i64 148, !7, i64 152, !12, i64 232, !14, i64 240, !12, i64 248, !7, i64 256, !12, i64 320, !7, i64 328}
!11 = !{!"_ZTS9ggml_type", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"_ZTS7ggml_op", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!14, !14, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = distinct !{!18, !19, !20}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!"llvm.loop.peeled.count", i32 1}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass