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

; 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 }
%"class.std::unordered_map.65" = type { %"class.std::_Hashtable.66" }
%"class.std::_Hashtable.66" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::unordered_map.44" = type { %"class.std::_Hashtable.45" }
%"class.std::_Hashtable.45" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%struct.ggml_cgraph = type { i32, i32, i32, ptr, ptr, ptr, ptr, %struct.ggml_hash_set, i32 }
%struct.ggml_hash_set = type { i64, ptr, ptr }
%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] }>
%class.rpc_server = type { ptr, ptr, %"class.std::unordered_set" }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.7" }
%"class.std::_Hashtable.7" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%struct.rpc_msg_graph_compute_rsp = type { i8 }

@.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.25 = external hidden unnamed_addr constant [46 x i8], align 1
@__func__._ZN10rpc_server13graph_computeERKSt6vectorIhSaIhEER25rpc_msg_graph_compute_rsp = external hidden unnamed_addr constant [14 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

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 nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN10rpc_server13graph_computeERKSt6vectorIhSaIhEER25rpc_msg_graph_compute_rsp(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 1 dereferenceable(1) %2) #6 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca %struct.ggml_init_params, align 8
  %15 = alloca %"class.std::unique_ptr", align 8
  %16 = alloca %struct.ggml_init_params, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca %"class.std::unordered_map.65", align 8
  %22 = alloca i32, align 4
  %23 = alloca %"class.std::unordered_map.44", align 8
  %24 = alloca i32, align 4
  %25 = alloca i64, align 8
  %26 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %27 = load ptr, ptr %5, align 8
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #7
  %30 = icmp ult i64 %29, 4
  br i1 %30, label %31, label %32

31:                                               ; preds = %3
  store i1 false, ptr %4, align 1
  br label %207

32:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = call noundef ptr @_ZNKSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %33) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 1 %34, i64 4, i1 false)
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %35) #7
  %37 = load i32, ptr %8, align 4, !tbaa !9
  %38 = zext i32 %37 to i64
  %39 = mul i64 %38, 8
  %40 = add i64 4, %39
  %41 = add i64 %40, 4
  %42 = icmp ult i64 %36, %41
  br i1 %42, label %43, label %44

43:                                               ; preds = %32
  store i1 false, ptr %4, align 1
  store i32 1, ptr %9, align 4
  br label %206

44:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = call noundef ptr @_ZNKSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %45) #7
  %47 = getelementptr inbounds i8, ptr %46, i64 4
  store ptr %47, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = call noundef ptr @_ZNKSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #7
  %50 = getelementptr inbounds i8, ptr %49, i64 4
  %51 = load i32, ptr %8, align 4, !tbaa !9
  %52 = zext i32 %51 to i64
  %53 = mul i64 %52, 8
  %54 = getelementptr inbounds i8, ptr %50, i64 %53
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 1 %54, i64 4, i1 false)
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %55) #7
  %57 = load i32, ptr %8, align 4, !tbaa !9
  %58 = zext i32 %57 to i64
  %59 = mul i64 %58, 8
  %60 = add i64 4, %59
  %61 = add i64 %60, 4
  %62 = load i32, ptr %11, align 4, !tbaa !9
  %63 = zext i32 %62 to i64
  %64 = mul i64 %63, 296
  %65 = add i64 %61, %64
  %66 = icmp ult i64 %56, %65
  br i1 %66, label %67, label %68

67:                                               ; preds = %44
  store i1 false, ptr %4, align 1
  store i32 1, ptr %9, align 4
  br label %205

68:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = call noundef ptr @_ZNKSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %69) #7
  %71 = getelementptr inbounds i8, ptr %70, i64 4
  %72 = load i32, ptr %8, align 4, !tbaa !9
  %73 = zext i32 %72 to i64
  %74 = mul i64 %73, 8
  %75 = getelementptr inbounds i8, ptr %71, i64 %74
  %76 = getelementptr inbounds i8, ptr %75, i64 4
  store ptr %76, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %77 = call i64 @ggml_tensor_overhead()
  %78 = load i32, ptr %8, align 4, !tbaa !9
  %79 = load i32, ptr %11, align 4, !tbaa !9
  %80 = add i32 %78, %79
  %81 = zext i32 %80 to i64
  %82 = mul i64 %77, %81
  %83 = load i32, ptr %8, align 4, !tbaa !9
  %84 = zext i32 %83 to i64
  %85 = call i64 @ggml_graph_overhead_custom(i64 noundef %84, i1 noundef zeroext false)
  %86 = add i64 %82, %85
  store i64 %86, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #7
  %87 = getelementptr inbounds %struct.ggml_init_params, ptr %14, i32 0, i32 0
  %88 = load i64, ptr %13, align 8, !tbaa !11
  store i64 %88, ptr %87, align 8, !tbaa !13
  %89 = getelementptr inbounds %struct.ggml_init_params, ptr %14, i32 0, i32 1
  store ptr null, ptr %89, align 8, !tbaa !16
  %90 = getelementptr inbounds %struct.ggml_init_params, ptr %14, i32 0, i32 2
  store i8 1, ptr %90, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %14, i64 24, i1 false), !tbaa.struct !18
  %91 = call ptr @ggml_init(ptr noundef byval(%struct.ggml_init_params) align 8 %16)
  call void @_ZNSt10unique_ptrI12ggml_context20ggml_context_deleterEC2IS1_vEEPS0_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef %91) #7
  %92 = call noundef zeroext i1 @_ZStneI12ggml_context20ggml_context_deleterEbRKSt10unique_ptrIT_T0_EDn(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr null) #7
  br i1 %92, label %99, label %93

93:                                               ; preds = %68
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.3, i32 noundef 1340, ptr noundef @.str.4, ptr noundef @.str.5) #8
          to label %94 unwind label %95

94:                                               ; preds = %93
  unreachable

95:                                               ; preds = %93
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %17, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %18, align 4
  br label %204

99:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %100 = call noundef ptr @_ZNKSt10unique_ptrI12ggml_context20ggml_context_deleterE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  store ptr %100, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %101 = load ptr, ptr %19, align 8, !tbaa !5
  %102 = load i32, ptr %8, align 4, !tbaa !9
  %103 = zext i32 %102 to i64
  %104 = invoke ptr @ggml_new_graph_custom(ptr noundef %101, i64 noundef %103, i1 noundef zeroext false)
          to label %105 unwind label %114

105:                                              ; preds = %99
  store ptr %104, ptr %20, align 8, !tbaa !5
  %106 = load i32, ptr %8, align 4, !tbaa !9
  %107 = load ptr, ptr %20, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.ggml_cgraph, ptr %107, i32 0, i32 1
  store i32 %106, ptr %108, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 56, ptr %21) #7
  call void @_ZNSt13unordered_mapImPK10rpc_tensorSt4hashImESt8equal_toImESaISt4pairIKmS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %21) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %109

109:                                              ; preds = %130, %105
  %110 = load i32, ptr %22, align 4, !tbaa !9
  %111 = load i32, ptr %11, align 4, !tbaa !9
  %112 = icmp ult i32 %110, %111
  br i1 %112, label %118, label %113

113:                                              ; preds = %109
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %137

114:                                              ; preds = %99
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %17, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %18, align 4
  br label %203

118:                                              ; preds = %109
  %119 = load ptr, ptr %12, align 8, !tbaa !5
  %120 = load i32, ptr %22, align 4, !tbaa !9
  %121 = zext i32 %120 to i64
  %122 = getelementptr inbounds %struct.rpc_tensor, ptr %119, i64 %121
  %123 = load ptr, ptr %12, align 8, !tbaa !5
  %124 = load i32, ptr %22, align 4, !tbaa !9
  %125 = zext i32 %124 to i64
  %126 = getelementptr inbounds %struct.rpc_tensor, ptr %123, i64 %125
  %127 = getelementptr inbounds %struct.rpc_tensor, ptr %126, i32 0, i32 0
  %128 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapImPK10rpc_tensorSt4hashImESt8equal_toImESaISt4pairIKmS2_EEEixERS8_(ptr noundef nonnull align 8 dereferenceable(56) %21, ptr noundef nonnull align 8 dereferenceable(8) %127)
          to label %129 unwind label %133

129:                                              ; preds = %118
  store ptr %122, ptr %128, align 8, !tbaa !5
  br label %130

