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

; 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_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.12 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.132 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.133 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.134 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.137 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.138 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.141 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.146 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.147 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.150 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.151 = external hidden unnamed_addr constant [55 x i8], align 1

; Function Attrs: noreturn nounwind uwtable
declare dso_local void @ggml_abort(ptr noundef, i32 noundef, ptr noundef, ...) #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @ggml_nelements(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @ggml_is_contiguous(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local ptr @ggml_new_tensor(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local ptr @ggml_rwkv_wkv7(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #2 {
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca [4 x i64], align 16
  %22 = alloca ptr, align 8
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  store ptr %7, ptr %16, align 8, !tbaa !5
  %23 = load ptr, ptr %10, align 8, !tbaa !5
  %24 = call zeroext i1 @ggml_is_contiguous(ptr noundef %23)
  br i1 %24, label %26, label %25

25:                                               ; preds = %8
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4778, ptr noundef @.str.13, ptr noundef @.str.134) #3
  unreachable

26:                                               ; preds = %8
  %27 = load ptr, ptr %11, align 8, !tbaa !5
  %28 = call zeroext i1 @ggml_is_contiguous(ptr noundef %27)
  br i1 %28, label %30, label %29

29:                                               ; preds = %26
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4779, ptr noundef @.str.13, ptr noundef @.str.146) #3
  unreachable

30:                                               ; preds = %26
  %31 = load ptr, ptr %12, align 8, !tbaa !5
  %32 = call zeroext i1 @ggml_is_contiguous(ptr noundef %31)
  br i1 %32, label %34, label %33

33:                                               ; preds = %30
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4780, ptr noundef @.str.13, ptr noundef @.str.132) #3
  unreachable

34:                                               ; preds = %30
  %35 = load ptr, ptr %13, align 8, !tbaa !5
  %36 = call zeroext i1 @ggml_is_contiguous(ptr noundef %35)
  br i1 %36, label %38, label %37

37:                                               ; preds = %34
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4781, ptr noundef @.str.13, ptr noundef @.str.133) #3
  unreachable

38:                                               ; preds = %34
  %39 = load ptr, ptr %14, align 8, !tbaa !5
  %40 = call zeroext i1 @ggml_is_contiguous(ptr noundef %39)
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4782, ptr noundef @.str.13, ptr noundef @.str.49) #3
  unreachable

42:                                               ; preds = %38
  %43 = load ptr, ptr %15, align 8, !tbaa !5
  %44 = call zeroext i1 @ggml_is_contiguous(ptr noundef %43)
  br i1 %44, label %46, label %45

45:                                               ; preds = %42
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4783, ptr noundef @.str.13, ptr noundef @.str.147) #3
  unreachable

46:                                               ; preds = %42
  %47 = load ptr, ptr %16, align 8, !tbaa !5
  %48 = call zeroext i1 @ggml_is_contiguous(ptr noundef %47)
  br i1 %48, label %50, label %49

49:                                               ; preds = %46
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4784, ptr noundef @.str.13, ptr noundef @.str.137) #3
  unreachable

50:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %51 = load ptr, ptr %12, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.ggml_tensor, ptr %51, i32 0, i32 2
  %53 = getelementptr inbounds [4 x i64], ptr %52, i64 0, i64 0
  %54 = load i64, ptr %53, align 8, !tbaa !9
  store i64 %54, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %55 = load ptr, ptr %12, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.ggml_tensor, ptr %55, i32 0, i32 2
  %57 = getelementptr inbounds [4 x i64], ptr %56, i64 0, i64 1
  %58 = load i64, ptr %57, align 8, !tbaa !9
  store i64 %58, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %59 = load ptr, ptr %12, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.ggml_tensor, ptr %59, i32 0, i32 2
  %61 = getelementptr inbounds [4 x i64], ptr %60, i64 0, i64 2
  %62 = load i64, ptr %61, align 8, !tbaa !9
  store i64 %62, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %63 = load ptr, ptr %16, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.ggml_tensor, ptr %63, i32 0, i32 2
  %65 = getelementptr inbounds [4 x i64], ptr %64, i64 0, i64 1
  %66 = load i64, ptr %65, align 8, !tbaa !9
  store i64 %66, ptr %20, align 8, !tbaa !9
  %67 = load ptr, ptr %11, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.ggml_tensor, ptr %67, i32 0, i32 2
  %69 = getelementptr inbounds [4 x i64], ptr %68, i64 0, i64 0
  %70 = load i64, ptr %69, align 8, !tbaa !9
  %71 = load i64, ptr %17, align 8, !tbaa !9
  %72 = icmp eq i64 %70, %71
  br i1 %72, label %73, label %87

73:                                               ; preds = %50
  %74 = load ptr, ptr %11, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.ggml_tensor, ptr %74, i32 0, i32 2
  %76 = getelementptr inbounds [4 x i64], ptr %75, i64 0, i64 1
  %77 = load i64, ptr %76, align 8, !tbaa !9
  %78 = load i64, ptr %18, align 8, !tbaa !9
  %79 = icmp eq i64 %77, %78
  br i1 %79, label %80, label %87

80:                                               ; preds = %73
  %81 = load ptr, ptr %11, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.ggml_tensor, ptr %81, i32 0, i32 2
  %83 = getelementptr inbounds [4 x i64], ptr %82, i64 0, i64 2
  %84 = load i64, ptr %83, align 8, !tbaa !9
  %85 = load i64, ptr %19, align 8, !tbaa !9
  %86 = icmp eq i64 %84, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %80, %73, %50
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4791, ptr noundef @.str.13, ptr noundef @.str.148) #3
  unreachable

88:                                               ; preds = %80
  %89 = load ptr, ptr %12, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.ggml_tensor, ptr %89, i32 0, i32 2
  %91 = getelementptr inbounds [4 x i64], ptr %90, i64 0, i64 0
  %92 = load i64, ptr %91, align 8, !tbaa !9
  %93 = load i64, ptr %17, align 8, !tbaa !9
  %94 = icmp eq i64 %92, %93
  br i1 %94, label %95, label %109

95:                                               ; preds = %88
  %96 = load ptr, ptr %12, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.ggml_tensor, ptr %96, i32 0, i32 2
  %98 = getelementptr inbounds [4 x i64], ptr %97, i64 0, i64 1
  %99 = load i64, ptr %98, align 8, !tbaa !9
  %100 = load i64, ptr %18, align 8, !tbaa !9
  %101 = icmp eq i64 %99, %100
  br i1 %101, label %102, label %109

102:                                              ; preds = %95
  %103 = load ptr, ptr %12, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.ggml_tensor, ptr %103, i32 0, i32 2
  %105 = getelementptr inbounds [4 x i64], ptr %104, i64 0, i64 2
  %106 = load i64, ptr %105, align 8, !tbaa !9
  %107 = load i64, ptr %19, align 8, !tbaa !9
  %108 = icmp eq i64 %106, %107
  br i1 %108, label %110, label %109

109:                                              ; preds = %102, %95, %88
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4792, ptr noundef @.str.13, ptr noundef @.str.149) #3
  unreachable

110:                                              ; preds = %102
  %111 = load ptr, ptr %13, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.ggml_tensor, ptr %111, i32 0, i32 2
  %113 = getelementptr inbounds [4 x i64], ptr %112, i64 0, i64 0
  %114 = load i64, ptr %113, align 8, !tbaa !9
  %115 = load i64, ptr %17, align 8, !tbaa !9
  %116 = icmp eq i64 %114, %115
  br i1 %116, label %117, label %131

117:                                              ; preds = %110
  %118 = load ptr, ptr %13, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.ggml_tensor, ptr %118, i32 0, i32 2
  %120 = getelementptr inbounds [4 x i64], ptr %119, i64 0, i64 1
  %121 = load i64, ptr %120, align 8, !tbaa !9
  %122 = load i64, ptr %18, align 8, !tbaa !9
  %123 = icmp eq i64 %121, %122
  br i1 %123, label %124, label %131

124:                                              ; preds = %117
  %125 = load ptr, ptr %13, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.ggml_tensor, ptr %125, i32 0, i32 2
  %127 = getelementptr inbounds [4 x i64], ptr %126, i64 0, i64 2
  %128 = load i64, ptr %127, align 8, !tbaa !9
  %129 = load i64, ptr %19, align 8, !tbaa !9
  %130 = icmp eq i64 %128, %129
  br i1 %130, label %132, label %131

131:                                              ; preds = %124, %117, %110
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4793, ptr noundef @.str.13, ptr noundef @.str.138) #3
  unreachable

132:                                              ; preds = %124
  %133 = load ptr, ptr %14, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.ggml_tensor, ptr %133, i32 0, i32 2
  %135 = getelementptr inbounds [4 x i64], ptr %134, i64 0, i64 0
  %136 = load i64, ptr %135, align 8, !tbaa !9
  %137 = load i64, ptr %17, align 8, !tbaa !9
  %138 = icmp eq i64 %136, %137
  br i1 %138, label %139, label %153

139:                                              ; preds = %132
  %140 = load ptr, ptr %14, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.ggml_tensor, ptr %140, i32 0, i32 2
  %142 = getelementptr inbounds [4 x i64], ptr %141, i64 0, i64 1
  %143 = load i64, ptr %142, align 8, !tbaa !9
  %144 = load i64, ptr %18, align 8, !tbaa !9
  %145 = icmp eq i64 %143, %144
  br i1 %145, label %146, label %153

146:                                              ; preds = %139
  %147 = load ptr, ptr %14, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.ggml_tensor, ptr %147, i32 0, i32 2
  %149 = getelementptr inbounds [4 x i64], ptr %148, i64 0, i64 2
  %150 = load i64, ptr %149, align 8, !tbaa !9
  %151 = load i64, ptr %19, align 8, !tbaa !9
  %152 = icmp eq i64 %150, %151
  br i1 %152, label %154, label %153

153:                                              ; preds = %146, %139, %132
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4794, ptr noundef @.str.13, ptr noundef @.str.150) #3
  unreachable

154:                                              ; preds = %146
  %155 = load ptr, ptr %15, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.ggml_tensor, ptr %155, i32 0, i32 2
  %157 = getelementptr inbounds [4 x i64], ptr %156, i64 0, i64 0
  %158 = load i64, ptr %157, align 8, !tbaa !9
  %159 = load i64, ptr %17, align 8, !tbaa !9
  %160 = icmp eq i64 %158, %159
  br i1 %160, label %161, label %175

161:                                              ; preds = %154
  %162 = load ptr, ptr %15, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.ggml_tensor, ptr %162, i32 0, i32 2
  %164 = getelementptr inbounds [4 x i64], ptr %163, i64 0, i64 1
  %165 = load i64, ptr %164, align 8, !tbaa !9
  %166 = load i64, ptr %18, align 8, !tbaa !9
  %167 = icmp eq i64 %165, %166
  br i1 %167, label %168, label %175

168:                                              ; preds = %161
  %169 = load ptr, ptr %15, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.ggml_tensor, ptr %169, i32 0, i32 2
  %171 = getelementptr inbounds [4 x i64], ptr %170, i64 0, i64 2
  %172 = load i64, ptr %171, align 8, !tbaa !9
  %173 = load i64, ptr %19, align 8, !tbaa !9
  %174 = icmp eq i64 %172, %173
  br i1 %174, label %176, label %175

175:                                              ; preds = %168, %161, %154
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4795, ptr noundef @.str.13, ptr noundef @.str.151) #3
  unreachable

176:                                              ; preds = %168
  %177 = load ptr, ptr %16, align 8, !tbaa !5
  %178 = call i64 @ggml_nelements(ptr noundef %177)
  %179 = load i64, ptr %17, align 8, !tbaa !9
  %180 = load i64, ptr %17, align 8, !tbaa !9
  %181 = mul nsw i64 %179, %180
  %182 = load i64, ptr %18, align 8, !tbaa !9
  %183 = mul nsw i64 %181, %182
  %184 = load i64, ptr %20, align 8, !tbaa !9
  %185 = mul nsw i64 %183, %184
  %186 = icmp eq i64 %178, %185
  br i1 %186, label %188, label %187

187:                                              ; preds = %176
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4796, ptr noundef @.str.13, ptr noundef @.str.141) #3
  unreachable

188:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #4
  %189 = load i64, ptr %17, align 8, !tbaa !9
  %190 = load i64, ptr %18, align 8, !tbaa !9
  %191 = mul nsw i64 %189, %190
  store i64 %191, ptr %21, align 8, !tbaa !9
  %192 = getelementptr inbounds i64, ptr %21, i64 1
  %193 = load i64, ptr %19, align 8, !tbaa !9
  %194 = load i64, ptr %17, align 8, !tbaa !9
  %195 = load i64, ptr %20, align 8, !tbaa !9
  %196 = mul nsw i64 %194, %195
  %197 = add nsw i64 %193, %196
  store i64 %197, ptr %192, align 8, !tbaa !9
  %198 = getelementptr inbounds i64, ptr %21, i64 2
  store i64 1, ptr %198, align 8, !tbaa !9
  %199 = getelementptr inbounds i64, ptr %21, i64 3
  store i64 1, ptr %199, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %200 = load ptr, ptr %9, align 8, !tbaa !5
  %201 = getelementptr inbounds [4 x i64], ptr %21, i64 0, i64 0
  %202 = call ptr @ggml_new_tensor(ptr noundef %200, i32 noundef 0, i32 noundef 4, ptr noundef %201)
  store ptr %202, ptr %22, align 8, !tbaa !5
  %203 = load ptr, ptr %22, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.ggml_tensor, ptr %203, i32 0, i32 4
  store i32 73, ptr %204, align 8, !tbaa !11
  %205 = load ptr, ptr %10, align 8, !tbaa !5
  %206 = load ptr, ptr %22, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.ggml_tensor, ptr %206, i32 0, i32 7
  %208 = getelementptr inbounds [10 x ptr], ptr %207, i64 0, i64 0
  store ptr %205, ptr %208, align 8, !tbaa !5
  %209 = load ptr, ptr %11, align 8, !tbaa !5
  %210 = load ptr, ptr %22, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.ggml_tensor, ptr %210, i32 0, i32 7
  %212 = getelementptr inbounds [10 x ptr], ptr %211, i64 0, i64 1
  store ptr %209, ptr %212, align 8, !tbaa !5
  %213 = load ptr, ptr %12, align 8, !tbaa !5
  %214 = load ptr, ptr %22, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.ggml_tensor, ptr %214, i32 0, i32 7
  %216 = getelementptr inbounds [10 x ptr], ptr %215, i64 0, i64 2
  store ptr %213, ptr %216, align 8, !tbaa !5
  %217 = load ptr, ptr %13, align 8, !tbaa !5
  %218 = load ptr, ptr %22, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.ggml_tensor, ptr %218, i32 0, i32 7
  %220 = getelementptr inbounds [10 x ptr], ptr %219, i64 0, i64 3
  store ptr %217, ptr %220, align 8, !tbaa !5
  %221 = load ptr, ptr %14, align 8, !tbaa !5
  %222 = load ptr, ptr %22, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.ggml_tensor, ptr %222, i32 0, i32 7
  %224 = getelementptr inbounds [10 x ptr], ptr %223, i64 0, i64 4
  store ptr %221, ptr %224, align 8, !tbaa !5
  %225 = load ptr, ptr %15, align 8, !tbaa !5
  %226 = load ptr, ptr %22, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.ggml_tensor, ptr %226, i32 0, i32 7
  %228 = getelementptr inbounds [10 x ptr], ptr %227, i64 0, i64 5
  store ptr %225, ptr %228, align 8, !tbaa !5
  %229 = load ptr, ptr %16, align 8, !tbaa !5
  %230 = load ptr, ptr %22, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.ggml_tensor, ptr %230, i32 0, i32 7
  %232 = getelementptr inbounds [10 x ptr], ptr %231, i64 0, i64 6
  store ptr %229, ptr %232, align 8, !tbaa !5
  %233 = load ptr, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  ret ptr %233
}

attributes #0 = { noreturn 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn }
attributes #4 = { 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 = !{!12, !13, i64 80}
!12 = !{!"ggml_tensor", !13, i64 0, !6, i64 8, !7, i64 16, !7, i64 48, !13, i64 80, !7, i64 84, !13, i64 148, !7, i64 152, !6, i64 232, !10, i64 240, !6, i64 248, !7, i64 256, !6, i64 320, !7, i64 328}
!13 = !{!"int", !7, i64 0}


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

@.str.12 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.132 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.133 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.134 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.137 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.138 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.141 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.146 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.147 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.150 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.151 = external hidden unnamed_addr constant [55 x i8], align 1

; Function Attrs: noreturn nounwind uwtable
declare dso_local void @ggml_abort(ptr noundef, i32 noundef, ptr noundef, ...) 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @ggml_nelements(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @ggml_is_contiguous(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local ptr @ggml_new_tensor(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local ptr @ggml_rwkv_wkv7(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) local_unnamed_addr #2 {
  %9 = alloca [4 x i64], align 16
  %10 = tail call zeroext i1 @ggml_is_contiguous(ptr noundef %1)
  br i1 %10, label %12, label %11

11:                                               ; preds = %8
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4778, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.134) #3
  unreachable

12:                                               ; preds = %8
  %13 = tail call zeroext i1 @ggml_is_contiguous(ptr noundef %2)
  br i1 %13, label %15, label %14

14:                                               ; preds = %12
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4779, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.146) #3
  unreachable

15:                                               ; preds = %12
  %16 = tail call zeroext i1 @ggml_is_contiguous(ptr noundef %3)
  br i1 %16, label %18, label %17

17:                                               ; preds = %15
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4780, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.132) #3
  unreachable

18:                                               ; preds = %15
  %19 = tail call zeroext i1 @ggml_is_contiguous(ptr noundef %4)
  br i1 %19, label %21, label %20

20:                                               ; preds = %18
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4781, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.133) #3
  unreachable

21:                                               ; preds = %18
  %22 = tail call zeroext i1 @ggml_is_contiguous(ptr noundef %5)
  br i1 %22, label %24, label %23

23:                                               ; preds = %21
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4782, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.49) #3
  unreachable

24:                                               ; preds = %21
  %25 = tail call zeroext i1 @ggml_is_contiguous(ptr noundef %6)
  br i1 %25, label %27, label %26

26:                                               ; preds = %24
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4783, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.147) #3
  unreachable

27:                                               ; preds = %24
  %28 = tail call zeroext i1 @ggml_is_contiguous(ptr noundef %7)
  br i1 %28, label %30, label %29

29:                                               ; preds = %27
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4784, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.137) #3
  unreachable

30:                                               ; preds = %27
  %31 = getelementptr inbounds i8, ptr %3, i64 16
  %32 = load i64, ptr %31, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %3, i64 24
  %34 = load i64, ptr %33, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %3, i64 32
  %36 = load i64, ptr %35, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %7, i64 24
  %38 = load i64, ptr %37, align 8, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %2, i64 16
  %40 = load i64, ptr %39, align 8, !tbaa !5
  %41 = icmp eq i64 %40, %32
  br i1 %41, label %42, label %50

42:                                               ; preds = %30
  %43 = getelementptr inbounds i8, ptr %2, i64 24
  %44 = load i64, ptr %43, align 8, !tbaa !5
  %45 = icmp eq i64 %44, %34
  br i1 %45, label %46, label %50

46:                                               ; preds = %42
  %47 = getelementptr inbounds i8, ptr %2, i64 32
  %48 = load i64, ptr %47, align 8, !tbaa !5
  %49 = icmp eq i64 %48, %36
  br i1 %49, label %51, label %50

50:                                               ; preds = %46, %42, %30
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4791, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.148) #3
  unreachable

51:                                               ; preds = %46
  %52 = getelementptr inbounds i8, ptr %4, i64 16
  %53 = load i64, ptr %52, align 8, !tbaa !5
  %54 = icmp eq i64 %53, %32
  br i1 %54, label %55, label %63

55:                                               ; preds = %51
  %56 = getelementptr inbounds i8, ptr %4, i64 24
  %57 = load i64, ptr %56, align 8, !tbaa !5
  %58 = icmp eq i64 %57, %34
  br i1 %58, label %59, label %63

59:                                               ; preds = %55
  %60 = getelementptr inbounds i8, ptr %4, i64 32
  %61 = load i64, ptr %60, align 8, !tbaa !5
  %62 = icmp eq i64 %61, %36
  br i1 %62, label %64, label %63

63:                                               ; preds = %59, %55, %51
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4793, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.138) #3
  unreachable

64:                                               ; preds = %59
  %65 = getelementptr inbounds i8, ptr %5, i64 16
  %66 = load i64, ptr %65, align 8, !tbaa !5
  %67 = icmp eq i64 %66, %32
  br i1 %67, label %68, label %76

68:                                               ; preds = %64
  %69 = getelementptr inbounds i8, ptr %5, i64 24
  %70 = load i64, ptr %69, align 8, !tbaa !5
  %71 = icmp eq i64 %70, %34
  br i1 %71, label %72, label %76

72:                                               ; preds = %68
  %73 = getelementptr inbounds i8, ptr %5, i64 32
  %74 = load i64, ptr %73, align 8, !tbaa !5
  %75 = icmp eq i64 %74, %36
  br i1 %75, label %77, label %76

76:                                               ; preds = %72, %68, %64
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4794, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.150) #3
  unreachable

77:                                               ; preds = %72
  %78 = getelementptr inbounds i8, ptr %6, i64 16
  %79 = load i64, ptr %78, align 8, !tbaa !5
  %80 = icmp eq i64 %79, %32
  br i1 %80, label %81, label %89

81:                                               ; preds = %77
  %82 = getelementptr inbounds i8, ptr %6, i64 24
  %83 = load i64, ptr %82, align 8, !tbaa !5
  %84 = icmp eq i64 %83, %34
  br i1 %84, label %85, label %89

85:                                               ; preds = %81
  %86 = getelementptr inbounds i8, ptr %6, i64 32
  %87 = load i64, ptr %86, align 8, !tbaa !5
  %88 = icmp eq i64 %87, %36
  br i1 %88, label %90, label %89

89:                                               ; preds = %85, %81, %77
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4795, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.151) #3
  unreachable

90:                                               ; preds = %85
  %91 = tail call i64 @ggml_nelements(ptr noundef nonnull %7)
  %92 = mul i64 %34, %32
  %93 = mul i64 %92, %32
  %94 = mul nsw i64 %93, %38
  %95 = icmp eq i64 %91, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %90
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4796, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.141) #3
  unreachable

97:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  store i64 %92, ptr %9, align 16, !tbaa !5
  %98 = getelementptr inbounds i8, ptr %9, i64 8
  %99 = mul nsw i64 %38, %32
  %100 = add nsw i64 %99, %36
  store i64 %100, ptr %98, align 8, !tbaa !5
  %101 = getelementptr inbounds i8, ptr %9, i64 16
  store i64 1, ptr %101, align 16, !tbaa !5
  %102 = getelementptr inbounds i8, ptr %9, i64 24
  store i64 1, ptr %102, align 8, !tbaa !5
  %103 = call ptr @ggml_new_tensor(ptr noundef %0, i32 noundef 0, i32 noundef 4, ptr noundef nonnull %9)
  %104 = getelementptr inbounds i8, ptr %103, i64 80
  store i32 73, ptr %104, align 8, !tbaa !9
  %105 = getelementptr inbounds i8, ptr %103, i64 152
  store ptr %1, ptr %105, align 8, !tbaa !13
  %106 = getelementptr inbounds i8, ptr %103, i64 160
  store ptr %2, ptr %106, align 8, !tbaa !13
  %107 = getelementptr inbounds i8, ptr %103, i64 168
  store ptr %3, ptr %107, align 8, !tbaa !13
  %108 = getelementptr inbounds i8, ptr %103, i64 176
  store ptr %4, ptr %108, align 8, !tbaa !13
  %109 = getelementptr inbounds i8, ptr %103, i64 184
  store ptr %5, ptr %109, align 8, !tbaa !13
  %110 = getelementptr inbounds i8, ptr %103, i64 192
  store ptr %6, ptr %110, align 8, !tbaa !13
  %111 = getelementptr inbounds i8, ptr %103, i64 200
  store ptr %7, ptr %111, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  ret ptr %103
}

attributes #0 = { noreturn 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn }
attributes #4 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 80}
!10 = !{!"ggml_tensor", !11, i64 0, !12, i64 8, !7, i64 16, !7, i64 48, !11, i64 80, !7, i64 84, !11, i64 148, !7, i64 152, !12, i64 232, !6, i64 240, !12, i64 248, !7, i64 256, !12, i64 320, !7, i64 328}
!11 = !{!"int", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!12, !12, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass