; LLVM IR from huawei-noah/bolt :: compute/tensor/src (rnn)

; 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.TensorDesc = type { i32, i32, i32, [20 x i32] }
%struct.RNNParamSpec = type { i32, i32, i32, i32, float, float, i8, float, i32 }
%struct.ArchInfo = type { i32, ptr }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [18 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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef byval(%struct.TensorDesc) align 8) #2 align 2

; 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) #3

; Function Attrs: nounwind
declare i64 @syscall(i64 noundef, ...) #4

declare i32 @printf(ptr noundef, ...) #5

declare i32 @fflush(ptr noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @ee2str(i32 noundef) #6

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor8get_descEv(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #8

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z25rnncell_infer_output_sizeSt6vectorIP6TensorSaIS1_EE12RNNParamSpecS1_P8ArchInfo(ptr noundef %0, ptr noundef byval(%struct.RNNParamSpec) align 8 %1, ptr noundef %2, ptr noundef %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.TensorDesc, align 4
  %15 = alloca %struct.TensorDesc, 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 i32, align 4
  %22 = alloca %struct.TensorDesc, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %struct.TensorDesc, align 4
  %26 = alloca %struct.TensorDesc, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  store ptr %3, ptr %7, align 8, !tbaa !5
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6TensorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #9
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  %29 = icmp eq ptr %28, null
  br i1 %29, label %30, label %46

30:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  store i32 1, ptr %8, align 4, !tbaa !9
  %31 = load i32, ptr %8, align 4, !tbaa !9
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %33, label %45

33:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  %34 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %35 = trunc i64 %34 to i32
  store i32 %35, ptr %9, align 4, !tbaa !11
  %36 = load i32, ptr %9, align 4, !tbaa !11
  %37 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %36)
  %38 = load ptr, ptr @stdout, align 8, !tbaa !5
  %39 = call i32 @fflush(ptr noundef %38)
  %40 = load i32, ptr %8, align 4, !tbaa !9
  %41 = call ptr @ee2str(i32 noundef %40)
  %42 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %41)
  %43 = load ptr, ptr @stdout, align 8, !tbaa !5
  %44 = call i32 @fflush(ptr noundef %43)
  call void @exit(i32 noundef 1) #10
  unreachable

45:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  br label %46

46:                                               ; preds = %45, %4
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6TensorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #9
  %48 = load ptr, ptr %47, align 8, !tbaa !5
  %49 = icmp eq ptr %48, null
  br i1 %49, label %50, label %66

50:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  store i32 1, ptr %10, align 4, !tbaa !9
  %51 = load i32, ptr %10, align 4, !tbaa !9
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %65

53:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  %54 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %55 = trunc i64 %54 to i32
  store i32 %55, ptr %11, align 4, !tbaa !11
  %56 = load i32, ptr %11, align 4, !tbaa !11
  %57 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %56)
  %58 = load ptr, ptr @stdout, align 8, !tbaa !5
  %59 = call i32 @fflush(ptr noundef %58)
  %60 = load i32, ptr %10, align 4, !tbaa !9
  %61 = call ptr @ee2str(i32 noundef %60)
  %62 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %61)
  %63 = load ptr, ptr @stdout, align 8, !tbaa !5
  %64 = call i32 @fflush(ptr noundef %63)
  call void @exit(i32 noundef 1) #10
  unreachable

65:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  br label %66

66:                                               ; preds = %65, %46
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = icmp eq ptr %67, null
  br i1 %68, label %69, label %85

69:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  store i32 1, ptr %12, align 4, !tbaa !9
  %70 = load i32, ptr %12, align 4, !tbaa !9
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %72, label %84

72:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  %73 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %74 = trunc i64 %73 to i32
  store i32 %74, ptr %13, align 4, !tbaa !11
  %75 = load i32, ptr %13, align 4, !tbaa !11
  %76 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %75)
  %77 = load ptr, ptr @stdout, align 8, !tbaa !5
  %78 = call i32 @fflush(ptr noundef %77)
  %79 = load i32, ptr %12, align 4, !tbaa !9
  %80 = call ptr @ee2str(i32 noundef %79)
  %81 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %80)
  %82 = load ptr, ptr @stdout, align 8, !tbaa !5
  %83 = call i32 @fflush(ptr noundef %82)
  call void @exit(i32 noundef 1) #10
  unreachable

84:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  br label %85

85:                                               ; preds = %84, %66
  call void @llvm.lifetime.start.p0(i64 92, ptr %14) #9
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6TensorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #9
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %14, ptr noundef nonnull align 8 dereferenceable(32) %87)
  call void @llvm.lifetime.start.p0(i64 92, ptr %15) #9
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %15, ptr noundef nonnull align 8 dereferenceable(32) %88)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.ArchInfo, ptr %89, i32 0, i32 0
  %91 = load i32, ptr %90, align 8, !tbaa !13
  store i32 %91, ptr %16, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %14, i64 92, i1 false), !tbaa.struct !17
  %92 = call noundef i32 @_Z11tensor2dGet10TensorDescP8DataTypeP10DataFormatPjS4_(ptr noundef byval(%struct.TensorDesc) align 8 %22, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20)
  store i32 %92, ptr %21, align 4, !tbaa !9
  %93 = load i32, ptr %21, align 4, !tbaa !9
  %94 = icmp ne i32 %93, 0
  br i1 %94, label %95, label %107

95:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  %96 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %97 = trunc i64 %96 to i32
  store i32 %97, ptr %23, align 4, !tbaa !11
  %98 = load i32, ptr %23, align 4, !tbaa !11
  %99 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %98)
  %100 = load ptr, ptr @stdout, align 8, !tbaa !5
  %101 = call i32 @fflush(ptr noundef %100)
  %102 = load i32, ptr %21, align 4, !tbaa !9
  %103 = call ptr @ee2str(i32 noundef %102)
  %104 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %103)
  %105 = load ptr, ptr @stdout, align 8, !tbaa !5
  %106 = call i32 @fflush(ptr noundef %105)
  call void @exit(i32 noundef 1) #10
  unreachable

107:                                              ; preds = %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  %108 = getelementptr inbounds %struct.RNNParamSpec, ptr %1, i32 0, i32 1
  %109 = load i32, ptr %108, align 4, !tbaa !23
  store i32 %109, ptr %24, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 92, ptr %25) #9
  %110 = load i32, ptr %17, align 4, !tbaa !18
  %111 = load i32, ptr %18, align 4, !tbaa !20
  %112 = load i32, ptr %19, align 4, !tbaa !11
  %113 = load i32, ptr %24, align 4, !tbaa !11
  call void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %25, i32 noundef %110, i32 noundef %111, i32 noundef %112, i32 noundef %113)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %25, i64 92, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 92, ptr %25) #9
  %114 = load i32, ptr %16, align 4, !tbaa !16
  %115 = icmp eq i32 %114, 2
  br i1 %115, label %119, label %116

116:                                              ; preds = %107
  %117 = load i32, ptr %16, align 4, !tbaa !16
  %118 = icmp eq i32 %117, 7
  br i1 %118, label %119, label %120

119:                                              ; preds = %116, %107
  br label %120

120:                                              ; preds = %119, %116
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %15, i64 92, i1 false), !tbaa.struct !17
  call void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32) %121, ptr noundef byval(%struct.TensorDesc) align 8 %26)
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr %14) #9
  ret i32 0
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z11tensor2dGet10TensorDescP8DataTypeP10DataFormatPjS4_(ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind "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 = { "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 #6 = { inlinehint 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 #7 = { noreturn nounwind "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 #8 = { inlinehint 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 #9 = { nounwind }
attributes #10 = { noreturn 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTS2EE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTS8ArchInfo", !15, i64 0, !6, i64 8}
!15 = !{!"_ZTS4Arch", !7, i64 0}
!16 = !{!15, !15, i64 0}
!17 = !{i64 0, i64 4, !18, i64 4, i64 4, !20, i64 8, i64 4, !11, i64 12, i64 80, !22}
!18 = !{!19, !19, i64 0}
!19 = !{!"_ZTS8DataType", !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"_ZTS10DataFormat", !7, i64 0}
!22 = !{!7, !7, i64 0}
!23 = !{!24, !12, i64 4}
!24 = !{!"_ZTS12RNNParamSpec", !25, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !26, i64 16, !26, i64 20, !27, i64 24, !26, i64 28, !28, i64 32}
!25 = !{!"_ZTS7RNNMode", !7, i64 0}
!26 = !{!"float", !7, i64 0}
!27 = !{!"bool", !7, i64 0}
!28 = !{!"_ZTS14ActivationMode", !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"

%struct.TensorDesc = type { i32, i32, i32, [20 x i32] }
%struct.RNNParamSpec = type { i32, i32, i32, i32, float, float, i8, float, i32 }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [18 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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6TensorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #2 align 2

; 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) #3

; Function Attrs: nounwind
declare i64 @syscall(i64 noundef, ...) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @ee2str(i32 noundef) local_unnamed_addr #6

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor8get_descEv(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #8

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z25rnncell_infer_output_sizeSt6vectorIP6TensorSaIS1_EE12RNNParamSpecS1_P8ArchInfo(ptr noundef nonnull %0, ptr nocapture noundef readonly byval(%struct.RNNParamSpec) align 8 %1, ptr noundef %2, ptr nocapture noundef readnone %3) local_unnamed_addr #2 {
  %5 = alloca %struct.TensorDesc, align 8
  %6 = alloca %struct.TensorDesc, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %struct.TensorDesc, align 8
  %12 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6TensorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #9
  %13 = load ptr, ptr %12, align 8, !tbaa !5
  %14 = icmp eq ptr %13, null
  br i1 %14, label %15, label %25

15:                                               ; preds = %4
  %16 = tail call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %17 = trunc i64 %16 to i32
  %18 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %17)
  %19 = load ptr, ptr @stdout, align 8, !tbaa !5
  %20 = tail call i32 @fflush(ptr noundef %19)
  %21 = tail call ptr @ee2str(i32 noundef 1)
  %22 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %21)
  %23 = load ptr, ptr @stdout, align 8, !tbaa !5
  %24 = tail call i32 @fflush(ptr noundef %23)
  tail call void @exit(i32 noundef 1) #10
  unreachable

25:                                               ; preds = %4
  %26 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6TensorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #9
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %39

29:                                               ; preds = %25
  %30 = tail call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %31 = trunc i64 %30 to i32
  %32 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %31)
  %33 = load ptr, ptr @stdout, align 8, !tbaa !5
  %34 = tail call i32 @fflush(ptr noundef %33)
  %35 = tail call ptr @ee2str(i32 noundef 1)
  %36 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %35)
  %37 = load ptr, ptr @stdout, align 8, !tbaa !5
  %38 = tail call i32 @fflush(ptr noundef %37)
  tail call void @exit(i32 noundef 1) #10
  unreachable

39:                                               ; preds = %25
  %40 = icmp eq ptr %2, null
  br i1 %40, label %41, label %51

41:                                               ; preds = %39
  %42 = tail call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %43 = trunc i64 %42 to i32
  %44 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %43)
  %45 = load ptr, ptr @stdout, align 8, !tbaa !5
  %46 = tail call i32 @fflush(ptr noundef %45)
  %47 = tail call ptr @ee2str(i32 noundef 1)
  %48 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %47)
  %49 = load ptr, ptr @stdout, align 8, !tbaa !5
  %50 = tail call i32 @fflush(ptr noundef %49)
  tail call void @exit(i32 noundef 1) #10
  unreachable

51:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %5) #9
  %52 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6TensorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #9
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %5, ptr noundef nonnull align 8 dereferenceable(32) %53)
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %6) #9
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %6, ptr noundef nonnull align 8 dereferenceable(32) %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #9
  %54 = call noundef i32 @_Z11tensor2dGet10TensorDescP8DataTypeP10DataFormatPjS4_(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %5, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10)
  %.not = icmp eq i32 %54, 0
  br i1 %.not, label %65, label %55

55:                                               ; preds = %51
  %56 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %57 = trunc i64 %56 to i32
  %58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %57)
  %59 = load ptr, ptr @stdout, align 8, !tbaa !5
  %60 = call i32 @fflush(ptr noundef %59)
  %61 = call ptr @ee2str(i32 noundef %54)
  %62 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %61)
  %63 = load ptr, ptr @stdout, align 8, !tbaa !5
  %64 = call i32 @fflush(ptr noundef %63)
  call void @exit(i32 noundef 1) #10
  unreachable

65:                                               ; preds = %51
  %66 = getelementptr inbounds i8, ptr %1, i64 4
  %67 = load i32, ptr %66, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %11) #9
  %68 = load i32, ptr %7, align 4, !tbaa !16
  %69 = load i32, ptr %8, align 4, !tbaa !18
  %70 = load i32, ptr %9, align 4, !tbaa !20
  call void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %11, i32 noundef %68, i32 noundef %69, i32 noundef %70, i32 noundef %67)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(92) %6, ptr noundef nonnull align 8 dereferenceable(92) %11, i64 92, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %11) #9
  call void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %5) #9
  ret i32 0
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z11tensor2dGet10TensorDescP8DataTypeP10DataFormatPjS4_(ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind "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 = { nofree nounwind "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 #6 = { inlinehint 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 #7 = { noreturn nounwind "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 #8 = { inlinehint 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 #9 = { nounwind }
attributes #10 = { noreturn 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++ TBAA"}
!9 = !{!10, !12, i64 4}
!10 = !{!"_ZTS12RNNParamSpec", !11, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !13, i64 16, !13, i64 20, !14, i64 24, !13, i64 28, !15, i64 32}
!11 = !{!"_ZTS7RNNMode", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTS14ActivationMode", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"_ZTS8DataType", !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"_ZTS10DataFormat", !7, i64 0}
!20 = !{!12, !12, i64 0}
!21 = !{i64 0, i64 4, !16, i64 4, i64 4, !18, i64 8, i64 4, !20, i64 12, i64 80, !22}
!22 = !{!7, !7, i64 0}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass