; LLVM IR from ggml-org/ggml :: tests/test-conv1d.ll (Z10load_modelR10test_modelb)

; 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<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%struct.ggml_init_params = type { i64, ptr, i8 }
%struct.ggml_tallocr = type { ptr, ptr, i64, i64 }
%struct.test_model = type { ptr, ptr, ptr, ptr, ptr }
%struct.ggml_tensor = type { i32, ptr, [4 x i64], [4 x i64], i32, [16 x i32], i32, [10 x ptr], ptr, i64, ptr, [64 x i8], ptr, [8 x i8] }

@.str = external hidden unnamed_addr constant [36 x i8], align 1
@__func__._Z10load_modelR10test_modelb = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [36 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z10load_modelR10test_modelb(ptr noundef nonnull align 8 dereferenceable(40) %0, i1 noundef zeroext %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::vector.0", align 8
  %16 = alloca %"class.std::allocator.2", align 1
  %17 = alloca %"class.std::vector", align 8
  %18 = alloca %"class.std::allocator", align 1
  %19 = alloca i32, align 4
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca %struct.ggml_init_params, align 8
  %23 = alloca %struct.ggml_init_params, align 8
  %24 = alloca %struct.ggml_tallocr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %25 = zext i1 %1 to i8
  store i8 %25, ptr %4, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 3, ptr %5, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 10, ptr %6, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 10, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 8, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #5
  %26 = load i32, ptr %5, align 4, !tbaa !11
  %27 = load i32, ptr %6, align 4, !tbaa !11
  %28 = mul nsw i32 %26, %27
  %29 = load i32, ptr %7, align 4, !tbaa !11
  %30 = mul nsw i32 %28, %29
  %31 = sext i32 %30 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #5
  call void @_ZNSaIfEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  invoke void @_ZNSt6vectorIfSaIfEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %31, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %32 unwind label %42

32:                                               ; preds = %2
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !11
  br label %33

33:                                               ; preds = %50, %32
  %34 = load i32, ptr %14, align 4, !tbaa !11
  %35 = load i32, ptr %5, align 4, !tbaa !11
  %36 = load i32, ptr %6, align 4, !tbaa !11
  %37 = mul nsw i32 %35, %36
  %38 = load i32, ptr %7, align 4, !tbaa !11
  %39 = mul nsw i32 %37, %38
  %40 = icmp slt i32 %34, %39
  br i1 %40, label %46, label %41

41:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %53

42:                                               ; preds = %2
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %12, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %13, align 4
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  br label %285

46:                                               ; preds = %33
  %47 = load i32, ptr %14, align 4, !tbaa !11
  %48 = sext i32 %47 to i64
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %48) #5
  store float 4.500000e+00, ptr %49, align 4, !tbaa !13
  br label %50

50:                                               ; preds = %46
  %51 = load i32, ptr %14, align 4, !tbaa !11
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %14, align 4, !tbaa !11
  br label %33, !llvm.loop !15

53:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #5
  %54 = load i32, ptr %5, align 4, !tbaa !11
  %55 = load i32, ptr %6, align 4, !tbaa !11
  %56 = mul nsw i32 %54, %55
  %57 = load i32, ptr %7, align 4, !tbaa !11
  %58 = mul nsw i32 %56, %57
  %59 = sext i32 %58 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #5
  call void @_ZNSaItEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  invoke void @_ZNSt6vectorItSaItEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %59, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %60 unwind label %86

60:                                               ; preds = %53
  call void @_ZNSt15__new_allocatorItED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  %61 = call noundef ptr @_ZNSt6vectorIfSaIfEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %62 = call noundef ptr @_ZNSt6vectorItSaItEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  %63 = load i32, ptr %5, align 4, !tbaa !11
  %64 = load i32, ptr %6, align 4, !tbaa !11
  %65 = mul nsw i32 %63, %64
  %66 = load i32, ptr %7, align 4, !tbaa !11
  %67 = mul nsw i32 %65, %66
  %68 = sext i32 %67 to i64
  invoke void @ggml_fp32_to_fp16_row(ptr noundef %61, ptr noundef %62, i64 noundef %68)
          to label %69 unwind label %90

69:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #5
  %70 = load i32, ptr %8, align 4, !tbaa !11
  %71 = load i32, ptr %6, align 4, !tbaa !11
  %72 = mul nsw i32 %70, %71
  %73 = load i32, ptr %9, align 4, !tbaa !11
  %74 = mul nsw i32 %72, %73
  %75 = sext i32 %74 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  call void @_ZNSaIfEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  invoke void @_ZNSt6vectorIfSaIfEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %75, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %76 unwind label %94

76:                                               ; preds = %69
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !11
  br label %77

77:                                               ; preds = %102, %76
  %78 = load i32, ptr %19, align 4, !tbaa !11
  %79 = load i32, ptr %8, align 4, !tbaa !11
  %80 = load i32, ptr %6, align 4, !tbaa !11
  %81 = mul nsw i32 %79, %80
  %82 = load i32, ptr %9, align 4, !tbaa !11
  %83 = mul nsw i32 %81, %82
  %84 = icmp slt i32 %78, %83
  br i1 %84, label %98, label %85

85:                                               ; preds = %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %105

86:                                               ; preds = %53
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %12, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %13, align 4
  call void @_ZNSt15__new_allocatorItED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  br label %284

90:                                               ; preds = %60
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %12, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %13, align 4
  br label %283

94:                                               ; preds = %69
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %12, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %13, align 4
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  br label %282

98:                                               ; preds = %77
  %99 = load i32, ptr %19, align 4, !tbaa !11
  %100 = sext i32 %99 to i64
  %101 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %100) #5
  store float 2.500000e+00, ptr %101, align 4, !tbaa !13
  br label %102

