; LLVM IR from ggml-org/ggml :: src (gguf)

; 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.gguf_context = type { i32, %"class.std::vector", %"class.std::vector.17", i64, i64, i64, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<gguf_kv, std::allocator<gguf_kv>>::_Vector_impl" }
%"struct.std::_Vector_base<gguf_kv, std::allocator<gguf_kv>>::_Vector_impl" = type { %"struct.std::_Vector_base<gguf_kv, std::allocator<gguf_kv>>::_Vector_impl_data" }
%"struct.std::_Vector_base<gguf_kv, std::allocator<gguf_kv>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<gguf_tensor_info, std::allocator<gguf_tensor_info>>::_Vector_impl" }
%"struct.std::_Vector_base<gguf_tensor_info, std::allocator<gguf_tensor_info>>::_Vector_impl" = type { %"struct.std::_Vector_base<gguf_tensor_info, std::allocator<gguf_tensor_info>>::_Vector_impl_data" }
%"struct.std::_Vector_base<gguf_tensor_info, std::allocator<gguf_tensor_info>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.gguf_tensor_info = type { %struct.ggml_tensor, i64 }
%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.28 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [92 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(344) ptr @_ZNSt6vectorI16gguf_tensor_infoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

declare i64 @ggml_type_size(i32 noundef) #3

declare i64 @ggml_blck_size(i32 noundef) #3

declare i64 @ggml_nbytes(ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i64 @gguf_get_n_tensors(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local i64 @gguf_find_tensor(ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local void @gguf_set_tensor_type(ptr noundef %0, ptr noundef %1, i32 noundef %2) #4 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = call i64 @gguf_find_tensor(ptr noundef %14, ptr noundef %15)
  store i64 %16, ptr %7, align 8, !tbaa !11
  %17 = load i64, ptr %7, align 8, !tbaa !11
  %18 = icmp slt i64 %17, 0
  br i1 %18, label %19, label %21

19:                                               ; preds = %3
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.28, i32 noundef 1110, ptr noundef @.str.63, ptr noundef %20) #6
  unreachable

21:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.gguf_context, ptr %22, i32 0, i32 2
  %24 = load i64, ptr %7, align 8, !tbaa !11
  %25 = call noundef nonnull align 8 dereferenceable(344) ptr @_ZNSt6vectorI16gguf_tensor_infoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %24) #5
  %26 = getelementptr inbounds %struct.gguf_tensor_info, ptr %25, i32 0, i32 0
  store ptr %26, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %27 = load i32, ptr %6, align 4, !tbaa !9
  %28 = call i64 @ggml_type_size(i32 noundef %27)
  store i64 %28, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %29 = load i32, ptr %6, align 4, !tbaa !9
  %30 = call i64 @ggml_blck_size(i32 noundef %29)
  store i64 %30, ptr %10, align 8, !tbaa !11
  %31 = load i32, ptr %6, align 4, !tbaa !9
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.ggml_tensor, ptr %32, i32 0, i32 0
  store i32 %31, ptr %33, align 8, !tbaa !13
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.ggml_tensor, ptr %34, i32 0, i32 2
  %36 = getelementptr inbounds [4 x i64], ptr %35, i64 0, i64 0
  %37 = load i64, ptr %36, align 8, !tbaa !11
  %38 = load i64, ptr %10, align 8, !tbaa !11
  %39 = srem i64 %37, %38
  %40 = icmp eq i64 %39, 0
  br i1 %40, label %42, label %41

41:                                               ; preds = %21
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.28, i32 noundef 1117, ptr noundef @.str.29, ptr noundef @.str.64) #6
  unreachable

42:                                               ; preds = %21
  %43 = load i64, ptr %9, align 8, !tbaa !11
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.ggml_tensor, ptr %44, i32 0, i32 3
  %46 = getelementptr inbounds [4 x i64], ptr %45, i64 0, i64 0
  store i64 %43, ptr %46, align 8, !tbaa !11
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.ggml_tensor, ptr %47, i32 0, i32 3
  %49 = getelementptr inbounds [4 x i64], ptr %48, i64 0, i64 0
  %50 = load i64, ptr %49, align 8, !tbaa !11
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.ggml_tensor, ptr %51, i32 0, i32 2
  %53 = getelementptr inbounds [4 x i64], ptr %52, i64 0, i64 0
  %54 = load i64, ptr %53, align 8, !tbaa !11
  %55 = load i64, ptr %10, align 8, !tbaa !11
  %56 = sdiv i64 %54, %55
  %57 = mul i64 %50, %56
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.ggml_tensor, ptr %58, i32 0, i32 3
  %60 = getelementptr inbounds [4 x i64], ptr %59, i64 0, i64 1
  store i64 %57, ptr %60, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 2, ptr %11, align 4, !tbaa !17
  br label %61

61:                                               ; preds = %86, %42
  %62 = load i32, ptr %11, align 4, !tbaa !17
  %63 = icmp slt i32 %62, 4
  br i1 %63, label %65, label %64

64:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %89

65:                                               ; preds = %61
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.ggml_tensor, ptr %66, i32 0, i32 3
  %68 = load i32, ptr %11, align 4, !tbaa !17
  %69 = sub nsw i32 %68, 1
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [4 x i64], ptr %67, i64 0, i64 %70
  %72 = load i64, ptr %71, align 8, !tbaa !11
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.ggml_tensor, ptr %73, i32 0, i32 2
  %75 = load i32, ptr %11, align 4, !tbaa !17
  %76 = sub nsw i32 %75, 1
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [4 x i64], ptr %74, i64 0, i64 %77
  %79 = load i64, ptr %78, align 8, !tbaa !11
  %80 = mul i64 %72, %79
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.ggml_tensor, ptr %81, i32 0, i32 3
  %83 = load i32, ptr %11, align 4, !tbaa !17
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [4 x i64], ptr %82, i64 0, i64 %84
  store i64 %80, ptr %85, align 8, !tbaa !11
  br label %86

86:                                               ; preds = %65
  %87 = load i32, ptr %11, align 4, !tbaa !17
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %11, align 4, !tbaa !17
  br label %61, !llvm.loop !18

89:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = call i64 @gguf_get_n_tensors(ptr noundef %90)
  store i64 %91, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %92 = load i64, ptr %7, align 8, !tbaa !11
  %93 = add nsw i64 %92, 1
  store i64 %93, ptr %13, align 8, !tbaa !11
  br label %94

94:                                               ; preds = %131, %89
  %95 = load i64, ptr %13, align 8, !tbaa !11
  %96 = load i64, ptr %12, align 8, !tbaa !11
  %97 = icmp slt i64 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %134

99:                                               ; preds = %94
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.gguf_context, ptr %100, i32 0, i32 2
  %102 = load i64, ptr %13, align 8, !tbaa !11
  %103 = sub nsw i64 %102, 1
  %104 = call noundef nonnull align 8 dereferenceable(344) ptr @_ZNSt6vectorI16gguf_tensor_infoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %101, i64 noundef %103) #5
  %105 = getelementptr inbounds %struct.gguf_tensor_info, ptr %104, i32 0, i32 1
  %106 = load i64, ptr %105, align 8, !tbaa !20
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.gguf_context, ptr %107, i32 0, i32 2
  %109 = load i64, ptr %13, align 8, !tbaa !11
  %110 = sub nsw i64 %109, 1
  %111 = call noundef nonnull align 8 dereferenceable(344) ptr @_ZNSt6vectorI16gguf_tensor_infoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %108, i64 noundef %110) #5
  %112 = getelementptr inbounds %struct.gguf_tensor_info, ptr %111, i32 0, i32 0
  %113 = call i64 @ggml_nbytes(ptr noundef %112)
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.gguf_context, ptr %114, i32 0, i32 3
  %116 = load i64, ptr %115, align 8, !tbaa !22
  %117 = add i64 %113, %116
  %118 = sub i64 %117, 1
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.gguf_context, ptr %119, i32 0, i32 3
  %121 = load i64, ptr %120, align 8, !tbaa !22
  %122 = sub i64 %121, 1
  %123 = xor i64 %122, -1
  %124 = and i64 %118, %123
  %125 = add i64 %106, %124
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.gguf_context, ptr %126, i32 0, i32 2
  %128 = load i64, ptr %13, align 8, !tbaa !11
  %129 = call noundef nonnull align 8 dereferenceable(344) ptr @_ZNSt6vectorI16gguf_tensor_infoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %127, i64 noundef %128) #5
  %130 = getelementptr inbounds %struct.gguf_tensor_info, ptr %129, i32 0, i32 1
  store i64 %125, ptr %130, align 8, !tbaa !20
  br label %131

131:                                              ; preds = %99
  %132 = load i64, ptr %13, align 8, !tbaa !11
  %133 = add nsw i64 %132, 1
  store i64 %133, ptr %13, align 8, !tbaa !11
  br label %94, !llvm.loop !32

134:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret void
}

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 = { 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 #3 = { "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 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 = { nounwind }
attributes #6 = { noreturn }

!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 = !{!"_ZTS9ggml_type", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTS11ggml_tensor", !10, i64 0, !6, i64 8, !7, i64 16, !7, i64 48, !15, i64 80, !7, i64 84, !16, i64 148, !7, i64 152, !6, i64 232, !12, i64 240, !6, i64 248, !7, i64 256, !6, i64 320, !7, i64 328}
!15 = !{!"_ZTS7ggml_op", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!16, !16, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!21, !12, i64 336}
!21 = !{!"_ZTS16gguf_tensor_info", !14, i64 0, !12, i64 336}
!22 = !{!23, !12, i64 56}
!23 = !{!"_ZTS12gguf_context", !16, i64 0, !24, i64 8, !28, i64 32, !12, i64 56, !12, i64 64, !12, i64 72, !6, i64 80}
!24 = !{!"_ZTSSt6vectorI7gguf_kvSaIS0_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseI7gguf_kvSaIS0_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseI7gguf_kvSaIS0_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseI7gguf_kvSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!"_ZTSSt6vectorI16gguf_tensor_infoSaIS0_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseI16gguf_tensor_infoSaIS0_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseI16gguf_tensor_infoSaIS0_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseI16gguf_tensor_infoSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = distinct !{!32, !19}


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

@.str.28 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [92 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(344) ptr @_ZNSt6vectorI16gguf_tensor_infoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

declare i64 @ggml_type_size(i32 noundef) local_unnamed_addr #2

declare i64 @ggml_blck_size(i32 noundef) local_unnamed_addr #2

declare i64 @ggml_nbytes(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i64 @gguf_get_n_tensors(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local i64 @gguf_find_tensor(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @gguf_set_tensor_type(ptr noundef %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #3 {
  %4 = tail call i64 @gguf_find_tensor(ptr noundef %0, ptr noundef %1)
  %5 = icmp slt i64 %4, 0
  br i1 %5, label %6, label %7

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

7:                                                ; preds = %3
  %8 = getelementptr inbounds i8, ptr %0, i64 32
  %9 = tail call noundef nonnull align 8 dereferenceable(344) ptr @_ZNSt6vectorI16gguf_tensor_infoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %4) #5
  %10 = tail call i64 @ggml_type_size(i32 noundef %2)
  %11 = tail call i64 @ggml_blck_size(i32 noundef %2)
  store i32 %2, ptr %9, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %9, i64 16
  %13 = load i64, ptr %12, align 8, !tbaa !14
  %14 = srem i64 %13, %11
  %15 = sdiv i64 %13, %11
  %16 = icmp eq i64 %14, 0
  br i1 %16, label %18, label %17

17:                                               ; preds = %7
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.28, i32 noundef 1117, ptr noundef nonnull @.str.29, ptr noundef nonnull @.str.64) #4
  unreachable

18:                                               ; preds = %7
  %19 = getelementptr inbounds i8, ptr %9, i64 48
  store i64 %10, ptr %19, align 8, !tbaa !14
  %20 = mul i64 %15, %10
  %21 = getelementptr inbounds i8, ptr %9, i64 56
  store i64 %20, ptr %21, align 8, !tbaa !14
  %22 = getelementptr inbounds i8, ptr %9, i64 24
  %23 = load i64, ptr %22, align 8, !tbaa !14
  %24 = mul i64 %23, %20
  %25 = getelementptr inbounds i8, ptr %9, i64 64
  store i64 %24, ptr %25, align 8, !tbaa !14
  %26 = getelementptr inbounds i8, ptr %9, i64 32
  %27 = load i64, ptr %26, align 8, !tbaa !14
  %28 = mul i64 %27, %24
  %29 = getelementptr inbounds i8, ptr %9, i64 72
  store i64 %28, ptr %29, align 8, !tbaa !14
  %30 = tail call i64 @gguf_get_n_tensors(ptr noundef %0)
  %.041 = add nuw nsw i64 %4, 1
  %31 = icmp slt i64 %.041, %30
  br i1 %31, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %18
  %32 = getelementptr inbounds i8, ptr %0, i64 56
  br label %33

._crit_edge:                                      ; preds = %33, %18
  ret void

33:                                               ; preds = %.lr.ph, %33
  %.043 = phi i64 [ %.041, %.lr.ph ], [ %.0, %33 ]
  %.0.in42 = phi i64 [ %4, %.lr.ph ], [ %.043, %33 ]
  %34 = tail call noundef nonnull align 8 dereferenceable(344) ptr @_ZNSt6vectorI16gguf_tensor_infoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.0.in42) #5
  %35 = getelementptr inbounds i8, ptr %34, i64 336
  %36 = load i64, ptr %35, align 8, !tbaa !15
  %37 = tail call noundef nonnull align 8 dereferenceable(344) ptr @_ZNSt6vectorI16gguf_tensor_infoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.0.in42) #5
  %38 = tail call i64 @ggml_nbytes(ptr noundef nonnull %37)
  %39 = load i64, ptr %32, align 8, !tbaa !17
  %40 = add i64 %38, -1
  %41 = add i64 %40, %39
  %42 = sub i64 0, %39
  %43 = and i64 %41, %42
  %44 = add i64 %43, %36
  %45 = tail call noundef nonnull align 8 dereferenceable(344) ptr @_ZNSt6vectorI16gguf_tensor_infoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.043) #5
  %46 = getelementptr inbounds i8, ptr %45, i64 336
  store i64 %44, ptr %46, align 8, !tbaa !15
  %.0 = add i64 %.043, 1
  %exitcond.not = icmp eq i64 %.0, %30
  br i1 %exitcond.not, label %._crit_edge, label %33, !llvm.loop !27
}

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 = { 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 #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 = { 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 #4 = { noreturn }
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, !7, i64 0}
!6 = !{!"_ZTS11ggml_tensor", !7, i64 0, !10, i64 8, !8, i64 16, !8, i64 48, !11, i64 80, !8, i64 84, !12, i64 148, !8, i64 152, !10, i64 232, !13, i64 240, !10, i64 248, !8, i64 256, !10, i64 320, !8, i64 328}
!7 = !{!"_ZTS9ggml_type", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTS7ggml_op", !8, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!"long", !8, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!16, !13, i64 336}
!16 = !{!"_ZTS16gguf_tensor_info", !6, i64 0, !13, i64 336}
!17 = !{!18, !13, i64 56}
!18 = !{!"_ZTS12gguf_context", !12, i64 0, !19, i64 8, !23, i64 32, !13, i64 56, !13, i64 64, !13, i64 72, !10, i64 80}
!19 = !{!"_ZTSSt6vectorI7gguf_kvSaIS0_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseI7gguf_kvSaIS0_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseI7gguf_kvSaIS0_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseI7gguf_kvSaIS0_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!23 = !{!"_ZTSSt6vectorI16gguf_tensor_infoSaIS0_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseI16gguf_tensor_infoSaIS0_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseI16gguf_tensor_infoSaIS0_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseI16gguf_tensor_infoSaIS0_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: BDCEPass,DivRemPairsPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass