; LLVM IR from ggml-org/ggml :: src/ggml-rpc/ggml-rpc.ll (ZN10rpc_server11init_tensorERK23rpc_msg_init_tensor_req)

; 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_init_params = type { i64, ptr, i8 }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.6" }
%"struct.std::_Head_base.6" = type { ptr }
%struct.rpc_msg_init_tensor_req = type { %struct.rpc_tensor }
%struct.rpc_tensor = type <{ i64, i32, i64, [4 x i32], [4 x i32], i32, [16 x i32], i32, [10 x i64], i64, i64, i64, [64 x i8], [4 x i8] }>
%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] }
%struct.ggml_backend_buffer = type { %struct.ggml_backend_buffer_i, ptr, ptr, i64, i32 }
%struct.ggml_backend_buffer_i = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str.3 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [72 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

declare i32 @__gxx_personality_v0(...)

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

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

declare i64 @ggml_tensor_overhead() #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10unique_ptrI12ggml_context20ggml_context_deleterEC2IS1_vEEPS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneI12ggml_context20ggml_context_deleterEbRKSt10unique_ptrIT_T0_EDn(ptr noundef nonnull align 8 dereferenceable(8), ptr) #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN10rpc_server18deserialize_tensorEP12ggml_contextPK10rpc_tensor(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef, ptr noundef) #6 align 2

declare void @ggml_log_internal(i32 noundef, ptr noundef, ...) #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN10rpc_server11init_tensorERK23rpc_msg_init_tensor_req(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 1 dereferenceable(296) %1) #6 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %struct.ggml_init_params, align 8
  %7 = alloca %"class.std::unique_ptr", align 8
  %8 = alloca %struct.ggml_init_params, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %15 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #7
  %16 = getelementptr inbounds %struct.ggml_init_params, ptr %6, i32 0, i32 0
  %17 = call i64 @ggml_tensor_overhead()
  store i64 %17, ptr %16, align 8, !tbaa !9
  %18 = getelementptr inbounds %struct.ggml_init_params, ptr %6, i32 0, i32 1
  store ptr null, ptr %18, align 8, !tbaa !13
  %19 = getelementptr inbounds %struct.ggml_init_params, ptr %6, i32 0, i32 2
  store i8 1, ptr %19, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %6, i64 24, i1 false), !tbaa.struct !15
  %20 = call ptr @ggml_init(ptr noundef byval(%struct.ggml_init_params) align 8 %8)
  call void @_ZNSt10unique_ptrI12ggml_context20ggml_context_deleterEC2IS1_vEEPS0_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef %20) #7
  %21 = call noundef zeroext i1 @_ZStneI12ggml_context20ggml_context_deleterEbRKSt10unique_ptrIT_T0_EDn(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr null) #7
  br i1 %21, label %28, label %22

22:                                               ; preds = %2
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.3, i32 noundef 1158, ptr noundef @.str.4, ptr noundef @.str.5) #8
          to label %23 unwind label %24

23:                                               ; preds = %22
  unreachable

24:                                               ; preds = %22
  %25 = landingpad { ptr, i32 }
          cleanup
  %26 = extractvalue { ptr, i32 } %25, 0
  store ptr %26, ptr %9, align 8
  %27 = extractvalue { ptr, i32 } %25, 1
  store i32 %27, ptr %10, align 4
  br label %82

28:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %29 = call noundef ptr @_ZNKSt10unique_ptrI12ggml_context20ggml_context_deleterE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  store ptr %29, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %30 = load ptr, ptr %11, align 8, !tbaa !5
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.rpc_msg_init_tensor_req, ptr %31, i32 0, i32 0
  %33 = invoke noundef ptr @_ZN10rpc_server18deserialize_tensorEP12ggml_contextPK10rpc_tensor(ptr noundef nonnull align 8 dereferenceable(72) %15, ptr noundef %30, ptr noundef %32)
          to label %34 unwind label %39

34:                                               ; preds = %28
  store ptr %33, ptr %12, align 8, !tbaa !5
  %35 = load ptr, ptr %12, align 8, !tbaa !5
  %36 = icmp eq ptr %35, null
  br i1 %36, label %37, label %43

37:                                               ; preds = %34
  invoke void (i32, ptr, ...) @ggml_log_internal(i32 noundef 4, ptr noundef @.str.18)
          to label %38 unwind label %39

38:                                               ; preds = %37
  store i1 false, ptr %3, align 1
  store i32 1, ptr %13, align 4
  br label %79

39:                                               ; preds = %37, %28
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %9, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %10, align 4
  br label %81

43:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %44 = load ptr, ptr %12, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.ggml_tensor, ptr %44, i32 0, i32 1
  %46 = load ptr, ptr %45, align 8, !tbaa !18
  store ptr %46, ptr %14, align 8, !tbaa !5
  %47 = load ptr, ptr %14, align 8, !tbaa !5
  %48 = icmp ne ptr %47, null
  br i1 %48, label %49, label %68

49:                                               ; preds = %43
  %50 = load ptr, ptr %14, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.ggml_backend_buffer, ptr %50, i32 0, i32 0
  %52 = getelementptr inbounds %struct.ggml_backend_buffer_i, ptr %51, i32 0, i32 2
  %53 = load ptr, ptr %52, align 8, !tbaa !23
  %54 = icmp ne ptr %53, null
  br i1 %54, label %55, label %68

55:                                               ; preds = %49
  %56 = load ptr, ptr %14, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.ggml_backend_buffer, ptr %56, i32 0, i32 0
  %58 = getelementptr inbounds %struct.ggml_backend_buffer_i, ptr %57, i32 0, i32 2
  %59 = load ptr, ptr %58, align 8, !tbaa !23
  %60 = load ptr, ptr %14, align 8, !tbaa !5
  %61 = load ptr, ptr %12, align 8, !tbaa !5
  %62 = invoke noundef i32 %59(ptr noundef %60, ptr noundef %61)
          to label %63 unwind label %64

63:                                               ; preds = %55
  br label %70

64:                                               ; preds = %75, %68, %55
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %9, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %81

68:                                               ; preds = %49, %43
  invoke void (i32, ptr, ...) @ggml_log_internal(i32 noundef 4, ptr noundef @.str.19)
          to label %69 unwind label %64

69:                                               ; preds = %68
  br label %70

70:                                               ; preds = %69, %63
  %71 = load ptr, ptr %12, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.ggml_tensor, ptr %71, i32 0, i32 12
  %73 = load ptr, ptr %72, align 8, !tbaa !27
  %74 = icmp ne ptr %73, null
  br i1 %74, label %75, label %77

75:                                               ; preds = %70
  invoke void (i32, ptr, ...) @ggml_log_internal(i32 noundef 4, ptr noundef @.str.20)
          to label %76 unwind label %64

76:                                               ; preds = %75
  store i1 false, ptr %3, align 1
  store i32 1, ptr %13, align 4
  br label %78

77:                                               ; preds = %70
  store i1 true, ptr %3, align 1
  store i32 1, ptr %13, align 4
  br label %78

78:                                               ; preds = %77, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %79

79:                                               ; preds = %78, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @_ZNSt10unique_ptrI12ggml_context20ggml_context_deleterED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  %80 = load i1, ptr %3, align 1
  ret i1 %80

81:                                               ; preds = %64, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %82

82:                                               ; preds = %81, %24
  call void @_ZNSt10unique_ptrI12ggml_context20ggml_context_deleterED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  br label %83

83:                                               ; preds = %82
  %84 = load ptr, ptr %9, align 8
  %85 = load i32, ptr %10, align 4
  %86 = insertvalue { ptr, i32 } poison, ptr %84, 0
  %87 = insertvalue { ptr, i32 } %86, i32 %85, 1
  resume { ptr, i32 } %87
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 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 = { 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { 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, !11, i64 0}
!10 = !{!"_ZTS16ggml_init_params", !11, i64 0, !6, i64 8, !12, i64 16}
!11 = !{!"long", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!10, !6, i64 8}
!14 = !{!10, !12, i64 16}
!15 = !{i64 0, i64 8, !16, i64 8, i64 8, !5, i64 16, i64 1, !17}
!16 = !{!11, !11, i64 0}
!17 = !{!12, !12, i64 0}
!18 = !{!19, !6, i64 8}
!19 = !{!"_ZTS11ggml_tensor", !20, i64 0, !6, i64 8, !7, i64 16, !7, i64 48, !21, i64 80, !7, i64 84, !22, i64 148, !7, i64 152, !6, i64 232, !11, i64 240, !6, i64 248, !7, i64 256, !6, i64 320, !7, i64 328}
!20 = !{!"_ZTS9ggml_type", !7, i64 0}
!21 = !{!"_ZTS7ggml_op", !7, i64 0}
!22 = !{!"int", !7, i64 0}
!23 = !{!24, !6, i64 16}
!24 = !{!"_ZTS19ggml_backend_buffer", !25, i64 0, !6, i64 72, !6, i64 80, !11, i64 88, !26, i64 96}
!25 = !{!"_ZTS21ggml_backend_buffer_i", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64}
!26 = !{!"_ZTS25ggml_backend_buffer_usage", !7, i64 0}
!27 = !{!19, !6, i64 320}


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

%struct.ggml_init_params = type { i64, ptr, i8 }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.6" }
%"struct.std::_Head_base.6" = type { ptr }

@.str.3 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [72 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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 nounwind uwtable
declare dso_local void @_ZNSt10unique_ptrI12ggml_context20ggml_context_deleterEC2IS1_vEEPS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneI12ggml_context20ggml_context_deleterEbRKSt10unique_ptrIT_T0_EDn(ptr noundef nonnull align 8 dereferenceable(8), ptr) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN10rpc_server18deserialize_tensorEP12ggml_contextPK10rpc_tensor(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef, ptr noundef) local_unnamed_addr #5 align 2

declare void @ggml_log_internal(i32 noundef, ptr noundef, ...) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN10rpc_server11init_tensorERK23rpc_msg_init_tensor_req(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 1 dereferenceable(296) %1) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::unique_ptr", align 8
  %4 = alloca %struct.ggml_init_params, align 8
  %5 = tail call i64 @ggml_tensor_overhead()
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  store i64 %5, ptr %4, align 8, !tbaa !5
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 8
  store ptr null, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !9
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 16
  store i8 1, ptr %.sroa.6.0..sroa_idx, align 8, !tbaa !11
  %6 = tail call ptr @ggml_init(ptr noundef nonnull byval(%struct.ggml_init_params) align 8 %4)
  call void @_ZNSt10unique_ptrI12ggml_context20ggml_context_deleterEC2IS1_vEEPS0_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef %6) #6
  %7 = call noundef zeroext i1 @_ZStneI12ggml_context20ggml_context_deleterEbRKSt10unique_ptrIT_T0_EDn(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr null) #6
  br i1 %7, label %12, label %8

8:                                                ; preds = %2
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.3, i32 noundef 1158, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5) #7
          to label %9 unwind label %10

9:                                                ; preds = %8
  unreachable

10:                                               ; preds = %8
  %11 = landingpad { ptr, i32 }
          cleanup
  br label %36

12:                                               ; preds = %2
  %13 = call noundef ptr @_ZNKSt10unique_ptrI12ggml_context20ggml_context_deleterE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %14 = invoke noundef ptr @_ZN10rpc_server18deserialize_tensorEP12ggml_contextPK10rpc_tensor(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef %13, ptr noundef nonnull %1)
          to label %15 unwind label %18

15:                                               ; preds = %12
  %16 = icmp eq ptr %14, null
  br i1 %16, label %17, label %20

17:                                               ; preds = %15
  invoke void (i32, ptr, ...) @ggml_log_internal(i32 noundef 4, ptr noundef nonnull @.str.18)
          to label %35 unwind label %18

18:                                               ; preds = %17, %12
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %36

20:                                               ; preds = %15
  %21 = getelementptr inbounds i8, ptr %14, i64 8
  %22 = load ptr, ptr %21, align 8, !tbaa !13
  %.not = icmp eq ptr %22, null
  br i1 %.not, label %30, label %23

23:                                               ; preds = %20
  %24 = getelementptr inbounds i8, ptr %22, i64 16
  %25 = load ptr, ptr %24, align 8, !tbaa !18
  %.not20 = icmp eq ptr %25, null
  br i1 %.not20, label %30, label %26

26:                                               ; preds = %23
  %27 = invoke noundef i32 %25(ptr noundef nonnull %22, ptr noundef nonnull %14)
          to label %31 unwind label %28

28:                                               ; preds = %34, %30, %26
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %36

30:                                               ; preds = %23, %20
  invoke void (i32, ptr, ...) @ggml_log_internal(i32 noundef 4, ptr noundef nonnull @.str.19)
          to label %31 unwind label %28

31:                                               ; preds = %30, %26
  %32 = getelementptr inbounds i8, ptr %14, i64 320
  %33 = load ptr, ptr %32, align 8, !tbaa !22
  %.not21 = icmp eq ptr %33, null
  br i1 %.not21, label %35, label %34

34:                                               ; preds = %31
  invoke void (i32, ptr, ...) @ggml_log_internal(i32 noundef 4, ptr noundef nonnull @.str.20)
          to label %35 unwind label %28

35:                                               ; preds = %34, %31, %17
  %.1 = phi i1 [ false, %17 ], [ true, %31 ], [ false, %34 ]
  call void @_ZNSt10unique_ptrI12ggml_context20ggml_context_deleterED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  ret i1 %.1

36:                                               ; preds = %18, %28, %10
  %.pn.pn = phi { ptr, i32 } [ %11, %10 ], [ %19, %18 ], [ %29, %28 ]
  call void @_ZNSt10unique_ptrI12ggml_context20ggml_context_deleterED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn.pn
}

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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint 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 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !10, i64 8}
!14 = !{!"_ZTS11ggml_tensor", !15, i64 0, !10, i64 8, !7, i64 16, !7, i64 48, !16, i64 80, !7, i64 84, !17, i64 148, !7, i64 152, !10, i64 232, !6, i64 240, !10, i64 248, !7, i64 256, !10, i64 320, !7, i64 328}
!15 = !{!"_ZTS9ggml_type", !7, i64 0}
!16 = !{!"_ZTS7ggml_op", !7, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!19, !10, i64 16}
!19 = !{!"_ZTS19ggml_backend_buffer", !20, i64 0, !10, i64 72, !10, i64 80, !6, i64 88, !21, i64 96}
!20 = !{!"_ZTS21ggml_backend_buffer_i", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64}
!21 = !{!"_ZTS25ggml_backend_buffer_usage", !7, i64 0}
!22 = !{!14, !10, i64 320}


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