102:                                              ; preds = %98
  %103 = load i32, ptr %19, align 4, !tbaa !11
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %19, align 4, !tbaa !11
  br label %77, !llvm.loop !17

105:                                              ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  store i64 0, ptr %20, align 8, !tbaa !18
  %106 = load i32, ptr %5, align 4, !tbaa !11
  %107 = load i32, ptr %6, align 4, !tbaa !11
  %108 = mul nsw i32 %106, %107
  %109 = load i32, ptr %7, align 4, !tbaa !11
  %110 = mul nsw i32 %108, %109
  %111 = sext i32 %110 to i64
  %112 = invoke i64 @ggml_type_size(i32 noundef 1)
          to label %113 unwind label %157

113:                                              ; preds = %105
  %114 = mul i64 %111, %112
  %115 = load i64, ptr %20, align 8, !tbaa !18
  %116 = add i64 %115, %114
  store i64 %116, ptr %20, align 8, !tbaa !18
  %117 = load i32, ptr %8, align 4, !tbaa !11
  %118 = load i32, ptr %6, align 4, !tbaa !11
  %119 = mul nsw i32 %117, %118
  %120 = load i32, ptr %9, align 4, !tbaa !11
  %121 = mul nsw i32 %119, %120
  %122 = sext i32 %121 to i64
  %123 = invoke i64 @ggml_type_size(i32 noundef 0)
          to label %124 unwind label %157

124:                                              ; preds = %113
  %125 = mul i64 %122, %123
  %126 = load i64, ptr %20, align 8, !tbaa !18
  %127 = add i64 %126, %125
  store i64 %127, ptr %20, align 8, !tbaa !18
  %128 = load i64, ptr %20, align 8, !tbaa !18
  %129 = add i64 %128, 1024
  store i64 %129, ptr %20, align 8, !tbaa !18
  %130 = invoke i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @__func__._Z10load_modelR10test_modelb, i32 noundef 336)
          to label %131 unwind label %157

131:                                              ; preds = %124
  %132 = load i64, ptr %20, align 8, !tbaa !18
  %133 = uitofp i64 %132 to float
  %134 = fdiv float %133, 1.024000e+03
  %135 = fdiv float %134, 1.024000e+03
  %136 = fpext float %135 to double
  %137 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef @__func__._Z10load_modelR10test_modelb, double noundef %136)
          to label %138 unwind label %157

138:                                              ; preds = %131
  invoke void @ggml_log_set(ptr noundef @_ZL25ggml_log_callback_default14ggml_log_levelPKcPv, ptr noundef null)
          to label %139 unwind label %157

139:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 2, ptr %21, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #5
  %140 = getelementptr inbounds %struct.ggml_init_params, ptr %22, i32 0, i32 0
  %141 = invoke i64 @ggml_tensor_overhead()
          to label %142 unwind label %161

142:                                              ; preds = %139
  %143 = load i32, ptr %21, align 4, !tbaa !11
  %144 = sext i32 %143 to i64
  %145 = mul i64 %141, %144
  store i64 %145, ptr %140, align 8, !tbaa !20
  %146 = getelementptr inbounds %struct.ggml_init_params, ptr %22, i32 0, i32 1
  store ptr null, ptr %146, align 8, !tbaa !22
  %147 = getelementptr inbounds %struct.ggml_init_params, ptr %22, i32 0, i32 2
  store i8 1, ptr %147, align 8, !tbaa !23
  %148 = load ptr, ptr %3, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.test_model, ptr %148, i32 0, i32 2
  %150 = load ptr, ptr %149, align 8, !tbaa !24
  %151 = icmp ne ptr %150, null
  br i1 %151, label %165, label %152

152:                                              ; preds = %142
  %153 = invoke ptr @ggml_backend_cpu_init()
          to label %154 unwind label %161

154:                                              ; preds = %152
  %155 = load ptr, ptr %3, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.test_model, ptr %155, i32 0, i32 2
  store ptr %153, ptr %156, align 8, !tbaa !24
  br label %165

157:                                              ; preds = %138, %131, %124, %113, %105
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %12, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %13, align 4
  br label %281

161:                                              ; preds = %188, %175, %171, %165, %152, %139
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %12, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %13, align 4
  br label %280

165:                                              ; preds = %154, %142
  %166 = load ptr, ptr %3, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.test_model, ptr %166, i32 0, i32 2
  %168 = load ptr, ptr %167, align 8, !tbaa !24
  %169 = load i64, ptr %20, align 8, !tbaa !18
  %170 = invoke ptr @ggml_backend_alloc_buffer(ptr noundef %168, i64 noundef %169)
          to label %171 unwind label %161

171:                                              ; preds = %165
  %172 = load ptr, ptr %3, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.test_model, ptr %172, i32 0, i32 3
  store ptr %170, ptr %173, align 8, !tbaa !26
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 8 %22, i64 24, i1 false), !tbaa.struct !27
  %174 = invoke ptr @ggml_init(ptr noundef byval(%struct.ggml_init_params) align 8 %23)
          to label %175 unwind label %161

175:                                              ; preds = %171
  %176 = load ptr, ptr %3, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.test_model, ptr %176, i32 0, i32 4
  store ptr %174, ptr %177, align 8, !tbaa !28
  %178 = load ptr, ptr %3, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.test_model, ptr %178, i32 0, i32 4
  %180 = load ptr, ptr %179, align 8, !tbaa !28
  %181 = load i32, ptr %5, align 4, !tbaa !11
  %182 = sext i32 %181 to i64
  %183 = load i32, ptr %6, align 4, !tbaa !11
  %184 = sext i32 %183 to i64
  %185 = load i32, ptr %7, align 4, !tbaa !11
  %186 = sext i32 %185 to i64
  %187 = invoke ptr @ggml_new_tensor_3d(ptr noundef %180, i32 noundef 1, i64 noundef %182, i64 noundef %184, i64 noundef %186)
          to label %188 unwind label %161

188:                                              ; preds = %175
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.test_model, ptr %189, i32 0, i32 0
  store ptr %187, ptr %190, align 8, !tbaa !29
  %191 = load ptr, ptr %3, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.test_model, ptr %191, i32 0, i32 4
  %193 = load ptr, ptr %192, align 8, !tbaa !28
  %194 = load i32, ptr %8, align 4, !tbaa !11
  %195 = sext i32 %194 to i64
  %196 = load i32, ptr %6, align 4, !tbaa !11
  %197 = sext i32 %196 to i64
  %198 = load i32, ptr %9, align 4, !tbaa !11
  %199 = sext i32 %198 to i64
  %200 = invoke ptr @ggml_new_tensor_3d(ptr noundef %193, i32 noundef 0, i64 noundef %195, i64 noundef %197, i64 noundef %199)
          to label %201 unwind label %161

201:                                              ; preds = %188
  %202 = load ptr, ptr %3, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.test_model, ptr %202, i32 0, i32 1
  store ptr %200, ptr %203, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #5
  %204 = load ptr, ptr %3, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.test_model, ptr %204, i32 0, i32 3
  %206 = load ptr, ptr %205, align 8, !tbaa !26
  invoke void @ggml_tallocr_new(ptr dead_on_unwind writable sret(%struct.ggml_tallocr) align 8 %24, ptr noundef %206)
          to label %207 unwind label %230

207:                                              ; preds = %201
  %208 = load ptr, ptr %3, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.test_model, ptr %208, i32 0, i32 0
  %210 = load ptr, ptr %209, align 8, !tbaa !29
  %211 = invoke i32 @ggml_tallocr_alloc(ptr noundef %24, ptr noundef %210)
          to label %212 unwind label %230

212:                                              ; preds = %207
  %213 = load ptr, ptr %3, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.test_model, ptr %213, i32 0, i32 2
  %215 = load ptr, ptr %214, align 8, !tbaa !24
  %216 = invoke zeroext i1 @ggml_backend_is_cpu(ptr noundef %215)
          to label %217 unwind label %230

217:                                              ; preds = %212
  br i1 %216, label %218, label %234

218:                                              ; preds = %217
  %219 = load ptr, ptr %3, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.test_model, ptr %219, i32 0, i32 0
  %221 = load ptr, ptr %220, align 8, !tbaa !29
  %222 = getelementptr inbounds %struct.ggml_tensor, ptr %221, i32 0, i32 10
  %223 = load ptr, ptr %222, align 8, !tbaa !31
  %224 = call noundef ptr @_ZNSt6vectorItSaItEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  %225 = load ptr, ptr %3, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.test_model, ptr %225, i32 0, i32 0
  %227 = load ptr, ptr %226, align 8, !tbaa !29
  %228 = invoke i64 @ggml_nbytes(ptr noundef %227)
          to label %229 unwind label %230

229:                                              ; preds = %218
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %223, ptr align 2 %224, i64 %228, i1 false)
  br label %245

230:                                              ; preds = %277, %268, %256, %250, %245, %243, %234, %218, %212, %207, %201
  %231 = landingpad { ptr, i32 }
          cleanup
  %232 = extractvalue { ptr, i32 } %231, 0
  store ptr %232, ptr %12, align 8
  %233 = extractvalue { ptr, i32 } %231, 1
  store i32 %233, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #5
  br label %280

234:                                              ; preds = %217
  %235 = load ptr, ptr %3, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.test_model, ptr %235, i32 0, i32 0
  %237 = load ptr, ptr %236, align 8, !tbaa !29
  %238 = call noundef ptr @_ZNSt6vectorItSaItEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  %239 = load ptr, ptr %3, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.test_model, ptr %239, i32 0, i32 0
  %241 = load ptr, ptr %240, align 8, !tbaa !29
  %242 = invoke i64 @ggml_nbytes(ptr noundef %241)
          to label %243 unwind label %230

243:                                              ; preds = %234
  invoke void @ggml_backend_tensor_set(ptr noundef %237, ptr noundef %238, i64 noundef 0, i64 noundef %242)
          to label %244 unwind label %230

244:                                              ; preds = %243
  br label %245

245:                                              ; preds = %244, %229
  %246 = load ptr, ptr %3, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.test_model, ptr %246, i32 0, i32 1
  %248 = load ptr, ptr %247, align 8, !tbaa !30
  %249 = invoke i32 @ggml_tallocr_alloc(ptr noundef %24, ptr noundef %248)
          to label %250 unwind label %230

250:                                              ; preds = %245
  %251 = load ptr, ptr %3, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.test_model, ptr %251, i32 0, i32 2
  %253 = load ptr, ptr %252, align 8, !tbaa !24
  %254 = invoke zeroext i1 @ggml_backend_is_cpu(ptr noundef %253)
          to label %255 unwind label %230

255:                                              ; preds = %250
  br i1 %254, label %256, label %268

256:                                              ; preds = %255
  %257 = load ptr, ptr %3, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.test_model, ptr %257, i32 0, i32 1
  %259 = load ptr, ptr %258, align 8, !tbaa !30
  %260 = getelementptr inbounds %struct.ggml_tensor, ptr %259, i32 0, i32 10
  %261 = load ptr, ptr %260, align 8, !tbaa !31
  %262 = call noundef ptr @_ZNSt6vectorIfSaIfEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  %263 = load ptr, ptr %3, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.test_model, ptr %263, i32 0, i32 1
  %265 = load ptr, ptr %264, align 8, !tbaa !30
  %266 = invoke i64 @ggml_nbytes(ptr noundef %265)
          to label %267 unwind label %230

267:                                              ; preds = %256
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %261, ptr align 4 %262, i64 %266, i1 false)
  br label %279

268:                                              ; preds = %255
  %269 = load ptr, ptr %3, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.test_model, ptr %269, i32 0, i32 1
  %271 = load ptr, ptr %270, align 8, !tbaa !30
  %272 = call noundef ptr @_ZNSt6vectorIfSaIfEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  %273 = load ptr, ptr %3, align 8, !tbaa !5
  %274 = getelementptr inbounds %struct.test_model, ptr %273, i32 0, i32 1
  %275 = load ptr, ptr %274, align 8, !tbaa !30
  %276 = invoke i64 @ggml_nbytes(ptr noundef %275)
          to label %277 unwind label %230

277:                                              ; preds = %268
  invoke void @ggml_backend_tensor_set(ptr noundef %271, ptr noundef %272, i64 noundef 0, i64 noundef %276)
          to label %278 unwind label %230

278:                                              ; preds = %277
  br label %279

279:                                              ; preds = %278, %267
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #5
  call void @_ZNSt6vectorItSaItEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #5
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret void

280:                                              ; preds = %230, %161
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %281

281:                                              ; preds = %280, %157
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  br label %282

282:                                              ; preds = %281, %94
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #5
  br label %283

283:                                              ; preds = %282, %90
  call void @_ZNSt6vectorItSaItEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  br label %284

284:                                              ; preds = %283, %86
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #5
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  br label %285

285:                                              ; preds = %284, %42
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %286

286:                                              ; preds = %285
  %287 = load ptr, ptr %12, align 8
  %288 = load i32, ptr %13, align 4
  %289 = insertvalue { ptr, i32 } poison, ptr %287, 0
  %290 = insertvalue { ptr, i32 } %289, i32 %288, 1
  resume { ptr, i32 } %290
}

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

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

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

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) #1

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

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

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

declare void @ggml_fp32_to_fp16_row(ptr noundef, ptr noundef, i64 noundef) #3

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

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

declare i64 @ggml_type_size(i32 noundef) #3

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

declare void @ggml_log_set(ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL25ggml_log_callback_default14ggml_log_levelPKcPv(i32 noundef, ptr noundef, ptr noundef) #0

declare i64 @ggml_tensor_overhead() #3

declare ptr @ggml_backend_cpu_init() #3

declare ptr @ggml_backend_alloc_buffer(ptr noundef, i64 noundef) #3

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

; 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) #4

declare ptr @ggml_new_tensor_3d(ptr noundef, i32 noundef, i64 noundef, i64 noundef, i64 noundef) #3

declare void @ggml_tallocr_new(ptr dead_on_unwind writable sret(%struct.ggml_tallocr) align 8, ptr noundef) #3

declare i32 @ggml_tallocr_alloc(ptr noundef, ptr noundef) #3

declare zeroext i1 @ggml_backend_is_cpu(ptr noundef) #3

declare i64 @ggml_nbytes(ptr noundef) #3

declare void @ggml_backend_tensor_set(ptr noundef, ptr noundef, i64 noundef, i64 noundef) #3

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!19, !19, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!21, !19, i64 0}
!21 = !{!"_ZTS16ggml_init_params", !19, i64 0, !6, i64 8, !10, i64 16}
!22 = !{!21, !6, i64 8}
!23 = !{!21, !10, i64 16}
!24 = !{!25, !6, i64 16}
!25 = !{!"_ZTS10test_model", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!26 = !{!25, !6, i64 24}
!27 = !{i64 0, i64 8, !18, i64 8, i64 8, !5, i64 16, i64 1, !9}
!28 = !{!25, !6, i64 32}
!29 = !{!25, !6, i64 0}
!30 = !{!25, !6, i64 8}
!31 = !{!32, !6, i64 248}
!32 = !{!"_ZTS11ggml_tensor", !33, i64 0, !6, i64 8, !7, i64 16, !7, i64 48, !34, i64 80, !7, i64 84, !12, i64 148, !7, i64 152, !6, i64 232, !19, i64 240, !6, i64 248, !7, i64 256, !6, i64 320, !7, i64 328}
!33 = !{!"_ZTS9ggml_type", !7, i64 0}
!34 = !{!"_ZTS7ggml_op", !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"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%struct.ggml_init_params = type { i64, ptr, i8 }
%struct.ggml_tallocr = type { ptr, ptr, i64, i64 }

@.str = external hidden unnamed_addr constant [36 x i8], align 1
@__func__._Z10load_modelR10test_modelb = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [36 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z10load_modelR10test_modelb(ptr nocapture noundef nonnull align 8 dereferenceable(40) %0, i1 noundef zeroext %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %"class.std::vector.0", align 8
  %6 = alloca %"class.std::allocator.2", align 1
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca %struct.ggml_init_params, align 8
  %10 = alloca %struct.ggml_tallocr, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  call void @_ZNSaIfEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  invoke void @_ZNSt6vectorIfSaIfEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 300, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %11 unwind label %13

11:                                               ; preds = %2
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  br label %15

12:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSaItEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt6vectorItSaItEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 300, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %17 unwind label %24

13:                                               ; preds = %2
  %14 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  br label %120

15:                                               ; preds = %11, %15
  %indvars.iv = phi i64 [ 0, %11 ], [ %indvars.iv.next, %15 ]
  %16 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #6
  store float 4.500000e+00, ptr %16, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 300
  br i1 %exitcond.not, label %12, label %15, !llvm.loop !9

17:                                               ; preds = %12
  call void @_ZNSt15__new_allocatorItED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  %18 = call noundef ptr @_ZNSt6vectorIfSaIfEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  %19 = call noundef ptr @_ZNSt6vectorItSaItEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  invoke void @ggml_fp32_to_fp16_row(ptr noundef %18, ptr noundef %19, i64 noundef 300)
          to label %20 unwind label %26

20:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #6
  call void @_ZNSaIfEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt6vectorIfSaIfEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 80, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %21 unwind label %28

21:                                               ; preds = %20
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  br label %30

22:                                               ; preds = %30
  %23 = invoke i64 @ggml_type_size(i32 noundef 1)
          to label %32 unwind label %54

24:                                               ; preds = %12
  %25 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorItED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  br label %119

26:                                               ; preds = %17
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %118

28:                                               ; preds = %20
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  br label %117

30:                                               ; preds = %21, %30
  %indvars.iv82 = phi i64 [ 0, %21 ], [ %indvars.iv.next83, %30 ]
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv82) #6
  store float 2.500000e+00, ptr %31, align 4, !tbaa !5
  %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1
  %exitcond85.not = icmp eq i64 %indvars.iv.next83, 80
  br i1 %exitcond85.not, label %22, label %30, !llvm.loop !11

32:                                               ; preds = %22
  %33 = invoke i64 @ggml_type_size(i32 noundef 0)
          to label %34 unwind label %54

34:                                               ; preds = %32
  %35 = mul i64 %23, 300
  %36 = mul i64 %33, 80
  %37 = add i64 %35, 1024
  %38 = add i64 %37, %36
  %39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull @__func__._Z10load_modelR10test_modelb, i32 noundef 336)
  %40 = uitofp i64 %38 to float
  %41 = fmul float %40, 0x3F50000000000000
  %42 = fmul float %41, 0x3F50000000000000
  %43 = fpext float %42 to double
  %44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @__func__._Z10load_modelR10test_modelb, double noundef %43)
  invoke void @ggml_log_set(ptr noundef nonnull @_ZL25ggml_log_callback_default14ggml_log_levelPKcPv, ptr noundef null)
          to label %45 unwind label %54

45:                                               ; preds = %34
  %46 = invoke i64 @ggml_tensor_overhead()
          to label %47 unwind label %56

47:                                               ; preds = %45
  %48 = shl i64 %46, 1
  %49 = getelementptr inbounds i8, ptr %0, i64 16
  %50 = load ptr, ptr %49, align 8, !tbaa !12
  %.not = icmp eq ptr %50, null
  br i1 %.not, label %51, label %58

51:                                               ; preds = %47
  %52 = invoke ptr @ggml_backend_cpu_init()
          to label %53 unwind label %56

53:                                               ; preds = %51
  store ptr %52, ptr %49, align 8, !tbaa !12
  br label %58

54:                                               ; preds = %34, %32, %22
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %116

56:                                               ; preds = %67, %64, %61, %58, %51, %45
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %116

58:                                               ; preds = %53, %47
  %59 = phi ptr [ %52, %53 ], [ %50, %47 ]
  %60 = invoke ptr @ggml_backend_alloc_buffer(ptr noundef %59, i64 noundef %38)
          to label %61 unwind label %56

61:                                               ; preds = %58
  %62 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %60, ptr %62, align 8, !tbaa !15
  store i64 %48, ptr %9, align 8, !tbaa !16
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  store ptr null, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !18
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 16
  store i8 1, ptr %.sroa.6.0..sroa_idx, align 8, !tbaa !19
  %63 = invoke ptr @ggml_init(ptr noundef nonnull byval(%struct.ggml_init_params) align 8 %9)
          to label %64 unwind label %56

64:                                               ; preds = %61
  %65 = getelementptr inbounds i8, ptr %0, i64 32
  store ptr %63, ptr %65, align 8, !tbaa !21
  %66 = invoke ptr @ggml_new_tensor_3d(ptr noundef %63, i32 noundef 1, i64 noundef 3, i64 noundef 10, i64 noundef 10)
          to label %67 unwind label %56

67:                                               ; preds = %64
  store ptr %66, ptr %0, align 8, !tbaa !22
  %68 = load ptr, ptr %65, align 8, !tbaa !21
  %69 = invoke ptr @ggml_new_tensor_3d(ptr noundef %68, i32 noundef 0, i64 noundef 8, i64 noundef 10, i64 noundef 1)
          to label %70 unwind label %56

70:                                               ; preds = %67
  %71 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %69, ptr %71, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #6
  %72 = load ptr, ptr %62, align 8, !tbaa !15
  invoke void @ggml_tallocr_new(ptr dead_on_unwind nonnull writable sret(%struct.ggml_tallocr) align 8 %10, ptr noundef %72)
          to label %73 unwind label %88

73:                                               ; preds = %70
  %74 = load ptr, ptr %0, align 8, !tbaa !22
  %75 = invoke i32 @ggml_tallocr_alloc(ptr noundef nonnull %10, ptr noundef %74)
          to label %76 unwind label %88

76:                                               ; preds = %73
  %77 = load ptr, ptr %49, align 8, !tbaa !12
  %78 = invoke zeroext i1 @ggml_backend_is_cpu(ptr noundef %77)
          to label %79 unwind label %88

79:                                               ; preds = %76
  %80 = load ptr, ptr %0, align 8, !tbaa !22
  br i1 %78, label %81, label %90

81:                                               ; preds = %79
  %82 = getelementptr inbounds i8, ptr %80, i64 248
  %83 = load ptr, ptr %82, align 8, !tbaa !24
  %84 = call noundef ptr @_ZNSt6vectorItSaItEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %85 = load ptr, ptr %0, align 8, !tbaa !22
  %86 = invoke i64 @ggml_nbytes(ptr noundef %85)
          to label %87 unwind label %88

87:                                               ; preds = %81
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %83, ptr align 2 %84, i64 %86, i1 false)
  br label %95

88:                                               ; preds = %114, %110, %103, %98, %95, %94, %90, %81, %76, %73, %70
  %89 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  br label %116

90:                                               ; preds = %79
  %91 = call noundef ptr @_ZNSt6vectorItSaItEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %92 = load ptr, ptr %0, align 8, !tbaa !22
  %93 = invoke i64 @ggml_nbytes(ptr noundef %92)
          to label %94 unwind label %88

94:                                               ; preds = %90
  invoke void @ggml_backend_tensor_set(ptr noundef %80, ptr noundef %91, i64 noundef 0, i64 noundef %93)
          to label %95 unwind label %88

95:                                               ; preds = %94, %87
  %96 = load ptr, ptr %71, align 8, !tbaa !23
  %97 = invoke i32 @ggml_tallocr_alloc(ptr noundef nonnull %10, ptr noundef %96)
          to label %98 unwind label %88

98:                                               ; preds = %95
  %99 = load ptr, ptr %49, align 8, !tbaa !12
  %100 = invoke zeroext i1 @ggml_backend_is_cpu(ptr noundef %99)
          to label %101 unwind label %88

101:                                              ; preds = %98
  %102 = load ptr, ptr %71, align 8, !tbaa !23
  br i1 %100, label %103, label %110

103:                                              ; preds = %101
  %104 = getelementptr inbounds i8, ptr %102, i64 248
  %105 = load ptr, ptr %104, align 8, !tbaa !24
  %106 = call noundef ptr @_ZNSt6vectorIfSaIfEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %107 = load ptr, ptr %71, align 8, !tbaa !23
  %108 = invoke i64 @ggml_nbytes(ptr noundef %107)
          to label %109 unwind label %88

109:                                              ; preds = %103
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %105, ptr align 4 %106, i64 %108, i1 false)
  br label %115

110:                                              ; preds = %101
  %111 = call noundef ptr @_ZNSt6vectorIfSaIfEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %112 = load ptr, ptr %71, align 8, !tbaa !23
  %113 = invoke i64 @ggml_nbytes(ptr noundef %112)
          to label %114 unwind label %88

114:                                              ; preds = %110
  invoke void @ggml_backend_tensor_set(ptr noundef %102, ptr noundef %111, i64 noundef 0, i64 noundef %113)
          to label %115 unwind label %88

115:                                              ; preds = %114, %109
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @_ZNSt6vectorItSaItEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  ret void

116:                                              ; preds = %56, %88, %54
  %.pn.pn = phi { ptr, i32 } [ %55, %54 ], [ %89, %88 ], [ %57, %56 ]
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  br label %117

117:                                              ; preds = %116, %28
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %116 ], [ %29, %28 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br label %118

118:                                              ; preds = %117, %26
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %117 ], [ %27, %26 ]
  call void @_ZNSt6vectorItSaItEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  br label %119

119:                                              ; preds = %118, %24
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %118 ], [ %25, %24 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  br label %120

120:                                              ; preds = %119, %13
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %119 ], [ %14, %13 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn
}

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

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

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

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) #1

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

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

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

declare void @ggml_fp32_to_fp16_row(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #3

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

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

declare i64 @ggml_type_size(i32 noundef) local_unnamed_addr #3

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

declare void @ggml_log_set(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL25ggml_log_callback_default14ggml_log_levelPKcPv(i32 noundef, ptr noundef, ptr noundef) #0

declare i64 @ggml_tensor_overhead() local_unnamed_addr #3

declare ptr @ggml_backend_cpu_init() local_unnamed_addr #3

declare ptr @ggml_backend_alloc_buffer(ptr noundef, i64 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress 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) #5

declare ptr @ggml_new_tensor_3d(ptr noundef, i32 noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #3

declare void @ggml_tallocr_new(ptr dead_on_unwind writable sret(%struct.ggml_tallocr) align 8, ptr noundef) local_unnamed_addr #3

declare i32 @ggml_tallocr_alloc(ptr noundef, ptr noundef) local_unnamed_addr #3

declare zeroext i1 @ggml_backend_is_cpu(ptr noundef) local_unnamed_addr #3

declare i64 @ggml_nbytes(ptr noundef) local_unnamed_addr #3

declare void @ggml_backend_tensor_set(ptr noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #3

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

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !14, i64 16}
!13 = !{!"_ZTS10test_model", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!13, !14, i64 24}
!16 = !{!17, !17, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!14, !14, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"bool", !7, i64 0}
!21 = !{!13, !14, i64 32}
!22 = !{!13, !14, i64 0}
!23 = !{!13, !14, i64 8}
!24 = !{!25, !14, i64 248}
!25 = !{!"_ZTS11ggml_tensor", !26, i64 0, !14, i64 8, !7, i64 16, !7, i64 48, !27, i64 80, !7, i64 84, !28, i64 148, !7, i64 152, !14, i64 232, !17, i64 240, !14, i64 248, !7, i64 256, !14, i64 320, !7, i64 328}
!26 = !{!"_ZTS9ggml_type", !7, i64 0}
!27 = !{!"_ZTS7ggml_op", !7, i64 0}
!28 = !{!"int", !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass