; LLVM IR from ggml-org/ggml :: tests/test-mul-mat.ll (Z11build_graphRK10test_model)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.ggml_init_params = type { i64, ptr, i8 }
%"class.std::allocator" = type { i8 }
%struct.test_model = type { ptr, ptr, ptr, ptr, ptr }

@_ZZ11build_graphRK10test_modelE8buf_size = external hidden global i64, align 8
@_ZGVZ11build_graphRK10test_modelE8buf_size = external hidden global i64, align 8
@_ZZ11build_graphRK10test_modelE3buf = external hidden global %"class.std::vector", align 8
@_ZGVZ11build_graphRK10test_modelE3buf = external hidden global i64, align 8
@__dso_handle = external hidden global i8

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

declare i64 @ggml_tensor_overhead() #1

declare ptr @ggml_init(ptr noundef byval(%struct.ggml_init_params) align 8) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; 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 noundef ptr @_Z11build_graphRK10test_model(ptr noundef nonnull align 8 dereferenceable(40) %0) #3 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %struct.ggml_init_params, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %struct.ggml_init_params, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %11 = load atomic i8, ptr @_ZGVZ11build_graphRK10test_modelE8buf_size acquire, align 8
  %12 = icmp eq i8 %11, 0
  br i1 %12, label %13, label %23, !prof !9

13:                                               ; preds = %1
  %14 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ11build_graphRK10test_modelE8buf_size) #4
  %15 = icmp ne i32 %14, 0
  br i1 %15, label %16, label %23

16:                                               ; preds = %13
  %17 = invoke i64 @ggml_tensor_overhead()
          to label %18 unwind label %60

18:                                               ; preds = %16
  %19 = mul i64 %17, 2048
  %20 = invoke i64 @ggml_graph_overhead()
          to label %21 unwind label %60

21:                                               ; preds = %18
  %22 = add i64 %19, %20
  store i64 %22, ptr @_ZZ11build_graphRK10test_modelE8buf_size, align 8, !tbaa !10
  call void @__cxa_guard_release(ptr @_ZGVZ11build_graphRK10test_modelE8buf_size) #4
  br label %23

23:                                               ; preds = %21, %13, %1
  %24 = load atomic i8, ptr @_ZGVZ11build_graphRK10test_modelE3buf acquire, align 8
  %25 = icmp eq i8 %24, 0
  br i1 %25, label %26, label %33, !prof !9

26:                                               ; preds = %23
  %27 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ11build_graphRK10test_modelE3buf) #4
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %29, label %33

29:                                               ; preds = %26
  %30 = load i64, ptr @_ZZ11build_graphRK10test_modelE8buf_size, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #4
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  invoke void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ11build_graphRK10test_modelE3buf, i64 noundef %30, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %31 unwind label %64

31:                                               ; preds = %29
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  %32 = call i32 @__cxa_atexit(ptr @_ZNSt6vectorIhSaIhEED2Ev, ptr @_ZZ11build_graphRK10test_modelE3buf, ptr @__dso_handle) #4
  call void @__cxa_guard_release(ptr @_ZGVZ11build_graphRK10test_modelE3buf) #4
  br label %33

33:                                               ; preds = %31, %26, %23
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #4
  %34 = getelementptr inbounds %struct.ggml_init_params, ptr %6, i32 0, i32 0
  %35 = load i64, ptr @_ZZ11build_graphRK10test_modelE8buf_size, align 8, !tbaa !10
  store i64 %35, ptr %34, align 8, !tbaa !12
  %36 = getelementptr inbounds %struct.ggml_init_params, ptr %6, i32 0, i32 1
  %37 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ11build_graphRK10test_modelE3buf) #4
  store ptr %37, ptr %36, align 8, !tbaa !15
  %38 = getelementptr inbounds %struct.ggml_init_params, ptr %6, i32 0, i32 2
  store i8 1, ptr %38, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %6, i64 24, i1 false), !tbaa.struct !17
  %39 = call ptr @ggml_init(ptr noundef byval(%struct.ggml_init_params) align 8 %8)
  store ptr %39, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = call ptr @ggml_new_graph(ptr noundef %40)
  store ptr %41, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.test_model, ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !19
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = load ptr, ptr %2, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.test_model, ptr %47, i32 0, i32 1
  %49 = load ptr, ptr %48, align 8, !tbaa !21
  %50 = call ptr @ggml_cont(ptr noundef %46, ptr noundef %49)
  %51 = call ptr @ggml_mul_mat(ptr noundef %42, ptr noundef %45, ptr noundef %50)
  store ptr %51, ptr %10, align 8, !tbaa !5
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = call ptr @ggml_transpose(ptr noundef %54, ptr noundef %55)
  %57 = call ptr @ggml_cont(ptr noundef %53, ptr noundef %56)
  call void @ggml_build_forward_expand(ptr noundef %52, ptr noundef %57)
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  call void @ggml_free(ptr noundef %58)
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #4
  ret ptr %59

60:                                               ; preds = %18, %16
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %3, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %4, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZ11build_graphRK10test_modelE8buf_size) #4
  br label %68

64:                                               ; preds = %29
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %3, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %4, align 4
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  call void @__cxa_guard_abort(ptr @_ZGVZ11build_graphRK10test_modelE3buf) #4
  br label %68

68:                                               ; preds = %64, %60
  %69 = load ptr, ptr %3, align 8
  %70 = load i32, ptr %4, align 4
  %71 = insertvalue { ptr, i32 } poison, ptr %69, 0
  %72 = insertvalue { ptr, i32 } %71, i32 %70, 1
  resume { ptr, i32 } %72
}

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #4

declare i32 @__gxx_personality_v0(...)

declare i64 @ggml_graph_overhead() #1

; Function Attrs: nounwind
declare void @__cxa_guard_abort(ptr) #4

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

; Function Attrs: nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

declare ptr @ggml_new_graph(ptr noundef) #1

declare ptr @ggml_mul_mat(ptr noundef, ptr noundef, ptr noundef) #1

declare ptr @ggml_cont(ptr noundef, ptr noundef) #1

declare void @ggml_build_forward_expand(ptr noundef, ptr noundef) #1

declare ptr @ggml_transpose(ptr noundef, ptr noundef) #1

declare void @ggml_free(ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 align 2

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

!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 = !{!"branch_weights", i32 1, i32 1048575}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !7, i64 0}
!12 = !{!13, !11, i64 0}
!13 = !{!"_ZTS16ggml_init_params", !11, i64 0, !6, i64 8, !14, i64 16}
!14 = !{!"bool", !7, i64 0}
!15 = !{!13, !6, i64 8}
!16 = !{!13, !14, i64 16}
!17 = !{i64 0, i64 8, !10, i64 8, i64 8, !5, i64 16, i64 1, !18}
!18 = !{!14, !14, i64 0}
!19 = !{!20, !6, i64 0}
!20 = !{!"_ZTS10test_model", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!21 = !{!20, !6, i64 8}


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.ggml_init_params = type { i64, ptr, i8 }
%"class.std::allocator" = type { i8 }

@_ZZ11build_graphRK10test_modelE8buf_size = external hidden local_unnamed_addr global i64, align 8
@_ZGVZ11build_graphRK10test_modelE8buf_size = external hidden global i64, align 8
@_ZZ11build_graphRK10test_modelE3buf = external hidden global %"class.std::vector", align 8
@_ZGVZ11build_graphRK10test_modelE3buf = external hidden global i64, align 8
@__dso_handle = external hidden global i8

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

declare i64 @ggml_tensor_overhead() local_unnamed_addr #1

declare ptr @ggml_init(ptr noundef byval(%struct.ggml_init_params) align 8) local_unnamed_addr #1

; 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 noundef ptr @_Z11build_graphRK10test_model(ptr nocapture noundef nonnull readonly align 8 dereferenceable(40) %0) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::allocator", align 1
  %3 = alloca %struct.ggml_init_params, align 8
  %4 = load atomic i8, ptr @_ZGVZ11build_graphRK10test_modelE8buf_size acquire, align 8
  %5 = icmp eq i8 %4, 0
  br i1 %5, label %6, label %15, !prof !5

6:                                                ; preds = %1
  %7 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ11build_graphRK10test_modelE8buf_size) #5
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %15, label %8

8:                                                ; preds = %6
  %9 = invoke i64 @ggml_tensor_overhead()
          to label %10 unwind label %36

10:                                               ; preds = %8
  %11 = invoke i64 @ggml_graph_overhead()
          to label %12 unwind label %36

12:                                               ; preds = %10
  %13 = shl i64 %9, 11
  %14 = add i64 %11, %13
  store i64 %14, ptr @_ZZ11build_graphRK10test_modelE8buf_size, align 8, !tbaa !6
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZ11build_graphRK10test_modelE8buf_size) #5
  br label %15

15:                                               ; preds = %12, %6, %1
  %16 = load atomic i8, ptr @_ZGVZ11build_graphRK10test_modelE3buf acquire, align 8
  %17 = icmp eq i8 %16, 0
  br i1 %17, label %18, label %24, !prof !5

18:                                               ; preds = %15
  %19 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ11build_graphRK10test_modelE3buf) #5
  %.not13 = icmp eq i32 %19, 0
  br i1 %.not13, label %24, label %20

20:                                               ; preds = %18
  %21 = load i64, ptr @_ZZ11build_graphRK10test_modelE8buf_size, align 8, !tbaa !6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #5
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  invoke void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ11build_graphRK10test_modelE3buf, i64 noundef %21, ptr noundef nonnull align 1 dereferenceable(1) %2)
          to label %22 unwind label %38

22:                                               ; preds = %20
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #5
  %23 = call i32 @__cxa_atexit(ptr nonnull @_ZNSt6vectorIhSaIhEED2Ev, ptr nonnull @_ZZ11build_graphRK10test_modelE3buf, ptr nonnull @__dso_handle) #5
  call void @__cxa_guard_release(ptr nonnull @_ZGVZ11build_graphRK10test_modelE3buf) #5
  br label %24

24:                                               ; preds = %22, %18, %15
  %25 = load i64, ptr @_ZZ11build_graphRK10test_modelE8buf_size, align 8, !tbaa !6
  %26 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ11build_graphRK10test_modelE3buf) #5
  store i64 %25, ptr %3, align 8, !tbaa !6
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 8
  store ptr %26, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !10
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 16
  store i8 1, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !12
  %27 = call ptr @ggml_init(ptr noundef nonnull byval(%struct.ggml_init_params) align 8 %3)
  %28 = call ptr @ggml_new_graph(ptr noundef %27)
  %29 = load ptr, ptr %0, align 8, !tbaa !14
  %30 = getelementptr inbounds i8, ptr %0, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !16
  %32 = call ptr @ggml_cont(ptr noundef %27, ptr noundef %31)
  %33 = call ptr @ggml_mul_mat(ptr noundef %27, ptr noundef %29, ptr noundef %32)
  %34 = call ptr @ggml_transpose(ptr noundef %27, ptr noundef %33)
  %35 = call ptr @ggml_cont(ptr noundef %27, ptr noundef %34)
  call void @ggml_build_forward_expand(ptr noundef %28, ptr noundef %35)
  call void @ggml_free(ptr noundef %27)
  ret ptr %28

36:                                               ; preds = %10, %8
  %37 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_guard_abort(ptr nonnull @_ZGVZ11build_graphRK10test_modelE8buf_size) #5
  br label %40

38:                                               ; preds = %20
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #5
  call void @__cxa_guard_abort(ptr nonnull @_ZGVZ11build_graphRK10test_modelE3buf) #5
  br label %40

40:                                               ; preds = %38, %36
  %.pn = phi { ptr, i32 } [ %39, %38 ], [ %37, %36 ]
  resume { ptr, i32 } %.pn
}

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

declare i64 @ggml_graph_overhead() local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare void @__cxa_guard_abort(ptr) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

; Function Attrs: nofree nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

declare ptr @ggml_new_graph(ptr noundef) local_unnamed_addr #1

declare ptr @ggml_mul_mat(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @ggml_cont(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @ggml_build_forward_expand(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @ggml_transpose(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @ggml_free(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { nofree nounwind }
attributes #4 = { 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 #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 = !{!"branch_weights", i32 1, i32 1048575}
!6 = !{!7, !7, i64 0}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"bool", !8, i64 0}
!14 = !{!15, !11, i64 0}
!15 = !{!"_ZTS10test_model", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32}
!16 = !{!15, !11, i64 8}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,TailCallElimPass