; LLVM IR from ggml-org/ggml :: examples/mnist (mnist-common)

; 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.mnist_model = type { %"class.std::__cxx11::basic_string", ptr, %"class.std::vector", i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.0 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.0 = type { i64, [8 x i8] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ggml_backend *, std::allocator<ggml_backend *>>::_Vector_impl" }
%"struct.std::_Vector_base<ggml_backend *, std::allocator<ggml_backend *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ggml_backend *, std::allocator<ggml_backend *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ggml_backend *, std::allocator<ggml_backend *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.gguf_init_params = type { i8, 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] }

@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [37 x i8], align 1
@__func__._Z26mnist_model_init_from_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii = external hidden unnamed_addr constant [27 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.70 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.71 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.75 = external hidden unnamed_addr constant [41 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: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z14load_from_ggufPKcP12ggml_contextP12gguf_context(ptr noundef, ptr noundef, ptr noundef) #4

declare ptr @ggml_get_tensor(ptr noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
define dso_local void @_Z26mnist_model_init_from_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii(ptr dead_on_unwind noalias writable sret(%struct.mnist_model) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %2, i32 noundef %3, i32 noundef %4) #4 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i1, align 1
  %12 = alloca ptr, align 8
  %13 = alloca %struct.gguf_init_params, align 8
  %14 = alloca %struct.gguf_init_params, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  store ptr %0, ptr %6, align 8
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !9
  store i1 false, ptr %11, align 1
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  %18 = load i32, ptr %9, align 4, !tbaa !9
  %19 = load i32, ptr %10, align 4, !tbaa !9
  call void @_ZN11mnist_modelC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(208) %0, ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %18, i32 noundef %19)
  %20 = load ptr, ptr @stderr, align 8, !tbaa !5
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %21) #9
  %23 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef @.str.10, ptr noundef @__func__._Z26mnist_model_init_from_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii, ptr noundef %22) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #9
  %24 = getelementptr inbounds %struct.gguf_init_params, ptr %13, i32 0, i32 0
  store i8 1, ptr %24, align 8, !tbaa !11
  %25 = getelementptr inbounds %struct.gguf_init_params, ptr %13, i32 0, i32 1
  %26 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 17
  store ptr %26, ptr %25, align 8, !tbaa !14
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %27) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %13, i64 16, i1 false), !tbaa.struct !15
  %29 = getelementptr inbounds { i8, ptr }, ptr %14, i32 0, i32 0
  %30 = load i8, ptr %29, align 8
  %31 = getelementptr inbounds { i8, ptr }, ptr %14, i32 0, i32 1
  %32 = load ptr, ptr %31, align 8
  %33 = invoke ptr @gguf_init_from_file(ptr noundef %28, i8 %30, ptr %32)
          to label %34 unwind label %40

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

37:                                               ; preds = %34
  %38 = load ptr, ptr @stderr, align 8, !tbaa !5
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef @.str.11, ptr noundef @__func__._Z26mnist_model_init_from_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii) #9
  call void @exit(i32 noundef 1) #10
  unreachable

40:                                               ; preds = %5
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %15, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #9
  br label %582

44:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #9
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  %46 = load ptr, ptr %12, align 8, !tbaa !5
  %47 = invoke i64 @gguf_find_key(ptr noundef %46, ptr noundef @.str.12)
          to label %48 unwind label %75

48:                                               ; preds = %44
  %49 = invoke ptr @gguf_get_val_str(ptr noundef %45, i64 noundef %47)
          to label %50 unwind label %75

50:                                               ; preds = %48
  %51 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 0
  %52 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %51, ptr noundef %49)
          to label %53 unwind label %75

53:                                               ; preds = %50
  %54 = load ptr, ptr @stderr, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 0
  %56 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %55) #9
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef @.str.13, ptr noundef @__func__._Z26mnist_model_init_from_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii, ptr noundef %56) #9
  %58 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 0
  %59 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %58, ptr noundef @.str.14)
          to label %60 unwind label %75

60:                                               ; preds = %53
  br i1 %59, label %61, label %230

61:                                               ; preds = %60
  %62 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 17
  %63 = load ptr, ptr %62, align 8, !tbaa !17
  %64 = invoke ptr @ggml_get_tensor(ptr noundef %63, ptr noundef @.str.15)
          to label %65 unwind label %75

65:                                               ; preds = %61
  %66 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 7
  store ptr %64, ptr %66, align 8, !tbaa !26
  %67 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 7
  %68 = load ptr, ptr %67, align 8, !tbaa !26
  %69 = getelementptr inbounds %struct.ggml_tensor, ptr %68, i32 0, i32 2
  %70 = getelementptr inbounds [4 x i64], ptr %69, i64 0, i64 0
  %71 = load i64, ptr %70, align 8, !tbaa !27
  %72 = icmp eq i64 %71, 784
  br i1 %72, label %79, label %73

73:                                               ; preds = %65
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 152, ptr noundef @.str.2, ptr noundef @.str.16) #11
          to label %74 unwind label %75

74:                                               ; preds = %73
  unreachable

75:                                               ; preds = %568, %565, %560, %556, %542, %535, %526, %517, %508, %499, %490, %479, %477, %468, %459, %450, %441, %430, %428, %419, %410, %401, %392, %381, %379, %370, %361, %352, %343, %332, %330, %321, %312, %303, %294, %283, %281, %272, %263, %254, %245, %234, %230, %227, %218, %209, %200, %188, %186, %177, %168, %159, %147, %145, %136, %127, %118, %106, %104, %95, %86, %73, %61, %53, %50, %48, %44
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %15, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %16, align 4
  br label %582

79:                                               ; preds = %65
  %80 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 7
  %81 = load ptr, ptr %80, align 8, !tbaa !26
  %82 = getelementptr inbounds %struct.ggml_tensor, ptr %81, i32 0, i32 2
  %83 = getelementptr inbounds [4 x i64], ptr %82, i64 0, i64 1
  %84 = load i64, ptr %83, align 8, !tbaa !27
  %85 = icmp eq i64 %84, 500
  br i1 %85, label %88, label %86

86:                                               ; preds = %79
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 153, ptr noundef @.str.2, ptr noundef @.str.17) #11
          to label %87 unwind label %75

87:                                               ; preds = %86
  unreachable

88:                                               ; preds = %79
  %89 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 7
  %90 = load ptr, ptr %89, align 8, !tbaa !26
  %91 = getelementptr inbounds %struct.ggml_tensor, ptr %90, i32 0, i32 2
  %92 = getelementptr inbounds [4 x i64], ptr %91, i64 0, i64 2
  %93 = load i64, ptr %92, align 8, !tbaa !27
  %94 = icmp eq i64 %93, 1
  br i1 %94, label %97, label %95

95:                                               ; preds = %88
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 154, ptr noundef @.str.2, ptr noundef @.str.18) #11
          to label %96 unwind label %75

96:                                               ; preds = %95
  unreachable

97:                                               ; preds = %88
  %98 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 7
  %99 = load ptr, ptr %98, align 8, !tbaa !26
  %100 = getelementptr inbounds %struct.ggml_tensor, ptr %99, i32 0, i32 2
  %101 = getelementptr inbounds [4 x i64], ptr %100, i64 0, i64 3
  %102 = load i64, ptr %101, align 8, !tbaa !27
  %103 = icmp eq i64 %102, 1
  br i1 %103, label %106, label %104

104:                                              ; preds = %97
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 155, ptr noundef @.str.2, ptr noundef @.str.19) #11
          to label %105 unwind label %75

105:                                              ; preds = %104
  unreachable

106:                                              ; preds = %97
  %107 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 17
  %108 = load ptr, ptr %107, align 8, !tbaa !17
  %109 = invoke ptr @ggml_get_tensor(ptr noundef %108, ptr noundef @.str.20)
          to label %110 unwind label %75

110:                                              ; preds = %106
  %111 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 8
  store ptr %109, ptr %111, align 8, !tbaa !28
  %112 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 8
  %113 = load ptr, ptr %112, align 8, !tbaa !28
  %114 = getelementptr inbounds %struct.ggml_tensor, ptr %113, i32 0, i32 2
  %115 = getelementptr inbounds [4 x i64], ptr %114, i64 0, i64 0
  %116 = load i64, ptr %115, align 8, !tbaa !27
  %117 = icmp eq i64 %116, 500
  br i1 %117, label %120, label %118

118:                                              ; preds = %110
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 158, ptr noundef @.str.2, ptr noundef @.str.21) #11
          to label %119 unwind label %75

119:                                              ; preds = %118
  unreachable

120:                                              ; preds = %110
  %121 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 8
  %122 = load ptr, ptr %121, align 8, !tbaa !28
  %123 = getelementptr inbounds %struct.ggml_tensor, ptr %122, i32 0, i32 2
  %124 = getelementptr inbounds [4 x i64], ptr %123, i64 0, i64 1
  %125 = load i64, ptr %124, align 8, !tbaa !27
  %126 = icmp eq i64 %125, 1
  br i1 %126, label %129, label %127

127:                                              ; preds = %120
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 159, ptr noundef @.str.2, ptr noundef @.str.22) #11
          to label %128 unwind label %75

128:                                              ; preds = %127
  unreachable

129:                                              ; preds = %120
  %130 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 8
  %131 = load ptr, ptr %130, align 8, !tbaa !28
  %132 = getelementptr inbounds %struct.ggml_tensor, ptr %131, i32 0, i32 2
  %133 = getelementptr inbounds [4 x i64], ptr %132, i64 0, i64 2
  %134 = load i64, ptr %133, align 8, !tbaa !27
  %135 = icmp eq i64 %134, 1
  br i1 %135, label %138, label %136

136:                                              ; preds = %129
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 160, ptr noundef @.str.2, ptr noundef @.str.23) #11
          to label %137 unwind label %75

137:                                              ; preds = %136
  unreachable

138:                                              ; preds = %129
  %139 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 8
  %140 = load ptr, ptr %139, align 8, !tbaa !28
  %141 = getelementptr inbounds %struct.ggml_tensor, ptr %140, i32 0, i32 2
  %142 = getelementptr inbounds [4 x i64], ptr %141, i64 0, i64 3
  %143 = load i64, ptr %142, align 8, !tbaa !27
  %144 = icmp eq i64 %143, 1
  br i1 %144, label %147, label %145

145:                                              ; preds = %138
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 161, ptr noundef @.str.2, ptr noundef @.str.24) #11
          to label %146 unwind label %75

146:                                              ; preds = %145
  unreachable

147:                                              ; preds = %138
  %148 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 17
  %149 = load ptr, ptr %148, align 8, !tbaa !17
  %150 = invoke ptr @ggml_get_tensor(ptr noundef %149, ptr noundef @.str.25)
          to label %151 unwind label %75

151:                                              ; preds = %147
  %152 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 9
  store ptr %150, ptr %152, align 8, !tbaa !29
  %153 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 9
  %154 = load ptr, ptr %153, align 8, !tbaa !29
  %155 = getelementptr inbounds %struct.ggml_tensor, ptr %154, i32 0, i32 2
  %156 = getelementptr inbounds [4 x i64], ptr %155, i64 0, i64 0
  %157 = load i64, ptr %156, align 8, !tbaa !27
  %158 = icmp eq i64 %157, 500
  br i1 %158, label %161, label %159

159:                                              ; preds = %151
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 164, ptr noundef @.str.2, ptr noundef @.str.26) #11
          to label %160 unwind label %75

160:                                              ; preds = %159
  unreachable

161:                                              ; preds = %151
  %162 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 9
  %163 = load ptr, ptr %162, align 8, !tbaa !29
  %164 = getelementptr inbounds %struct.ggml_tensor, ptr %163, i32 0, i32 2
  %165 = getelementptr inbounds [4 x i64], ptr %164, i64 0, i64 1
  %166 = load i64, ptr %165, align 8, !tbaa !27
  %167 = icmp eq i64 %166, 10
  br i1 %167, label %170, label %168

168:                                              ; preds = %161
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 165, ptr noundef @.str.2, ptr noundef @.str.27) #11
          to label %169 unwind label %75

169:                                              ; preds = %168
  unreachable

170:                                              ; preds = %161
  %171 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 9
  %172 = load ptr, ptr %171, align 8, !tbaa !29
  %173 = getelementptr inbounds %struct.ggml_tensor, ptr %172, i32 0, i32 2
  %174 = getelementptr inbounds [4 x i64], ptr %173, i64 0, i64 2
  %175 = load i64, ptr %174, align 8, !tbaa !27
  %176 = icmp eq i64 %175, 1
  br i1 %176, label %179, label %177

177:                                              ; preds = %170
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 166, ptr noundef @.str.2, ptr noundef @.str.28) #11
          to label %178 unwind label %75

178:                                              ; preds = %177
  unreachable

179:                                              ; preds = %170
  %180 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 9
  %181 = load ptr, ptr %180, align 8, !tbaa !29
  %182 = getelementptr inbounds %struct.ggml_tensor, ptr %181, i32 0, i32 2
  %183 = getelementptr inbounds [4 x i64], ptr %182, i64 0, i64 3
  %184 = load i64, ptr %183, align 8, !tbaa !27
  %185 = icmp eq i64 %184, 1
  br i1 %185, label %188, label %186

186:                                              ; preds = %179
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 167, ptr noundef @.str.2, ptr noundef @.str.29) #11
          to label %187 unwind label %75

187:                                              ; preds = %186
  unreachable

188:                                              ; preds = %179
  %189 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 17
  %190 = load ptr, ptr %189, align 8, !tbaa !17
  %191 = invoke ptr @ggml_get_tensor(ptr noundef %190, ptr noundef @.str.30)
          to label %192 unwind label %75

192:                                              ; preds = %188
  %193 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 10
  store ptr %191, ptr %193, align 8, !tbaa !30
  %194 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 10
  %195 = load ptr, ptr %194, align 8, !tbaa !30
  %196 = getelementptr inbounds %struct.ggml_tensor, ptr %195, i32 0, i32 2
  %197 = getelementptr inbounds [4 x i64], ptr %196, i64 0, i64 0
  %198 = load i64, ptr %197, align 8, !tbaa !27
  %199 = icmp eq i64 %198, 10
  br i1 %199, label %202, label %200

200:                                              ; preds = %192
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 170, ptr noundef @.str.2, ptr noundef @.str.31) #11
          to label %201 unwind label %75

201:                                              ; preds = %200
  unreachable

202:                                              ; preds = %192
  %203 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 10
  %204 = load ptr, ptr %203, align 8, !tbaa !30
  %205 = getelementptr inbounds %struct.ggml_tensor, ptr %204, i32 0, i32 2
  %206 = getelementptr inbounds [4 x i64], ptr %205, i64 0, i64 1
  %207 = load i64, ptr %206, align 8, !tbaa !27
  %208 = icmp eq i64 %207, 1
  br i1 %208, label %211, label %209

209:                                              ; preds = %202
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 171, ptr noundef @.str.2, ptr noundef @.str.32) #11
          to label %210 unwind label %75

210:                                              ; preds = %209
  unreachable

211:                                              ; preds = %202
  %212 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 10
  %213 = load ptr, ptr %212, align 8, !tbaa !30
  %214 = getelementptr inbounds %struct.ggml_tensor, ptr %213, i32 0, i32 2
  %215 = getelementptr inbounds [4 x i64], ptr %214, i64 0, i64 2
  %216 = load i64, ptr %215, align 8, !tbaa !27
  %217 = icmp eq i64 %216, 1
  br i1 %217, label %220, label %218

218:                                              ; preds = %211
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 172, ptr noundef @.str.2, ptr noundef @.str.33) #11
          to label %219 unwind label %75

219:                                              ; preds = %218
  unreachable

220:                                              ; preds = %211
  %221 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 10
  %222 = load ptr, ptr %221, align 8, !tbaa !30
  %223 = getelementptr inbounds %struct.ggml_tensor, ptr %222, i32 0, i32 2
  %224 = getelementptr inbounds [4 x i64], ptr %223, i64 0, i64 3
  %225 = load i64, ptr %224, align 8, !tbaa !27
  %226 = icmp eq i64 %225, 1
  br i1 %226, label %229, label %227

227:                                              ; preds = %220
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 173, ptr noundef @.str.2, ptr noundef @.str.34) #11
          to label %228 unwind label %75

228:                                              ; preds = %227
  unreachable

229:                                              ; preds = %220
  br label %535

230:                                              ; preds = %60
  %231 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 0
  %232 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %231, ptr noundef @.str.35)
          to label %233 unwind label %75

233:                                              ; preds = %230
  br i1 %232, label %234, label %529

234:                                              ; preds = %233
  %235 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 17
  %236 = load ptr, ptr %235, align 8, !tbaa !17
  %237 = invoke ptr @ggml_get_tensor(ptr noundef %236, ptr noundef @.str.36)
          to label %238 unwind label %75

238:                                              ; preds = %234
  %239 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 11
  store ptr %237, ptr %239, align 8, !tbaa !31
  %240 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 11
  %241 = load ptr, ptr %240, align 8, !tbaa !31
  %242 = getelementptr inbounds %struct.ggml_tensor, ptr %241, i32 0, i32 0
  %243 = load i32, ptr %242, align 8, !tbaa !32
  %244 = icmp eq i32 %243, 0
  br i1 %244, label %247, label %245

245:                                              ; preds = %238
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 176, ptr noundef @.str.2, ptr noundef @.str.37) #11
          to label %246 unwind label %75

246:                                              ; preds = %245
  unreachable

247:                                              ; preds = %238
  %248 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 11
  %249 = load ptr, ptr %248, align 8, !tbaa !31
  %250 = getelementptr inbounds %struct.ggml_tensor, ptr %249, i32 0, i32 2
  %251 = getelementptr inbounds [4 x i64], ptr %250, i64 0, i64 0
  %252 = load i64, ptr %251, align 8, !tbaa !27
  %253 = icmp eq i64 %252, 3
  br i1 %253, label %256, label %254

254:                                              ; preds = %247
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 177, ptr noundef @.str.2, ptr noundef @.str.38) #11
          to label %255 unwind label %75

255:                                              ; preds = %254
  unreachable

256:                                              ; preds = %247
  %257 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 11
  %258 = load ptr, ptr %257, align 8, !tbaa !31
  %259 = getelementptr inbounds %struct.ggml_tensor, ptr %258, i32 0, i32 2
  %260 = getelementptr inbounds [4 x i64], ptr %259, i64 0, i64 1
  %261 = load i64, ptr %260, align 8, !tbaa !27
  %262 = icmp eq i64 %261, 3
  br i1 %262, label %265, label %263

263:                                              ; preds = %256
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 178, ptr noundef @.str.2, ptr noundef @.str.39) #11
          to label %264 unwind label %75

264:                                              ; preds = %263
  unreachable

265:                                              ; preds = %256
  %266 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 11
  %267 = load ptr, ptr %266, align 8, !tbaa !31
  %268 = getelementptr inbounds %struct.ggml_tensor, ptr %267, i32 0, i32 2
  %269 = getelementptr inbounds [4 x i64], ptr %268, i64 0, i64 2
  %270 = load i64, ptr %269, align 8, !tbaa !27
  %271 = icmp eq i64 %270, 1
  br i1 %271, label %274, label %272

272:                                              ; preds = %265
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 179, ptr noundef @.str.2, ptr noundef @.str.40) #11
          to label %273 unwind label %75

273:                                              ; preds = %272
  unreachable

274:                                              ; preds = %265
  %275 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 11
  %276 = load ptr, ptr %275, align 8, !tbaa !31
  %277 = getelementptr inbounds %struct.ggml_tensor, ptr %276, i32 0, i32 2
  %278 = getelementptr inbounds [4 x i64], ptr %277, i64 0, i64 3
  %279 = load i64, ptr %278, align 8, !tbaa !27
  %280 = icmp eq i64 %279, 8
  br i1 %280, label %283, label %281

281:                                              ; preds = %274
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 180, ptr noundef @.str.2, ptr noundef @.str.41) #11
          to label %282 unwind label %75

282:                                              ; preds = %281
  unreachable

283:                                              ; preds = %274
  %284 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 17
  %285 = load ptr, ptr %284, align 8, !tbaa !17
  %286 = invoke ptr @ggml_get_tensor(ptr noundef %285, ptr noundef @.str.42)
          to label %287 unwind label %75

287:                                              ; preds = %283
  %288 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 12
  store ptr %286, ptr %288, align 8, !tbaa !36
  %289 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 12
  %290 = load ptr, ptr %289, align 8, !tbaa !36
  %291 = getelementptr inbounds %struct.ggml_tensor, ptr %290, i32 0, i32 0
  %292 = load i32, ptr %291, align 8, !tbaa !32
  %293 = icmp eq i32 %292, 0
  br i1 %293, label %296, label %294

294:                                              ; preds = %287
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 183, ptr noundef @.str.2, ptr noundef @.str.43) #11
          to label %295 unwind label %75

295:                                              ; preds = %294
  unreachable

296:                                              ; preds = %287
  %297 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 12
  %298 = load ptr, ptr %297, align 8, !tbaa !36
  %299 = getelementptr inbounds %struct.ggml_tensor, ptr %298, i32 0, i32 2
  %300 = getelementptr inbounds [4 x i64], ptr %299, i64 0, i64 0
  %301 = load i64, ptr %300, align 8, !tbaa !27
  %302 = icmp eq i64 %301, 1
  br i1 %302, label %305, label %303

303:                                              ; preds = %296
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 184, ptr noundef @.str.2, ptr noundef @.str.44) #11
          to label %304 unwind label %75

304:                                              ; preds = %303
  unreachable

305:                                              ; preds = %296
  %306 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 12
  %307 = load ptr, ptr %306, align 8, !tbaa !36
  %308 = getelementptr inbounds %struct.ggml_tensor, ptr %307, i32 0, i32 2
  %309 = getelementptr inbounds [4 x i64], ptr %308, i64 0, i64 1
  %310 = load i64, ptr %309, align 8, !tbaa !27
  %311 = icmp eq i64 %310, 1
  br i1 %311, label %314, label %312

312:                                              ; preds = %305
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 185, ptr noundef @.str.2, ptr noundef @.str.45) #11
          to label %313 unwind label %75

313:                                              ; preds = %312
  unreachable

314:                                              ; preds = %305
  %315 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 12
  %316 = load ptr, ptr %315, align 8, !tbaa !36
  %317 = getelementptr inbounds %struct.ggml_tensor, ptr %316, i32 0, i32 2
  %318 = getelementptr inbounds [4 x i64], ptr %317, i64 0, i64 2
  %319 = load i64, ptr %318, align 8, !tbaa !27
  %320 = icmp eq i64 %319, 8
  br i1 %320, label %323, label %321

321:                                              ; preds = %314
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 186, ptr noundef @.str.2, ptr noundef @.str.46) #11
          to label %322 unwind label %75

322:                                              ; preds = %321
  unreachable

323:                                              ; preds = %314
  %324 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 12
  %325 = load ptr, ptr %324, align 8, !tbaa !36
  %326 = getelementptr inbounds %struct.ggml_tensor, ptr %325, i32 0, i32 2
  %327 = getelementptr inbounds [4 x i64], ptr %326, i64 0, i64 3
  %328 = load i64, ptr %327, align 8, !tbaa !27
  %329 = icmp eq i64 %328, 1
  br i1 %329, label %332, label %330

330:                                              ; preds = %323
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 187, ptr noundef @.str.2, ptr noundef @.str.47) #11
          to label %331 unwind label %75

331:                                              ; preds = %330
  unreachable

332:                                              ; preds = %323
  %333 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 17
  %334 = load ptr, ptr %333, align 8, !tbaa !17
  %335 = invoke ptr @ggml_get_tensor(ptr noundef %334, ptr noundef @.str.48)
          to label %336 unwind label %75

336:                                              ; preds = %332
  %337 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 13
  store ptr %335, ptr %337, align 8, !tbaa !37
  %338 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 13
  %339 = load ptr, ptr %338, align 8, !tbaa !37
  %340 = getelementptr inbounds %struct.ggml_tensor, ptr %339, i32 0, i32 0
  %341 = load i32, ptr %340, align 8, !tbaa !32
  %342 = icmp eq i32 %341, 0
  br i1 %342, label %345, label %343

343:                                              ; preds = %336
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 190, ptr noundef @.str.2, ptr noundef @.str.49) #11
          to label %344 unwind label %75

344:                                              ; preds = %343
  unreachable

345:                                              ; preds = %336
  %346 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 13
  %347 = load ptr, ptr %346, align 8, !tbaa !37
  %348 = getelementptr inbounds %struct.ggml_tensor, ptr %347, i32 0, i32 2
  %349 = getelementptr inbounds [4 x i64], ptr %348, i64 0, i64 0
  %350 = load i64, ptr %349, align 8, !tbaa !27
  %351 = icmp eq i64 %350, 3
  br i1 %351, label %354, label %352

352:                                              ; preds = %345
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 191, ptr noundef @.str.2, ptr noundef @.str.50) #11
          to label %353 unwind label %75

353:                                              ; preds = %352
  unreachable

354:                                              ; preds = %345
  %355 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 13
  %356 = load ptr, ptr %355, align 8, !tbaa !37
  %357 = getelementptr inbounds %struct.ggml_tensor, ptr %356, i32 0, i32 2
  %358 = getelementptr inbounds [4 x i64], ptr %357, i64 0, i64 1
  %359 = load i64, ptr %358, align 8, !tbaa !27
  %360 = icmp eq i64 %359, 3
  br i1 %360, label %363, label %361

361:                                              ; preds = %354
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 192, ptr noundef @.str.2, ptr noundef @.str.51) #11
          to label %362 unwind label %75

362:                                              ; preds = %361
  unreachable

363:                                              ; preds = %354
  %364 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 13
  %365 = load ptr, ptr %364, align 8, !tbaa !37
  %366 = getelementptr inbounds %struct.ggml_tensor, ptr %365, i32 0, i32 2
  %367 = getelementptr inbounds [4 x i64], ptr %366, i64 0, i64 2
  %368 = load i64, ptr %367, align 8, !tbaa !27
  %369 = icmp eq i64 %368, 8
  br i1 %369, label %372, label %370

370:                                              ; preds = %363
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 193, ptr noundef @.str.2, ptr noundef @.str.52) #11
          to label %371 unwind label %75

371:                                              ; preds = %370
  unreachable

372:                                              ; preds = %363
  %373 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 13
  %374 = load ptr, ptr %373, align 8, !tbaa !37
  %375 = getelementptr inbounds %struct.ggml_tensor, ptr %374, i32 0, i32 2
  %376 = getelementptr inbounds [4 x i64], ptr %375, i64 0, i64 3
  %377 = load i64, ptr %376, align 8, !tbaa !27
  %378 = icmp eq i64 %377, 16
  br i1 %378, label %381, label %379

379:                                              ; preds = %372
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 194, ptr noundef @.str.2, ptr noundef @.str.53) #11
          to label %380 unwind label %75

380:                                              ; preds = %379
  unreachable

