; 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.112 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.113 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.114 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.115 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.116 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.117 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.118 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.119 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.120 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.121 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.122 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.123 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.124 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.125 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.126 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.127 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.128 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.129 = external hidden unnamed_addr constant [19 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 i64 @ggml_type_size(i32 noundef) #2

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @ggml_is_3d(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 zeroext i1 @ggml_are_same_shape(ptr noundef, ptr noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local ptr @ggml_ssm_scan(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #2 {
  %8 = alloca ptr, align 8
  %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 i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca ptr, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  %20 = load ptr, ptr %9, align 8, !tbaa !5
  %21 = call zeroext i1 @ggml_is_contiguous(ptr noundef %20)
  br i1 %21, label %23, label %22

22:                                               ; preds = %7
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4525, ptr noundef @.str.13, ptr noundef @.str.112) #3
  unreachable

23:                                               ; preds = %7
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  %25 = call zeroext i1 @ggml_is_contiguous(ptr noundef %24)
  br i1 %25, label %27, label %26

26:                                               ; preds = %23
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4526, ptr noundef @.str.13, ptr noundef @.str.113) #3
  unreachable

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

30:                                               ; preds = %27
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4527, ptr noundef @.str.13, ptr noundef @.str.114) #3
  unreachable

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

34:                                               ; preds = %31
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4528, ptr noundef @.str.13, ptr noundef @.str.115) #3
  unreachable

35:                                               ; preds = %31
  %36 = load ptr, ptr %12, align 8, !tbaa !5
  %37 = call zeroext i1 @ggml_is_matrix(ptr noundef %36)
  br i1 %37, label %39, label %38

38:                                               ; preds = %35
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4529, ptr noundef @.str.13, ptr noundef @.str.116) #3
  unreachable

39:                                               ; preds = %35
  %40 = load ptr, ptr %13, align 8, !tbaa !5
  %41 = call zeroext i1 @ggml_is_3d(ptr noundef %40)
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4530, ptr noundef @.str.13, ptr noundef @.str.117) #3
  unreachable

43:                                               ; preds = %39
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  %45 = call zeroext i1 @ggml_is_3d(ptr noundef %44)
  br i1 %45, label %47, label %46

46:                                               ; preds = %43
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4531, ptr noundef @.str.13, ptr noundef @.str.118) #3
  unreachable

47:                                               ; preds = %43
  %48 = load ptr, ptr %13, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.ggml_tensor, ptr %48, i32 0, i32 3
  %50 = getelementptr inbounds [4 x i64], ptr %49, i64 0, i64 0
  %51 = load i64, ptr %50, align 8, !tbaa !9
  %52 = load ptr, ptr %13, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.ggml_tensor, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 8, !tbaa !11
  %55 = call i64 @ggml_type_size(i32 noundef %54)
  %56 = icmp eq i64 %51, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %47
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4532, ptr noundef @.str.13, ptr noundef @.str.119) #3
  unreachable

58:                                               ; preds = %47
  %59 = load ptr, ptr %14, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.ggml_tensor, ptr %59, i32 0, i32 3
  %61 = getelementptr inbounds [4 x i64], ptr %60, i64 0, i64 0
  %62 = load i64, ptr %61, align 8, !tbaa !9
  %63 = load ptr, ptr %14, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.ggml_tensor, ptr %63, i32 0, i32 0
  %65 = load i32, ptr %64, align 8, !tbaa !11
  %66 = call i64 @ggml_type_size(i32 noundef %65)
  %67 = icmp eq i64 %62, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %58
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4533, ptr noundef @.str.13, ptr noundef @.str.120) #3
  unreachable

69:                                               ; preds = %58
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = load ptr, ptr %11, align 8, !tbaa !5
  %72 = call zeroext i1 @ggml_are_same_shape(ptr noundef %70, ptr noundef %71)
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4534, ptr noundef @.str.13, ptr noundef @.str.121) #3
  unreachable

74:                                               ; preds = %69
  %75 = load ptr, ptr %13, align 8, !tbaa !5
  %76 = load ptr, ptr %14, align 8, !tbaa !5
  %77 = call zeroext i1 @ggml_are_same_shape(ptr noundef %75, ptr noundef %76)
  br i1 %77, label %79, label %78

78:                                               ; preds = %74
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4535, ptr noundef @.str.13, ptr noundef @.str.122) #3
  unreachable

79:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.ggml_tensor, ptr %80, i32 0, i32 2
  %82 = getelementptr inbounds [4 x i64], ptr %81, i64 0, i64 0
  %83 = load i64, ptr %82, align 8, !tbaa !9
  store i64 %83, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.ggml_tensor, ptr %84, i32 0, i32 2
  %86 = getelementptr inbounds [4 x i64], ptr %85, i64 0, i64 1
  %87 = load i64, ptr %86, align 8, !tbaa !9
  store i64 %87, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.ggml_tensor, ptr %88, i32 0, i32 2
  %90 = getelementptr inbounds [4 x i64], ptr %89, i64 0, i64 1
  %91 = load i64, ptr %90, align 8, !tbaa !9
  store i64 %91, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %92 = load ptr, ptr %10, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.ggml_tensor, ptr %92, i32 0, i32 2
  %94 = getelementptr inbounds [4 x i64], ptr %93, i64 0, i64 2
  %95 = load i64, ptr %94, align 8, !tbaa !9
  store i64 %95, ptr %18, align 8, !tbaa !9
  %96 = load ptr, ptr %9, 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 2
  %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 %103, label %102

102:                                              ; preds = %79
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4543, ptr noundef @.str.13, ptr noundef @.str.123) #3
  unreachable

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

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

111:                                              ; preds = %103
  %112 = load ptr, ptr %12, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.ggml_tensor, ptr %112, i32 0, i32 2
  %114 = getelementptr inbounds [4 x i64], ptr %113, i64 0, i64 0
  %115 = load i64, ptr %114, align 8, !tbaa !9
  %116 = load i64, ptr %15, align 8, !tbaa !9
  %117 = icmp eq i64 %115, %116
  br i1 %117, label %119, label %118

118:                                              ; preds = %111
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4545, ptr noundef @.str.13, ptr noundef @.str.125) #3
  unreachable

119:                                              ; preds = %111
  %120 = load ptr, ptr %12, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.ggml_tensor, ptr %120, i32 0, i32 2
  %122 = getelementptr inbounds [4 x i64], ptr %121, i64 0, i64 1
  %123 = load i64, ptr %122, align 8, !tbaa !9
  %124 = load i64, ptr %16, align 8, !tbaa !9
  %125 = icmp eq i64 %123, %124
  br i1 %125, label %127, label %126

126:                                              ; preds = %119
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4546, ptr noundef @.str.13, ptr noundef @.str.126) #3
  unreachable

127:                                              ; preds = %119
  %128 = load ptr, ptr %13, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.ggml_tensor, ptr %128, i32 0, i32 2
  %130 = getelementptr inbounds [4 x i64], ptr %129, i64 0, i64 0
  %131 = load i64, ptr %130, align 8, !tbaa !9
  %132 = load i64, ptr %15, align 8, !tbaa !9
  %133 = icmp eq i64 %131, %132
  br i1 %133, label %135, label %134

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

135:                                              ; preds = %127
  %136 = load ptr, ptr %13, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.ggml_tensor, ptr %136, i32 0, i32 2
  %138 = getelementptr inbounds [4 x i64], ptr %137, i64 0, i64 1
  %139 = load i64, ptr %138, align 8, !tbaa !9
  %140 = load i64, ptr %17, align 8, !tbaa !9
  %141 = icmp eq i64 %139, %140
  br i1 %141, label %143, label %142

142:                                              ; preds = %135
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4548, ptr noundef @.str.13, ptr noundef @.str.128) #3
  unreachable

143:                                              ; preds = %135
  %144 = load ptr, ptr %13, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.ggml_tensor, ptr %144, i32 0, i32 2
  %146 = getelementptr inbounds [4 x i64], ptr %145, i64 0, i64 2
  %147 = load i64, ptr %146, align 8, !tbaa !9
  %148 = load i64, ptr %18, align 8, !tbaa !9
  %149 = icmp eq i64 %147, %148
  br i1 %149, label %151, label %150

150:                                              ; preds = %143
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 4549, ptr noundef @.str.13, ptr noundef @.str.129) #3
  unreachable

151:                                              ; preds = %143
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %152 = load ptr, ptr %8, align 8, !tbaa !5
  %153 = load ptr, ptr %10, align 8, !tbaa !5
  %154 = call i64 @ggml_nelements(ptr noundef %153)
  %155 = load ptr, ptr %9, align 8, !tbaa !5
  %156 = call i64 @ggml_nelements(ptr noundef %155)
  %157 = add nsw i64 %154, %156
  %158 = call ptr @ggml_new_tensor_1d(ptr noundef %152, i32 noundef 0, i64 noundef %157)
  store ptr %158, ptr %19, align 8, !tbaa !5
  %159 = load ptr, ptr %19, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.ggml_tensor, ptr %159, i32 0, i32 4
  store i32 66, ptr %160, align 8, !tbaa !14
  %161 = load ptr, ptr %9, align 8, !tbaa !5
  %162 = load ptr, ptr %19, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.ggml_tensor, ptr %162, i32 0, i32 7
  %164 = getelementptr inbounds [10 x ptr], ptr %163, i64 0, i64 0
  store ptr %161, ptr %164, align 8, !tbaa !5
  %165 = load ptr, ptr %10, align 8, !tbaa !5
  %166 = load ptr, ptr %19, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.ggml_tensor, ptr %166, i32 0, i32 7
  %168 = getelementptr inbounds [10 x ptr], ptr %167, i64 0, i64 1
  store ptr %165, ptr %168, align 8, !tbaa !5
  %169 = load ptr, ptr %11, align 8, !tbaa !5
  %170 = load ptr, ptr %19, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.ggml_tensor, ptr %170, i32 0, i32 7
  %172 = getelementptr inbounds [10 x ptr], ptr %171, i64 0, i64 2
  store ptr %169, ptr %172, align 8, !tbaa !5
  %173 = load ptr, ptr %12, align 8, !tbaa !5
  %174 = load ptr, ptr %19, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.ggml_tensor, ptr %174, i32 0, i32 7
  %176 = getelementptr inbounds [10 x ptr], ptr %175, i64 0, i64 3
  store ptr %173, ptr %176, align 8, !tbaa !5
  %177 = load ptr, ptr %13, align 8, !tbaa !5
  %178 = load ptr, ptr %19, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.ggml_tensor, ptr %178, i32 0, i32 7
  %180 = getelementptr inbounds [10 x ptr], ptr %179, i64 0, i64 4
  store ptr %177, ptr %180, align 8, !tbaa !5
  %181 = load ptr, ptr %14, align 8, !tbaa !5
  %182 = load ptr, ptr %19, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.ggml_tensor, ptr %182, i32 0, i32 7
  %184 = getelementptr inbounds [10 x ptr], ptr %183, i64 0, i64 5
  store ptr %181, ptr %184, align 8, !tbaa !5
  %185 = load ptr, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  ret ptr %185
}

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 0}
!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}
!14 = !{!12, !13, i64 80}


; 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.112 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.113 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.114 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.115 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.116 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.117 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.118 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.119 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.120 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.121 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.122 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.123 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.124 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.125 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.126 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.127 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.128 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.129 = external hidden unnamed_addr constant [19 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: nounwind uwtable
declare dso_local i64 @ggml_nelements(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @ggml_type_size(i32 noundef) local_unnamed_addr #1

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @ggml_ssm_scan(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #1 {
  %8 = tail call zeroext i1 @ggml_is_contiguous(ptr noundef %1)
  br i1 %8, label %10, label %9

9:                                                ; preds = %7
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4525, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.112) #2
  unreachable

10:                                               ; preds = %7
  %11 = tail call zeroext i1 @ggml_is_contiguous(ptr noundef %2)
  br i1 %11, label %13, label %12

12:                                               ; preds = %10
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4526, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.113) #2
  unreachable

13:                                               ; preds = %10
  %14 = tail call zeroext i1 @ggml_is_contiguous(ptr noundef %3)
  br i1 %14, label %16, label %15

15:                                               ; preds = %13
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4527, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.114) #2
  unreachable

16:                                               ; preds = %13
  %17 = tail call zeroext i1 @ggml_is_contiguous(ptr noundef %4)
  br i1 %17, label %19, label %18

18:                                               ; preds = %16
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4528, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.115) #2
  unreachable

19:                                               ; preds = %16
  %20 = tail call zeroext i1 @ggml_is_matrix(ptr noundef %4)
  br i1 %20, label %22, label %21

21:                                               ; preds = %19
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4529, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.116) #2
  unreachable

22:                                               ; preds = %19
  %23 = tail call zeroext i1 @ggml_is_3d(ptr noundef %5)
  br i1 %23, label %25, label %24

24:                                               ; preds = %22
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4530, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.117) #2
  unreachable

25:                                               ; preds = %22
  %26 = tail call zeroext i1 @ggml_is_3d(ptr noundef %1)
  br i1 %26, label %28, label %27

27:                                               ; preds = %25
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4531, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.118) #2
  unreachable

28:                                               ; preds = %25
  %29 = getelementptr inbounds i8, ptr %5, i64 48
  %30 = load i64, ptr %29, align 8, !tbaa !5
  %31 = load i32, ptr %5, align 8, !tbaa !9
  %32 = tail call i64 @ggml_type_size(i32 noundef %31)
  %33 = icmp eq i64 %30, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %28
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4532, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.119) #2
  unreachable

35:                                               ; preds = %28
  %36 = getelementptr inbounds i8, ptr %6, i64 48
  %37 = load i64, ptr %36, align 8, !tbaa !5
  %38 = load i32, ptr %6, align 8, !tbaa !9
  %39 = tail call i64 @ggml_type_size(i32 noundef %38)
  %40 = icmp eq i64 %37, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %35
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4533, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.120) #2
  unreachable

42:                                               ; preds = %35
  %43 = tail call zeroext i1 @ggml_are_same_shape(ptr noundef %2, ptr noundef %3)
  br i1 %43, label %45, label %44

44:                                               ; preds = %42
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4534, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.121) #2
  unreachable

45:                                               ; preds = %42
  %46 = tail call zeroext i1 @ggml_are_same_shape(ptr noundef nonnull %5, ptr noundef nonnull %6)
  br i1 %46, label %48, label %47

47:                                               ; preds = %45
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4535, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.122) #2
  unreachable

48:                                               ; preds = %45
  %49 = getelementptr inbounds i8, ptr %1, i64 16
  %50 = load i64, ptr %49, align 8, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %1, i64 24
  %52 = load i64, ptr %51, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %2, i64 24
  %54 = load i64, ptr %53, align 8, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %2, i64 32
  %56 = load i64, ptr %55, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %1, i64 32
  %58 = load i64, ptr %57, align 8, !tbaa !5
  %59 = icmp eq i64 %58, %56
  br i1 %59, label %61, label %60

60:                                               ; preds = %48
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4543, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.123) #2
  unreachable

61:                                               ; preds = %48
  %62 = getelementptr inbounds i8, ptr %2, i64 16
  %63 = load i64, ptr %62, align 8, !tbaa !5
  %64 = icmp eq i64 %63, %52
  br i1 %64, label %66, label %65

65:                                               ; preds = %61
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4544, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.124) #2
  unreachable

66:                                               ; preds = %61
  %67 = getelementptr inbounds i8, ptr %4, i64 16
  %68 = load i64, ptr %67, align 8, !tbaa !5
  %69 = icmp eq i64 %68, %50
  br i1 %69, label %71, label %70

70:                                               ; preds = %66
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4545, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.125) #2
  unreachable

71:                                               ; preds = %66
  %72 = getelementptr inbounds i8, ptr %4, i64 24
  %73 = load i64, ptr %72, align 8, !tbaa !5
  %74 = icmp eq i64 %73, %52
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4546, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.126) #2
  unreachable

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

80:                                               ; preds = %76
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4547, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.127) #2
  unreachable

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

85:                                               ; preds = %81
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4548, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.128) #2
  unreachable

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

90:                                               ; preds = %86
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 4549, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.129) #2
  unreachable

91:                                               ; preds = %86
  %92 = tail call i64 @ggml_nelements(ptr noundef nonnull %2)
  %93 = tail call i64 @ggml_nelements(ptr noundef nonnull %1)
  %94 = add nsw i64 %93, %92
  %95 = tail call ptr @ggml_new_tensor_1d(ptr noundef %0, i32 noundef 0, i64 noundef %94)
  %96 = getelementptr inbounds i8, ptr %95, i64 80
  store i32 66, ptr %96, align 8, !tbaa !13
  %97 = getelementptr inbounds i8, ptr %95, i64 152
  store ptr %1, ptr %97, align 8, !tbaa !14
  %98 = getelementptr inbounds i8, ptr %95, i64 160
  store ptr %2, ptr %98, align 8, !tbaa !14
  %99 = getelementptr inbounds i8, ptr %95, i64 168
  store ptr %3, ptr %99, align 8, !tbaa !14
  %100 = getelementptr inbounds i8, ptr %95, i64 176
  store ptr %4, ptr %100, align 8, !tbaa !14
  %101 = getelementptr inbounds i8, ptr %95, i64 184
  store ptr %5, ptr %101, align 8, !tbaa !14
  %102 = getelementptr inbounds i8, ptr %95, i64 192
  store ptr %6, ptr %102, align 8, !tbaa !14
  ret ptr %95
}

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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { noreturn }

!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 0}
!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 = !{!10, !11, i64 80}
!14 = !{!12, !12, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,TailCallElimPass