; LLVM IR from ggml-org/ggml :: tests (test-conv-transpose)

; 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] }

@__const.test_conv_transpose_1d.expected_out_1 = external hidden unnamed_addr constant [3 x [4 x float]], align 16
@__const.test_conv_transpose_1d.expected_out_2 = external hidden unnamed_addr constant [3 x [6 x float]], align 16
@__const.test_conv_transpose_1d.expected_out_3 = external hidden unnamed_addr constant [3 x [8 x float]], align 16

; Function Attrs: nounwind uwtable
declare dso_local ptr @make_ctx() #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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; 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 void @check_tensor(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
define dso_local void @test_conv_transpose_1d() #0 {
  %1 = alloca [1024 x float], align 16
  %2 = alloca i32, align 4
  %3 = alloca [1024 x i16], align 16
  %4 = alloca i32, align 4
  %5 = alloca [3 x [4 x float]], align 16
  %6 = alloca [3 x [6 x float]], align 16
  %7 = alloca [3 x [8 x float]], align 16
  %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 ptr, align 8
  %16 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 4096, ptr %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %27, %0
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = icmp slt i32 %18, 1024
  br i1 %19, label %21, label %20

20:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %30

21:                                               ; preds = %17
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = sitofp i32 %22 to float
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [1024 x float], ptr %1, i64 0, i64 %25
  store float %23, ptr %26, align 4, !tbaa !9
  br label %27

27:                                               ; preds = %21
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %2, align 4, !tbaa !5
  br label %17, !llvm.loop !11

30:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 2048, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %42, %30
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = icmp slt i32 %32, 1024
  br i1 %33, label %35, label %34

34:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %45

35:                                               ; preds = %31
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = sitofp i32 %36 to float
  %38 = call zeroext i16 @ggml_fp32_to_fp16(float noundef %37)
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [1024 x i16], ptr %3, i64 0, i64 %40
  store i16 %38, ptr %41, align 2, !tbaa !13
  br label %42

42:                                               ; preds = %35
  %43 = load i32, ptr %4, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %4, align 4, !tbaa !5
  br label %31, !llvm.loop !15

45:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 48, ptr %5) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %5, ptr align 16 @__const.test_conv_transpose_1d.expected_out_1, i64 48, i1 false)
  call void @llvm.lifetime.start.p0(i64 72, ptr %6) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %6, ptr align 16 @__const.test_conv_transpose_1d.expected_out_2, i64 72, i1 false)
  call void @llvm.lifetime.start.p0(i64 96, ptr %7) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %7, ptr align 16 @__const.test_conv_transpose_1d.expected_out_3, i64 96, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %46 = call ptr @make_ctx()
  store ptr %46, ptr %8, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %47 = load ptr, ptr %8, align 8, !tbaa !16
  %48 = call ptr @ggml_new_tensor_2d(ptr noundef %47, i32 noundef 0, i64 noundef 3, i64 noundef 2)
  store ptr %48, ptr %9, align 8, !tbaa !16
  %49 = load ptr, ptr %9, align 8, !tbaa !16
  %50 = getelementptr inbounds %struct.ggml_tensor, ptr %49, i32 0, i32 10
  %51 = load ptr, ptr %50, align 8, !tbaa !18
  %52 = getelementptr inbounds [1024 x float], ptr %1, i64 0, i64 0
  %53 = load ptr, ptr %9, align 8, !tbaa !16
  %54 = call i64 @ggml_nbytes(ptr noundef %53)
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %51, ptr align 16 %52, i64 %54, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %55 = load ptr, ptr %8, align 8, !tbaa !16
  %56 = call ptr @ggml_new_tensor_3d(ptr noundef %55, i32 noundef 1, i64 noundef 2, i64 noundef 3, i64 noundef 2)
  store ptr %56, ptr %10, align 8, !tbaa !16
  %57 = load ptr, ptr %10, align 8, !tbaa !16
  %58 = getelementptr inbounds %struct.ggml_tensor, ptr %57, i32 0, i32 10
  %59 = load ptr, ptr %58, align 8, !tbaa !18
  %60 = getelementptr inbounds [1024 x i16], ptr %3, i64 0, i64 0
  %61 = load ptr, ptr %10, align 8, !tbaa !16
  %62 = call i64 @ggml_nbytes(ptr noundef %61)
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %59, ptr align 16 %60, i64 %62, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %63 = load ptr, ptr %8, align 8, !tbaa !16
  %64 = load ptr, ptr %10, align 8, !tbaa !16
  %65 = load ptr, ptr %9, align 8, !tbaa !16
  %66 = call ptr @ggml_conv_transpose_1d(ptr noundef %63, ptr noundef %64, ptr noundef %65, i32 noundef 1, i32 noundef 0, i32 noundef 1)
  store ptr %66, ptr %11, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %67 = load ptr, ptr %8, align 8, !tbaa !16
  %68 = load ptr, ptr %10, align 8, !tbaa !16
  %69 = load ptr, ptr %9, align 8, !tbaa !16
  %70 = call ptr @ggml_conv_transpose_1d(ptr noundef %67, ptr noundef %68, ptr noundef %69, i32 noundef 2, i32 noundef 0, i32 noundef 1)
  store ptr %70, ptr %12, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %71 = load ptr, ptr %8, align 8, !tbaa !16
  %72 = load ptr, ptr %10, align 8, !tbaa !16
  %73 = load ptr, ptr %9, align 8, !tbaa !16
  %74 = call ptr @ggml_conv_transpose_1d(ptr noundef %71, ptr noundef %72, ptr noundef %73, i32 noundef 3, i32 noundef 0, i32 noundef 1)
  store ptr %74, ptr %13, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %75 = load ptr, ptr %8, align 8, !tbaa !16
  %76 = call ptr @ggml_new_graph(ptr noundef %75)
  store ptr %76, ptr %14, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %77 = load ptr, ptr %8, align 8, !tbaa !16
  %78 = call ptr @ggml_new_graph(ptr noundef %77)
  store ptr %78, ptr %15, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %79 = load ptr, ptr %8, align 8, !tbaa !16
  %80 = call ptr @ggml_new_graph(ptr noundef %79)
  store ptr %80, ptr %16, align 8, !tbaa !16
  %81 = load ptr, ptr %14, align 8, !tbaa !16
  %82 = load ptr, ptr %11, align 8, !tbaa !16
  call void @ggml_build_forward_expand(ptr noundef %81, ptr noundef %82)
  %83 = load ptr, ptr %15, align 8, !tbaa !16
  %84 = load ptr, ptr %12, align 8, !tbaa !16
  call void @ggml_build_forward_expand(ptr noundef %83, ptr noundef %84)
  %85 = load ptr, ptr %16, align 8, !tbaa !16
  %86 = load ptr, ptr %13, align 8, !tbaa !16
  call void @ggml_build_forward_expand(ptr noundef %85, ptr noundef %86)
  %87 = load ptr, ptr %8, align 8, !tbaa !16
  %88 = load ptr, ptr %14, align 8, !tbaa !16
  %89 = call i32 @ggml_graph_compute_with_ctx(ptr noundef %87, ptr noundef %88, i32 noundef 1)
  %90 = load ptr, ptr %8, align 8, !tbaa !16
  %91 = load ptr, ptr %15, align 8, !tbaa !16
  %92 = call i32 @ggml_graph_compute_with_ctx(ptr noundef %90, ptr noundef %91, i32 noundef 1)
  %93 = load ptr, ptr %8, align 8, !tbaa !16
  %94 = load ptr, ptr %16, align 8, !tbaa !16
  %95 = call i32 @ggml_graph_compute_with_ctx(ptr noundef %93, ptr noundef %94, i32 noundef 1)
  %96 = load ptr, ptr %11, align 8, !tbaa !16
  %97 = getelementptr inbounds [3 x [4 x float]], ptr %5, i64 0, i64 0
  call void @check_tensor(ptr noundef %96, ptr noundef %97, i32 noundef 4, i32 noundef 3, i32 noundef 1)
  %98 = load ptr, ptr %12, align 8, !tbaa !16
  %99 = getelementptr inbounds [3 x [6 x float]], ptr %6, i64 0, i64 0
  call void @check_tensor(ptr noundef %98, ptr noundef %99, i32 noundef 6, i32 noundef 3, i32 noundef 1)
  %100 = load ptr, ptr %13, align 8, !tbaa !16
  %101 = getelementptr inbounds [3 x [8 x float]], ptr %7, i64 0, i64 0
  call void @check_tensor(ptr noundef %100, ptr noundef %101, i32 noundef 8, i32 noundef 3, i32 noundef 1)
  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.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 96, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 2048, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4096, ptr %1) #4
  ret void
}

declare zeroext i16 @ggml_fp32_to_fp16(float noundef) #3

declare ptr @ggml_new_tensor_2d(ptr noundef, i32 noundef, i64 noundef, i64 noundef) #3

declare i64 @ggml_nbytes(ptr noundef) #3

declare ptr @ggml_new_tensor_3d(ptr noundef, i32 noundef, i64 noundef, i64 noundef, i64 noundef) #3

declare ptr @ggml_conv_transpose_1d(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) #3

declare ptr @ggml_new_graph(ptr noundef) #3

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

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

attributes #0 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 = { 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 = !{!"float", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = distinct !{!15, !12}
!16 = !{!17, !17, i64 0}
!17 = !{!"any pointer", !7, i64 0}
!18 = !{!19, !17, i64 248}
!19 = !{!"ggml_tensor", !6, i64 0, !17, i64 8, !7, i64 16, !7, i64 48, !6, i64 80, !7, i64 84, !6, i64 148, !7, i64 152, !17, i64 232, !20, i64 240, !17, i64 248, !7, i64 256, !17, i64 320, !7, i64 328}
!20 = !{!"long", !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"

@__const.test_conv_transpose_1d.expected_out_1 = external hidden unnamed_addr constant [3 x [4 x float]], align 16
@__const.test_conv_transpose_1d.expected_out_2 = external hidden unnamed_addr constant [3 x [6 x float]], align 16
@__const.test_conv_transpose_1d.expected_out_3 = external hidden unnamed_addr constant [3 x [8 x float]], align 16

; Function Attrs: nounwind uwtable
declare dso_local ptr @make_ctx() 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; 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 void @check_tensor(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @test_conv_transpose_1d() local_unnamed_addr #0 {
vector.ph:
  %0 = alloca [1024 x float], align 16
  %1 = alloca [1024 x i16], align 16
  %2 = alloca [3 x [4 x float]], align 16
  %3 = alloca [3 x [6 x float]], align 16
  %4 = alloca [3 x [8 x float]], align 16
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %0) #4
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next.1, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next.1, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %5 = uitofp <4 x i32> %vec.ind to <4 x float>
  %6 = uitofp <4 x i32> %step.add to <4 x float>
  %7 = getelementptr inbounds [1024 x float], ptr %0, i64 0, i64 %index
  %8 = getelementptr inbounds i8, ptr %7, i64 16
  store <4 x float> %5, ptr %7, align 16, !tbaa !5
  store <4 x float> %6, ptr %8, align 16, !tbaa !5
  %index.next = or disjoint i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %step.add.1 = add <4 x i32> %vec.ind, <i32 12, i32 12, i32 12, i32 12>
  %9 = uitofp <4 x i32> %vec.ind.next to <4 x float>
  %10 = uitofp <4 x i32> %step.add.1 to <4 x float>
  %11 = getelementptr inbounds [1024 x float], ptr %0, i64 0, i64 %index.next
  %12 = getelementptr inbounds i8, ptr %11, i64 16
  store <4 x float> %9, ptr %11, align 16, !tbaa !5
  store <4 x float> %10, ptr %12, align 16, !tbaa !5
  %index.next.1 = add nuw nsw i64 %index, 16
  %vec.ind.next.1 = add <4 x i32> %vec.ind, <i32 16, i32 16, i32 16, i32 16>
  %13 = icmp eq i64 %index.next.1, 1024
  br i1 %13, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %1) #4
  br label %33

14:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) %2, ptr noundef nonnull align 16 dereferenceable(48) @__const.test_conv_transpose_1d.expected_out_1, i64 48, i1 false)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %3) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(72) %3, ptr noundef nonnull align 16 dereferenceable(72) @__const.test_conv_transpose_1d.expected_out_2, i64 72, i1 false)
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %4) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(96) %4, ptr noundef nonnull align 16 dereferenceable(96) @__const.test_conv_transpose_1d.expected_out_3, i64 96, i1 false)
  %15 = tail call ptr @make_ctx()
  %16 = tail call ptr @ggml_new_tensor_2d(ptr noundef %15, i32 noundef 0, i64 noundef 3, i64 noundef 2) #4
  %17 = getelementptr inbounds i8, ptr %16, i64 248
  %18 = load ptr, ptr %17, align 8, !tbaa !13
  %19 = tail call i64 @ggml_nbytes(ptr noundef %16) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %18, ptr nonnull align 16 %0, i64 %19, i1 false)
  %20 = tail call ptr @ggml_new_tensor_3d(ptr noundef %15, i32 noundef 1, i64 noundef 2, i64 noundef 3, i64 noundef 2) #4
  %21 = getelementptr inbounds i8, ptr %20, i64 248
  %22 = load ptr, ptr %21, align 8, !tbaa !13
  %23 = tail call i64 @ggml_nbytes(ptr noundef %20) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %22, ptr nonnull align 16 %1, i64 %23, i1 false)
  %24 = tail call ptr @ggml_conv_transpose_1d(ptr noundef %15, ptr noundef %20, ptr noundef %16, i32 noundef 1, i32 noundef 0, i32 noundef 1) #4
  %25 = tail call ptr @ggml_conv_transpose_1d(ptr noundef %15, ptr noundef %20, ptr noundef %16, i32 noundef 2, i32 noundef 0, i32 noundef 1) #4
  %26 = tail call ptr @ggml_conv_transpose_1d(ptr noundef %15, ptr noundef %20, ptr noundef %16, i32 noundef 3, i32 noundef 0, i32 noundef 1) #4
  %27 = tail call ptr @ggml_new_graph(ptr noundef %15) #4
  %28 = tail call ptr @ggml_new_graph(ptr noundef %15) #4
  %29 = tail call ptr @ggml_new_graph(ptr noundef %15) #4
  tail call void @ggml_build_forward_expand(ptr noundef %27, ptr noundef %24) #4
  tail call void @ggml_build_forward_expand(ptr noundef %28, ptr noundef %25) #4
  tail call void @ggml_build_forward_expand(ptr noundef %29, ptr noundef %26) #4
  %30 = tail call i32 @ggml_graph_compute_with_ctx(ptr noundef %15, ptr noundef %27, i32 noundef 1) #4
  %31 = tail call i32 @ggml_graph_compute_with_ctx(ptr noundef %15, ptr noundef %28, i32 noundef 1) #4
  %32 = tail call i32 @ggml_graph_compute_with_ctx(ptr noundef %15, ptr noundef %29, i32 noundef 1) #4
  call void @check_tensor(ptr noundef %24, ptr noundef nonnull %2, i32 noundef 4, i32 noundef 3, i32 noundef 1)
  call void @check_tensor(ptr noundef %25, ptr noundef nonnull %3, i32 noundef 6, i32 noundef 3, i32 noundef 1)
  call void @check_tensor(ptr noundef %26, ptr noundef nonnull %4, i32 noundef 8, i32 noundef 3, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %1) #4
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %0) #4
  ret void

33:                                               ; preds = %middle.block, %33
  %indvars.iv44 = phi i64 [ 0, %middle.block ], [ %indvars.iv.next45, %33 ]
  %34 = trunc nuw nsw i64 %indvars.iv44 to i32
  %35 = uitofp nneg i32 %34 to float
  %36 = tail call zeroext i16 @ggml_fp32_to_fp16(float noundef %35) #4
  %37 = getelementptr inbounds [1024 x i16], ptr %1, i64 0, i64 %indvars.iv44
  store i16 %36, ptr %37, align 2, !tbaa !18
  %indvars.iv.next45 = add nuw nsw i64 %indvars.iv44, 1
  %exitcond47.not = icmp eq i64 %indvars.iv.next45, 1024
  br i1 %exitcond47.not, label %14, label %33, !llvm.loop !20
}

declare zeroext i16 @ggml_fp32_to_fp16(float noundef) local_unnamed_addr #3

declare ptr @ggml_new_tensor_2d(ptr noundef, i32 noundef, i64 noundef, i64 noundef) local_unnamed_addr #3

declare i64 @ggml_nbytes(ptr noundef) local_unnamed_addr #3

declare ptr @ggml_new_tensor_3d(ptr noundef, i32 noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #3

declare ptr @ggml_conv_transpose_1d(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare ptr @ggml_new_graph(ptr noundef) local_unnamed_addr #3

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

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

attributes #0 = { 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = !{!14, !16, i64 248}
!14 = !{!"ggml_tensor", !15, i64 0, !16, i64 8, !7, i64 16, !7, i64 48, !15, i64 80, !7, i64 84, !15, i64 148, !7, i64 152, !16, i64 232, !17, i64 240, !16, i64 248, !7, i64 256, !16, i64 320, !7, i64 328}
!15 = !{!"int", !7, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"short", !7, i64 0}
!20 = distinct !{!20, !10}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LoopLoadEliminationPass,LoopRotatePass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass,TailCallElimPass