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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.ggml_init_params = type { i64, ptr, i8 }
%struct.ggml_tensor = type { i32, ptr, [4 x i64], [4 x i64], i32, [16 x i32], i32, [10 x ptr], ptr, i64, ptr, [64 x i8], ptr, [8 x i8] }

@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@__const.main.params = external hidden unnamed_addr constant %struct.ggml_init_params, align 8
@.str.11 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [24 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [29 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: nounwind
declare i32 @rand() #0

; Function Attrs: nounwind uwtable
declare dso_local void @get_random_dims(ptr noundef, i32 noundef) #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @get_random_tensor(ptr noundef, i32 noundef, ptr noundef, float noundef, float noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @check_gradient(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, float noundef, float noundef, float noundef) #1

declare void @ggml_build_forward_expand(ptr noundef, ptr noundef) #4

declare i32 @ggml_graph_compute_with_ctx(ptr noundef, ptr noundef, i32 noundef) #4

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @check_mat_mul(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %struct.ggml_init_params, align 8
  %7 = alloca [4 x i64], align 16
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca [2 x ptr], align 16
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 8 @__const.main.params, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 500, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %25 = call ptr @getenv(ptr noundef @.str.11) #7
  store ptr %25, ptr %9, align 8, !tbaa !9
  %26 = load ptr, ptr %9, align 8, !tbaa !9
  %27 = icmp ne ptr %26, null
  br i1 %27, label %28, label %31

28:                                               ; preds = %2
  %29 = load ptr, ptr %9, align 8, !tbaa !9
  %30 = call i32 @atoi(ptr noundef %29) #8
  store i32 %30, ptr %8, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %28, %2
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = icmp sgt i32 %32, 1
  br i1 %33, label %34, label %39

34:                                               ; preds = %31
  %35 = load ptr, ptr %5, align 8, !tbaa !9
  %36 = getelementptr inbounds ptr, ptr %35, i64 1
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  %38 = call i32 @atoi(ptr noundef %37) #8
  store i32 %38, ptr %8, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %34, %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %397, %39
  %41 = load i32, ptr %11, align 4, !tbaa !5
  %42 = load i32, ptr %8, align 4, !tbaa !5
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %400

45:                                               ; preds = %40
  %46 = load i32, ptr %11, align 4, !tbaa !5
  %47 = load i32, ptr %8, align 4, !tbaa !5
  %48 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, i32 noundef %46, i32 noundef %47)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %49 = call ptr @ggml_init(ptr noundef byval(%struct.ggml_init_params) align 8 %6)
  store ptr %49, ptr %13, align 8, !tbaa !9
  %50 = getelementptr inbounds [4 x i64], ptr %7, i64 0, i64 0
  call void @get_random_dims(ptr noundef %50, i32 noundef 4)
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 1, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 2, ptr %16, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %216, %45
  %52 = load i32, ptr %16, align 4, !tbaa !5
  %53 = icmp sle i32 %52, 4
  br i1 %53, label %55, label %54

54:                                               ; preds = %51
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %219

55:                                               ; preds = %51
  %56 = load ptr, ptr %13, align 8, !tbaa !9
  %57 = load i32, ptr %16, align 4, !tbaa !5
  %58 = getelementptr inbounds [4 x i64], ptr %7, i64 0, i64 0
  %59 = call ptr @get_random_tensor(ptr noundef %56, i32 noundef %57, ptr noundef %58, float noundef -1.000000e+00, float noundef 1.000000e+00)
  %60 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  store ptr %59, ptr %60, align 16, !tbaa !9
  %61 = call i32 @rand() #7
  %62 = srem i32 %61, 4
  %63 = add nsw i32 %62, 1
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [4 x i64], ptr %7, i64 0, i64 1
  store i64 %64, ptr %65, align 8, !tbaa !11
  %66 = load ptr, ptr %13, align 8, !tbaa !9
  %67 = load i32, ptr %16, align 4, !tbaa !5
  %68 = getelementptr inbounds [4 x i64], ptr %7, i64 0, i64 0
  %69 = call ptr @get_random_tensor(ptr noundef %66, i32 noundef %67, ptr noundef %68, float noundef -1.000000e+00, float noundef 1.000000e+00)
  %70 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 1
  store ptr %69, ptr %70, align 8, !tbaa !9
  %71 = load ptr, ptr %13, align 8, !tbaa !9
  %72 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %73 = load ptr, ptr %72, align 16, !tbaa !9
  call void @ggml_set_param(ptr noundef %71, ptr noundef %73)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %74 = load ptr, ptr %13, align 8, !tbaa !9
  %75 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 1
  %76 = load ptr, ptr %75, align 8, !tbaa !9
  %77 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %78 = load ptr, ptr %77, align 16, !tbaa !9
  %79 = call ptr @ggml_mul_mat(ptr noundef %74, ptr noundef %76, ptr noundef %78)
  store ptr %79, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %80 = load ptr, ptr %13, align 8, !tbaa !9
  %81 = load ptr, ptr %17, align 8, !tbaa !9
  %82 = call ptr @ggml_sum(ptr noundef %80, ptr noundef %81)
  store ptr %82, ptr %18, align 8, !tbaa !9
  %83 = load ptr, ptr %17, align 8, !tbaa !9
  %84 = getelementptr inbounds %struct.ggml_tensor, ptr %83, i32 0, i32 2
  %85 = getelementptr inbounds [4 x i64], ptr %84, i64 0, i64 0
  %86 = load i64, ptr %85, align 8, !tbaa !11
  %87 = load ptr, ptr %17, align 8, !tbaa !9
  %88 = getelementptr inbounds %struct.ggml_tensor, ptr %87, i32 0, i32 2
  %89 = getelementptr inbounds [4 x i64], ptr %88, i64 0, i64 1
  %90 = load i64, ptr %89, align 8, !tbaa !11
  %91 = load ptr, ptr %17, align 8, !tbaa !9
  %92 = getelementptr inbounds %struct.ggml_tensor, ptr %91, i32 0, i32 2
  %93 = getelementptr inbounds [4 x i64], ptr %92, i64 0, i64 2
  %94 = load i64, ptr %93, align 8, !tbaa !11
  %95 = load ptr, ptr %17, align 8, !tbaa !9
  %96 = getelementptr inbounds %struct.ggml_tensor, ptr %95, i32 0, i32 2
  %97 = getelementptr inbounds [4 x i64], ptr %96, i64 0, i64 3
  %98 = load i64, ptr %97, align 8, !tbaa !11
  %99 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 1
  %100 = load ptr, ptr %99, align 8, !tbaa !9
  %101 = getelementptr inbounds %struct.ggml_tensor, ptr %100, i32 0, i32 2
  %102 = getelementptr inbounds [4 x i64], ptr %101, i64 0, i64 0
  %103 = load i64, ptr %102, align 8, !tbaa !11
  %104 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 1
  %105 = load ptr, ptr %104, align 8, !tbaa !9
  %106 = getelementptr inbounds %struct.ggml_tensor, ptr %105, i32 0, i32 2
  %107 = getelementptr inbounds [4 x i64], ptr %106, i64 0, i64 1
  %108 = load i64, ptr %107, align 8, !tbaa !11
  %109 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 1
  %110 = load ptr, ptr %109, align 8, !tbaa !9
  %111 = getelementptr inbounds %struct.ggml_tensor, ptr %110, i32 0, i32 2
  %112 = getelementptr inbounds [4 x i64], ptr %111, i64 0, i64 2
  %113 = load i64, ptr %112, align 8, !tbaa !11
  %114 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 1
  %115 = load ptr, ptr %114, align 8, !tbaa !9
  %116 = getelementptr inbounds %struct.ggml_tensor, ptr %115, i32 0, i32 2
  %117 = getelementptr inbounds [4 x i64], ptr %116, i64 0, i64 3
  %118 = load i64, ptr %117, align 8, !tbaa !11
  %119 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %120 = load ptr, ptr %119, align 16, !tbaa !9
  %121 = getelementptr inbounds %struct.ggml_tensor, ptr %120, i32 0, i32 2
  %122 = getelementptr inbounds [4 x i64], ptr %121, i64 0, i64 0
  %123 = load i64, ptr %122, align 8, !tbaa !11
  %124 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %125 = load ptr, ptr %124, align 16, !tbaa !9
  %126 = getelementptr inbounds %struct.ggml_tensor, ptr %125, i32 0, i32 2
  %127 = getelementptr inbounds [4 x i64], ptr %126, i64 0, i64 1
  %128 = load i64, ptr %127, align 8, !tbaa !11
  %129 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %130 = load ptr, ptr %129, align 16, !tbaa !9
  %131 = getelementptr inbounds %struct.ggml_tensor, ptr %130, i32 0, i32 2
  %132 = getelementptr inbounds [4 x i64], ptr %131, i64 0, i64 2
  %133 = load i64, ptr %132, align 8, !tbaa !11
  %134 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %135 = load ptr, ptr %134, align 16, !tbaa !9
  %136 = getelementptr inbounds %struct.ggml_tensor, ptr %135, i32 0, i32 2
  %137 = getelementptr inbounds [4 x i64], ptr %136, i64 0, i64 3
  %138 = load i64, ptr %137, align 8, !tbaa !11
  %139 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, i64 noundef %86, i64 noundef %90, i64 noundef %94, i64 noundef %98, i64 noundef %103, i64 noundef %108, i64 noundef %113, i64 noundef %118, i64 noundef %123, i64 noundef %128, i64 noundef %133, i64 noundef %138)
  %140 = load ptr, ptr %17, align 8, !tbaa !9
  %141 = getelementptr inbounds %struct.ggml_tensor, ptr %140, i32 0, i32 2
  %142 = getelementptr inbounds [4 x i64], ptr %141, i64 0, i64 0
  %143 = load i64, ptr %142, align 8, !tbaa !11
  %144 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 1
  %145 = load ptr, ptr %144, align 8, !tbaa !9
  %146 = getelementptr inbounds %struct.ggml_tensor, ptr %145, i32 0, i32 2
  %147 = getelementptr inbounds [4 x i64], ptr %146, i64 0, i64 1
  %148 = load i64, ptr %147, align 8, !tbaa !11
  %149 = icmp eq i64 %143, %148
  br i1 %149, label %150, label %151

150:                                              ; preds = %55
  br label %152

151:                                              ; preds = %55
  call void @__assert_fail(ptr noundef @.str.14, ptr noundef @.str.1, i32 noundef 279, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

152:                                              ; preds = %150
  %153 = load ptr, ptr %17, align 8, !tbaa !9
  %154 = getelementptr inbounds %struct.ggml_tensor, ptr %153, i32 0, i32 2
  %155 = getelementptr inbounds [4 x i64], ptr %154, i64 0, i64 1
  %156 = load i64, ptr %155, align 8, !tbaa !11
  %157 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %158 = load ptr, ptr %157, align 16, !tbaa !9
  %159 = getelementptr inbounds %struct.ggml_tensor, ptr %158, i32 0, i32 2
  %160 = getelementptr inbounds [4 x i64], ptr %159, i64 0, i64 1
  %161 = load i64, ptr %160, align 8, !tbaa !11
  %162 = icmp eq i64 %156, %161
  br i1 %162, label %163, label %164

163:                                              ; preds = %152
  br label %165

164:                                              ; preds = %152
  call void @__assert_fail(ptr noundef @.str.15, ptr noundef @.str.1, i32 noundef 280, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

165:                                              ; preds = %163
  %166 = load ptr, ptr %17, align 8, !tbaa !9
  %167 = getelementptr inbounds %struct.ggml_tensor, ptr %166, i32 0, i32 2
  %168 = getelementptr inbounds [4 x i64], ptr %167, i64 0, i64 2
  %169 = load i64, ptr %168, align 8, !tbaa !11
  %170 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %171 = load ptr, ptr %170, align 16, !tbaa !9
  %172 = getelementptr inbounds %struct.ggml_tensor, ptr %171, i32 0, i32 2
  %173 = getelementptr inbounds [4 x i64], ptr %172, i64 0, i64 2
  %174 = load i64, ptr %173, align 8, !tbaa !11
  %175 = icmp eq i64 %169, %174
  br i1 %175, label %176, label %177

176:                                              ; preds = %165
  br label %178

177:                                              ; preds = %165
  call void @__assert_fail(ptr noundef @.str.16, ptr noundef @.str.1, i32 noundef 281, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

178:                                              ; preds = %176
  %179 = load ptr, ptr %17, align 8, !tbaa !9
  %180 = getelementptr inbounds %struct.ggml_tensor, ptr %179, i32 0, i32 2
  %181 = getelementptr inbounds [4 x i64], ptr %180, i64 0, i64 3
  %182 = load i64, ptr %181, align 8, !tbaa !11
  %183 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %184 = load ptr, ptr %183, align 16, !tbaa !9
  %185 = getelementptr inbounds %struct.ggml_tensor, ptr %184, i32 0, i32 2
  %186 = getelementptr inbounds [4 x i64], ptr %185, i64 0, i64 3
  %187 = load i64, ptr %186, align 8, !tbaa !11
  %188 = icmp eq i64 %182, %187
  br i1 %188, label %189, label %190

189:                                              ; preds = %178
  br label %191

190:                                              ; preds = %178
  call void @__assert_fail(ptr noundef @.str.17, ptr noundef @.str.1, i32 noundef 282, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

191:                                              ; preds = %189
  %192 = load i32, ptr %16, align 4, !tbaa !5
  %193 = icmp sle i32 %192, 2
  br i1 %193, label %194, label %200

194:                                              ; preds = %191
  %195 = load ptr, ptr %13, align 8, !tbaa !9
  %196 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %197 = load ptr, ptr %18, align 8, !tbaa !9
  %198 = load i32, ptr %16, align 4, !tbaa !5
  %199 = call zeroext i1 @check_gradient(ptr noundef @.str.18, ptr noundef %195, ptr noundef %196, ptr noundef %197, i32 noundef %198, i32 noundef 1, float noundef 0x3F50624DE0000000, float noundef 0x3F50624DE0000000, float noundef 0x7FF0000000000000)
  br label %209

200:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %201 = load ptr, ptr %13, align 8, !tbaa !9
  %202 = call ptr @ggml_new_graph(ptr noundef %201)
  store ptr %202, ptr %19, align 8, !tbaa !9
  %203 = load ptr, ptr %19, align 8, !tbaa !9
  %204 = load ptr, ptr %17, align 8, !tbaa !9
  call void @ggml_build_forward_expand(ptr noundef %203, ptr noundef %204)
  %205 = load ptr, ptr %13, align 8, !tbaa !9
  %206 = load ptr, ptr %19, align 8, !tbaa !9
  %207 = load i32, ptr %10, align 4, !tbaa !5
  %208 = call i32 @ggml_graph_compute_with_ctx(ptr noundef %205, ptr noundef %206, i32 noundef %207)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %209

209:                                              ; preds = %200, %194
  %210 = load ptr, ptr %17, align 8, !tbaa !9
  %211 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 1
  %212 = load ptr, ptr %211, align 8, !tbaa !9
  %213 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %214 = load ptr, ptr %213, align 16, !tbaa !9
  %215 = call zeroext i1 @check_mat_mul(ptr noundef %210, ptr noundef %212, ptr noundef %214)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %216

216:                                              ; preds = %209
  %217 = load i32, ptr %16, align 4, !tbaa !5
  %218 = add nsw i32 %217, 1
  store i32 %218, ptr %16, align 4, !tbaa !5
  br label %51, !llvm.loop !13

219:                                              ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 1, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 2, ptr %21, align 4, !tbaa !5
  br label %220

220:                                              ; preds = %392, %219
  %221 = load i32, ptr %21, align 4, !tbaa !5
  %222 = icmp sle i32 %221, 4
  br i1 %222, label %224, label %223

223:                                              ; preds = %220
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %395

224:                                              ; preds = %220
  %225 = load ptr, ptr %13, align 8, !tbaa !9
  %226 = load i32, ptr %21, align 4, !tbaa !5
  %227 = getelementptr inbounds [4 x i64], ptr %7, i64 0, i64 0
  %228 = call ptr @get_random_tensor(ptr noundef %225, i32 noundef %226, ptr noundef %227, float noundef -1.000000e+00, float noundef 1.000000e+00)
  %229 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  store ptr %228, ptr %229, align 16, !tbaa !9
  %230 = getelementptr inbounds [4 x i64], ptr %7, i64 0, i64 0
  %231 = load i64, ptr %230, align 16, !tbaa !11
  %232 = getelementptr inbounds [4 x i64], ptr %7, i64 0, i64 1
  store i64 %231, ptr %232, align 8, !tbaa !11
  %233 = call i32 @rand() #7
  %234 = srem i32 %233, 4
  %235 = add nsw i32 %234, 1
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds [4 x i64], ptr %7, i64 0, i64 0
  store i64 %236, ptr %237, align 16, !tbaa !11
  %238 = load ptr, ptr %13, align 8, !tbaa !9
  %239 = load ptr, ptr %13, align 8, !tbaa !9
  %240 = load ptr, ptr %13, align 8, !tbaa !9
  %241 = load i32, ptr %21, align 4, !tbaa !5
  %242 = getelementptr inbounds [4 x i64], ptr %7, i64 0, i64 0
  %243 = call ptr @get_random_tensor(ptr noundef %240, i32 noundef %241, ptr noundef %242, float noundef -1.000000e+00, float noundef 1.000000e+00)
  %244 = call ptr @ggml_transpose(ptr noundef %239, ptr noundef %243)
  %245 = call ptr @ggml_cont(ptr noundef %238, ptr noundef %244)
  %246 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 1
  store ptr %245, ptr %246, align 8, !tbaa !9
  %247 = load ptr, ptr %13, align 8, !tbaa !9
  %248 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %249 = load ptr, ptr %248, align 16, !tbaa !9
  call void @ggml_set_param(ptr noundef %247, ptr noundef %249)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %250 = load ptr, ptr %13, align 8, !tbaa !9
  %251 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 1
  %252 = load ptr, ptr %251, align 8, !tbaa !9
  %253 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %254 = load ptr, ptr %253, align 16, !tbaa !9
  %255 = call ptr @ggml_mul_mat(ptr noundef %250, ptr noundef %252, ptr noundef %254)
  store ptr %255, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %256 = load ptr, ptr %13, align 8, !tbaa !9
  %257 = load ptr, ptr %22, align 8, !tbaa !9
  %258 = call ptr @ggml_sum(ptr noundef %256, ptr noundef %257)
  store ptr %258, ptr %23, align 8, !tbaa !9
  %259 = load ptr, ptr %22, align 8, !tbaa !9
  %260 = getelementptr inbounds %struct.ggml_tensor, ptr %259, i32 0, i32 2
  %261 = getelementptr inbounds [4 x i64], ptr %260, i64 0, i64 0
  %262 = load i64, ptr %261, align 8, !tbaa !11
  %263 = load ptr, ptr %22, align 8, !tbaa !9
  %264 = getelementptr inbounds %struct.ggml_tensor, ptr %263, i32 0, i32 2
  %265 = getelementptr inbounds [4 x i64], ptr %264, i64 0, i64 1
  %266 = load i64, ptr %265, align 8, !tbaa !11
  %267 = load ptr, ptr %22, align 8, !tbaa !9
  %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 !11
  %271 = load ptr, ptr %22, align 8, !tbaa !9
  %272 = getelementptr inbounds %struct.ggml_tensor, ptr %271, i32 0, i32 2
  %273 = getelementptr inbounds [4 x i64], ptr %272, i64 0, i64 3
  %274 = load i64, ptr %273, align 8, !tbaa !11
  %275 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 1
  %276 = load ptr, ptr %275, align 8, !tbaa !9
  %277 = getelementptr inbounds %struct.ggml_tensor, ptr %276, i32 0, i32 2
  %278 = getelementptr inbounds [4 x i64], ptr %277, i64 0, i64 0
  %279 = load i64, ptr %278, align 8, !tbaa !11
  %280 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 1
  %281 = load ptr, ptr %280, align 8, !tbaa !9
  %282 = getelementptr inbounds %struct.ggml_tensor, ptr %281, i32 0, i32 2
  %283 = getelementptr inbounds [4 x i64], ptr %282, i64 0, i64 1
  %284 = load i64, ptr %283, align 8, !tbaa !11
  %285 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 1
  %286 = load ptr, ptr %285, align 8, !tbaa !9
  %287 = getelementptr inbounds %struct.ggml_tensor, ptr %286, i32 0, i32 2
  %288 = getelementptr inbounds [4 x i64], ptr %287, i64 0, i64 2
  %289 = load i64, ptr %288, align 8, !tbaa !11
  %290 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 1
  %291 = load ptr, ptr %290, align 8, !tbaa !9
  %292 = getelementptr inbounds %struct.ggml_tensor, ptr %291, i32 0, i32 2
  %293 = getelementptr inbounds [4 x i64], ptr %292, i64 0, i64 3
  %294 = load i64, ptr %293, align 8, !tbaa !11
  %295 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %296 = load ptr, ptr %295, align 16, !tbaa !9
  %297 = getelementptr inbounds %struct.ggml_tensor, ptr %296, i32 0, i32 2
  %298 = getelementptr inbounds [4 x i64], ptr %297, i64 0, i64 0
  %299 = load i64, ptr %298, align 8, !tbaa !11
  %300 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %301 = load ptr, ptr %300, align 16, !tbaa !9
  %302 = getelementptr inbounds %struct.ggml_tensor, ptr %301, i32 0, i32 2
  %303 = getelementptr inbounds [4 x i64], ptr %302, i64 0, i64 1
  %304 = load i64, ptr %303, align 8, !tbaa !11
  %305 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %306 = load ptr, ptr %305, align 16, !tbaa !9
  %307 = getelementptr inbounds %struct.ggml_tensor, ptr %306, i32 0, i32 2
  %308 = getelementptr inbounds [4 x i64], ptr %307, i64 0, i64 2
  %309 = load i64, ptr %308, align 8, !tbaa !11
  %310 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %311 = load ptr, ptr %310, align 16, !tbaa !9
  %312 = getelementptr inbounds %struct.ggml_tensor, ptr %311, i32 0, i32 2
  %313 = getelementptr inbounds [4 x i64], ptr %312, i64 0, i64 3
  %314 = load i64, ptr %313, align 8, !tbaa !11
  %315 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, i64 noundef %262, i64 noundef %266, i64 noundef %270, i64 noundef %274, i64 noundef %279, i64 noundef %284, i64 noundef %289, i64 noundef %294, i64 noundef %299, i64 noundef %304, i64 noundef %309, i64 noundef %314)
  %316 = load ptr, ptr %22, align 8, !tbaa !9
  %317 = getelementptr inbounds %struct.ggml_tensor, ptr %316, i32 0, i32 2
  %318 = getelementptr inbounds [4 x i64], ptr %317, i64 0, i64 0
  %319 = load i64, ptr %318, align 8, !tbaa !11
  %320 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 1
  %321 = load ptr, ptr %320, align 8, !tbaa !9
  %322 = getelementptr inbounds %struct.ggml_tensor, ptr %321, i32 0, i32 2
  %323 = getelementptr inbounds [4 x i64], ptr %322, i64 0, i64 1
  %324 = load i64, ptr %323, align 8, !tbaa !11
  %325 = icmp eq i64 %319, %324
  br i1 %325, label %326, label %327

326:                                              ; preds = %224
  br label %328

327:                                              ; preds = %224
  call void @__assert_fail(ptr noundef @.str.14, ptr noundef @.str.1, i32 noundef 316, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

328:                                              ; preds = %326
  %329 = load ptr, ptr %22, align 8, !tbaa !9
  %330 = getelementptr inbounds %struct.ggml_tensor, ptr %329, i32 0, i32 2
  %331 = getelementptr inbounds [4 x i64], ptr %330, i64 0, i64 1
  %332 = load i64, ptr %331, align 8, !tbaa !11
  %333 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %334 = load ptr, ptr %333, align 16, !tbaa !9
  %335 = getelementptr inbounds %struct.ggml_tensor, ptr %334, i32 0, i32 2
  %336 = getelementptr inbounds [4 x i64], ptr %335, i64 0, i64 1
  %337 = load i64, ptr %336, align 8, !tbaa !11
  %338 = icmp eq i64 %332, %337
  br i1 %338, label %339, label %340

339:                                              ; preds = %328
  br label %341

340:                                              ; preds = %328
  call void @__assert_fail(ptr noundef @.str.15, ptr noundef @.str.1, i32 noundef 317, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

341:                                              ; preds = %339
  %342 = load ptr, ptr %22, align 8, !tbaa !9
  %343 = getelementptr inbounds %struct.ggml_tensor, ptr %342, i32 0, i32 2
  %344 = getelementptr inbounds [4 x i64], ptr %343, i64 0, i64 2
  %345 = load i64, ptr %344, align 8, !tbaa !11
  %346 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %347 = load ptr, ptr %346, align 16, !tbaa !9
  %348 = getelementptr inbounds %struct.ggml_tensor, ptr %347, i32 0, i32 2
  %349 = getelementptr inbounds [4 x i64], ptr %348, i64 0, i64 2
  %350 = load i64, ptr %349, align 8, !tbaa !11
  %351 = icmp eq i64 %345, %350
  br i1 %351, label %352, label %353

352:                                              ; preds = %341
  br label %354

353:                                              ; preds = %341
  call void @__assert_fail(ptr noundef @.str.16, ptr noundef @.str.1, i32 noundef 318, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

354:                                              ; preds = %352
  %355 = load ptr, ptr %22, align 8, !tbaa !9
  %356 = getelementptr inbounds %struct.ggml_tensor, ptr %355, i32 0, i32 2
  %357 = getelementptr inbounds [4 x i64], ptr %356, i64 0, i64 3
  %358 = load i64, ptr %357, align 8, !tbaa !11
  %359 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %360 = load ptr, ptr %359, align 16, !tbaa !9
  %361 = getelementptr inbounds %struct.ggml_tensor, ptr %360, i32 0, i32 2
  %362 = getelementptr inbounds [4 x i64], ptr %361, i64 0, i64 3
  %363 = load i64, ptr %362, align 8, !tbaa !11
  %364 = icmp eq i64 %358, %363
  br i1 %364, label %365, label %366

365:                                              ; preds = %354
  br label %367

366:                                              ; preds = %354
  call void @__assert_fail(ptr noundef @.str.17, ptr noundef @.str.1, i32 noundef 319, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

367:                                              ; preds = %365
  %368 = load i32, ptr %21, align 4, !tbaa !5
  %369 = icmp sle i32 %368, 2
  br i1 %369, label %370, label %376

370:                                              ; preds = %367
  %371 = load ptr, ptr %13, align 8, !tbaa !9
  %372 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %373 = load ptr, ptr %23, align 8, !tbaa !9
  %374 = load i32, ptr %21, align 4, !tbaa !5
  %375 = call zeroext i1 @check_gradient(ptr noundef @.str.18, ptr noundef %371, ptr noundef %372, ptr noundef %373, i32 noundef %374, i32 noundef 1, float noundef 0x3F50624DE0000000, float noundef 0x3F50624DE0000000, float noundef 0x7FF0000000000000)
  br label %385

376:                                              ; preds = %367
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %377 = load ptr, ptr %13, align 8, !tbaa !9
  %378 = call ptr @ggml_new_graph(ptr noundef %377)
  store ptr %378, ptr %24, align 8, !tbaa !9
  %379 = load ptr, ptr %24, align 8, !tbaa !9
  %380 = load ptr, ptr %22, align 8, !tbaa !9
  call void @ggml_build_forward_expand(ptr noundef %379, ptr noundef %380)
  %381 = load ptr, ptr %13, align 8, !tbaa !9
  %382 = load ptr, ptr %24, align 8, !tbaa !9
  %383 = load i32, ptr %10, align 4, !tbaa !5
  %384 = call i32 @ggml_graph_compute_with_ctx(ptr noundef %381, ptr noundef %382, i32 noundef %383)
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %385

385:                                              ; preds = %376, %370
  %386 = load ptr, ptr %22, align 8, !tbaa !9
  %387 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 1
  %388 = load ptr, ptr %387, align 8, !tbaa !9
  %389 = getelementptr inbounds [2 x ptr], ptr %14, i64 0, i64 0
  %390 = load ptr, ptr %389, align 16, !tbaa !9
  %391 = call zeroext i1 @check_mat_mul(ptr noundef %386, ptr noundef %388, ptr noundef %390)
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %392

392:                                              ; preds = %385
  %393 = load i32, ptr %21, align 4, !tbaa !5
  %394 = add nsw i32 %393, 1
  store i32 %394, ptr %21, align 4, !tbaa !5
  br label %220, !llvm.loop !15

395:                                              ; preds = %223
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  %396 = load ptr, ptr %13, align 8, !tbaa !9
  call void @ggml_free(ptr noundef %396)
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %397

397:                                              ; preds = %395
  %398 = load i32, ptr %11, align 4, !tbaa !5
  %399 = add nsw i32 %398, 1
  store i32 %399, ptr %11, align 4, !tbaa !5
  br label %40, !llvm.loop !16

400:                                              ; preds = %44
  store i32 0, ptr %3, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  %401 = load i32, ptr %3, align 4
  ret i32 %401
}

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

; Function Attrs: nounwind
declare ptr @getenv(ptr noundef) #0

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #6

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

declare void @ggml_set_param(ptr noundef, ptr noundef) #4

declare ptr @ggml_mul_mat(ptr noundef, ptr noundef, ptr noundef) #4

declare ptr @ggml_sum(ptr noundef, ptr noundef) #4

declare ptr @ggml_new_graph(ptr noundef) #4

declare ptr @ggml_cont(ptr noundef, ptr noundef) #4

declare ptr @ggml_transpose(ptr noundef, ptr noundef) #4

declare void @ggml_free(ptr noundef) #4

attributes #0 = { 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 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { inlinehint nounwind willreturn memory(read) 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 = { nounwind willreturn memory(read) }
attributes #9 = { noreturn 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.ggml_init_params = type { i64, ptr, i8 }

@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@__const.main.params = external hidden unnamed_addr constant %struct.ggml_init_params, align 8
@.str.11 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [24 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [29 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @get_random_dims(ptr noundef, i32 noundef) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @get_random_tensor(ptr noundef, i32 noundef, ptr noundef, float noundef, float noundef) local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @check_gradient(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, float noundef, float noundef, float noundef) local_unnamed_addr #1

declare void @ggml_build_forward_expand(ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @ggml_graph_compute_with_ctx(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @check_mat_mul(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #1 {
  %3 = alloca [4 x i64], align 16
  %4 = alloca [2 x ptr], align 16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #8
  %5 = tail call ptr @getenv(ptr noundef nonnull @.str.11) #8
  %.not = icmp eq ptr %5, null
  br i1 %.not, label %8, label %6

6:                                                ; preds = %2
  %7 = tail call i32 @atoi(ptr nocapture noundef %5) #9
  br label %8

8:                                                ; preds = %6, %2
  %.0 = phi i32 [ %7, %6 ], [ 500, %2 ]
  %9 = icmp sgt i32 %0, 1
  br i1 %9, label %10, label %14

10:                                               ; preds = %8
  %11 = getelementptr inbounds i8, ptr %1, i64 8
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %13 = tail call i32 @atoi(ptr nocapture noundef %12) #9
  br label %14

14:                                               ; preds = %10, %8
  %.1 = phi i32 [ %13, %10 ], [ %.0, %8 ]
  %15 = icmp sgt i32 %.1, 0
  br i1 %15, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %14
  %16 = getelementptr inbounds i8, ptr %3, i64 8
  %17 = getelementptr inbounds i8, ptr %4, i64 8
  br label %.peel.begin

._crit_edge:                                      ; preds = %.loopexit91, %14
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  ret i32 0

.peel.begin:                                      ; preds = %.lr.ph, %.loopexit91
  %.07076 = phi i32 [ 0, %.lr.ph ], [ %400, %.loopexit91 ]
  %18 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef %.07076, i32 noundef %.1)
  %19 = call ptr @ggml_init(ptr noundef nonnull byval(%struct.ggml_init_params) align 8 @__const.main.params) #8
  call void @get_random_dims(ptr noundef nonnull %3, i32 noundef 4)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #8
  %20 = call ptr @get_random_tensor(ptr noundef %19, i32 noundef 2, ptr noundef nonnull %3, float noundef -1.000000e+00, float noundef 1.000000e+00)
  store ptr %20, ptr %4, align 16, !tbaa !5
  %21 = call i32 @rand() #8
  %22 = srem i32 %21, 4
  %23 = add nsw i32 %22, 1
  %24 = sext i32 %23 to i64
  store i64 %24, ptr %16, align 8, !tbaa !9
  %25 = call ptr @get_random_tensor(ptr noundef %19, i32 noundef 2, ptr noundef nonnull %3, float noundef -1.000000e+00, float noundef 1.000000e+00)
  store ptr %25, ptr %17, align 8, !tbaa !5
  %26 = load ptr, ptr %4, align 16, !tbaa !5
  call void @ggml_set_param(ptr noundef %19, ptr noundef %26) #8
  %27 = load ptr, ptr %17, align 8, !tbaa !5
  %28 = load ptr, ptr %4, align 16, !tbaa !5
  %29 = call ptr @ggml_mul_mat(ptr noundef %19, ptr noundef %27, ptr noundef %28) #8
  %30 = call ptr @ggml_sum(ptr noundef %19, ptr noundef %29) #8
  %31 = getelementptr inbounds i8, ptr %29, i64 16
  %32 = load i64, ptr %31, align 8, !tbaa !9
  %33 = getelementptr inbounds i8, ptr %29, i64 24
  %34 = load i64, ptr %33, align 8, !tbaa !9
  %35 = getelementptr inbounds i8, ptr %29, i64 32
  %36 = load i64, ptr %35, align 8, !tbaa !9
  %37 = getelementptr inbounds i8, ptr %29, i64 40
  %38 = load i64, ptr %37, align 8, !tbaa !9
  %39 = load ptr, ptr %17, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %39, i64 16
  %41 = load i64, ptr %40, align 8, !tbaa !9
  %42 = getelementptr inbounds i8, ptr %39, i64 24
  %43 = load i64, ptr %42, align 8, !tbaa !9
  %44 = getelementptr inbounds i8, ptr %39, i64 32
  %45 = load i64, ptr %44, align 8, !tbaa !9
  %46 = getelementptr inbounds i8, ptr %39, i64 40
  %47 = load i64, ptr %46, align 8, !tbaa !9
  %48 = load ptr, ptr %4, align 16, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %48, i64 16
  %50 = load i64, ptr %49, align 8, !tbaa !9
  %51 = getelementptr inbounds i8, ptr %48, i64 24
  %52 = load i64, ptr %51, align 8, !tbaa !9
  %53 = getelementptr inbounds i8, ptr %48, i64 32
  %54 = load i64, ptr %53, align 8, !tbaa !9
  %55 = getelementptr inbounds i8, ptr %48, i64 40
  %56 = load i64, ptr %55, align 8, !tbaa !9
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, i64 noundef %32, i64 noundef %34, i64 noundef %36, i64 noundef %38, i64 noundef %41, i64 noundef %43, i64 noundef %45, i64 noundef %47, i64 noundef %50, i64 noundef %52, i64 noundef %54, i64 noundef %56)
  %58 = load i64, ptr %31, align 8, !tbaa !9
  %59 = load ptr, ptr %17, align 8, !tbaa !5
  %60 = getelementptr inbounds i8, ptr %59, i64 24
  %61 = load i64, ptr %60, align 8, !tbaa !9
  %62 = icmp eq i64 %58, %61
  br i1 %62, label %63, label %.loopexit

63:                                               ; preds = %.peel.begin
  %64 = load i64, ptr %33, align 8, !tbaa !9
  %65 = load ptr, ptr %4, align 16, !tbaa !5
  %66 = getelementptr inbounds i8, ptr %65, i64 24
  %67 = load i64, ptr %66, align 8, !tbaa !9
  %68 = icmp eq i64 %64, %67
  br i1 %68, label %69, label %.loopexit78

69:                                               ; preds = %63
  %70 = load i64, ptr %35, align 8, !tbaa !9
  %71 = getelementptr inbounds i8, ptr %65, i64 32
  %72 = load i64, ptr %71, align 8, !tbaa !9
  %73 = icmp eq i64 %70, %72
  br i1 %73, label %74, label %.loopexit79

74:                                               ; preds = %69
  %75 = load i64, ptr %37, align 8, !tbaa !9
  %76 = getelementptr inbounds i8, ptr %65, i64 40
  %77 = load i64, ptr %76, align 8, !tbaa !9
  %78 = icmp eq i64 %75, %77
  br i1 %78, label %.peel.next, label %.loopexit80

.peel.next:                                       ; preds = %74
  %79 = call zeroext i1 @check_gradient(ptr noundef nonnull @.str.18, ptr noundef %19, ptr noundef nonnull %4, ptr noundef %30, i32 noundef 2, i32 noundef 1, float noundef 0x3F50624DE0000000, float noundef 0x3F50624DE0000000, float noundef 0x7FF0000000000000)
  %.pre97 = load ptr, ptr %4, align 16, !tbaa !5
  %.pre = load ptr, ptr %17, align 8, !tbaa !5
  %80 = call zeroext i1 @check_mat_mul(ptr noundef nonnull %29, ptr noundef %.pre, ptr noundef %.pre97)
  %81 = call ptr @get_random_tensor(ptr noundef %19, i32 noundef 3, ptr noundef nonnull %3, float noundef -1.000000e+00, float noundef 1.000000e+00)
  store ptr %81, ptr %4, align 16, !tbaa !5
  %82 = call i32 @rand() #8
  %83 = srem i32 %82, 4
  %84 = add nsw i32 %83, 1
  %85 = sext i32 %84 to i64
  store i64 %85, ptr %16, align 8, !tbaa !9
  %86 = call ptr @get_random_tensor(ptr noundef %19, i32 noundef 3, ptr noundef nonnull %3, float noundef -1.000000e+00, float noundef 1.000000e+00)
  store ptr %86, ptr %17, align 8, !tbaa !5
  %87 = load ptr, ptr %4, align 16, !tbaa !5
  call void @ggml_set_param(ptr noundef %19, ptr noundef %87) #8
  %88 = load ptr, ptr %17, align 8, !tbaa !5
  %89 = load ptr, ptr %4, align 16, !tbaa !5
  %90 = call ptr @ggml_mul_mat(ptr noundef %19, ptr noundef %88, ptr noundef %89) #8
  %91 = call ptr @ggml_sum(ptr noundef %19, ptr noundef %90) #8
  %92 = getelementptr inbounds i8, ptr %90, i64 16
  %93 = load i64, ptr %92, align 8, !tbaa !9
  %94 = getelementptr inbounds i8, ptr %90, i64 24
  %95 = load i64, ptr %94, align 8, !tbaa !9
  %96 = getelementptr inbounds i8, ptr %90, i64 32
  %97 = load i64, ptr %96, align 8, !tbaa !9
  %98 = getelementptr inbounds i8, ptr %90, i64 40
  %99 = load i64, ptr %98, align 8, !tbaa !9
  %100 = load ptr, ptr %17, align 8, !tbaa !5
  %101 = getelementptr inbounds i8, ptr %100, i64 16
  %102 = load i64, ptr %101, align 8, !tbaa !9
  %103 = getelementptr inbounds i8, ptr %100, i64 24
  %104 = load i64, ptr %103, align 8, !tbaa !9
  %105 = getelementptr inbounds i8, ptr %100, i64 32
  %106 = load i64, ptr %105, align 8, !tbaa !9
  %107 = getelementptr inbounds i8, ptr %100, i64 40
  %108 = load i64, ptr %107, align 8, !tbaa !9
  %109 = load ptr, ptr %4, align 16, !tbaa !5
  %110 = getelementptr inbounds i8, ptr %109, i64 16
  %111 = load i64, ptr %110, align 8, !tbaa !9
  %112 = getelementptr inbounds i8, ptr %109, i64 24
  %113 = load i64, ptr %112, align 8, !tbaa !9
  %114 = getelementptr inbounds i8, ptr %109, i64 32
  %115 = load i64, ptr %114, align 8, !tbaa !9
  %116 = getelementptr inbounds i8, ptr %109, i64 40
  %117 = load i64, ptr %116, align 8, !tbaa !9
  %118 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, i64 noundef %93, i64 noundef %95, i64 noundef %97, i64 noundef %99, i64 noundef %102, i64 noundef %104, i64 noundef %106, i64 noundef %108, i64 noundef %111, i64 noundef %113, i64 noundef %115, i64 noundef %117)
  %119 = load i64, ptr %92, align 8, !tbaa !9
  %120 = load ptr, ptr %17, align 8, !tbaa !5
  %121 = getelementptr inbounds i8, ptr %120, i64 24
  %122 = load i64, ptr %121, align 8, !tbaa !9
  %123 = icmp eq i64 %119, %122
  br i1 %123, label %124, label %.loopexit

.loopexit:                                        ; preds = %.peel.begin, %.peel.next, %140
  call void @__assert_fail(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.1, i32 noundef 279, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

124:                                              ; preds = %.peel.next
  %125 = load i64, ptr %94, align 8, !tbaa !9
  %126 = load ptr, ptr %4, align 16, !tbaa !5
  %127 = getelementptr inbounds i8, ptr %126, i64 24
  %128 = load i64, ptr %127, align 8, !tbaa !9
  %129 = icmp eq i64 %125, %128
  br i1 %129, label %130, label %.loopexit78

.loopexit78:                                      ; preds = %63, %124, %187
  call void @__assert_fail(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.1, i32 noundef 280, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

130:                                              ; preds = %124
  %131 = load i64, ptr %96, align 8, !tbaa !9
  %132 = getelementptr inbounds i8, ptr %126, i64 32
  %133 = load i64, ptr %132, align 8, !tbaa !9
  %134 = icmp eq i64 %131, %133
  br i1 %134, label %135, label %.loopexit79

.loopexit79:                                      ; preds = %69, %130, %193
  call void @__assert_fail(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.1, i32 noundef 281, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

135:                                              ; preds = %130
  %136 = load i64, ptr %98, align 8, !tbaa !9
  %137 = getelementptr inbounds i8, ptr %126, i64 40
  %138 = load i64, ptr %137, align 8, !tbaa !9
  %139 = icmp eq i64 %136, %138
  br i1 %139, label %140, label %.loopexit80

.loopexit80:                                      ; preds = %74, %135, %198
  call void @__assert_fail(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.1, i32 noundef 282, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

140:                                              ; preds = %135
  %141 = call ptr @ggml_new_graph(ptr noundef %19) #8
  call void @ggml_build_forward_expand(ptr noundef %141, ptr noundef nonnull %90) #8
  %142 = call i32 @ggml_graph_compute_with_ctx(ptr noundef %19, ptr noundef %141, i32 noundef 1) #8
  %.pre99 = load ptr, ptr %4, align 16, !tbaa !5
  %.pre98 = load ptr, ptr %17, align 8, !tbaa !5
  %143 = call zeroext i1 @check_mat_mul(ptr noundef nonnull %90, ptr noundef %.pre98, ptr noundef %.pre99)
  %144 = call ptr @get_random_tensor(ptr noundef %19, i32 noundef 4, ptr noundef nonnull %3, float noundef -1.000000e+00, float noundef 1.000000e+00)
  store ptr %144, ptr %4, align 16, !tbaa !5
  %145 = call i32 @rand() #8
  %146 = srem i32 %145, 4
  %147 = add nsw i32 %146, 1
  %148 = sext i32 %147 to i64
  store i64 %148, ptr %16, align 8, !tbaa !9
  %149 = call ptr @get_random_tensor(ptr noundef %19, i32 noundef 4, ptr noundef nonnull %3, float noundef -1.000000e+00, float noundef 1.000000e+00)
  store ptr %149, ptr %17, align 8, !tbaa !5
  %150 = load ptr, ptr %4, align 16, !tbaa !5
  call void @ggml_set_param(ptr noundef %19, ptr noundef %150) #8
  %151 = load ptr, ptr %17, align 8, !tbaa !5
  %152 = load ptr, ptr %4, align 16, !tbaa !5
  %153 = call ptr @ggml_mul_mat(ptr noundef %19, ptr noundef %151, ptr noundef %152) #8
  %154 = call ptr @ggml_sum(ptr noundef %19, ptr noundef %153) #8
  %155 = getelementptr inbounds i8, ptr %153, i64 16
  %156 = load i64, ptr %155, align 8, !tbaa !9
  %157 = getelementptr inbounds i8, ptr %153, i64 24
  %158 = load i64, ptr %157, align 8, !tbaa !9
  %159 = getelementptr inbounds i8, ptr %153, i64 32
  %160 = load i64, ptr %159, align 8, !tbaa !9
  %161 = getelementptr inbounds i8, ptr %153, i64 40
  %162 = load i64, ptr %161, align 8, !tbaa !9
  %163 = load ptr, ptr %17, align 8, !tbaa !5
  %164 = getelementptr inbounds i8, ptr %163, i64 16
  %165 = load i64, ptr %164, align 8, !tbaa !9
  %166 = getelementptr inbounds i8, ptr %163, i64 24
  %167 = load i64, ptr %166, align 8, !tbaa !9
  %168 = getelementptr inbounds i8, ptr %163, i64 32
  %169 = load i64, ptr %168, align 8, !tbaa !9
  %170 = getelementptr inbounds i8, ptr %163, i64 40
  %171 = load i64, ptr %170, align 8, !tbaa !9
  %172 = load ptr, ptr %4, align 16, !tbaa !5
  %173 = getelementptr inbounds i8, ptr %172, i64 16
  %174 = load i64, ptr %173, align 8, !tbaa !9
  %175 = getelementptr inbounds i8, ptr %172, i64 24
  %176 = load i64, ptr %175, align 8, !tbaa !9
  %177 = getelementptr inbounds i8, ptr %172, i64 32
  %178 = load i64, ptr %177, align 8, !tbaa !9
  %179 = getelementptr inbounds i8, ptr %172, i64 40
  %180 = load i64, ptr %179, align 8, !tbaa !9
  %181 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, i64 noundef %156, i64 noundef %158, i64 noundef %160, i64 noundef %162, i64 noundef %165, i64 noundef %167, i64 noundef %169, i64 noundef %171, i64 noundef %174, i64 noundef %176, i64 noundef %178, i64 noundef %180)
  %182 = load i64, ptr %155, align 8, !tbaa !9
  %183 = load ptr, ptr %17, align 8, !tbaa !5
  %184 = getelementptr inbounds i8, ptr %183, i64 24
  %185 = load i64, ptr %184, align 8, !tbaa !9
  %186 = icmp eq i64 %182, %185
  br i1 %186, label %187, label %.loopexit

187:                                              ; preds = %140
  %188 = load i64, ptr %157, align 8, !tbaa !9
  %189 = load ptr, ptr %4, align 16, !tbaa !5
  %190 = getelementptr inbounds i8, ptr %189, i64 24
  %191 = load i64, ptr %190, align 8, !tbaa !9
  %192 = icmp eq i64 %188, %191
  br i1 %192, label %193, label %.loopexit78

193:                                              ; preds = %187
  %194 = load i64, ptr %159, align 8, !tbaa !9
  %195 = getelementptr inbounds i8, ptr %189, i64 32
  %196 = load i64, ptr %195, align 8, !tbaa !9
  %197 = icmp eq i64 %194, %196
  br i1 %197, label %198, label %.loopexit79

198:                                              ; preds = %193
  %199 = load i64, ptr %161, align 8, !tbaa !9
  %200 = getelementptr inbounds i8, ptr %189, i64 40
  %201 = load i64, ptr %200, align 8, !tbaa !9
  %202 = icmp eq i64 %199, %201
  br i1 %202, label %.preheader.preheader, label %.loopexit80

.preheader.preheader:                             ; preds = %198
  %203 = call ptr @ggml_new_graph(ptr noundef %19) #8
  call void @ggml_build_forward_expand(ptr noundef %203, ptr noundef nonnull %153) #8
  %204 = call i32 @ggml_graph_compute_with_ctx(ptr noundef %19, ptr noundef %203, i32 noundef 1) #8
  %.pre99.1 = load ptr, ptr %4, align 16, !tbaa !5
  %.pre98.1 = load ptr, ptr %17, align 8, !tbaa !5
  %205 = call zeroext i1 @check_mat_mul(ptr noundef nonnull %153, ptr noundef %.pre98.1, ptr noundef %.pre99.1)
  %206 = call ptr @get_random_tensor(ptr noundef %19, i32 noundef 2, ptr noundef nonnull %3, float noundef -1.000000e+00, float noundef 1.000000e+00)
  store ptr %206, ptr %4, align 16, !tbaa !5
  %207 = load i64, ptr %3, align 16, !tbaa !9
  store i64 %207, ptr %16, align 8, !tbaa !9
  %208 = call i32 @rand() #8
  %209 = srem i32 %208, 4
  %210 = add nsw i32 %209, 1
  %211 = sext i32 %210 to i64
  store i64 %211, ptr %3, align 16, !tbaa !9
  %212 = call ptr @get_random_tensor(ptr noundef %19, i32 noundef 2, ptr noundef nonnull %3, float noundef -1.000000e+00, float noundef 1.000000e+00)
  %213 = call ptr @ggml_transpose(ptr noundef %19, ptr noundef %212) #8
  %214 = call ptr @ggml_cont(ptr noundef %19, ptr noundef %213) #8
  store ptr %214, ptr %17, align 8, !tbaa !5
  %215 = load ptr, ptr %4, align 16, !tbaa !5
  call void @ggml_set_param(ptr noundef %19, ptr noundef %215) #8
  %216 = load ptr, ptr %17, align 8, !tbaa !5
  %217 = load ptr, ptr %4, align 16, !tbaa !5
  %218 = call ptr @ggml_mul_mat(ptr noundef %19, ptr noundef %216, ptr noundef %217) #8
  %219 = call ptr @ggml_sum(ptr noundef %19, ptr noundef %218) #8
  %220 = getelementptr inbounds i8, ptr %218, i64 16
  %221 = load i64, ptr %220, align 8, !tbaa !9
  %222 = getelementptr inbounds i8, ptr %218, i64 24
  %223 = load i64, ptr %222, align 8, !tbaa !9
  %224 = getelementptr inbounds i8, ptr %218, i64 32
  %225 = load i64, ptr %224, align 8, !tbaa !9
  %226 = getelementptr inbounds i8, ptr %218, i64 40
  %227 = load i64, ptr %226, align 8, !tbaa !9
  %228 = load ptr, ptr %17, align 8, !tbaa !5
  %229 = getelementptr inbounds i8, ptr %228, i64 16
  %230 = load i64, ptr %229, align 8, !tbaa !9
  %231 = getelementptr inbounds i8, ptr %228, i64 24
  %232 = load i64, ptr %231, align 8, !tbaa !9
  %233 = getelementptr inbounds i8, ptr %228, i64 32
  %234 = load i64, ptr %233, align 8, !tbaa !9
  %235 = getelementptr inbounds i8, ptr %228, i64 40
  %236 = load i64, ptr %235, align 8, !tbaa !9
  %237 = load ptr, ptr %4, align 16, !tbaa !5
  %238 = getelementptr inbounds i8, ptr %237, i64 16
  %239 = load i64, ptr %238, align 8, !tbaa !9
  %240 = getelementptr inbounds i8, ptr %237, i64 24
  %241 = load i64, ptr %240, align 8, !tbaa !9
  %242 = getelementptr inbounds i8, ptr %237, i64 32
  %243 = load i64, ptr %242, align 8, !tbaa !9
  %244 = getelementptr inbounds i8, ptr %237, i64 40
  %245 = load i64, ptr %244, align 8, !tbaa !9
  %246 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, i64 noundef %221, i64 noundef %223, i64 noundef %225, i64 noundef %227, i64 noundef %230, i64 noundef %232, i64 noundef %234, i64 noundef %236, i64 noundef %239, i64 noundef %241, i64 noundef %243, i64 noundef %245)
  %247 = load i64, ptr %220, align 8, !tbaa !9
  %248 = load ptr, ptr %17, align 8, !tbaa !5
  %249 = getelementptr inbounds i8, ptr %248, i64 24
  %250 = load i64, ptr %249, align 8, !tbaa !9
  %251 = icmp eq i64 %247, %250
  br i1 %251, label %252, label %.loopexit87

252:                                              ; preds = %.preheader.preheader
  %253 = load i64, ptr %222, align 8, !tbaa !9
  %254 = load ptr, ptr %4, align 16, !tbaa !5
  %255 = getelementptr inbounds i8, ptr %254, i64 24
  %256 = load i64, ptr %255, align 8, !tbaa !9
  %257 = icmp eq i64 %253, %256
  br i1 %257, label %258, label %.loopexit88

258:                                              ; preds = %252
  %259 = load i64, ptr %224, align 8, !tbaa !9
  %260 = getelementptr inbounds i8, ptr %254, i64 32
  %261 = load i64, ptr %260, align 8, !tbaa !9
  %262 = icmp eq i64 %259, %261
  br i1 %262, label %263, label %.loopexit89

263:                                              ; preds = %258
  %264 = load i64, ptr %226, align 8, !tbaa !9
  %265 = getelementptr inbounds i8, ptr %254, i64 40
  %266 = load i64, ptr %265, align 8, !tbaa !9
  %267 = icmp eq i64 %264, %266
  br i1 %267, label %.preheader.peel.next, label %.loopexit90

.preheader.peel.next:                             ; preds = %263
  %268 = call zeroext i1 @check_gradient(ptr noundef nonnull @.str.18, ptr noundef %19, ptr noundef nonnull %4, ptr noundef %219, i32 noundef 2, i32 noundef 1, float noundef 0x3F50624DE0000000, float noundef 0x3F50624DE0000000, float noundef 0x7FF0000000000000)
  %.pre101 = load ptr, ptr %4, align 16, !tbaa !5
  %.pre100 = load ptr, ptr %17, align 8, !tbaa !5
  %269 = call zeroext i1 @check_mat_mul(ptr noundef nonnull %218, ptr noundef %.pre100, ptr noundef %.pre101)
  %270 = call ptr @get_random_tensor(ptr noundef %19, i32 noundef 3, ptr noundef nonnull %3, float noundef -1.000000e+00, float noundef 1.000000e+00)
  store ptr %270, ptr %4, align 16, !tbaa !5
  %271 = load i64, ptr %3, align 16, !tbaa !9
  store i64 %271, ptr %16, align 8, !tbaa !9
  %272 = call i32 @rand() #8
  %273 = srem i32 %272, 4
  %274 = add nsw i32 %273, 1
  %275 = sext i32 %274 to i64
  store i64 %275, ptr %3, align 16, !tbaa !9
  %276 = call ptr @get_random_tensor(ptr noundef %19, i32 noundef 3, ptr noundef nonnull %3, float noundef -1.000000e+00, float noundef 1.000000e+00)
  %277 = call ptr @ggml_transpose(ptr noundef %19, ptr noundef %276) #8
  %278 = call ptr @ggml_cont(ptr noundef %19, ptr noundef %277) #8
  store ptr %278, ptr %17, align 8, !tbaa !5
  %279 = load ptr, ptr %4, align 16, !tbaa !5
  call void @ggml_set_param(ptr noundef %19, ptr noundef %279) #8
  %280 = load ptr, ptr %17, align 8, !tbaa !5
  %281 = load ptr, ptr %4, align 16, !tbaa !5
  %282 = call ptr @ggml_mul_mat(ptr noundef %19, ptr noundef %280, ptr noundef %281) #8
  %283 = call ptr @ggml_sum(ptr noundef %19, ptr noundef %282) #8
  %284 = getelementptr inbounds i8, ptr %282, i64 16
  %285 = load i64, ptr %284, align 8, !tbaa !9
  %286 = getelementptr inbounds i8, ptr %282, i64 24
  %287 = load i64, ptr %286, align 8, !tbaa !9
  %288 = getelementptr inbounds i8, ptr %282, i64 32
  %289 = load i64, ptr %288, align 8, !tbaa !9
  %290 = getelementptr inbounds i8, ptr %282, i64 40
  %291 = load i64, ptr %290, align 8, !tbaa !9
  %292 = load ptr, ptr %17, align 8, !tbaa !5
  %293 = getelementptr inbounds i8, ptr %292, i64 16
  %294 = load i64, ptr %293, align 8, !tbaa !9
  %295 = getelementptr inbounds i8, ptr %292, i64 24
  %296 = load i64, ptr %295, align 8, !tbaa !9
  %297 = getelementptr inbounds i8, ptr %292, i64 32
  %298 = load i64, ptr %297, align 8, !tbaa !9
  %299 = getelementptr inbounds i8, ptr %292, i64 40
  %300 = load i64, ptr %299, align 8, !tbaa !9
  %301 = load ptr, ptr %4, align 16, !tbaa !5
  %302 = getelementptr inbounds i8, ptr %301, i64 16
  %303 = load i64, ptr %302, align 8, !tbaa !9
  %304 = getelementptr inbounds i8, ptr %301, i64 24
  %305 = load i64, ptr %304, align 8, !tbaa !9
  %306 = getelementptr inbounds i8, ptr %301, i64 32
  %307 = load i64, ptr %306, align 8, !tbaa !9
  %308 = getelementptr inbounds i8, ptr %301, i64 40
  %309 = load i64, ptr %308, align 8, !tbaa !9
  %310 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, i64 noundef %285, i64 noundef %287, i64 noundef %289, i64 noundef %291, i64 noundef %294, i64 noundef %296, i64 noundef %298, i64 noundef %300, i64 noundef %303, i64 noundef %305, i64 noundef %307, i64 noundef %309)
  %311 = load i64, ptr %284, align 8, !tbaa !9
  %312 = load ptr, ptr %17, align 8, !tbaa !5
  %313 = getelementptr inbounds i8, ptr %312, i64 24
  %314 = load i64, ptr %313, align 8, !tbaa !9
  %315 = icmp eq i64 %311, %314
  br i1 %315, label %316, label %.loopexit87

.loopexit87:                                      ; preds = %.preheader.preheader, %.preheader.peel.next, %.preheader.1
  call void @__assert_fail(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.1, i32 noundef 316, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

316:                                              ; preds = %.preheader.peel.next
  %317 = load i64, ptr %286, align 8, !tbaa !9
  %318 = load ptr, ptr %4, align 16, !tbaa !5
  %319 = getelementptr inbounds i8, ptr %318, i64 24
  %320 = load i64, ptr %319, align 8, !tbaa !9
  %321 = icmp eq i64 %317, %320
  br i1 %321, label %322, label %.loopexit88

.loopexit88:                                      ; preds = %252, %316, %381
  call void @__assert_fail(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.1, i32 noundef 317, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

322:                                              ; preds = %316
  %323 = load i64, ptr %288, align 8, !tbaa !9
  %324 = getelementptr inbounds i8, ptr %318, i64 32
  %325 = load i64, ptr %324, align 8, !tbaa !9
  %326 = icmp eq i64 %323, %325
  br i1 %326, label %327, label %.loopexit89

.loopexit89:                                      ; preds = %258, %322, %387
  call void @__assert_fail(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.1, i32 noundef 318, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

327:                                              ; preds = %322
  %328 = load i64, ptr %290, align 8, !tbaa !9
  %329 = getelementptr inbounds i8, ptr %318, i64 40
  %330 = load i64, ptr %329, align 8, !tbaa !9
  %331 = icmp eq i64 %328, %330
  br i1 %331, label %.preheader.1, label %.loopexit90

.loopexit90:                                      ; preds = %263, %327, %392
  call void @__assert_fail(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.1, i32 noundef 319, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

.preheader.1:                                     ; preds = %327
  %332 = call ptr @ggml_new_graph(ptr noundef %19) #8
  call void @ggml_build_forward_expand(ptr noundef %332, ptr noundef nonnull %282) #8
  %333 = call i32 @ggml_graph_compute_with_ctx(ptr noundef %19, ptr noundef %332, i32 noundef 1) #8
  %.pre104 = load ptr, ptr %4, align 16, !tbaa !5
  %.pre103 = load ptr, ptr %17, align 8, !tbaa !5
  %334 = call zeroext i1 @check_mat_mul(ptr noundef nonnull %282, ptr noundef %.pre103, ptr noundef %.pre104)
  %335 = call ptr @get_random_tensor(ptr noundef %19, i32 noundef 4, ptr noundef nonnull %3, float noundef -1.000000e+00, float noundef 1.000000e+00)
  store ptr %335, ptr %4, align 16, !tbaa !5
  %336 = load i64, ptr %3, align 16, !tbaa !9
  store i64 %336, ptr %16, align 8, !tbaa !9
  %337 = call i32 @rand() #8
  %338 = srem i32 %337, 4
  %339 = add nsw i32 %338, 1
  %340 = sext i32 %339 to i64
  store i64 %340, ptr %3, align 16, !tbaa !9
  %341 = call ptr @get_random_tensor(ptr noundef %19, i32 noundef 4, ptr noundef nonnull %3, float noundef -1.000000e+00, float noundef 1.000000e+00)
  %342 = call ptr @ggml_transpose(ptr noundef %19, ptr noundef %341) #8
  %343 = call ptr @ggml_cont(ptr noundef %19, ptr noundef %342) #8
  store ptr %343, ptr %17, align 8, !tbaa !5
  %344 = load ptr, ptr %4, align 16, !tbaa !5
  call void @ggml_set_param(ptr noundef %19, ptr noundef %344) #8
  %345 = load ptr, ptr %17, align 8, !tbaa !5
  %346 = load ptr, ptr %4, align 16, !tbaa !5
  %347 = call ptr @ggml_mul_mat(ptr noundef %19, ptr noundef %345, ptr noundef %346) #8
  %348 = call ptr @ggml_sum(ptr noundef %19, ptr noundef %347) #8
  %349 = getelementptr inbounds i8, ptr %347, i64 16
  %350 = load i64, ptr %349, align 8, !tbaa !9
  %351 = getelementptr inbounds i8, ptr %347, i64 24
  %352 = load i64, ptr %351, align 8, !tbaa !9
  %353 = getelementptr inbounds i8, ptr %347, i64 32
  %354 = load i64, ptr %353, align 8, !tbaa !9
  %355 = getelementptr inbounds i8, ptr %347, i64 40
  %356 = load i64, ptr %355, align 8, !tbaa !9
  %357 = load ptr, ptr %17, align 8, !tbaa !5
  %358 = getelementptr inbounds i8, ptr %357, i64 16
  %359 = load i64, ptr %358, align 8, !tbaa !9
  %360 = getelementptr inbounds i8, ptr %357, i64 24
  %361 = load i64, ptr %360, align 8, !tbaa !9
  %362 = getelementptr inbounds i8, ptr %357, i64 32
  %363 = load i64, ptr %362, align 8, !tbaa !9
  %364 = getelementptr inbounds i8, ptr %357, i64 40
  %365 = load i64, ptr %364, align 8, !tbaa !9
  %366 = load ptr, ptr %4, align 16, !tbaa !5
  %367 = getelementptr inbounds i8, ptr %366, i64 16
  %368 = load i64, ptr %367, align 8, !tbaa !9
  %369 = getelementptr inbounds i8, ptr %366, i64 24
  %370 = load i64, ptr %369, align 8, !tbaa !9
  %371 = getelementptr inbounds i8, ptr %366, i64 32
  %372 = load i64, ptr %371, align 8, !tbaa !9
  %373 = getelementptr inbounds i8, ptr %366, i64 40
  %374 = load i64, ptr %373, align 8, !tbaa !9
  %375 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, i64 noundef %350, i64 noundef %352, i64 noundef %354, i64 noundef %356, i64 noundef %359, i64 noundef %361, i64 noundef %363, i64 noundef %365, i64 noundef %368, i64 noundef %370, i64 noundef %372, i64 noundef %374)
  %376 = load i64, ptr %349, align 8, !tbaa !9
  %377 = load ptr, ptr %17, align 8, !tbaa !5
  %378 = getelementptr inbounds i8, ptr %377, i64 24
  %379 = load i64, ptr %378, align 8, !tbaa !9
  %380 = icmp eq i64 %376, %379
  br i1 %380, label %381, label %.loopexit87

381:                                              ; preds = %.preheader.1
  %382 = load i64, ptr %351, align 8, !tbaa !9
  %383 = load ptr, ptr %4, align 16, !tbaa !5
  %384 = getelementptr inbounds i8, ptr %383, i64 24
  %385 = load i64, ptr %384, align 8, !tbaa !9
  %386 = icmp eq i64 %382, %385
  br i1 %386, label %387, label %.loopexit88

387:                                              ; preds = %381
  %388 = load i64, ptr %353, align 8, !tbaa !9
  %389 = getelementptr inbounds i8, ptr %383, i64 32
  %390 = load i64, ptr %389, align 8, !tbaa !9
  %391 = icmp eq i64 %388, %390
  br i1 %391, label %392, label %.loopexit89

392:                                              ; preds = %387
  %393 = load i64, ptr %355, align 8, !tbaa !9
  %394 = getelementptr inbounds i8, ptr %383, i64 40
  %395 = load i64, ptr %394, align 8, !tbaa !9
  %396 = icmp eq i64 %393, %395
  br i1 %396, label %.loopexit91, label %.loopexit90

.loopexit91:                                      ; preds = %392
  %397 = call ptr @ggml_new_graph(ptr noundef %19) #8
  call void @ggml_build_forward_expand(ptr noundef %397, ptr noundef nonnull %347) #8
  %398 = call i32 @ggml_graph_compute_with_ctx(ptr noundef %19, ptr noundef %397, i32 noundef 1) #8
  %.pre104.1 = load ptr, ptr %4, align 16, !tbaa !5
  %.pre103.1 = load ptr, ptr %17, align 8, !tbaa !5
  %399 = call zeroext i1 @check_mat_mul(ptr noundef nonnull %347, ptr noundef %.pre103.1, ptr noundef %.pre104.1)
  call void @ggml_free(ptr noundef %19) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  %400 = add nuw nsw i32 %.07076, 1
  %exitcond96.not = icmp eq i32 %400, %.1
  br i1 %exitcond96.not, label %._crit_edge, label %.peel.begin, !llvm.loop !11
}

; Function Attrs: nofree nounwind memory(read)
declare noundef ptr @getenv(ptr nocapture noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #7

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

declare void @ggml_set_param(ptr noundef, ptr noundef) local_unnamed_addr #4

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

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

declare ptr @ggml_new_graph(ptr noundef) local_unnamed_addr #4

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

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

declare void @ggml_free(ptr noundef) local_unnamed_addr #4

attributes #0 = { 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 = { 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { 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 #6 = { nofree nounwind memory(read) "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 nofree nounwind willreturn memory(read) 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 = { nounwind willreturn memory(read) }
attributes #10 = { noreturn nounwind }

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

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


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass