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

; 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.test_model = type { ptr, ptr, ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }

@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [16 x i8], align 1
@__const.main.matrixA = external hidden unnamed_addr constant [144 x float], align 16
@__const.main.matrixB = external hidden unnamed_addr constant [576 x float], align 16
@__const.main.expected_result = external hidden unnamed_addr constant [64 x float], align 16
@stderr = external global ptr, align 8
@.str.10 = external hidden unnamed_addr constant [34 x i8], align 1
@__func__.main = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z10load_modelR10test_modelPfS1_iiib(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) #0

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

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

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

declare i64 @ggml_nbytes(ptr noundef) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z11build_graphRK10test_model(ptr noundef nonnull align 8 dereferenceable(40)) #0

declare i32 @__gxx_personality_v0(...)

declare void @ggml_free(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z7computeRK10test_modelP12ggml_gallocr(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) #0

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

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

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #5 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca [144 x float], align 16
  %6 = alloca [576 x float], align 16
  %7 = alloca [64 x float], align 16
  %8 = alloca i8, align 1
  %9 = alloca %struct.test_model, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.std::vector.0", align 8
  %15 = alloca %"class.std::allocator.2", align 1
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @ggml_time_init()
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 4, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 16, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 36, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 576, ptr %5) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %5, ptr align 16 @__const.main.matrixA, i64 576, i1 false)
  call void @llvm.lifetime.start.p0(i64 2304, ptr %6) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %6, ptr align 16 @__const.main.matrixB, i64 2304, i1 false)
  call void @llvm.lifetime.start.p0(i64 256, ptr %7) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %7, ptr align 16 @__const.main.expected_result, i64 256, i1 false)
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #8
  store i8 1, ptr %8, align 1, !tbaa !9
  %22 = getelementptr inbounds [144 x float], ptr %5, i64 0, i64 0
  %23 = getelementptr inbounds [576 x float], ptr %6, i64 0, i64 0
  %24 = getelementptr inbounds [64 x float], ptr %7, i64 0, i64 0
  call void @_Z17perform_gemm_testPfS_S_iii(ptr noundef %22, ptr noundef %23, ptr noundef %24, i32 noundef 4, i32 noundef 16, i32 noundef 36)
  call void @llvm.lifetime.start.p0(i64 40, ptr %9) #8
  call void @_ZN10test_modelC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #8
  %25 = getelementptr inbounds [144 x float], ptr %5, i64 0, i64 0
  %26 = getelementptr inbounds [576 x float], ptr %6, i64 0, i64 0
  call void @_Z10load_modelR10test_modelPfS1_iiib(ptr noundef nonnull align 8 dereferenceable(40) %9, ptr noundef %25, ptr noundef %26, i32 noundef 4, i32 noundef 16, i32 noundef 36, i1 noundef zeroext true)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  store ptr null, ptr %10, align 8, !tbaa !11
  %27 = getelementptr inbounds %struct.test_model, ptr %9, i32 0, i32 2
  %28 = load ptr, ptr %27, align 8, !tbaa !13
  %29 = call ptr @ggml_backend_get_default_buffer_type(ptr noundef %28)
  %30 = call ptr @ggml_gallocr_new(ptr noundef %29)
  store ptr %30, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %31 = call noundef ptr @_Z11build_graphRK10test_model(ptr noundef nonnull align 8 dereferenceable(40) %9)
  store ptr %31, ptr %11, align 8, !tbaa !11
  %32 = load ptr, ptr %10, align 8, !tbaa !11
  %33 = load ptr, ptr %11, align 8, !tbaa !11
  %34 = call zeroext i1 @ggml_gallocr_reserve(ptr noundef %32, ptr noundef %33)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %35 = load ptr, ptr %10, align 8, !tbaa !11
  %36 = call i64 @ggml_gallocr_get_buffer_size(ptr noundef %35, i32 noundef 0)
  store i64 %36, ptr %12, align 8, !tbaa !15
  %37 = load ptr, ptr @stderr, align 8, !tbaa !11
  %38 = load i64, ptr %12, align 8, !tbaa !15
  %39 = uitofp i64 %38 to float
  %40 = fdiv float %39, 1.024000e+03
  %41 = fdiv float %40, 1.024000e+03
  %42 = fpext float %41 to double
  %43 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef @.str.10, ptr noundef @__func__.main, double noundef %42) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %44 = load ptr, ptr %10, align 8, !tbaa !11
  %45 = call noundef ptr @_Z7computeRK10test_modelP12ggml_gallocr(ptr noundef nonnull align 8 dereferenceable(40) %9, ptr noundef %44)
  store ptr %45, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #8
  %46 = load ptr, ptr %13, align 8, !tbaa !11
  %47 = call i64 @ggml_nelements(ptr noundef %46)
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #8
  call void @_ZNSaIfEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #8
  invoke void @_ZNSt6vectorIfSaIfEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %47, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %48 unwind label %61

48:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #8
  %49 = load ptr, ptr %13, align 8, !tbaa !11
  %50 = call noundef ptr @_ZNSt6vectorIfSaIfEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  %51 = load ptr, ptr %13, align 8, !tbaa !11
  %52 = invoke i64 @ggml_nbytes(ptr noundef %51)
          to label %53 unwind label %65

53:                                               ; preds = %48
  invoke void @ggml_backend_tensor_get(ptr noundef %49, ptr noundef %50, i64 noundef 0, i64 noundef %52)
          to label %54 unwind label %65

54:                                               ; preds = %53
  %55 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.11)
          to label %56 unwind label %65

56:                                               ; preds = %54
  store i8 1, ptr %8, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %81, %56
  %58 = load i32, ptr %18, align 4, !tbaa !5
  %59 = icmp slt i32 %58, 64
  br i1 %59, label %69, label %60

60:                                               ; preds = %57
  store i32 2, ptr %19, align 4
  br label %84

61:                                               ; preds = %0
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %16, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %17, align 4
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #8
  br label %156

65:                                               ; preds = %151, %148, %145, %142, %138, %131, %124, %54, %53, %48
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %16, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %17, align 4
  br label %155

69:                                               ; preds = %57
  %70 = load i32, ptr %18, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %71) #8
  %73 = load float, ptr %72, align 4, !tbaa !17
  %74 = load i32, ptr %18, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [64 x float], ptr %7, i64 0, i64 %75
  %77 = load float, ptr %76, align 4, !tbaa !17
  %78 = fcmp une float %73, %77
  br i1 %78, label %79, label %80

79:                                               ; preds = %69
  store i8 0, ptr %8, align 1, !tbaa !9
  store i32 2, ptr %19, align 4
  br label %84

80:                                               ; preds = %69
  br label %81

81:                                               ; preds = %80
  %82 = load i32, ptr %18, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %18, align 4, !tbaa !5
  br label %57, !llvm.loop !19

84:                                               ; preds = %79, %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %85

85:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %116, %85
  %87 = load i32, ptr %20, align 4, !tbaa !5
  %88 = icmp slt i32 %87, 4
  br i1 %88, label %90, label %89

89:                                               ; preds = %86
  store i32 5, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %124

90:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %91

91:                                               ; preds = %106, %90
  %92 = load i32, ptr %21, align 4, !tbaa !5
  %93 = icmp slt i32 %92, 16
  br i1 %93, label %95, label %94

94:                                               ; preds = %91
  store i32 8, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %113

95:                                               ; preds = %91
  %96 = load i32, ptr %20, align 4, !tbaa !5
  %97 = mul nsw i32 %96, 16
  %98 = load i32, ptr %21, align 4, !tbaa !5
  %99 = add nsw i32 %97, %98
  %100 = sext i32 %99 to i64
  %101 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %100) #8
  %102 = load float, ptr %101, align 4, !tbaa !17
  %103 = fpext float %102 to double
  %104 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.12, double noundef %103)
          to label %105 unwind label %109

105:                                              ; preds = %95
  br label %106

106:                                              ; preds = %105
  %107 = load i32, ptr %21, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %21, align 4, !tbaa !5
  br label %91, !llvm.loop !21

109:                                              ; preds = %95
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %16, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %123

113:                                              ; preds = %94
  %114 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.6)
          to label %115 unwind label %119

115:                                              ; preds = %113
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %20, align 4, !tbaa !5
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %20, align 4, !tbaa !5
  br label %86, !llvm.loop !22

119:                                              ; preds = %113
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %16, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %17, align 4
  br label %123

123:                                              ; preds = %119, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %155

124:                                              ; preds = %89
  %125 = load ptr, ptr %13, align 8, !tbaa !11
  %126 = invoke i64 @ggml_nelements(ptr noundef %125)
          to label %127 unwind label %65

127:                                              ; preds = %124
  %128 = trunc i64 %126 to i32
  %129 = load i8, ptr %8, align 1, !tbaa !9, !range !23, !noundef !24
  %130 = trunc i8 %129 to i1
  br i1 %130, label %131, label %137

131:                                              ; preds = %127
  %132 = load ptr, ptr %13, align 8, !tbaa !11
  %133 = invoke i64 @ggml_nelements(ptr noundef %132)
          to label %134 unwind label %65

134:                                              ; preds = %131
  %135 = icmp eq i64 %133, 64
  br i1 %135, label %136, label %137

136:                                              ; preds = %134
  br label %138

137:                                              ; preds = %134, %127
  br label %138

138:                                              ; preds = %137, %136
  %139 = phi ptr [ @.str.8, %136 ], [ @.str.9, %137 ]
  %140 = getelementptr inbounds [16 x i8], ptr %139, i64 0, i64 0
  %141 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.13, i32 noundef %128, ptr noundef %140)
          to label %142 unwind label %65

142:                                              ; preds = %138
  %143 = getelementptr inbounds %struct.test_model, ptr %9, i32 0, i32 4
  %144 = load ptr, ptr %143, align 8, !tbaa !25
  invoke void @ggml_free(ptr noundef %144)
          to label %145 unwind label %65

145:                                              ; preds = %142
  %146 = getelementptr inbounds %struct.test_model, ptr %9, i32 0, i32 3
  %147 = load ptr, ptr %146, align 8, !tbaa !26
  invoke void @ggml_backend_buffer_free(ptr noundef %147)
          to label %148 unwind label %65

148:                                              ; preds = %145
  %149 = getelementptr inbounds %struct.test_model, ptr %9, i32 0, i32 2
  %150 = load ptr, ptr %149, align 8, !tbaa !13
  invoke void @ggml_backend_free(ptr noundef %150)
          to label %151 unwind label %65

151:                                              ; preds = %148
  %152 = load ptr, ptr %10, align 8, !tbaa !11
  invoke void @ggml_gallocr_free(ptr noundef %152)
          to label %153 unwind label %65

153:                                              ; preds = %151
  store i32 0, ptr %1, align 4
  store i32 1, ptr %19, align 4
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 256, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 2304, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 576, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %154 = load i32, ptr %1, align 4
  ret i32 %154

155:                                              ; preds = %123, %65
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  br label %156

156:                                              ; preds = %155, %61
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 256, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 2304, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 576, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %157

157:                                              ; preds = %156
  %158 = load ptr, ptr %16, align 8
  %159 = load i32, ptr %17, align 4
  %160 = insertvalue { ptr, i32 } poison, ptr %158, 0
  %161 = insertvalue { ptr, i32 } %160, i32 %159, 1
  resume { ptr, i32 } %161
}

declare void @ggml_time_init() #2

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

declare ptr @ggml_gallocr_new(ptr noundef) #2

declare ptr @ggml_backend_get_default_buffer_type(ptr noundef) #2

declare zeroext i1 @ggml_gallocr_reserve(ptr noundef, ptr noundef) #2

declare i64 @ggml_gallocr_get_buffer_size(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #7

declare i64 @ggml_nelements(ptr noundef) #2

declare void @ggml_backend_tensor_get(ptr noundef, ptr noundef, i64 noundef, i64 noundef) #2

declare void @ggml_backend_buffer_free(ptr noundef) #2

declare void @ggml_backend_free(ptr noundef) #2

declare void @ggml_gallocr_free(ptr noundef) #2

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

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

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

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


; 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.test_model = type { ptr, ptr, ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }

@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [16 x i8], align 1
@__const.main.matrixA = external hidden unnamed_addr constant [144 x float], align 16
@__const.main.matrixB = external hidden unnamed_addr constant [576 x float], align 16
@__const.main.expected_result = external hidden unnamed_addr constant [64 x float], align 16
@stderr = external local_unnamed_addr global ptr, align 8
@.str.10 = external hidden unnamed_addr constant [34 x i8], align 1
@__func__.main = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z10load_modelR10test_modelPfS1_iiib(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #0

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

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

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

declare i64 @ggml_nbytes(ptr noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z11build_graphRK10test_model(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

declare void @ggml_free(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z7computeRK10test_modelP12ggml_gallocr(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z17perform_gemm_testPfS_S_iii(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #6 personality ptr @__gxx_personality_v0 {
  %1 = alloca [144 x float], align 16
  %2 = alloca [576 x float], align 16
  %3 = alloca [64 x float], align 16
  %4 = alloca %struct.test_model, align 8
  %5 = alloca %"class.std::vector.0", align 8
  %6 = alloca %"class.std::allocator.2", align 1
  tail call void @ggml_time_init()
  call void @llvm.lifetime.start.p0(i64 576, ptr nonnull %1) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(576) %1, ptr noundef nonnull align 16 dereferenceable(576) @__const.main.matrixA, i64 576, i1 false)
  call void @llvm.lifetime.start.p0(i64 2304, ptr nonnull %2) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(2304) %2, ptr noundef nonnull align 16 dereferenceable(2304) @__const.main.matrixB, i64 2304, i1 false)
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %3) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(256) %3, ptr noundef nonnull align 16 dereferenceable(256) @__const.main.expected_result, i64 256, i1 false)
  call void @_Z17perform_gemm_testPfS_S_iii(ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3, i32 noundef 4, i32 noundef 16, i32 noundef 36)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #8
  call void @_ZN10test_modelC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #8
  call void @_Z10load_modelR10test_modelPfS1_iiib(ptr noundef nonnull align 8 dereferenceable(40) %4, ptr noundef nonnull %1, ptr noundef nonnull %2, i32 noundef 4, i32 noundef 16, i32 noundef 36, i1 noundef zeroext true)
  %7 = getelementptr inbounds i8, ptr %4, i64 16
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %9 = call ptr @ggml_backend_get_default_buffer_type(ptr noundef %8)
  %10 = call ptr @ggml_gallocr_new(ptr noundef %9)
  %11 = call noundef ptr @_Z11build_graphRK10test_model(ptr noundef nonnull align 8 dereferenceable(40) %4)
  %12 = call zeroext i1 @ggml_gallocr_reserve(ptr noundef %10, ptr noundef %11)
  %13 = call i64 @ggml_gallocr_get_buffer_size(ptr noundef %10, i32 noundef 0)
  %14 = load ptr, ptr @stderr, align 8, !tbaa !10
  %15 = uitofp i64 %13 to float
  %16 = fmul float %15, 0x3F50000000000000
  %17 = fmul float %16, 0x3F50000000000000
  %18 = fpext float %17 to double
  %19 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str.10, ptr noundef nonnull @__func__.main, double noundef %18) #9
  %20 = call noundef ptr @_Z7computeRK10test_modelP12ggml_gallocr(ptr noundef nonnull align 8 dereferenceable(40) %4, ptr noundef %10)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  %21 = call i64 @ggml_nelements(ptr noundef %20)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #8
  call void @_ZNSaIfEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  invoke void @_ZNSt6vectorIfSaIfEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %21, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %22 unwind label %32

22:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  %23 = call noundef ptr @_ZNSt6vectorIfSaIfEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  %24 = invoke i64 @ggml_nbytes(ptr noundef %20)
          to label %25 unwind label %34

25:                                               ; preds = %22
  invoke void @ggml_backend_tensor_get(ptr noundef %20, ptr noundef %23, i64 noundef 0, i64 noundef %24)
          to label %26 unwind label %34

26:                                               ; preds = %25
  %27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11)
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 0) #8
  %29 = load float, ptr %28, align 4, !tbaa !11
  %30 = load float, ptr %3, align 16, !tbaa !11
  %31 = fcmp une float %29, %30
  br i1 %31, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %26, %36
  %indvars.iv41 = phi i64 [ %indvars.iv.next, %36 ], [ 0, %26 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv41, 1
  %exitcond = icmp eq i64 %indvars.iv.next, 64
  br i1 %exitcond, label %._crit_edge.loopexit, label %36, !llvm.loop !13

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

34:                                               ; preds = %143, %141, %138, %133, %128, %124, %25, %22
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  br label %145

36:                                               ; preds = %.lr.ph
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv.next) #8
  %38 = load float, ptr %37, align 4, !tbaa !11
  %39 = getelementptr inbounds [64 x float], ptr %3, i64 0, i64 %indvars.iv.next
  %40 = load float, ptr %39, align 4, !tbaa !11
  %41 = fcmp une float %38, %40
  br i1 %41, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !13

._crit_edge.loopexit:                             ; preds = %36, %.lr.ph
  %42 = icmp ugt i64 %indvars.iv41, 62
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %26
  %.lcssa = phi i1 [ false, %26 ], [ %42, %._crit_edge.loopexit ]
  br label %.preheader

.preheader:                                       ; preds = %._crit_edge, %.preheader
  %indvars.iv37 = phi i64 [ 0, %._crit_edge ], [ %indvars.iv.next38, %.preheader ]
  %43 = shl nuw nsw i64 %indvars.iv37, 4
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %43) #8
  %45 = load float, ptr %44, align 4, !tbaa !11
  %46 = fpext float %45 to double
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %46)
  %48 = or disjoint i64 %43, 1
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %48) #8
  %50 = load float, ptr %49, align 4, !tbaa !11
  %51 = fpext float %50 to double
  %52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %51)
  %53 = or disjoint i64 %43, 2
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %53) #8
  %55 = load float, ptr %54, align 4, !tbaa !11
  %56 = fpext float %55 to double
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %56)
  %58 = or disjoint i64 %43, 3
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %58) #8
  %60 = load float, ptr %59, align 4, !tbaa !11
  %61 = fpext float %60 to double
  %62 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %61)
  %63 = or disjoint i64 %43, 4
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %63) #8
  %65 = load float, ptr %64, align 4, !tbaa !11
  %66 = fpext float %65 to double
  %67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %66)
  %68 = or disjoint i64 %43, 5
  %69 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %68) #8
  %70 = load float, ptr %69, align 4, !tbaa !11
  %71 = fpext float %70 to double
  %72 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %71)
  %73 = or disjoint i64 %43, 6
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %73) #8
  %75 = load float, ptr %74, align 4, !tbaa !11
  %76 = fpext float %75 to double
  %77 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %76)
  %78 = or disjoint i64 %43, 7
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %78) #8
  %80 = load float, ptr %79, align 4, !tbaa !11
  %81 = fpext float %80 to double
  %82 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %81)
  %83 = or disjoint i64 %43, 8
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %83) #8
  %85 = load float, ptr %84, align 4, !tbaa !11
  %86 = fpext float %85 to double
  %87 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %86)
  %88 = or disjoint i64 %43, 9
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %88) #8
  %90 = load float, ptr %89, align 4, !tbaa !11
  %91 = fpext float %90 to double
  %92 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %91)
  %93 = or disjoint i64 %43, 10
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %93) #8
  %95 = load float, ptr %94, align 4, !tbaa !11
  %96 = fpext float %95 to double
  %97 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %96)
  %98 = or disjoint i64 %43, 11
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %98) #8
  %100 = load float, ptr %99, align 4, !tbaa !11
  %101 = fpext float %100 to double
  %102 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %101)
  %103 = or disjoint i64 %43, 12
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %103) #8
  %105 = load float, ptr %104, align 4, !tbaa !11
  %106 = fpext float %105 to double
  %107 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %106)
  %108 = or disjoint i64 %43, 13
  %109 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %108) #8
  %110 = load float, ptr %109, align 4, !tbaa !11
  %111 = fpext float %110 to double
  %112 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %111)
  %113 = or disjoint i64 %43, 14
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %113) #8
  %115 = load float, ptr %114, align 4, !tbaa !11
  %116 = fpext float %115 to double
  %117 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %116)
  %118 = or disjoint i64 %43, 15
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %118) #8
  %120 = load float, ptr %119, align 4, !tbaa !11
  %121 = fpext float %120 to double
  %122 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %121)
  %123 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %indvars.iv.next38 = add nuw nsw i64 %indvars.iv37, 1
  %exitcond40.not = icmp eq i64 %indvars.iv.next38, 4
  br i1 %exitcond40.not, label %124, label %.preheader, !llvm.loop !15

124:                                              ; preds = %.preheader
  %125 = invoke i64 @ggml_nelements(ptr noundef %20)
          to label %126 unwind label %34

126:                                              ; preds = %124
  %127 = trunc i64 %125 to i32
  br i1 %.lcssa, label %128, label %132

128:                                              ; preds = %126
  %129 = invoke i64 @ggml_nelements(ptr noundef %20)
          to label %130 unwind label %34

130:                                              ; preds = %128
  %131 = icmp eq i64 %129, 64
  br i1 %131, label %133, label %132

132:                                              ; preds = %130, %126
  br label %133

133:                                              ; preds = %130, %132
  %134 = phi ptr [ @.str.9, %132 ], [ @.str.8, %130 ]
  %135 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef %127, ptr noundef nonnull %134)
  %136 = getelementptr inbounds i8, ptr %4, i64 32
  %137 = load ptr, ptr %136, align 8, !tbaa !16
  invoke void @ggml_free(ptr noundef %137)
          to label %138 unwind label %34

138:                                              ; preds = %133
  %139 = getelementptr inbounds i8, ptr %4, i64 24
  %140 = load ptr, ptr %139, align 8, !tbaa !17
  invoke void @ggml_backend_buffer_free(ptr noundef %140)
          to label %141 unwind label %34

141:                                              ; preds = %138
  %142 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @ggml_backend_free(ptr noundef %142)
          to label %143 unwind label %34

143:                                              ; preds = %141
  invoke void @ggml_gallocr_free(ptr noundef %10)
          to label %144 unwind label %34

144:                                              ; preds = %143
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 2304, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 576, ptr nonnull %1) #8
  ret i32 0

145:                                              ; preds = %34, %32
  %.pn = phi { ptr, i32 } [ %35, %34 ], [ %33, %32 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 2304, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 576, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn
}

declare void @ggml_time_init() local_unnamed_addr #4

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

declare ptr @ggml_gallocr_new(ptr noundef) local_unnamed_addr #4

declare ptr @ggml_backend_get_default_buffer_type(ptr noundef) local_unnamed_addr #4

declare zeroext i1 @ggml_gallocr_reserve(ptr noundef, ptr noundef) local_unnamed_addr #4

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

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

declare i64 @ggml_nelements(ptr noundef) local_unnamed_addr #4

declare void @ggml_backend_tensor_get(ptr noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #4

declare void @ggml_backend_buffer_free(ptr noundef) local_unnamed_addr #4

declare void @ggml_backend_free(ptr noundef) local_unnamed_addr #4

declare void @ggml_gallocr_free(ptr noundef) local_unnamed_addr #4

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 16}
!6 = !{!"_ZTS10test_model", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!7, !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !8, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!6, !7, i64 32}
!17 = !{!6, !7, i64 24}


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