130:                                              ; preds = %129
  %131 = load i32, ptr %22, align 4, !tbaa !9
  %132 = add i32 %131, 1
  store i32 %132, ptr %22, align 4, !tbaa !9
  br label %109, !llvm.loop !24

133:                                              ; preds = %118
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %17, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %202

137:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 56, ptr %23) #7
  call void @_ZNSt13unordered_mapImP11ggml_tensorSt4hashImESt8equal_toImESaISt4pairIKmS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %23) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %138

138:                                              ; preds = %181, %137
  %139 = load i32, ptr %24, align 4, !tbaa !9
  %140 = load i32, ptr %8, align 4, !tbaa !9
  %141 = icmp ult i32 %139, %140
  br i1 %141, label %143, label %142

142:                                              ; preds = %138
  store i32 5, ptr %9, align 4
  br label %184

143:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %144 = load ptr, ptr %10, align 8, !tbaa !5
  %145 = load i32, ptr %24, align 4, !tbaa !9
  %146 = zext i32 %145 to i64
  %147 = getelementptr inbounds i64, ptr %144, i64 %146
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %147, i64 8, i1 false)
  %148 = load i64, ptr %25, align 8, !tbaa !11
  %149 = load ptr, ptr %19, align 8, !tbaa !5
  %150 = invoke noundef ptr @_ZN10rpc_server11create_nodeEmP12ggml_contextRKSt13unordered_mapImPK10rpc_tensorSt4hashImESt8equal_toImESaISt4pairIKmS5_EEERS2_ImP11ggml_tensorS7_S9_SaISA_ISB_SI_EEE(ptr noundef nonnull align 8 dereferenceable(72) %27, i64 noundef %148, ptr noundef %149, ptr noundef nonnull align 8 dereferenceable(56) %21, ptr noundef nonnull align 8 dereferenceable(56) %23)
          to label %151 unwind label %173

151:                                              ; preds = %143
  %152 = load ptr, ptr %20, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.ggml_cgraph, ptr %152, i32 0, i32 3
  %154 = load ptr, ptr %153, align 8, !tbaa !26
  %155 = load i32, ptr %24, align 4, !tbaa !9
  %156 = zext i32 %155 to i64
  %157 = getelementptr inbounds ptr, ptr %154, i64 %156
  store ptr %150, ptr %157, align 8, !tbaa !5
  %158 = load ptr, ptr %20, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.ggml_cgraph, ptr %158, i32 0, i32 3
  %160 = load ptr, ptr %159, align 8, !tbaa !26
  %161 = load i32, ptr %24, align 4, !tbaa !9
  %162 = zext i32 %161 to i64
  %163 = getelementptr inbounds ptr, ptr %160, i64 %162
  %164 = load ptr, ptr %163, align 8, !tbaa !5
  %165 = icmp eq ptr %164, null
  br i1 %165, label %166, label %177

166:                                              ; preds = %151
  %167 = load i64, ptr %25, align 8, !tbaa !11
  %168 = icmp ne i64 %167, 0
  br i1 %168, label %169, label %177

169:                                              ; preds = %166
  %170 = load i32, ptr %24, align 4, !tbaa !9
  %171 = load i64, ptr %25, align 8, !tbaa !11
  invoke void (i32, ptr, ...) @ggml_log_internal(i32 noundef 4, ptr noundef @.str.25, ptr noundef @__func__._ZN10rpc_server13graph_computeERKSt6vectorIhSaIhEER25rpc_msg_graph_compute_rsp, i32 noundef %170, i64 noundef %171)
          to label %172 unwind label %173

172:                                              ; preds = %169
  store i1 false, ptr %4, align 1
  store i32 1, ptr %9, align 4
  br label %178

173:                                              ; preds = %169, %143
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %17, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %201

177:                                              ; preds = %166, %151
  store i32 0, ptr %9, align 4
  br label %178

178:                                              ; preds = %177, %172
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  %179 = load i32, ptr %9, align 4
  switch i32 %179, label %184 [
    i32 0, label %180
  ]

180:                                              ; preds = %178
  br label %181

181:                                              ; preds = %180
  %182 = load i32, ptr %24, align 4, !tbaa !9
  %183 = add i32 %182, 1
  store i32 %183, ptr %24, align 4, !tbaa !9
  br label %138, !llvm.loop !27

184:                                              ; preds = %178, %142
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  %185 = load i32, ptr %9, align 4
  switch i32 %185, label %200 [
    i32 5, label %186
  ]

186:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %187 = getelementptr inbounds %class.rpc_server, ptr %27, i32 0, i32 0
  %188 = load ptr, ptr %187, align 8, !tbaa !28
  %189 = load ptr, ptr %20, align 8, !tbaa !5
  %190 = invoke i32 @ggml_backend_graph_compute(ptr noundef %188, ptr noundef %189)
          to label %191 unwind label %196

191:                                              ; preds = %186
  store i32 %190, ptr %26, align 4, !tbaa !35
  %192 = load i32, ptr %26, align 4, !tbaa !35
  %193 = trunc i32 %192 to i8
  %194 = load ptr, ptr %7, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.rpc_msg_graph_compute_rsp, ptr %194, i32 0, i32 0
  store i8 %193, ptr %195, align 1, !tbaa !37
  store i1 true, ptr %4, align 1
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %200

196:                                              ; preds = %186
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %17, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %201

200:                                              ; preds = %191, %184
  call void @_ZNSt13unordered_mapImP11ggml_tensorSt4hashImESt8equal_toImESaISt4pairIKmS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %23) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #7
  call void @_ZNSt13unordered_mapImPK10rpc_tensorSt4hashImESt8equal_toImESaISt4pairIKmS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %21) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @_ZNSt10unique_ptrI12ggml_context20ggml_context_deleterED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %205

201:                                              ; preds = %196, %173
  call void @_ZNSt13unordered_mapImP11ggml_tensorSt4hashImESt8equal_toImESaISt4pairIKmS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %23) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #7
  br label %202

202:                                              ; preds = %201, %133
  call void @_ZNSt13unordered_mapImPK10rpc_tensorSt4hashImESt8equal_toImESaISt4pairIKmS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %21) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %21) #7
  br label %203

203:                                              ; preds = %202, %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %204

204:                                              ; preds = %203, %95
  call void @_ZNSt10unique_ptrI12ggml_context20ggml_context_deleterED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %209

205:                                              ; preds = %200, %67
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %206

206:                                              ; preds = %205, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %207

207:                                              ; preds = %206, %31
  %208 = load i1, ptr %4, align 1
  ret i1 %208

209:                                              ; preds = %204
  %210 = load ptr, ptr %17, align 8
  %211 = load i32, ptr %18, align 4
  %212 = insertvalue { ptr, i32 } poison, ptr %210, 0
  %213 = insertvalue { ptr, i32 } %212, i32 %211, 1
  resume { ptr, i32 } %213
}

declare i64 @ggml_graph_overhead_custom(i64 noundef, i1 noundef zeroext) #2

declare ptr @ggml_new_graph_custom(ptr noundef, i64 noundef, i1 noundef zeroext) #2

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

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

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

declare i32 @ggml_backend_graph_compute(ptr noundef, ptr noundef) #2

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

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

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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"_ZTS16ggml_init_params", !12, i64 0, !6, i64 8, !15, i64 16}
!15 = !{!"bool", !7, i64 0}
!16 = !{!14, !6, i64 8}
!17 = !{!14, !15, i64 16}
!18 = !{i64 0, i64 8, !11, i64 8, i64 8, !5, i64 16, i64 1, !19}
!19 = !{!15, !15, i64 0}
!20 = !{!21, !10, i64 4}
!21 = !{!"_ZTS11ggml_cgraph", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !22, i64 48, !23, i64 72}
!22 = !{!"_ZTS13ggml_hash_set", !12, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTS22ggml_cgraph_eval_order", !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!21, !6, i64 16}
!27 = distinct !{!27, !25}
!28 = !{!29, !6, i64 0}
!29 = !{!"_ZTS10rpc_server", !6, i64 0, !6, i64 8, !30, i64 16}
!30 = !{!"_ZTSSt13unordered_setIP19ggml_backend_bufferSt4hashIS1_ESt8equal_toIS1_ESaIS1_EE", !31, i64 0}
!31 = !{!"_ZTSSt10_HashtableIP19ggml_backend_bufferS1_SaIS1_ENSt8__detail9_IdentityESt8equal_toIS1_ESt4hashIS1_ENS3_18_Mod_range_hashingENS3_20_Default_ranged_hashENS3_20_Prime_rehash_policyENS3_17_Hashtable_traitsILb0ELb1ELb1EEEE", !6, i64 0, !12, i64 8, !32, i64 16, !12, i64 24, !33, i64 32, !6, i64 48}
!32 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!33 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !34, i64 0, !12, i64 8}
!34 = !{!"float", !7, i64 0}
!35 = !{!36, !36, i64 0}
!36 = !{!"_ZTS11ggml_status", !7, i64 0}
!37 = !{!38, !7, i64 0}
!38 = !{!"_ZTS25rpc_msg_graph_compute_rsp", !7, i64 0}


; 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 }
%"class.std::unordered_map.65" = type { %"class.std::_Hashtable.66" }
%"class.std::_Hashtable.66" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::unordered_map.44" = type { %"class.std::_Hashtable.45" }
%"class.std::_Hashtable.45" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%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] }>

@.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.25 = external hidden unnamed_addr constant [46 x i8], align 1
@__func__._ZN10rpc_server13graph_computeERKSt6vectorIhSaIhEER25rpc_msg_graph_compute_rsp = external hidden unnamed_addr constant [14 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

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 nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN10rpc_server13graph_computeERKSt6vectorIhSaIhEER25rpc_msg_graph_compute_rsp(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr nocapture noundef nonnull writeonly align 1 dereferenceable(1) %2) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::unique_ptr", align 8
  %5 = alloca %struct.ggml_init_params, align 8
  %6 = alloca %"class.std::unordered_map.65", align 8
  %7 = alloca %"class.std::unordered_map.44", align 8
  %8 = tail call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %9 = icmp ult i64 %8, 4
  br i1 %9, label %81, label %10

10:                                               ; preds = %3
  %11 = tail call noundef ptr @_ZNKSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %.0.copyload33 = load i32, ptr %11, align 1
  %12 = tail call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %13 = zext i32 %.0.copyload33 to i64
  %14 = shl nuw nsw i64 %13, 3
  %15 = add nuw nsw i64 %14, 8
  %16 = icmp ult i64 %12, %15
  br i1 %16, label %81, label %17

17:                                               ; preds = %10
  %18 = tail call noundef ptr @_ZNKSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %19 = getelementptr inbounds i8, ptr %18, i64 4
  %20 = tail call noundef ptr @_ZNKSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %21 = getelementptr inbounds i8, ptr %20, i64 4
  %22 = getelementptr inbounds i8, ptr %21, i64 %14
  %.0.copyload26 = load i32, ptr %22, align 1
  %23 = tail call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %24 = zext i32 %.0.copyload26 to i64
  %25 = mul nuw nsw i64 %24, 296
  %26 = add nuw nsw i64 %25, %15
  %27 = icmp ult i64 %23, %26
  br i1 %27, label %81, label %28

28:                                               ; preds = %17
  %29 = tail call noundef ptr @_ZNKSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %30 = getelementptr inbounds i8, ptr %29, i64 4
  %31 = getelementptr inbounds i8, ptr %30, i64 %14
  %32 = getelementptr inbounds i8, ptr %31, i64 4
  %33 = tail call i64 @ggml_tensor_overhead()
  %34 = add i32 %.0.copyload26, %.0.copyload33
  %35 = zext i32 %34 to i64
  %36 = mul i64 %33, %35
  %37 = tail call i64 @ggml_graph_overhead_custom(i64 noundef %13, i1 noundef zeroext false)
  %38 = add i64 %36, %37
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  store i64 %38, ptr %5, align 8, !tbaa !5
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  store ptr null, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !9
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 16
  store i8 1, ptr %.sroa.6.0..sroa_idx, align 8, !tbaa !11
  %39 = tail call ptr @ggml_init(ptr noundef nonnull byval(%struct.ggml_init_params) align 8 %5)
  call void @_ZNSt10unique_ptrI12ggml_context20ggml_context_deleterEC2IS1_vEEPS0_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef %39) #6
  %40 = call noundef zeroext i1 @_ZStneI12ggml_context20ggml_context_deleterEbRKSt10unique_ptrIT_T0_EDn(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr null) #6
  br i1 %40, label %45, label %41

41:                                               ; preds = %28
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.3, i32 noundef 1340, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5) #7
          to label %42 unwind label %43

42:                                               ; preds = %41
  unreachable

43:                                               ; preds = %41
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %80

45:                                               ; preds = %28
  %46 = call noundef ptr @_ZNKSt10unique_ptrI12ggml_context20ggml_context_deleterE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %47 = invoke ptr @ggml_new_graph_custom(ptr noundef %46, i64 noundef %13, i1 noundef zeroext false)
          to label %48 unwind label %51

48:                                               ; preds = %45
  %49 = getelementptr inbounds i8, ptr %47, i64 4
  store i32 %.0.copyload33, ptr %49, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %6) #6
  call void @_ZNSt13unordered_mapImPK10rpc_tensorSt4hashImESt8equal_toImESaISt4pairIKmS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #6
  %.not86 = icmp eq i32 %.0.copyload26, 0
  br i1 %.not86, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %55, %48
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %7) #6
  call void @_ZNSt13unordered_mapImP11ggml_tensorSt4hashImESt8equal_toImESaISt4pairIKmS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #6
  %.not81 = icmp eq i32 %.0.copyload33, 0
  br i1 %.not81, label %.critedge73, label %.lr.ph85

.lr.ph85:                                         ; preds = %._crit_edge
  %50 = getelementptr inbounds i8, ptr %47, i64 16
  br label %58

51:                                               ; preds = %45
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %80

.lr.ph:                                           ; preds = %48, %55
  %indvars.iv = phi i64 [ %indvars.iv.next, %55 ], [ 0, %48 ]
  %53 = getelementptr inbounds %struct.rpc_tensor, ptr %32, i64 %indvars.iv
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapImPK10rpc_tensorSt4hashImESt8equal_toImESaISt4pairIKmS2_EEEixERS8_(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 8 dereferenceable(8) %53)
          to label %55 unwind label %56

55:                                               ; preds = %.lr.ph
  store ptr %53, ptr %54, align 8, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %24
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !18

56:                                               ; preds = %.lr.ph
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %79

58:                                               ; preds = %.lr.ph85, %.critedge
  %indvars.iv95 = phi i64 [ 0, %.lr.ph85 ], [ %indvars.iv.next96, %.critedge ]
  %.not83 = phi i1 [ false, %.lr.ph85 ], [ %.not, %.critedge ]
  %59 = getelementptr inbounds i64, ptr %19, i64 %indvars.iv95
  %.0.copyload = load i64, ptr %59, align 8
  %60 = invoke noundef ptr @_ZN10rpc_server11create_nodeEmP12ggml_contextRKSt13unordered_mapImPK10rpc_tensorSt4hashImESt8equal_toImESaISt4pairIKmS5_EEERS2_ImP11ggml_tensorS7_S9_SaISA_ISB_SI_EEE(ptr noundef nonnull align 8 dereferenceable(72) %0, i64 noundef %.0.copyload, ptr noundef %46, ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 8 dereferenceable(56) %7)
          to label %61 unwind label %.loopexit

61:                                               ; preds = %58
  %62 = load ptr, ptr %50, align 8, !tbaa !20
  %63 = getelementptr inbounds ptr, ptr %62, i64 %indvars.iv95
  store ptr %60, ptr %63, align 8, !tbaa !9
  %64 = load ptr, ptr %50, align 8, !tbaa !20
  %65 = getelementptr inbounds ptr, ptr %64, i64 %indvars.iv95
  %66 = load ptr, ptr %65, align 8, !tbaa !9
  %67 = icmp ne ptr %66, null
  %68 = icmp eq i64 %.0.copyload, 0
  %or.cond.not = or i1 %68, %67
  br i1 %or.cond.not, label %.critedge, label %69

69:                                               ; preds = %61
  %70 = trunc nuw i64 %indvars.iv95 to i32
  invoke void (i32, ptr, ...) @ggml_log_internal(i32 noundef 4, ptr noundef nonnull @.str.25, ptr noundef nonnull @__func__._ZN10rpc_server13graph_computeERKSt6vectorIhSaIhEER25rpc_msg_graph_compute_rsp, i32 noundef %70, i64 noundef %.0.copyload)
          to label %77 unwind label %.loopexit.split-lp

.loopexit:                                        ; preds = %58
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %78

.loopexit.split-lp:                               ; preds = %69
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %78

.critedge:                                        ; preds = %61
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %.not = icmp uge i64 %indvars.iv.next96, %13
  %exitcond98 = icmp eq i64 %indvars.iv.next96, %13
  br i1 %exitcond98, label %.critedge73, label %58, !llvm.loop !21

.critedge73:                                      ; preds = %.critedge, %._crit_edge
  %.not.lcssa = phi i1 [ true, %._crit_edge ], [ %.not, %.critedge ]
  %71 = load ptr, ptr %0, align 8, !tbaa !22
  %72 = invoke i32 @ggml_backend_graph_compute(ptr noundef %71, ptr noundef %47)
          to label %73 unwind label %75

73:                                               ; preds = %.critedge73
  %74 = trunc i32 %72 to i8
  store i8 %74, ptr %2, align 1, !tbaa !29
  br label %77

75:                                               ; preds = %.critedge73
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %78

77:                                               ; preds = %69, %73
  %.not76 = phi i1 [ %.not83, %69 ], [ %.not.lcssa, %73 ]
  call void @_ZNSt13unordered_mapImP11ggml_tensorSt4hashImESt8equal_toImESaISt4pairIKmS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #6
  call void @_ZNSt13unordered_mapImPK10rpc_tensorSt4hashImESt8equal_toImESaISt4pairIKmS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #6
  call void @_ZNSt10unique_ptrI12ggml_context20ggml_context_deleterED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %81

78:                                               ; preds = %.loopexit, %.loopexit.split-lp, %75
  %.pn = phi { ptr, i32 } [ %76, %75 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt13unordered_mapImP11ggml_tensorSt4hashImESt8equal_toImESaISt4pairIKmS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #6
  br label %79

79:                                               ; preds = %78, %56
  %.pn68 = phi { ptr, i32 } [ %57, %56 ], [ %.pn, %78 ]
  call void @_ZNSt13unordered_mapImPK10rpc_tensorSt4hashImESt8equal_toImESaISt4pairIKmS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #6
  br label %80

80:                                               ; preds = %51, %79, %43
  %.pn68.pn.pn = phi { ptr, i32 } [ %44, %43 ], [ %.pn68, %79 ], [ %52, %51 ]
  call void @_ZNSt10unique_ptrI12ggml_context20ggml_context_deleterED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn68.pn.pn

81:                                               ; preds = %10, %17, %77, %3
  %.6 = phi i1 [ false, %3 ], [ false, %10 ], [ %.not76, %77 ], [ false, %17 ]
  ret i1 %.6
}

declare i64 @ggml_graph_overhead_custom(i64 noundef, i1 noundef zeroext) local_unnamed_addr #1

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

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

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

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

declare i32 @ggml_backend_graph_compute(ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapImPK10rpc_tensorSt4hashImESt8equal_toImESaISt4pairIKmS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 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 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, !15, i64 4}
!14 = !{!"_ZTS11ggml_cgraph", !15, i64 0, !15, i64 4, !15, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !16, i64 48, !17, i64 72}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTS13ggml_hash_set", !6, i64 0, !10, i64 8, !10, i64 16}
!17 = !{!"_ZTS22ggml_cgraph_eval_order", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!14, !10, i64 16}
!21 = distinct !{!21, !19}
!22 = !{!23, !10, i64 0}
!23 = !{!"_ZTS10rpc_server", !10, i64 0, !10, i64 8, !24, i64 16}
!24 = !{!"_ZTSSt13unordered_setIP19ggml_backend_bufferSt4hashIS1_ESt8equal_toIS1_ESaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSSt10_HashtableIP19ggml_backend_bufferS1_SaIS1_ENSt8__detail9_IdentityESt8equal_toIS1_ESt4hashIS1_ENS3_18_Mod_range_hashingENS3_20_Default_ranged_hashENS3_20_Prime_rehash_policyENS3_17_Hashtable_traitsILb0ELb1ELb1EEEE", !10, i64 0, !6, i64 8, !26, i64 16, !6, i64 24, !27, i64 32, !10, i64 48}
!26 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !10, i64 0}
!27 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !28, i64 0, !6, i64 8}
!28 = !{!"float", !7, i64 0}
!29 = !{!30, !7, i64 0}
!30 = !{!"_ZTS25rpc_msg_graph_compute_rsp", !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass