; 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.40 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [40 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 ptr @ggml_new_tensor(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @ggml_set_op_params(ptr noundef, ptr noundef, i64 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local ptr @ggml_im2col(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i1 noundef zeroext %9, i32 noundef %10) #2 {
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i8, align 1
  %22 = alloca i32, align 4
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca [4 x i64], align 16
  %26 = alloca ptr, align 8
  %27 = alloca [7 x i32], align 16
  store ptr %0, ptr %12, align 8, !tbaa !5
  store ptr %1, ptr %13, align 8, !tbaa !5
  store ptr %2, ptr %14, align 8, !tbaa !5
  store i32 %3, ptr %15, align 4, !tbaa !9
  store i32 %4, ptr %16, align 4, !tbaa !9
  store i32 %5, ptr %17, align 4, !tbaa !9
  store i32 %6, ptr %18, align 4, !tbaa !9
  store i32 %7, ptr %19, align 4, !tbaa !9
  store i32 %8, ptr %20, align 4, !tbaa !9
  %28 = zext i1 %9 to i8
  store i8 %28, ptr %21, align 1, !tbaa !11
  store i32 %10, ptr %22, align 4, !tbaa !9
  %29 = load i8, ptr %21, align 1, !tbaa !11, !range !13, !noundef !14
  %30 = trunc i8 %29 to i1
  br i1 %30, label %31, label %43

31:                                               ; preds = %11
  %32 = load ptr, ptr %13, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.ggml_tensor, ptr %32, i32 0, i32 2
  %34 = getelementptr inbounds [4 x i64], ptr %33, i64 0, i64 2
  %35 = load i64, ptr %34, align 8, !tbaa !15
  %36 = load ptr, ptr %14, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.ggml_tensor, ptr %36, i32 0, i32 2
  %38 = getelementptr inbounds [4 x i64], ptr %37, i64 0, i64 2
  %39 = load i64, ptr %38, align 8, !tbaa !15
  %40 = icmp eq i64 %35, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %31
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 3795, ptr noundef @.str.13, ptr noundef @.str.79) #3
  unreachable

42:                                               ; preds = %31
  br label %62

43:                                               ; preds = %11
  %44 = load ptr, ptr %14, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.ggml_tensor, ptr %44, i32 0, i32 2
  %46 = getelementptr inbounds [4 x i64], ptr %45, i64 0, i64 1
  %47 = load i64, ptr %46, align 8, !tbaa !15
  %48 = load ptr, ptr %13, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.ggml_tensor, ptr %48, i32 0, i32 2
  %50 = getelementptr inbounds [4 x i64], ptr %49, i64 0, i64 1
  %51 = load i64, ptr %50, align 8, !tbaa !15
  %52 = icmp eq i64 %47, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %43
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 3798, ptr noundef @.str.13, ptr noundef @.str.80) #3
  unreachable

54:                                               ; preds = %43
  %55 = load ptr, ptr %14, 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 3
  %58 = load i64, ptr %57, align 8, !tbaa !15
  %59 = icmp eq i64 %58, 1
  br i1 %59, label %61, label %60

60:                                               ; preds = %54
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 3799, ptr noundef @.str.13, ptr noundef @.str.40) #3
  unreachable

61:                                               ; preds = %54
  br label %62

62:                                               ; preds = %61, %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %63 = load i8, ptr %21, align 1, !tbaa !11, !range !13, !noundef !14
  %64 = trunc i8 %63 to i1
  br i1 %64, label %65, label %78

65:                                               ; preds = %62
  %66 = load ptr, ptr %14, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.ggml_tensor, ptr %66, i32 0, i32 2
  %68 = getelementptr inbounds [4 x i64], ptr %67, i64 0, i64 1
  %69 = load i64, ptr %68, align 8, !tbaa !15
  %70 = load ptr, ptr %13, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.ggml_tensor, ptr %70, i32 0, i32 2
  %72 = getelementptr inbounds [4 x i64], ptr %71, i64 0, i64 1
  %73 = load i64, ptr %72, align 8, !tbaa !15
  %74 = load i32, ptr %16, align 4, !tbaa !9
  %75 = load i32, ptr %18, align 4, !tbaa !9
  %76 = load i32, ptr %20, align 4, !tbaa !9
  %77 = call i64 @ggml_calc_conv_output_size(i64 noundef %69, i64 noundef %73, i32 noundef %74, i32 noundef %75, i32 noundef %76)
  br label %79

78:                                               ; preds = %62
  br label %79

79:                                               ; preds = %78, %65
  %80 = phi i64 [ %77, %65 ], [ 0, %78 ]
  store i64 %80, ptr %23, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %81 = load ptr, ptr %14, 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 0
  %84 = load i64, ptr %83, align 8, !tbaa !15
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.ggml_tensor, ptr %85, i32 0, i32 2
  %87 = getelementptr inbounds [4 x i64], ptr %86, i64 0, i64 0
  %88 = load i64, ptr %87, align 8, !tbaa !15
  %89 = load i32, ptr %15, align 4, !tbaa !9
  %90 = load i32, ptr %17, align 4, !tbaa !9
  %91 = load i32, ptr %19, align 4, !tbaa !9
  %92 = call i64 @ggml_calc_conv_output_size(i64 noundef %84, i64 noundef %88, i32 noundef %89, i32 noundef %90, i32 noundef %91)
  store i64 %92, ptr %24, align 8, !tbaa !15
  %93 = load i8, ptr %21, align 1, !tbaa !11, !range !13, !noundef !14
  %94 = trunc i8 %93 to i1
  br i1 %94, label %95, label %98

95:                                               ; preds = %79
  %96 = load i64, ptr %23, align 8, !tbaa !15
  %97 = icmp sgt i64 %96, 0
  br i1 %97, label %98, label %99

98:                                               ; preds = %95, %79
  br i1 true, label %100, label %99

99:                                               ; preds = %98, %95
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 3805, ptr noundef @.str.13, ptr noundef @.str.82) #3
  unreachable

100:                                              ; preds = %98
  %101 = load i64, ptr %24, align 8, !tbaa !15
  %102 = icmp sgt i64 %101, 0
  br i1 %102, label %103, label %104

103:                                              ; preds = %100
  br i1 true, label %105, label %104

104:                                              ; preds = %103, %100
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.12, i32 noundef 3806, ptr noundef @.str.13, ptr noundef @.str.83) #3
  unreachable

105:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #4
  %106 = load i8, ptr %21, align 1, !tbaa !11, !range !13, !noundef !14
  %107 = trunc i8 %106 to i1
  br i1 %107, label %108, label %123

108:                                              ; preds = %105
  %109 = load ptr, ptr %13, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.ggml_tensor, ptr %109, i32 0, i32 2
  %111 = getelementptr inbounds [4 x i64], ptr %110, i64 0, i64 2
  %112 = load i64, ptr %111, align 8, !tbaa !15
  %113 = load ptr, ptr %13, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.ggml_tensor, ptr %113, i32 0, i32 2
  %115 = getelementptr inbounds [4 x i64], ptr %114, i64 0, i64 1
  %116 = load i64, ptr %115, align 8, !tbaa !15
  %117 = mul nsw i64 %112, %116
  %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 0
  %121 = load i64, ptr %120, align 8, !tbaa !15
  %122 = mul nsw i64 %117, %121
  br label %133

123:                                              ; preds = %105
  %124 = load ptr, ptr %13, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.ggml_tensor, ptr %124, i32 0, i32 2
  %126 = getelementptr inbounds [4 x i64], ptr %125, i64 0, i64 1
  %127 = load i64, ptr %126, align 8, !tbaa !15
  %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 !15
  %132 = mul nsw i64 %127, %131
  br label %133

133:                                              ; preds = %123, %108
  %134 = phi i64 [ %122, %108 ], [ %132, %123 ]
  store i64 %134, ptr %25, align 8, !tbaa !15
  %135 = getelementptr inbounds i64, ptr %25, i64 1
  %136 = load i64, ptr %24, align 8, !tbaa !15
  store i64 %136, ptr %135, align 8, !tbaa !15
  %137 = getelementptr inbounds i64, ptr %25, i64 2
  %138 = load i8, ptr %21, align 1, !tbaa !11, !range !13, !noundef !14
  %139 = trunc i8 %138 to i1
  br i1 %139, label %140, label %142

140:                                              ; preds = %133
  %141 = load i64, ptr %23, align 8, !tbaa !15
  br label %147

142:                                              ; preds = %133
  %143 = load ptr, ptr %14, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.ggml_tensor, ptr %143, i32 0, i32 2
  %145 = getelementptr inbounds [4 x i64], ptr %144, i64 0, i64 2
  %146 = load i64, ptr %145, align 8, !tbaa !15
  br label %147

147:                                              ; preds = %142, %140
  %148 = phi i64 [ %141, %140 ], [ %146, %142 ]
  store i64 %148, ptr %137, align 8, !tbaa !15
  %149 = getelementptr inbounds i64, ptr %25, i64 3
  %150 = load i8, ptr %21, align 1, !tbaa !11, !range !13, !noundef !14
  %151 = trunc i8 %150 to i1
  br i1 %151, label %152, label %157

152:                                              ; preds = %147
  %153 = load ptr, ptr %14, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.ggml_tensor, ptr %153, i32 0, i32 2
  %155 = getelementptr inbounds [4 x i64], ptr %154, i64 0, i64 3
  %156 = load i64, ptr %155, align 8, !tbaa !15
  br label %158

157:                                              ; preds = %147
  br label %158

158:                                              ; preds = %157, %152
  %159 = phi i64 [ %156, %152 ], [ 1, %157 ]
  store i64 %159, ptr %149, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  %160 = load ptr, ptr %12, align 8, !tbaa !5
  %161 = load i32, ptr %22, align 4, !tbaa !9
  %162 = getelementptr inbounds [4 x i64], ptr %25, i64 0, i64 0
  %163 = call ptr @ggml_new_tensor(ptr noundef %160, i32 noundef %161, i32 noundef 4, ptr noundef %162)
  store ptr %163, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 28, ptr %27) #4
  %164 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %164, ptr %27, align 4, !tbaa !9
  %165 = getelementptr inbounds i32, ptr %27, i64 1
  %166 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %166, ptr %165, align 4, !tbaa !9
  %167 = getelementptr inbounds i32, ptr %27, i64 2
  %168 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %168, ptr %167, align 4, !tbaa !9
  %169 = getelementptr inbounds i32, ptr %27, i64 3
  %170 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %170, ptr %169, align 4, !tbaa !9
  %171 = getelementptr inbounds i32, ptr %27, i64 4
  %172 = load i32, ptr %19, align 4, !tbaa !9
  store i32 %172, ptr %171, align 4, !tbaa !9
  %173 = getelementptr inbounds i32, ptr %27, i64 5
  %174 = load i32, ptr %20, align 4, !tbaa !9
  store i32 %174, ptr %173, align 4, !tbaa !9
  %175 = getelementptr inbounds i32, ptr %27, i64 6
  %176 = load i8, ptr %21, align 1, !tbaa !11, !range !13, !noundef !14
  %177 = trunc i8 %176 to i1
  %178 = zext i1 %177 to i64
  %179 = select i1 %177, i32 1, i32 0
  store i32 %179, ptr %175, align 4, !tbaa !9
  %180 = load ptr, ptr %26, align 8, !tbaa !5
  %181 = getelementptr inbounds [7 x i32], ptr %27, i64 0, i64 0
  call void @ggml_set_op_params(ptr noundef %180, ptr noundef %181, i64 noundef 28)
  %182 = load ptr, ptr %26, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.ggml_tensor, ptr %182, i32 0, i32 4
  store i32 49, ptr %183, align 8, !tbaa !17
  %184 = load ptr, ptr %13, align 8, !tbaa !5
  %185 = load ptr, ptr %26, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.ggml_tensor, ptr %185, i32 0, i32 7
  %187 = getelementptr inbounds [10 x ptr], ptr %186, i64 0, i64 0
  store ptr %184, ptr %187, align 8, !tbaa !5
  %188 = load ptr, ptr %14, align 8, !tbaa !5
  %189 = load ptr, ptr %26, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.ggml_tensor, ptr %189, i32 0, i32 7
  %191 = getelementptr inbounds [10 x ptr], ptr %190, i64 0, i64 1
  store ptr %188, ptr %191, align 8, !tbaa !5
  %192 = load ptr, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 28, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  ret ptr %192
}

; Function Attrs: nounwind uwtable
declare hidden i64 @ggml_calc_conv_output_size(i64 noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef) #2

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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!18, !10, i64 80}
!18 = !{!"ggml_tensor", !10, i64 0, !6, i64 8, !7, i64 16, !7, i64 48, !10, i64 80, !7, i64 84, !10, i64 148, !7, i64 152, !6, i64 232, !16, i64 240, !6, i64 248, !7, i64 256, !6, i64 320, !7, i64 328}


; 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.40 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [40 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 ptr @ggml_new_tensor(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden void @ggml_set_op_params(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @ggml_im2col(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i1 noundef zeroext %9, i32 noundef %10) local_unnamed_addr #2 {
  %12 = alloca [4 x i64], align 16
  %13 = alloca [7 x i32], align 16
  br i1 %9, label %14, label %21

14:                                               ; preds = %11
  %15 = getelementptr inbounds i8, ptr %1, i64 32
  %16 = load i64, ptr %15, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %2, i64 32
  %18 = load i64, ptr %17, align 8, !tbaa !5
  %19 = icmp eq i64 %16, %18
  br i1 %19, label %33, label %20

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

21:                                               ; preds = %11
  %22 = getelementptr inbounds i8, ptr %2, i64 24
  %23 = load i64, ptr %22, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %1, i64 24
  %25 = load i64, ptr %24, align 8, !tbaa !5
  %26 = icmp eq i64 %23, %25
  br i1 %26, label %28, label %27

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

28:                                               ; preds = %21
  %29 = getelementptr inbounds i8, ptr %2, i64 40
  %30 = load i64, ptr %29, align 8, !tbaa !5
  %31 = icmp eq i64 %30, 1
  br i1 %31, label %39, label %32

32:                                               ; preds = %28
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 3799, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.40) #3
  unreachable

33:                                               ; preds = %14
  %34 = getelementptr inbounds i8, ptr %2, i64 24
  %35 = load i64, ptr %34, align 8, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %1, i64 24
  %37 = load i64, ptr %36, align 8, !tbaa !5
  %38 = tail call i64 @ggml_calc_conv_output_size(i64 noundef %35, i64 noundef %37, i32 noundef %4, i32 noundef %6, i32 noundef %8)
  br label %39

39:                                               ; preds = %28, %33
  %40 = phi i64 [ %38, %33 ], [ 0, %28 ]
  %41 = getelementptr inbounds i8, ptr %2, i64 16
  %42 = load i64, ptr %41, align 8, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %1, i64 16
  %44 = load i64, ptr %43, align 8, !tbaa !5
  %45 = tail call i64 @ggml_calc_conv_output_size(i64 noundef %42, i64 noundef %44, i32 noundef %3, i32 noundef %5, i32 noundef %7)
  %46 = icmp slt i64 %40, 1
  %or.cond.not = select i1 %9, i1 %46, i1 false
  br i1 %or.cond.not, label %47, label %48

47:                                               ; preds = %39
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 3805, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.82) #3
  unreachable

48:                                               ; preds = %39
  %49 = icmp sgt i64 %45, 0
  br i1 %49, label %51, label %50

50:                                               ; preds = %48
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.12, i32 noundef 3806, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.83) #3
  unreachable

51:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #4
  br i1 %9, label %.critedge, label %52

52:                                               ; preds = %51
  %53 = getelementptr inbounds i8, ptr %1, i64 24
  %54 = load i64, ptr %53, align 8, !tbaa !5
  %55 = load i64, ptr %43, align 8, !tbaa !5
  %56 = mul nsw i64 %55, %54
  %57 = getelementptr inbounds i8, ptr %2, i64 32
  %58 = load i64, ptr %57, align 8, !tbaa !5
  br label %68

.critedge:                                        ; preds = %51
  %59 = getelementptr inbounds i8, ptr %1, i64 32
  %60 = load i64, ptr %59, align 8, !tbaa !5
  %61 = getelementptr inbounds i8, ptr %1, i64 24
  %62 = load i64, ptr %61, align 8, !tbaa !5
  %63 = mul nsw i64 %62, %60
  %64 = load i64, ptr %43, align 8, !tbaa !5
  %65 = mul nsw i64 %63, %64
  %66 = getelementptr inbounds i8, ptr %2, i64 40
  %67 = load i64, ptr %66, align 8, !tbaa !5
  br label %68

68:                                               ; preds = %52, %.critedge
  %.sink50 = phi i64 [ %65, %.critedge ], [ %56, %52 ]
  %.sink = phi i64 [ %40, %.critedge ], [ %58, %52 ]
  %69 = phi i64 [ %67, %.critedge ], [ 1, %52 ]
  store i64 %.sink50, ptr %12, align 16
  %70 = getelementptr inbounds i8, ptr %12, i64 8
  store i64 %45, ptr %70, align 8
  %71 = getelementptr inbounds i8, ptr %12, i64 16
  store i64 %.sink, ptr %71, align 16
  %72 = getelementptr inbounds i8, ptr %12, i64 24
  store i64 %69, ptr %72, align 8, !tbaa !5
  %73 = call ptr @ggml_new_tensor(ptr noundef %0, i32 noundef %10, i32 noundef 4, ptr noundef nonnull %12)
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %13) #4
  store i32 %3, ptr %13, align 16, !tbaa !9
  %74 = getelementptr inbounds i8, ptr %13, i64 4
  store i32 %4, ptr %74, align 4, !tbaa !9
  %75 = getelementptr inbounds i8, ptr %13, i64 8
  store i32 %5, ptr %75, align 8, !tbaa !9
  %76 = getelementptr inbounds i8, ptr %13, i64 12
  store i32 %6, ptr %76, align 4, !tbaa !9
  %77 = getelementptr inbounds i8, ptr %13, i64 16
  store i32 %7, ptr %77, align 16, !tbaa !9
  %78 = getelementptr inbounds i8, ptr %13, i64 20
  store i32 %8, ptr %78, align 4, !tbaa !9
  %79 = getelementptr inbounds i8, ptr %13, i64 24
  %80 = zext i1 %9 to i32
  store i32 %80, ptr %79, align 8, !tbaa !9
  call void @ggml_set_op_params(ptr noundef %73, ptr noundef nonnull %13, i64 noundef 28)
  %81 = getelementptr inbounds i8, ptr %73, i64 80
  store i32 49, ptr %81, align 8, !tbaa !11
  %82 = getelementptr inbounds i8, ptr %73, i64 152
  store ptr %1, ptr %82, align 8, !tbaa !14
  %83 = getelementptr inbounds i8, ptr %73, i64 160
  store ptr %2, ptr %83, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #4
  ret ptr %73
}

; Function Attrs: nounwind uwtable
declare hidden i64 @ggml_calc_conv_output_size(i64 noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 80}
!12 = !{!"ggml_tensor", !10, i64 0, !13, i64 8, !7, i64 16, !7, i64 48, !10, i64 80, !7, i64 84, !10, i64 148, !7, i64 152, !13, i64 232, !6, i64 240, !13, i64 248, !7, i64 256, !13, i64 320, !7, i64 328}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!13, !13, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MergedLoadStoreMotionPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass