; LLVM IR from ggml-org/ggml :: tests/test-conv1d.ll (Z11build_graphRK10test_model)

; 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"

%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.ggml_init_params = type { i64, ptr, i8 }
%"class.std::allocator.7" = type { i8 }
%struct.test_model = type { ptr, ptr, ptr, ptr, ptr }

@_ZZ11build_graphRK10test_modelE8buf_size = external hidden global i64, align 8
@_ZGVZ11build_graphRK10test_modelE8buf_size = external hidden global i64, align 8
@_ZZ11build_graphRK10test_modelE3buf = external hidden global %"class.std::vector.5", align 8
@_ZGVZ11build_graphRK10test_modelE3buf = external hidden global i64, align 8
@__dso_handle = external hidden global i8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

declare i64 @ggml_tensor_overhead() #1

declare ptr @ggml_init(ptr noundef byval(%struct.ggml_init_params) align 8) #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: mustprogress uwtable
define dso_local noundef ptr @_Z11build_graphRK10test_model(ptr noundef nonnull align 8 dereferenceable(40) %0) #3 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::allocator.7", align 1
  %6 = alloca %struct.ggml_init_params, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %struct.ggml_init_params, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %15 = load atomic i8, ptr @_ZGVZ11build_graphRK10test_modelE8buf_size acquire, align 8
  %16 = icmp eq i8 %15, 0
  br i1 %16, label %17, label %27, !prof !9

17:                                               ; preds = %1
  %18 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ11build_graphRK10test_modelE8buf_size) #4
  %19 = icmp ne i32 %18, 0
  br i1 %19, label %20, label %27

20:                                               ; preds = %17
  %21 = invoke i64 @ggml_tensor_overhead()
          to label %22 unwind label %78

22:                                               ; preds = %20
  %23 = mul i64 %21, 2048
  %24 = invoke i64 @ggml_graph_overhead()
          to label %25 unwind label %78

25:                                               ; preds = %22
  %26 = add i64 %23, %24
  store i64 %26, ptr @_ZZ11build_graphRK10test_modelE8buf_size, align 8, !tbaa !10
  call void @__cxa_guard_release(ptr @_ZGVZ11build_graphRK10test_modelE8buf_size) #4
  br label %27

27:                                               ; preds = %25, %17, %1
  %28 = load atomic i8, ptr @_ZGVZ11build_graphRK10test_modelE3buf acquire, align 8
  %29 = icmp eq i8 %28, 0
  br i1 %29, label %30, label %37, !prof !9

30:                                               ; preds = %27
  %31 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ11build_graphRK10test_modelE3buf) #4
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %33, label %37

33:                                               ; preds = %30
  %34 = load i64, ptr @_ZZ11build_graphRK10test_modelE8buf_size, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #4
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  invoke void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ11build_graphRK10test_modelE3buf, i64 noundef %34, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %35 unwind label %82

35:                                               ; preds = %33
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  %36 = call i32 @__cxa_atexit(ptr @_ZNSt6vectorIhSaIhEED2Ev, ptr @_ZZ11build_graphRK10test_modelE3buf, ptr @__dso_handle) #4
  call void @__cxa_guard_release(ptr @_ZGVZ11build_graphRK10test_modelE3buf) #4
  br label %37

37:                                               ; preds = %35, %30, %27
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #4
  %38 = getelementptr inbounds %struct.ggml_init_params, ptr %6, i32 0, i32 0
  %39 = load i64, ptr @_ZZ11build_graphRK10test_modelE8buf_size, align 8, !tbaa !10
  store i64 %39, ptr %38, align 8, !tbaa !12
  %40 = getelementptr inbounds %struct.ggml_init_params, ptr %6, i32 0, i32 1
  %41 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ11build_graphRK10test_modelE3buf) #4
  store ptr %41, ptr %40, align 8, !tbaa !15
  %42 = getelementptr inbounds %struct.ggml_init_params, ptr %6, i32 0, i32 2
  store i8 1, ptr %42, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %6, i64 24, i1 false), !tbaa.struct !17
  %43 = call ptr @ggml_init(ptr noundef byval(%struct.ggml_init_params) align 8 %8)
  store ptr %43, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = call ptr @ggml_new_graph(ptr noundef %44)
  store ptr %45, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 1, ptr %10, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 1, ptr %11, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 1, ptr %12, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = load ptr, ptr %2, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.test_model, ptr %47, i32 0, i32 0
  %49 = load ptr, ptr %48, align 8, !tbaa !21
  %50 = load ptr, ptr %2, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.test_model, ptr %50, i32 0, i32 1
  %52 = load ptr, ptr %51, align 8, !tbaa !23
  %53 = load i32, ptr %10, align 4, !tbaa !19
  %54 = load i32, ptr %11, align 4, !tbaa !19
  %55 = load i32, ptr %12, align 4, !tbaa !19
  %56 = call ptr @ggml_im2col(ptr noundef %46, ptr noundef %49, ptr noundef %52, i32 noundef %53, i32 noundef 0, i32 noundef %54, i32 noundef 0, i32 noundef %55, i32 noundef 0, i1 noundef zeroext false, i32 noundef 1)
  store ptr %56, ptr %13, align 8, !tbaa !5
  %57 = load ptr, ptr %13, align 8, !tbaa !5
  %58 = call ptr @ggml_set_name(ptr noundef %57, ptr noundef @.str.2)
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = load ptr, ptr %13, align 8, !tbaa !5
  call void @ggml_build_forward_expand(ptr noundef %59, ptr noundef %60)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = load ptr, ptr %2, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.test_model, ptr %62, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8, !tbaa !21
  %65 = load ptr, ptr %2, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.test_model, ptr %65, i32 0, i32 1
  %67 = load ptr, ptr %66, align 8, !tbaa !23
  %68 = load i32, ptr %10, align 4, !tbaa !19
  %69 = load i32, ptr %11, align 4, !tbaa !19
  %70 = load i32, ptr %12, align 4, !tbaa !19
  %71 = call ptr @ggml_conv_1d(ptr noundef %61, ptr noundef %64, ptr noundef %67, i32 noundef %68, i32 noundef %69, i32 noundef %70)
  store ptr %71, ptr %14, align 8, !tbaa !5
  %72 = load ptr, ptr %14, align 8, !tbaa !5
  %73 = call ptr @ggml_set_name(ptr noundef %72, ptr noundef @.str.3)
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = load ptr, ptr %14, align 8, !tbaa !5
  call void @ggml_build_forward_expand(ptr noundef %74, ptr noundef %75)
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  call void @ggml_free(ptr noundef %76)
  %77 = load ptr, ptr %9, align 8, !tbaa !5
  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 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #4
  ret ptr %77

78:                                               ; preds = %22, %20
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %3, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %4, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZ11build_graphRK10test_modelE8buf_size) #4
  br label %86

82:                                               ; preds = %33
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %3, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %4, align 4
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  call void @__cxa_guard_abort(ptr @_ZGVZ11build_graphRK10test_modelE3buf) #4
  br label %86

86:                                               ; preds = %82, %78
  %87 = load ptr, ptr %3, align 8
  %88 = load i32, ptr %4, align 4
  %89 = insertvalue { ptr, i32 } poison, ptr %87, 0
  %90 = insertvalue { ptr, i32 } %89, i32 %88, 1
  resume { ptr, i32 } %90
}

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #4

declare i64 @ggml_graph_overhead() #1

; Function Attrs: nounwind
declare void @__cxa_guard_abort(ptr) #4

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

; Function Attrs: nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

declare ptr @ggml_new_graph(ptr noundef) #1

declare ptr @ggml_im2col(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext, i32 noundef) #1

declare ptr @ggml_set_name(ptr noundef, ptr noundef) #1

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

declare ptr @ggml_conv_1d(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) #1

declare void @ggml_free(ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress 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 #4 = { nounwind }
attributes #5 = { mustprogress 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" }

!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++ TBAA"}
!9 = !{!"branch_weights", i32 1, i32 1048575}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !7, i64 0}
!12 = !{!13, !11, i64 0}
!13 = !{!"_ZTS16ggml_init_params", !11, i64 0, !6, i64 8, !14, i64 16}
!14 = !{!"bool", !7, i64 0}
!15 = !{!13, !6, i64 8}
!16 = !{!13, !14, i64 16}
!17 = !{i64 0, i64 8, !10, i64 8, i64 8, !5, i64 16, i64 1, !18}
!18 = !{!14, !14, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!22, !6, i64 0}
!22 = !{!"_ZTS10test_model", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!23 = !{!22, !6, i64 8}


; 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"

%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.ggml_init_params = type { i64, ptr, i8 }
%"class.std::allocator.7" = type { i8 }

@_ZZ11build_graphRK10test_modelE8buf_size = external hidden local_unnamed_addr global i64, align 8
@_ZGVZ11build_graphRK10test_modelE8buf_size = external hidden global i64, align 8
@_ZZ11build_graphRK10test_modelE3buf = external hidden global %"class.std::vector.5", align 8
@_ZGVZ11build_graphRK10test_modelE3buf = external hidden global i64, align 8
@__dso_handle = external hidden global i8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

declare i64 @ggml_tensor_overhead() local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_Z11build_graphRK10test_model(ptr nocapture noundef nonnull readonly align 8 dereferenceable(40) %0) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::allocator.7", align 1
  %3 = alloca %struct.ggml_init_params, align 8
  %4 = load atomic i8, ptr @_ZGVZ11build_graphRK10test_modelE8buf_size acquire, align 8
  %5 = icmp eq i8 %4, 0
  br i1 %5, label %6, label %15, !prof !5

6:                                                ; preds = %1
  %7 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ11build_graphRK10test_modelE8buf_size) #5
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %15, label %8

8:                                                ; preds = %6
  %9 = invoke i64 @ggml_tensor_overhead()
          to label %10 unwind label %38

10:                                               ; preds = %8
  %11 = invoke i64 @ggml_graph_overhead()
          to label %12 unwind label %38

12:                                               ; preds = %10
  %13 = shl i64 %9, 11
  %14 = add i64 %11, %13
  store i64 %14, ptr @_ZZ11build_graphRK10test_modelE8buf_size, align 8, !tbaa !6
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZ11build_graphRK10test_modelE8buf_size) #5
  br label %15

15:                                               ; preds = %12, %6, %1
  %16 = load atomic i8, ptr @_ZGVZ11build_graphRK10test_modelE3buf acquire, align 8
  %17 = icmp eq i8 %16, 0
  br i1 %17, label %18, label %24, !prof !5

18:                                               ; preds = %15
  %19 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ11build_graphRK10test_modelE3buf) #5
  %.not23 = icmp eq i32 %19, 0
  br i1 %.not23, label %24, label %20

20:                                               ; preds = %18
  %21 = load i64, ptr @_ZZ11build_graphRK10test_modelE8buf_size, align 8, !tbaa !6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #5
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  invoke void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ11build_graphRK10test_modelE3buf, i64 noundef %21, ptr noundef nonnull align 1 dereferenceable(1) %2)
          to label %22 unwind label %40

22:                                               ; preds = %20
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #5
  %23 = call i32 @__cxa_atexit(ptr nonnull @_ZNSt6vectorIhSaIhEED2Ev, ptr nonnull @_ZZ11build_graphRK10test_modelE3buf, ptr nonnull @__dso_handle) #5
  call void @__cxa_guard_release(ptr nonnull @_ZGVZ11build_graphRK10test_modelE3buf) #5
  br label %24

24:                                               ; preds = %22, %18, %15
  %25 = load i64, ptr @_ZZ11build_graphRK10test_modelE8buf_size, align 8, !tbaa !6
  %26 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ11build_graphRK10test_modelE3buf) #5
  store i64 %25, ptr %3, align 8, !tbaa !6
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 8
  store ptr %26, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !10
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 16
  store i8 1, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !12
  %27 = call ptr @ggml_init(ptr noundef nonnull byval(%struct.ggml_init_params) align 8 %3)
  %28 = call ptr @ggml_new_graph(ptr noundef %27)
  %29 = load ptr, ptr %0, align 8, !tbaa !14
  %30 = getelementptr inbounds i8, ptr %0, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !16
  %32 = call ptr @ggml_im2col(ptr noundef %27, ptr noundef %29, ptr noundef %31, i32 noundef 1, i32 noundef 0, i32 noundef 1, i32 noundef 0, i32 noundef 1, i32 noundef 0, i1 noundef zeroext false, i32 noundef 1)
  %33 = call ptr @ggml_set_name(ptr noundef %32, ptr noundef nonnull @.str.2)
  call void @ggml_build_forward_expand(ptr noundef %28, ptr noundef %32)
  %34 = load ptr, ptr %0, align 8, !tbaa !14
  %35 = load ptr, ptr %30, align 8, !tbaa !16
  %36 = call ptr @ggml_conv_1d(ptr noundef %27, ptr noundef %34, ptr noundef %35, i32 noundef 1, i32 noundef 1, i32 noundef 1)
  %37 = call ptr @ggml_set_name(ptr noundef %36, ptr noundef nonnull @.str.3)
  call void @ggml_build_forward_expand(ptr noundef %28, ptr noundef %36)
  call void @ggml_free(ptr noundef %27)
  ret ptr %28

38:                                               ; preds = %10, %8
  %39 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_guard_abort(ptr nonnull @_ZGVZ11build_graphRK10test_modelE8buf_size) #5
  br label %42

40:                                               ; preds = %20
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #5
  call void @__cxa_guard_abort(ptr nonnull @_ZGVZ11build_graphRK10test_modelE3buf) #5
  br label %42

42:                                               ; preds = %40, %38
  %.pn = phi { ptr, i32 } [ %41, %40 ], [ %39, %38 ]
  resume { ptr, i32 } %.pn
}

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #3

declare i64 @ggml_graph_overhead() local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare void @__cxa_guard_abort(ptr) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

; Function Attrs: nofree nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

declare ptr @ggml_new_graph(ptr noundef) local_unnamed_addr #1

declare ptr @ggml_im2col(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext, i32 noundef) local_unnamed_addr #1

declare ptr @ggml_set_name(ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare ptr @ggml_conv_1d(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare void @ggml_free(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { nofree nounwind }
attributes #4 = { mustprogress 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 #5 = { 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 = !{!"branch_weights", i32 1, i32 1048575}
!6 = !{!7, !7, i64 0}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"bool", !8, i64 0}
!14 = !{!15, !11, i64 0}
!15 = !{!"_ZTS10test_model", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32}
!16 = !{!15, !11, i64 8}


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