381:                                              ; preds = %372
  %382 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 17
  %383 = load ptr, ptr %382, align 8, !tbaa !17
  %384 = invoke ptr @ggml_get_tensor(ptr noundef %383, ptr noundef @.str.54)
          to label %385 unwind label %75

385:                                              ; preds = %381
  %386 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 14
  store ptr %384, ptr %386, align 8, !tbaa !38
  %387 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 14
  %388 = load ptr, ptr %387, align 8, !tbaa !38
  %389 = getelementptr inbounds %struct.ggml_tensor, ptr %388, i32 0, i32 0
  %390 = load i32, ptr %389, align 8, !tbaa !32
  %391 = icmp eq i32 %390, 0
  br i1 %391, label %394, label %392

392:                                              ; preds = %385
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 197, ptr noundef @.str.2, ptr noundef @.str.55) #11
          to label %393 unwind label %75

393:                                              ; preds = %392
  unreachable

394:                                              ; preds = %385
  %395 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 14
  %396 = load ptr, ptr %395, align 8, !tbaa !38
  %397 = getelementptr inbounds %struct.ggml_tensor, ptr %396, i32 0, i32 2
  %398 = getelementptr inbounds [4 x i64], ptr %397, i64 0, i64 0
  %399 = load i64, ptr %398, align 8, !tbaa !27
  %400 = icmp eq i64 %399, 1
  br i1 %400, label %403, label %401

401:                                              ; preds = %394
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 198, ptr noundef @.str.2, ptr noundef @.str.56) #11
          to label %402 unwind label %75

402:                                              ; preds = %401
  unreachable

403:                                              ; preds = %394
  %404 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 14
  %405 = load ptr, ptr %404, align 8, !tbaa !38
  %406 = getelementptr inbounds %struct.ggml_tensor, ptr %405, i32 0, i32 2
  %407 = getelementptr inbounds [4 x i64], ptr %406, i64 0, i64 1
  %408 = load i64, ptr %407, align 8, !tbaa !27
  %409 = icmp eq i64 %408, 1
  br i1 %409, label %412, label %410

410:                                              ; preds = %403
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 199, ptr noundef @.str.2, ptr noundef @.str.57) #11
          to label %411 unwind label %75

411:                                              ; preds = %410
  unreachable

412:                                              ; preds = %403
  %413 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 14
  %414 = load ptr, ptr %413, align 8, !tbaa !38
  %415 = getelementptr inbounds %struct.ggml_tensor, ptr %414, i32 0, i32 2
  %416 = getelementptr inbounds [4 x i64], ptr %415, i64 0, i64 2
  %417 = load i64, ptr %416, align 8, !tbaa !27
  %418 = icmp eq i64 %417, 16
  br i1 %418, label %421, label %419

419:                                              ; preds = %412
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 200, ptr noundef @.str.2, ptr noundef @.str.58) #11
          to label %420 unwind label %75

420:                                              ; preds = %419
  unreachable

421:                                              ; preds = %412
  %422 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 14
  %423 = load ptr, ptr %422, align 8, !tbaa !38
  %424 = getelementptr inbounds %struct.ggml_tensor, ptr %423, i32 0, i32 2
  %425 = getelementptr inbounds [4 x i64], ptr %424, i64 0, i64 3
  %426 = load i64, ptr %425, align 8, !tbaa !27
  %427 = icmp eq i64 %426, 1
  br i1 %427, label %430, label %428

428:                                              ; preds = %421
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 201, ptr noundef @.str.2, ptr noundef @.str.59) #11
          to label %429 unwind label %75

429:                                              ; preds = %428
  unreachable

430:                                              ; preds = %421
  %431 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 17
  %432 = load ptr, ptr %431, align 8, !tbaa !17
  %433 = invoke ptr @ggml_get_tensor(ptr noundef %432, ptr noundef @.str.60)
          to label %434 unwind label %75

434:                                              ; preds = %430
  %435 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 15
  store ptr %433, ptr %435, align 8, !tbaa !39
  %436 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 15
  %437 = load ptr, ptr %436, align 8, !tbaa !39
  %438 = getelementptr inbounds %struct.ggml_tensor, ptr %437, i32 0, i32 0
  %439 = load i32, ptr %438, align 8, !tbaa !32
  %440 = icmp eq i32 %439, 0
  br i1 %440, label %443, label %441

441:                                              ; preds = %434
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 204, ptr noundef @.str.2, ptr noundef @.str.61) #11
          to label %442 unwind label %75

442:                                              ; preds = %441
  unreachable

443:                                              ; preds = %434
  %444 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 15
  %445 = load ptr, ptr %444, align 8, !tbaa !39
  %446 = getelementptr inbounds %struct.ggml_tensor, ptr %445, i32 0, i32 2
  %447 = getelementptr inbounds [4 x i64], ptr %446, i64 0, i64 0
  %448 = load i64, ptr %447, align 8, !tbaa !27
  %449 = icmp eq i64 %448, 784
  br i1 %449, label %452, label %450

450:                                              ; preds = %443
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 205, ptr noundef @.str.2, ptr noundef @.str.62) #11
          to label %451 unwind label %75

451:                                              ; preds = %450
  unreachable

452:                                              ; preds = %443
  %453 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 15
  %454 = load ptr, ptr %453, align 8, !tbaa !39
  %455 = getelementptr inbounds %struct.ggml_tensor, ptr %454, i32 0, i32 2
  %456 = getelementptr inbounds [4 x i64], ptr %455, i64 0, i64 1
  %457 = load i64, ptr %456, align 8, !tbaa !27
  %458 = icmp eq i64 %457, 10
  br i1 %458, label %461, label %459

459:                                              ; preds = %452
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 206, ptr noundef @.str.2, ptr noundef @.str.63) #11
          to label %460 unwind label %75

460:                                              ; preds = %459
  unreachable

461:                                              ; preds = %452
  %462 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 15
  %463 = load ptr, ptr %462, align 8, !tbaa !39
  %464 = getelementptr inbounds %struct.ggml_tensor, ptr %463, i32 0, i32 2
  %465 = getelementptr inbounds [4 x i64], ptr %464, i64 0, i64 2
  %466 = load i64, ptr %465, align 8, !tbaa !27
  %467 = icmp eq i64 %466, 1
  br i1 %467, label %470, label %468

468:                                              ; preds = %461
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 207, ptr noundef @.str.2, ptr noundef @.str.64) #11
          to label %469 unwind label %75

469:                                              ; preds = %468
  unreachable

470:                                              ; preds = %461
  %471 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 15
  %472 = load ptr, ptr %471, align 8, !tbaa !39
  %473 = getelementptr inbounds %struct.ggml_tensor, ptr %472, i32 0, i32 2
  %474 = getelementptr inbounds [4 x i64], ptr %473, i64 0, i64 3
  %475 = load i64, ptr %474, align 8, !tbaa !27
  %476 = icmp eq i64 %475, 1
  br i1 %476, label %479, label %477

477:                                              ; preds = %470
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 208, ptr noundef @.str.2, ptr noundef @.str.65) #11
          to label %478 unwind label %75

478:                                              ; preds = %477
  unreachable

479:                                              ; preds = %470
  %480 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 17
  %481 = load ptr, ptr %480, align 8, !tbaa !17
  %482 = invoke ptr @ggml_get_tensor(ptr noundef %481, ptr noundef @.str.66)
          to label %483 unwind label %75

483:                                              ; preds = %479
  %484 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 16
  store ptr %482, ptr %484, align 8, !tbaa !40
  %485 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 16
  %486 = load ptr, ptr %485, align 8, !tbaa !40
  %487 = getelementptr inbounds %struct.ggml_tensor, ptr %486, i32 0, i32 0
  %488 = load i32, ptr %487, align 8, !tbaa !32
  %489 = icmp eq i32 %488, 0
  br i1 %489, label %492, label %490

490:                                              ; preds = %483
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 211, ptr noundef @.str.2, ptr noundef @.str.67) #11
          to label %491 unwind label %75

491:                                              ; preds = %490
  unreachable

492:                                              ; preds = %483
  %493 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 16
  %494 = load ptr, ptr %493, align 8, !tbaa !40
  %495 = getelementptr inbounds %struct.ggml_tensor, ptr %494, i32 0, i32 2
  %496 = getelementptr inbounds [4 x i64], ptr %495, i64 0, i64 0
  %497 = load i64, ptr %496, align 8, !tbaa !27
  %498 = icmp eq i64 %497, 10
  br i1 %498, label %501, label %499

499:                                              ; preds = %492
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 212, ptr noundef @.str.2, ptr noundef @.str.68) #11
          to label %500 unwind label %75

500:                                              ; preds = %499
  unreachable

501:                                              ; preds = %492
  %502 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 16
  %503 = load ptr, ptr %502, align 8, !tbaa !40
  %504 = getelementptr inbounds %struct.ggml_tensor, ptr %503, i32 0, i32 2
  %505 = getelementptr inbounds [4 x i64], ptr %504, i64 0, i64 1
  %506 = load i64, ptr %505, align 8, !tbaa !27
  %507 = icmp eq i64 %506, 1
  br i1 %507, label %510, label %508

508:                                              ; preds = %501
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 213, ptr noundef @.str.2, ptr noundef @.str.69) #11
          to label %509 unwind label %75

509:                                              ; preds = %508
  unreachable

510:                                              ; preds = %501
  %511 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 16
  %512 = load ptr, ptr %511, align 8, !tbaa !40
  %513 = getelementptr inbounds %struct.ggml_tensor, ptr %512, i32 0, i32 2
  %514 = getelementptr inbounds [4 x i64], ptr %513, i64 0, i64 2
  %515 = load i64, ptr %514, align 8, !tbaa !27
  %516 = icmp eq i64 %515, 1
  br i1 %516, label %519, label %517

517:                                              ; preds = %510
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 214, ptr noundef @.str.2, ptr noundef @.str.70) #11
          to label %518 unwind label %75

518:                                              ; preds = %517
  unreachable

519:                                              ; preds = %510
  %520 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 16
  %521 = load ptr, ptr %520, align 8, !tbaa !40
  %522 = getelementptr inbounds %struct.ggml_tensor, ptr %521, i32 0, i32 2
  %523 = getelementptr inbounds [4 x i64], ptr %522, i64 0, i64 3
  %524 = load i64, ptr %523, align 8, !tbaa !27
  %525 = icmp eq i64 %524, 1
  br i1 %525, label %528, label %526

526:                                              ; preds = %519
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 215, ptr noundef @.str.2, ptr noundef @.str.71) #11
          to label %527 unwind label %75

527:                                              ; preds = %526
  unreachable

528:                                              ; preds = %519
  br label %534

529:                                              ; preds = %233
  %530 = load ptr, ptr @stderr, align 8, !tbaa !5
  %531 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 0
  %532 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %531) #9
  %533 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %530, ptr noundef @.str.72, ptr noundef @__func__._Z26mnist_model_init_from_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii, ptr noundef %532) #9
  br label %534

534:                                              ; preds = %529, %528
  br label %535

535:                                              ; preds = %534, %229
  %536 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 17
  %537 = load ptr, ptr %536, align 8, !tbaa !17
  %538 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 2
  %539 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ggml_backendSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %538, i64 noundef 0) #9
  %540 = load ptr, ptr %539, align 8, !tbaa !5
  %541 = invoke ptr @ggml_backend_alloc_ctx_tensors(ptr noundef %537, ptr noundef %540)
          to label %542 unwind label %75

542:                                              ; preds = %535
  %543 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 20
  store ptr %541, ptr %543, align 8, !tbaa !41
  %544 = load ptr, ptr %7, align 8, !tbaa !5
  %545 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %544) #9
  %546 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 17
  %547 = load ptr, ptr %546, align 8, !tbaa !17
  %548 = load ptr, ptr %12, align 8, !tbaa !5
  %549 = invoke noundef zeroext i1 @_Z14load_from_ggufPKcP12ggml_contextP12gguf_context(ptr noundef %545, ptr noundef %547, ptr noundef %548)
          to label %550 unwind label %75

550:                                              ; preds = %542
  br i1 %549, label %556, label %551

551:                                              ; preds = %550
  %552 = load ptr, ptr @stderr, align 8, !tbaa !5
  %553 = load ptr, ptr %7, align 8, !tbaa !5
  %554 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %553) #9
  %555 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %552, ptr noundef @.str.73, ptr noundef @__func__._Z26mnist_model_init_from_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii, ptr noundef %554) #9
  call void @exit(i32 noundef 1) #10
  unreachable

556:                                              ; preds = %550
  %557 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 18
  %558 = load ptr, ptr %557, align 8, !tbaa !42
  %559 = invoke ptr @ggml_new_tensor_2d(ptr noundef %558, i32 noundef 0, i64 noundef 784, i64 noundef 500)
          to label %560 unwind label %75

560:                                              ; preds = %556
  %561 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 5
  store ptr %559, ptr %561, align 8, !tbaa !43
  %562 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 5
  %563 = load ptr, ptr %562, align 8, !tbaa !43
  %564 = invoke ptr @ggml_set_name(ptr noundef %563, ptr noundef @.str.74)
          to label %565 unwind label %75

565:                                              ; preds = %560
  %566 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 5
  %567 = load ptr, ptr %566, align 8, !tbaa !43
  invoke void @ggml_set_input(ptr noundef %567)
          to label %568 unwind label %75

568:                                              ; preds = %565
  %569 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 18
  %570 = load ptr, ptr %569, align 8, !tbaa !42
  %571 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 2
  %572 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ggml_backendSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %571, i64 noundef 0) #9
  %573 = load ptr, ptr %572, align 8, !tbaa !5
  %574 = invoke ptr @ggml_backend_alloc_ctx_tensors(ptr noundef %570, ptr noundef %573)
          to label %575 unwind label %75

575:                                              ; preds = %568
  %576 = getelementptr inbounds %struct.mnist_model, ptr %0, i32 0, i32 21
  store ptr %574, ptr %576, align 8, !tbaa !44
  %577 = load ptr, ptr @stderr, align 8, !tbaa !5
  %578 = load ptr, ptr %7, align 8, !tbaa !5
  %579 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %578) #9
  %580 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %577, ptr noundef @.str.75, ptr noundef @__func__._Z26mnist_model_init_from_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii, ptr noundef %579) #9
  store i1 true, ptr %11, align 1
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  %581 = load i1, ptr %11, align 1
  br i1 %581, label %584, label %583

582:                                              ; preds = %75, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @_ZN11mnist_modelD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %0) #9
  br label %585

583:                                              ; preds = %575
  call void @_ZN11mnist_modelD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %0) #9
  br label %584

584:                                              ; preds = %583, %575
  ret void

585:                                              ; preds = %582
  %586 = load ptr, ptr %15, align 8
  %587 = load i32, ptr %16, align 4
  %588 = insertvalue { ptr, i32 } poison, ptr %586, 0
  %589 = insertvalue { ptr, i32 } %588, i32 %587, 1
  resume { ptr, i32 } %589
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11mnist_modelC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(208), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) unnamed_addr #4 align 2

declare ptr @gguf_init_from_file(ptr noundef, i8, ptr) #5

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #7

declare ptr @gguf_get_val_str(ptr noundef, i64 noundef) #5

declare i64 @gguf_find_key(ptr noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #4 align 2

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

declare ptr @ggml_backend_alloc_ctx_tensors(ptr noundef, ptr noundef) #5

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

declare ptr @ggml_new_tensor_2d(ptr noundef, i32 noundef, i64 noundef, i64 noundef) #5

declare ptr @ggml_set_name(ptr noundef, ptr noundef) #5

declare void @ggml_set_input(ptr noundef) #5

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { noreturn 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 #8 = { 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 #9 = { nounwind }
attributes #10 = { noreturn nounwind }
attributes #11 = { 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, !13, i64 0}
!12 = !{!"_ZTS16gguf_init_params", !13, i64 0, !6, i64 8}
!13 = !{!"bool", !7, i64 0}
!14 = !{!12, !6, i64 8}
!15 = !{i64 0, i64 1, !16, i64 8, i64 8, !5}
!16 = !{!13, !13, i64 0}
!17 = !{!18, !6, i64 168}
!18 = !{!"_ZTS11mnist_model", !19, i64 0, !6, i64 32, !22, i64 40, !10, i64 64, !10, i64 68, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !20, i64 0, !21, i64 8, !7, i64 16}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTSSt6vectorIP12ggml_backendSaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIP12ggml_backendSaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIP12ggml_backendSaIS1_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIP12ggml_backendSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!18, !6, i64 88}
!27 = !{!21, !21, i64 0}
!28 = !{!18, !6, i64 96}
!29 = !{!18, !6, i64 104}
!30 = !{!18, !6, i64 112}
!31 = !{!18, !6, i64 120}
!32 = !{!33, !34, i64 0}
!33 = !{!"_ZTS11ggml_tensor", !34, i64 0, !6, i64 8, !7, i64 16, !7, i64 48, !35, i64 80, !7, i64 84, !10, i64 148, !7, i64 152, !6, i64 232, !21, i64 240, !6, i64 248, !7, i64 256, !6, i64 320, !7, i64 328}
!34 = !{!"_ZTS9ggml_type", !7, i64 0}
!35 = !{!"_ZTS7ggml_op", !7, i64 0}
!36 = !{!18, !6, i64 128}
!37 = !{!18, !6, i64 136}
!38 = !{!18, !6, i64 144}
!39 = !{!18, !6, i64 152}
!40 = !{!18, !6, i64 160}
!41 = !{!18, !6, i64 192}
!42 = !{!18, !6, i64 176}
!43 = !{!18, !6, i64 72}
!44 = !{!18, !6, i64 200}


; 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.mnist_model = type { %"class.std::__cxx11::basic_string", ptr, %"class.std::vector", i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.0 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.0 = type { i64, [8 x i8] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ggml_backend *, std::allocator<ggml_backend *>>::_Vector_impl" }
%"struct.std::_Vector_base<ggml_backend *, std::allocator<ggml_backend *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ggml_backend *, std::allocator<ggml_backend *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ggml_backend *, std::allocator<ggml_backend *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [37 x i8], align 1
@__func__._Z26mnist_model_init_from_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii = external hidden unnamed_addr constant [27 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.70 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.71 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.75 = external hidden unnamed_addr constant [41 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z14load_from_ggufPKcP12ggml_contextP12gguf_context(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare ptr @ggml_get_tensor(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_Z26mnist_model_init_from_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii(ptr dead_on_unwind noalias nonnull writable sret(%struct.mnist_model) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  tail call void @_ZN11mnist_modelC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(208) %0, ptr noundef nonnull align 8 dereferenceable(32) %2, i32 noundef %3, i32 noundef %4)
  %6 = load ptr, ptr @stderr, align 8, !tbaa !5
  %7 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  %8 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.10, ptr noundef nonnull @__func__._Z26mnist_model_init_from_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii, ptr noundef %7) #8
  %9 = getelementptr inbounds i8, ptr %0, i64 168
  %10 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  %11 = invoke ptr @gguf_init_from_file(ptr noundef %10, i8 1, ptr nonnull %9)
          to label %12 unwind label %16

12:                                               ; preds = %5
  %.not = icmp eq ptr %11, null
  br i1 %.not, label %13, label %18

13:                                               ; preds = %12
  %14 = load ptr, ptr @stderr, align 8, !tbaa !5
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str.11, ptr noundef nonnull @__func__._Z26mnist_model_init_from_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii) #8
  tail call void @exit(i32 noundef 1) #9
  unreachable

16:                                               ; preds = %5
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %292

18:                                               ; preds = %12
  %19 = invoke i64 @gguf_find_key(ptr noundef nonnull %11, ptr noundef nonnull @.str.12)
          to label %20 unwind label %37

20:                                               ; preds = %18
  %21 = invoke ptr @gguf_get_val_str(ptr noundef nonnull %11, i64 noundef %19)
          to label %22 unwind label %37

22:                                               ; preds = %20
  %23 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %21)
          to label %24 unwind label %37

24:                                               ; preds = %22
  %25 = load ptr, ptr @stderr, align 8, !tbaa !5
  %26 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #7
  %27 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef nonnull @.str.13, ptr noundef nonnull @__func__._Z26mnist_model_init_from_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii, ptr noundef %26) #8
  %28 = tail call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.14)
  br i1 %28, label %29, label %111

29:                                               ; preds = %24
  %30 = load ptr, ptr %9, align 8, !tbaa !9
  %31 = invoke ptr @ggml_get_tensor(ptr noundef %30, ptr noundef nonnull @.str.15)
          to label %32 unwind label %37

32:                                               ; preds = %29
  %33 = getelementptr inbounds i8, ptr %0, i64 88
  store ptr %31, ptr %33, align 8, !tbaa !19
  %34 = getelementptr inbounds i8, ptr %31, i64 16
  %35 = load i64, ptr %34, align 8, !tbaa !20
  %36 = icmp eq i64 %35, 784
  br i1 %36, label %39, label %.invoke

37:                                               ; preds = %.invoke, %282, %280, %277, %273, %263, %257, %228, %205, %182, %159, %136, %113, %91, %71, %51, %29, %22, %20, %18
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %292

39:                                               ; preds = %32
  %40 = getelementptr inbounds i8, ptr %31, i64 24
  %41 = load i64, ptr %40, align 8, !tbaa !20
  %42 = icmp eq i64 %41, 500
  br i1 %42, label %43, label %.invoke

43:                                               ; preds = %39
  %44 = getelementptr inbounds i8, ptr %31, i64 32
  %45 = load i64, ptr %44, align 8, !tbaa !20
  %46 = icmp eq i64 %45, 1
  br i1 %46, label %47, label %.invoke

47:                                               ; preds = %43
  %48 = getelementptr inbounds i8, ptr %31, i64 40
  %49 = load i64, ptr %48, align 8, !tbaa !20
  %50 = icmp eq i64 %49, 1
  br i1 %50, label %51, label %.invoke

51:                                               ; preds = %47
  %52 = load ptr, ptr %9, align 8, !tbaa !9
  %53 = invoke ptr @ggml_get_tensor(ptr noundef %52, ptr noundef nonnull @.str.20)
          to label %54 unwind label %37

54:                                               ; preds = %51
  %55 = getelementptr inbounds i8, ptr %0, i64 96
  store ptr %53, ptr %55, align 8, !tbaa !21
  %56 = getelementptr inbounds i8, ptr %53, i64 16
  %57 = load i64, ptr %56, align 8, !tbaa !20
  %58 = icmp eq i64 %57, 500
  br i1 %58, label %59, label %.invoke

59:                                               ; preds = %54
  %60 = getelementptr inbounds i8, ptr %53, i64 24
  %61 = load i64, ptr %60, align 8, !tbaa !20
  %62 = icmp eq i64 %61, 1
  br i1 %62, label %63, label %.invoke

63:                                               ; preds = %59
  %64 = getelementptr inbounds i8, ptr %53, i64 32
  %65 = load i64, ptr %64, align 8, !tbaa !20
  %66 = icmp eq i64 %65, 1
  br i1 %66, label %67, label %.invoke

67:                                               ; preds = %63
  %68 = getelementptr inbounds i8, ptr %53, i64 40
  %69 = load i64, ptr %68, align 8, !tbaa !20
  %70 = icmp eq i64 %69, 1
  br i1 %70, label %71, label %.invoke

71:                                               ; preds = %67
  %72 = load ptr, ptr %9, align 8, !tbaa !9
  %73 = invoke ptr @ggml_get_tensor(ptr noundef %72, ptr noundef nonnull @.str.25)
          to label %74 unwind label %37

74:                                               ; preds = %71
  %75 = getelementptr inbounds i8, ptr %0, i64 104
  store ptr %73, ptr %75, align 8, !tbaa !22
  %76 = getelementptr inbounds i8, ptr %73, i64 16
  %77 = load i64, ptr %76, align 8, !tbaa !20
  %78 = icmp eq i64 %77, 500
  br i1 %78, label %79, label %.invoke

79:                                               ; preds = %74
  %80 = getelementptr inbounds i8, ptr %73, i64 24
  %81 = load i64, ptr %80, align 8, !tbaa !20
  %82 = icmp eq i64 %81, 10
  br i1 %82, label %83, label %.invoke

83:                                               ; preds = %79
  %84 = getelementptr inbounds i8, ptr %73, i64 32
  %85 = load i64, ptr %84, align 8, !tbaa !20
  %86 = icmp eq i64 %85, 1
  br i1 %86, label %87, label %.invoke

87:                                               ; preds = %83
  %88 = getelementptr inbounds i8, ptr %73, i64 40
  %89 = load i64, ptr %88, align 8, !tbaa !20
  %90 = icmp eq i64 %89, 1
  br i1 %90, label %91, label %.invoke

91:                                               ; preds = %87
  %92 = load ptr, ptr %9, align 8, !tbaa !9
  %93 = invoke ptr @ggml_get_tensor(ptr noundef %92, ptr noundef nonnull @.str.30)
          to label %94 unwind label %37

94:                                               ; preds = %91
  %95 = getelementptr inbounds i8, ptr %0, i64 112
  store ptr %93, ptr %95, align 8, !tbaa !23
  %96 = getelementptr inbounds i8, ptr %93, i64 16
  %97 = load i64, ptr %96, align 8, !tbaa !20
  %98 = icmp eq i64 %97, 10
  br i1 %98, label %99, label %.invoke

99:                                               ; preds = %94
  %100 = getelementptr inbounds i8, ptr %93, i64 24
  %101 = load i64, ptr %100, align 8, !tbaa !20
  %102 = icmp eq i64 %101, 1
  br i1 %102, label %103, label %.invoke

103:                                              ; preds = %99
  %104 = getelementptr inbounds i8, ptr %93, i64 32
  %105 = load i64, ptr %104, align 8, !tbaa !20
  %106 = icmp eq i64 %105, 1
  br i1 %106, label %107, label %.invoke

107:                                              ; preds = %103
  %108 = getelementptr inbounds i8, ptr %93, i64 40
  %109 = load i64, ptr %108, align 8, !tbaa !20
  %110 = icmp eq i64 %109, 1
  br i1 %110, label %257, label %.invoke

111:                                              ; preds = %24
  %112 = tail call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.35)
  br i1 %112, label %113, label %253

113:                                              ; preds = %111
  %114 = load ptr, ptr %9, align 8, !tbaa !9
  %115 = invoke ptr @ggml_get_tensor(ptr noundef %114, ptr noundef nonnull @.str.36)
          to label %116 unwind label %37

116:                                              ; preds = %113
  %117 = getelementptr inbounds i8, ptr %0, i64 120
  store ptr %115, ptr %117, align 8, !tbaa !24
  %118 = load i32, ptr %115, align 8, !tbaa !25
  %119 = icmp eq i32 %118, 0
  br i1 %119, label %120, label %.invoke

120:                                              ; preds = %116
  %121 = getelementptr inbounds i8, ptr %115, i64 16
  %122 = load i64, ptr %121, align 8, !tbaa !20
  %123 = icmp eq i64 %122, 3
  br i1 %123, label %124, label %.invoke

124:                                              ; preds = %120
  %125 = getelementptr inbounds i8, ptr %115, i64 24
  %126 = load i64, ptr %125, align 8, !tbaa !20
  %127 = icmp eq i64 %126, 3
  br i1 %127, label %128, label %.invoke

128:                                              ; preds = %124
  %129 = getelementptr inbounds i8, ptr %115, i64 32
  %130 = load i64, ptr %129, align 8, !tbaa !20
  %131 = icmp eq i64 %130, 1
  br i1 %131, label %132, label %.invoke

132:                                              ; preds = %128
  %133 = getelementptr inbounds i8, ptr %115, i64 40
  %134 = load i64, ptr %133, align 8, !tbaa !20
  %135 = icmp eq i64 %134, 8
  br i1 %135, label %136, label %.invoke

136:                                              ; preds = %132
  %137 = load ptr, ptr %9, align 8, !tbaa !9
  %138 = invoke ptr @ggml_get_tensor(ptr noundef %137, ptr noundef nonnull @.str.42)
          to label %139 unwind label %37

139:                                              ; preds = %136
  %140 = getelementptr inbounds i8, ptr %0, i64 128
  store ptr %138, ptr %140, align 8, !tbaa !29
  %141 = load i32, ptr %138, align 8, !tbaa !25
  %142 = icmp eq i32 %141, 0
  br i1 %142, label %143, label %.invoke

143:                                              ; preds = %139
  %144 = getelementptr inbounds i8, ptr %138, i64 16
  %145 = load i64, ptr %144, align 8, !tbaa !20
  %146 = icmp eq i64 %145, 1
  br i1 %146, label %147, label %.invoke

147:                                              ; preds = %143
  %148 = getelementptr inbounds i8, ptr %138, i64 24
  %149 = load i64, ptr %148, align 8, !tbaa !20
  %150 = icmp eq i64 %149, 1
  br i1 %150, label %151, label %.invoke

151:                                              ; preds = %147
  %152 = getelementptr inbounds i8, ptr %138, i64 32
  %153 = load i64, ptr %152, align 8, !tbaa !20
  %154 = icmp eq i64 %153, 8
  br i1 %154, label %155, label %.invoke

155:                                              ; preds = %151
  %156 = getelementptr inbounds i8, ptr %138, i64 40
  %157 = load i64, ptr %156, align 8, !tbaa !20
  %158 = icmp eq i64 %157, 1
  br i1 %158, label %159, label %.invoke

159:                                              ; preds = %155
  %160 = load ptr, ptr %9, align 8, !tbaa !9
  %161 = invoke ptr @ggml_get_tensor(ptr noundef %160, ptr noundef nonnull @.str.48)
          to label %162 unwind label %37

162:                                              ; preds = %159
  %163 = getelementptr inbounds i8, ptr %0, i64 136
  store ptr %161, ptr %163, align 8, !tbaa !30
  %164 = load i32, ptr %161, align 8, !tbaa !25
  %165 = icmp eq i32 %164, 0
  br i1 %165, label %166, label %.invoke

166:                                              ; preds = %162
  %167 = getelementptr inbounds i8, ptr %161, i64 16
  %168 = load i64, ptr %167, align 8, !tbaa !20
  %169 = icmp eq i64 %168, 3
  br i1 %169, label %170, label %.invoke

170:                                              ; preds = %166
  %171 = getelementptr inbounds i8, ptr %161, i64 24
  %172 = load i64, ptr %171, align 8, !tbaa !20
  %173 = icmp eq i64 %172, 3
  br i1 %173, label %174, label %.invoke

174:                                              ; preds = %170
  %175 = getelementptr inbounds i8, ptr %161, i64 32
  %176 = load i64, ptr %175, align 8, !tbaa !20
  %177 = icmp eq i64 %176, 8
  br i1 %177, label %178, label %.invoke

178:                                              ; preds = %174
  %179 = getelementptr inbounds i8, ptr %161, i64 40
  %180 = load i64, ptr %179, align 8, !tbaa !20
  %181 = icmp eq i64 %180, 16
  br i1 %181, label %182, label %.invoke

182:                                              ; preds = %178
  %183 = load ptr, ptr %9, align 8, !tbaa !9
  %184 = invoke ptr @ggml_get_tensor(ptr noundef %183, ptr noundef nonnull @.str.54)
          to label %185 unwind label %37

185:                                              ; preds = %182
  %186 = getelementptr inbounds i8, ptr %0, i64 144
  store ptr %184, ptr %186, align 8, !tbaa !31
  %187 = load i32, ptr %184, align 8, !tbaa !25
  %188 = icmp eq i32 %187, 0
  br i1 %188, label %189, label %.invoke

189:                                              ; preds = %185
  %190 = getelementptr inbounds i8, ptr %184, i64 16
  %191 = load i64, ptr %190, align 8, !tbaa !20
  %192 = icmp eq i64 %191, 1
  br i1 %192, label %193, label %.invoke

193:                                              ; preds = %189
  %194 = getelementptr inbounds i8, ptr %184, i64 24
  %195 = load i64, ptr %194, align 8, !tbaa !20
  %196 = icmp eq i64 %195, 1
  br i1 %196, label %197, label %.invoke

197:                                              ; preds = %193
  %198 = getelementptr inbounds i8, ptr %184, i64 32
  %199 = load i64, ptr %198, align 8, !tbaa !20
  %200 = icmp eq i64 %199, 16
  br i1 %200, label %201, label %.invoke

201:                                              ; preds = %197
  %202 = getelementptr inbounds i8, ptr %184, i64 40
  %203 = load i64, ptr %202, align 8, !tbaa !20
  %204 = icmp eq i64 %203, 1
  br i1 %204, label %205, label %.invoke

205:                                              ; preds = %201
  %206 = load ptr, ptr %9, align 8, !tbaa !9
  %207 = invoke ptr @ggml_get_tensor(ptr noundef %206, ptr noundef nonnull @.str.60)
          to label %208 unwind label %37

208:                                              ; preds = %205
  %209 = getelementptr inbounds i8, ptr %0, i64 152
  store ptr %207, ptr %209, align 8, !tbaa !32
  %210 = load i32, ptr %207, align 8, !tbaa !25
  %211 = icmp eq i32 %210, 0
  br i1 %211, label %212, label %.invoke

212:                                              ; preds = %208
  %213 = getelementptr inbounds i8, ptr %207, i64 16
  %214 = load i64, ptr %213, align 8, !tbaa !20
  %215 = icmp eq i64 %214, 784
  br i1 %215, label %216, label %.invoke

216:                                              ; preds = %212
  %217 = getelementptr inbounds i8, ptr %207, i64 24
  %218 = load i64, ptr %217, align 8, !tbaa !20
  %219 = icmp eq i64 %218, 10
  br i1 %219, label %220, label %.invoke

220:                                              ; preds = %216
  %221 = getelementptr inbounds i8, ptr %207, i64 32
  %222 = load i64, ptr %221, align 8, !tbaa !20
  %223 = icmp eq i64 %222, 1
  br i1 %223, label %224, label %.invoke

224:                                              ; preds = %220
  %225 = getelementptr inbounds i8, ptr %207, i64 40
  %226 = load i64, ptr %225, align 8, !tbaa !20
  %227 = icmp eq i64 %226, 1
  br i1 %227, label %228, label %.invoke

228:                                              ; preds = %224
  %229 = load ptr, ptr %9, align 8, !tbaa !9
  %230 = invoke ptr @ggml_get_tensor(ptr noundef %229, ptr noundef nonnull @.str.66)
          to label %231 unwind label %37

231:                                              ; preds = %228
  %232 = getelementptr inbounds i8, ptr %0, i64 160
  store ptr %230, ptr %232, align 8, !tbaa !33
  %233 = load i32, ptr %230, align 8, !tbaa !25
  %234 = icmp eq i32 %233, 0
  br i1 %234, label %235, label %.invoke

235:                                              ; preds = %231
  %236 = getelementptr inbounds i8, ptr %230, i64 16
  %237 = load i64, ptr %236, align 8, !tbaa !20
  %238 = icmp eq i64 %237, 10
  br i1 %238, label %239, label %.invoke

239:                                              ; preds = %235
  %240 = getelementptr inbounds i8, ptr %230, i64 24
  %241 = load i64, ptr %240, align 8, !tbaa !20
  %242 = icmp eq i64 %241, 1
  br i1 %242, label %243, label %.invoke

243:                                              ; preds = %239
  %244 = getelementptr inbounds i8, ptr %230, i64 32
  %245 = load i64, ptr %244, align 8, !tbaa !20
  %246 = icmp eq i64 %245, 1
  br i1 %246, label %247, label %.invoke

247:                                              ; preds = %243
  %248 = getelementptr inbounds i8, ptr %230, i64 40
  %249 = load i64, ptr %248, align 8, !tbaa !20
  %250 = icmp eq i64 %249, 1
  br i1 %250, label %257, label %.invoke

.invoke:                                          ; preds = %32, %247, %243, %239, %235, %231, %224, %220, %216, %212, %208, %201, %197, %193, %189, %185, %178, %174, %170, %166, %162, %155, %151, %147, %143, %139, %132, %128, %124, %120, %116, %107, %103, %99, %94, %87, %83, %79, %74, %67, %63, %59, %54, %47, %43, %39
  %251 = phi i32 [ 153, %39 ], [ 154, %43 ], [ 155, %47 ], [ 158, %54 ], [ 159, %59 ], [ 160, %63 ], [ 161, %67 ], [ 164, %74 ], [ 165, %79 ], [ 166, %83 ], [ 167, %87 ], [ 170, %94 ], [ 171, %99 ], [ 172, %103 ], [ 173, %107 ], [ 176, %116 ], [ 177, %120 ], [ 178, %124 ], [ 179, %128 ], [ 180, %132 ], [ 183, %139 ], [ 184, %143 ], [ 185, %147 ], [ 186, %151 ], [ 187, %155 ], [ 190, %162 ], [ 191, %166 ], [ 192, %170 ], [ 193, %174 ], [ 194, %178 ], [ 197, %185 ], [ 198, %189 ], [ 199, %193 ], [ 200, %197 ], [ 201, %201 ], [ 204, %208 ], [ 205, %212 ], [ 206, %216 ], [ 207, %220 ], [ 208, %224 ], [ 211, %231 ], [ 212, %235 ], [ 213, %239 ], [ 214, %243 ], [ 215, %247 ], [ 152, %32 ]
  %252 = phi ptr [ @.str.17, %39 ], [ @.str.18, %43 ], [ @.str.19, %47 ], [ @.str.21, %54 ], [ @.str.22, %59 ], [ @.str.23, %63 ], [ @.str.24, %67 ], [ @.str.26, %74 ], [ @.str.27, %79 ], [ @.str.28, %83 ], [ @.str.29, %87 ], [ @.str.31, %94 ], [ @.str.32, %99 ], [ @.str.33, %103 ], [ @.str.34, %107 ], [ @.str.37, %116 ], [ @.str.38, %120 ], [ @.str.39, %124 ], [ @.str.40, %128 ], [ @.str.41, %132 ], [ @.str.43, %139 ], [ @.str.44, %143 ], [ @.str.45, %147 ], [ @.str.46, %151 ], [ @.str.47, %155 ], [ @.str.49, %162 ], [ @.str.50, %166 ], [ @.str.51, %170 ], [ @.str.52, %174 ], [ @.str.53, %178 ], [ @.str.55, %185 ], [ @.str.56, %189 ], [ @.str.57, %193 ], [ @.str.58, %197 ], [ @.str.59, %201 ], [ @.str.61, %208 ], [ @.str.62, %212 ], [ @.str.63, %216 ], [ @.str.64, %220 ], [ @.str.65, %224 ], [ @.str.67, %231 ], [ @.str.68, %235 ], [ @.str.69, %239 ], [ @.str.70, %243 ], [ @.str.71, %247 ], [ @.str.16, %32 ]
  invoke void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.1, i32 noundef %251, ptr noundef nonnull @.str.2, ptr noundef nonnull %252) #10
          to label %.cont unwind label %37

.cont:                                            ; preds = %.invoke
  unreachable

253:                                              ; preds = %111
  %254 = load ptr, ptr @stderr, align 8, !tbaa !5
  %255 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #7
  %256 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %254, ptr noundef nonnull @.str.72, ptr noundef nonnull @__func__._Z26mnist_model_init_from_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii, ptr noundef %255) #8
  br label %257

257:                                              ; preds = %253, %247, %107
  %258 = load ptr, ptr %9, align 8, !tbaa !9
  %259 = getelementptr inbounds i8, ptr %0, i64 40
  %260 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ggml_backendSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %259, i64 noundef 0) #7
  %261 = load ptr, ptr %260, align 8, !tbaa !5
  %262 = invoke ptr @ggml_backend_alloc_ctx_tensors(ptr noundef %258, ptr noundef %261)
          to label %263 unwind label %37

263:                                              ; preds = %257
  %264 = getelementptr inbounds i8, ptr %0, i64 192
  store ptr %262, ptr %264, align 8, !tbaa !34
  %265 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  %266 = load ptr, ptr %9, align 8, !tbaa !9
  %267 = invoke noundef zeroext i1 @_Z14load_from_ggufPKcP12ggml_contextP12gguf_context(ptr noundef %265, ptr noundef %266, ptr noundef nonnull %11)
          to label %268 unwind label %37

268:                                              ; preds = %263
  br i1 %267, label %273, label %269

269:                                              ; preds = %268
  %270 = load ptr, ptr @stderr, align 8, !tbaa !5
  %271 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  %272 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %270, ptr noundef nonnull @.str.73, ptr noundef nonnull @__func__._Z26mnist_model_init_from_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii, ptr noundef %271) #8
  tail call void @exit(i32 noundef 1) #9
  unreachable

273:                                              ; preds = %268
  %274 = getelementptr inbounds i8, ptr %0, i64 176
  %275 = load ptr, ptr %274, align 8, !tbaa !35
  %276 = invoke ptr @ggml_new_tensor_2d(ptr noundef %275, i32 noundef 0, i64 noundef 784, i64 noundef 500)
          to label %277 unwind label %37

277:                                              ; preds = %273
  %278 = getelementptr inbounds i8, ptr %0, i64 72
  store ptr %276, ptr %278, align 8, !tbaa !36
  %279 = invoke ptr @ggml_set_name(ptr noundef %276, ptr noundef nonnull @.str.74)
          to label %280 unwind label %37

280:                                              ; preds = %277
  %281 = load ptr, ptr %278, align 8, !tbaa !36
  invoke void @ggml_set_input(ptr noundef %281)
          to label %282 unwind label %37

282:                                              ; preds = %280
  %283 = load ptr, ptr %274, align 8, !tbaa !35
  %284 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ggml_backendSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %259, i64 noundef 0) #7
  %285 = load ptr, ptr %284, align 8, !tbaa !5
  %286 = invoke ptr @ggml_backend_alloc_ctx_tensors(ptr noundef %283, ptr noundef %285)
          to label %287 unwind label %37

287:                                              ; preds = %282
  %288 = getelementptr inbounds i8, ptr %0, i64 200
  store ptr %286, ptr %288, align 8, !tbaa !37
  %289 = load ptr, ptr @stderr, align 8, !tbaa !5
  %290 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  %291 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %289, ptr noundef nonnull @.str.75, ptr noundef nonnull @__func__._Z26mnist_model_init_from_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ii, ptr noundef %290) #8
  ret void

292:                                              ; preds = %37, %16
  %.pn = phi { ptr, i32 } [ %38, %37 ], [ %17, %16 ]
  tail call void @_ZN11mnist_modelD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %0) #7
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11mnist_modelC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(208), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) unnamed_addr #3 align 2

declare ptr @gguf_init_from_file(ptr noundef, i8, ptr) local_unnamed_addr #4

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #5

declare ptr @gguf_get_val_str(ptr noundef, i64 noundef) local_unnamed_addr #4

declare i64 @gguf_find_key(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #3 align 2

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

declare ptr @ggml_backend_alloc_ctx_tensors(ptr noundef, ptr noundef) local_unnamed_addr #4

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

declare ptr @ggml_new_tensor_2d(ptr noundef, i32 noundef, i64 noundef, i64 noundef) local_unnamed_addr #4

declare ptr @ggml_set_name(ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @ggml_set_input(ptr noundef) local_unnamed_addr #4

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

attributes #0 = { 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 #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { cold nounwind }
attributes #9 = { noreturn nounwind }
attributes #10 = { 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, !6, i64 168}
!10 = !{!"_ZTS11mnist_model", !11, i64 0, !6, i64 32, !14, i64 40, !18, i64 64, !18, i64 68, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !13, i64 8, !7, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSSt6vectorIP12ggml_backendSaIS1_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIP12ggml_backendSaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIP12ggml_backendSaIS1_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIP12ggml_backendSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"int", !7, i64 0}
!19 = !{!10, !6, i64 88}
!20 = !{!13, !13, i64 0}
!21 = !{!10, !6, i64 96}
!22 = !{!10, !6, i64 104}
!23 = !{!10, !6, i64 112}
!24 = !{!10, !6, i64 120}
!25 = !{!26, !27, i64 0}
!26 = !{!"_ZTS11ggml_tensor", !27, i64 0, !6, i64 8, !7, i64 16, !7, i64 48, !28, i64 80, !7, i64 84, !18, i64 148, !7, i64 152, !6, i64 232, !13, i64 240, !6, i64 248, !7, i64 256, !6, i64 320, !7, i64 328}
!27 = !{!"_ZTS9ggml_type", !7, i64 0}
!28 = !{!"_ZTS7ggml_op", !7, i64 0}
!29 = !{!10, !6, i64 128}
!30 = !{!10, !6, i64 136}
!31 = !{!10, !6, i64 144}
!32 = !{!10, !6, i64 152}
!33 = !{!10, !6, i64 160}
!34 = !{!10, !6, i64 192}
!35 = !{!10, !6, i64 176}
!36 = !{!10, !6, i64 72}
!37 = !{!10, !6, i64 200}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass