; LLVM IR from ShahjalalShohag/code-library :: Math (Characteristic Polynomial Faster)

; 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<modint<998244353>>, std::allocator<std::vector<modint<998244353>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<modint<998244353>>, std::allocator<std::vector<modint<998244353>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<modint<998244353>>, std::allocator<std::vector<modint<998244353>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<modint<998244353>>, std::allocator<std::vector<modint<998244353>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<modint<998244353>, std::allocator<modint<998244353>>>::_Vector_impl" }
%"struct.std::_Vector_base<modint<998244353>, std::allocator<modint<998244353>>>::_Vector_impl" = type { %"struct.std::_Vector_base<modint<998244353>, std::allocator<modint<998244353>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<modint<998244353>, std::allocator<modint<998244353>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%"class.std::allocator" = type { i8 }
%struct.modint = type { i32 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z10HessenbergSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, 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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_Z2yoSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EES1_(ptr noundef, i32) #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8LagrangeRSt6vectorI6modintILi998244353EESaIS1_EES4_(ptr dead_on_unwind noalias writable sret(%"class.std::vector.0") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #6 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::vector.0", align 8
  %6 = alloca %"class.std::allocator.2", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::vector", align 8
  %14 = alloca %"class.std::vector", align 8
  %15 = alloca %"class.std::vector.0", align 8
  %16 = alloca %"class.std::allocator.2", align 1
  %17 = alloca %"class.std::vector.0", align 8
  %18 = alloca %"class.std::allocator.2", align 1
  %19 = alloca i32, align 4
  %20 = alloca %struct.modint, align 4
  %21 = alloca %struct.modint, align 4
  %22 = alloca %"class.std::vector", align 8
  %23 = alloca %struct.modint, align 4
  %24 = alloca %"class.std::vector.0", align 8
  %25 = alloca %struct.modint, align 4
  %26 = alloca %struct.modint, align 4
  %27 = alloca %struct.modint, align 4
  %28 = alloca i32, align 4
  %29 = alloca %struct.modint, align 4
  %30 = alloca %struct.modint, align 4
  %31 = alloca %struct.modint, align 4
  %32 = alloca %struct.modint, align 4
  store i32 0, ptr %1, align 4
  %33 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %34 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %35 = getelementptr i8, ptr %34, i64 -24
  %36 = load i64, ptr %35, align 8
  %37 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %36
  %38 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %37, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #8
  %41 = load i32, ptr %2, align 4, !tbaa !8
  %42 = sext i32 %41 to i64
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #8
  %43 = load i32, ptr %2, align 4, !tbaa !8
  %44 = sext i32 %43 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #8
  call void @_ZNSaI6modintILi998244353EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %44, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %45 unwind label %52

45:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #8
  call void @_ZNSaISt6vectorI6modintILi998244353EESaIS1_EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #8
  invoke void @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EEC2EmRKS3_RKS4_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %42, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %46 unwind label %56

46:                                               ; preds = %45
  call void @_ZNSt15__new_allocatorISt6vectorI6modintILi998244353EESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #8
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 0, ptr %10, align 4, !tbaa !8
  br label %47

47:                                               ; preds = %84, %46
  %48 = load i32, ptr %10, align 4, !tbaa !8
  %49 = load i32, ptr %2, align 4, !tbaa !8
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %61, label %51

51:                                               ; preds = %47
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %87

52:                                               ; preds = %0
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %7, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %8, align 4
  br label %60

56:                                               ; preds = %45
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %7, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %8, align 4
  call void @_ZNSt15__new_allocatorISt6vectorI6modintILi998244353EESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #8
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  br label %60

60:                                               ; preds = %56, %52
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #8
  br label %230

61:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !8
  br label %62

62:                                               ; preds = %76, %61
  %63 = load i32, ptr %12, align 4, !tbaa !8
  %64 = load i32, ptr %2, align 4, !tbaa !8
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %83

67:                                               ; preds = %62
  %68 = load i32, ptr %10, align 4, !tbaa !8
  %69 = sext i32 %68 to i64
  %70 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %69) #8
  %71 = load i32, ptr %12, align 4, !tbaa !8
  %72 = sext i32 %71 to i64
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %72) #8
  %74 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZrsILi998244353EERSiS0_R6modintIXT_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %73)
          to label %75 unwind label %79

75:                                               ; preds = %67
  br label %76

76:                                               ; preds = %75
  %77 = load i32, ptr %12, align 4, !tbaa !8
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %12, align 4, !tbaa !8
  br label %62, !llvm.loop !11

79:                                               ; preds = %67
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %7, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %229

83:                                               ; preds = %66
  br label %84

84:                                               ; preds = %83
  %85 = load i32, ptr %10, align 4, !tbaa !8
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %10, align 4, !tbaa !8
  br label %47, !llvm.loop !13

87:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #8
  invoke void @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %88 unwind label %104

88:                                               ; preds = %87
  invoke void @_Z10HessenbergSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EE(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %13, ptr noundef %14)
          to label %89 unwind label %108

89:                                               ; preds = %88
  %90 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EEaSEOS5_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #8
  %91 = load i32, ptr %2, align 4, !tbaa !8
  %92 = add nsw i32 %91, 1
  %93 = sext i32 %92 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #8
  call void @_ZNSaI6modintILi998244353EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #8
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %93, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %94 unwind label %113

94:                                               ; preds = %89
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #8
  %95 = load i32, ptr %2, align 4, !tbaa !8
  %96 = add nsw i32 %95, 1
  %97 = sext i32 %96 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #8
  call void @_ZNSaI6modintILi998244353EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #8
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %97, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %98 unwind label %117

98:                                               ; preds = %94
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 0, ptr %19, align 4, !tbaa !8
  br label %99

99:                                               ; preds = %140, %98
  %100 = load i32, ptr %19, align 4, !tbaa !8
  %101 = load i32, ptr %2, align 4, !tbaa !8
  %102 = icmp sle i32 %100, %101
  br i1 %102, label %121, label %103

103:                                              ; preds = %99
  store i32 8, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %157

104:                                              ; preds = %87
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %7, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %8, align 4
  br label %112

108:                                              ; preds = %88
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %7, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %8, align 4
  call void @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  br label %112

112:                                              ; preds = %108, %104
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #8
  br label %229

113:                                              ; preds = %89
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %7, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %8, align 4
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #8
  br label %228

117:                                              ; preds = %94
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %7, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %8, align 4
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #8
  br label %227

121:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %122 = load i32, ptr %19, align 4, !tbaa !8
  %123 = add nsw i32 %122, 1
  invoke void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %20, i32 noundef %123)
          to label %124 unwind label %143

124:                                              ; preds = %121
  %125 = load i32, ptr %19, align 4, !tbaa !8
  %126 = sext i32 %125 to i64
  %127 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %126) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %127, ptr align 4 %20, i64 4, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  invoke void @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %128 unwind label %147

128:                                              ; preds = %124
  %129 = load i32, ptr %19, align 4, !tbaa !8
  %130 = sext i32 %129 to i64
  %131 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %130) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 %131, i64 4, i1 false), !tbaa.struct !14
  %132 = getelementptr inbounds %struct.modint, ptr %23, i32 0, i32 0
  %133 = load i32, ptr %132, align 4
  %134 = invoke i32 @_Z2yoSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EES1_(ptr noundef %22, i32 %133)
          to label %135 unwind label %151

135:                                              ; preds = %128
  %136 = getelementptr inbounds %struct.modint, ptr %21, i32 0, i32 0
  store i32 %134, ptr %136, align 4
  %137 = load i32, ptr %19, align 4, !tbaa !8
  %138 = sext i32 %137 to i64
  %139 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %138) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %139, ptr align 4 %21, i64 4, i1 false), !tbaa.struct !14
  call void @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %140

140:                                              ; preds = %135
  %141 = load i32, ptr %19, align 4, !tbaa !8
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %19, align 4, !tbaa !8
  br label %99, !llvm.loop !15

143:                                              ; preds = %121
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %7, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %156

147:                                              ; preds = %124
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %7, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %8, align 4
  br label %155

151:                                              ; preds = %128
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %7, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %8, align 4
  call void @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #8
  br label %155

155:                                              ; preds = %151, %147
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %156

156:                                              ; preds = %155, %143
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %226

157:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #8
  invoke void @_Z8LagrangeRSt6vectorI6modintILi998244353EESaIS1_EES4_(ptr dead_on_unwind writable sret(%"class.std::vector.0") align 8 %24, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %17)
          to label %158 unwind label %173

158:                                              ; preds = %157
  br label %159

159:                                              ; preds = %219, %158
  %160 = load i32, ptr %3, align 4, !tbaa !8
  %161 = add nsw i32 %160, -1
  store i32 %161, ptr %3, align 4, !tbaa !8
  %162 = icmp ne i32 %160, 0
  br i1 %162, label %163, label %223

163:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %164 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZrsILi998244353EERSiS0_R6modintIXT_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %165 unwind label %177

165:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  invoke void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %26, i32 noundef 0)
          to label %166 unwind label %181

166:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  invoke void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %27, i32 noundef 1)
          to label %167 unwind label %185

167:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  store i32 0, ptr %28, align 4, !tbaa !8
  br label %168

168:                                              ; preds = %206, %167
  %169 = load i32, ptr %28, align 4, !tbaa !8
  %170 = load i32, ptr %2, align 4, !tbaa !8
  %171 = icmp sle i32 %169, %170
  br i1 %171, label %189, label %172

172:                                              ; preds = %168
  store i32 13, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %213

173:                                              ; preds = %157
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %7, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %8, align 4
  br label %225

177:                                              ; preds = %163
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %7, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %8, align 4
  br label %222

181:                                              ; preds = %165
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %7, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %8, align 4
  br label %221

185:                                              ; preds = %217, %213, %166
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %7, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %8, align 4
  br label %220

189:                                              ; preds = %168
  %190 = load i32, ptr %28, align 4, !tbaa !8
  %191 = sext i32 %190 to i64
  %192 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %191) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %192, i64 4, i1 false), !tbaa.struct !14
  %193 = getelementptr inbounds %struct.modint, ptr %30, i32 0, i32 0
  %194 = load i32, ptr %193, align 4
  %195 = invoke i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %27, i32 %194)
          to label %196 unwind label %209

196:                                              ; preds = %189
  %197 = getelementptr inbounds %struct.modint, ptr %29, i32 0, i32 0
  store i32 %195, ptr %197, align 4
  %198 = getelementptr inbounds %struct.modint, ptr %29, i32 0, i32 0
  %199 = load i32, ptr %198, align 4
  %200 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %26, i32 %199)
          to label %201 unwind label %209

201:                                              ; preds = %196
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 4 %25, i64 4, i1 false), !tbaa.struct !14
  %202 = getelementptr inbounds %struct.modint, ptr %31, i32 0, i32 0
  %203 = load i32, ptr %202, align 4
  %204 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4) %27, i32 %203)
          to label %205 unwind label %209

205:                                              ; preds = %201
  br label %206

206:                                              ; preds = %205
  %207 = load i32, ptr %28, align 4, !tbaa !8
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %28, align 4, !tbaa !8
  br label %168, !llvm.loop !16

209:                                              ; preds = %201, %196, %189
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %7, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %220

213:                                              ; preds = %172
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %26, i64 4, i1 false), !tbaa.struct !14
  %214 = getelementptr inbounds %struct.modint, ptr %32, i32 0, i32 0
  %215 = load i32, ptr %214, align 4
  %216 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsILi998244353EERSoS0_6modintIXT_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %215)
          to label %217 unwind label %185

217:                                              ; preds = %213
  %218 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %216, i8 noundef signext 32)
          to label %219 unwind label %185

219:                                              ; preds = %217
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %159, !llvm.loop !17

220:                                              ; preds = %209, %185
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %221

221:                                              ; preds = %220, %181
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %222

222:                                              ; preds = %221, %177
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  br label %225

223:                                              ; preds = %159
  store i32 0, ptr %1, align 4
  store i32 1, ptr %11, align 4
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #8
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #8
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #8
  call void @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %224 = load i32, ptr %1, align 4
  ret i32 %224

225:                                              ; preds = %222, %173
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #8
  br label %226

226:                                              ; preds = %225, %156
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  br label %227

227:                                              ; preds = %226, %117
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #8
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #8
  br label %228

228:                                              ; preds = %227, %113
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #8
  br label %229

229:                                              ; preds = %228, %112, %79
  call void @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  br label %230

230:                                              ; preds = %229, %60
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %231

231:                                              ; preds = %230
  %232 = load ptr, ptr %7, align 8
  %233 = load i32, ptr %8, align 4
  %234 = insertvalue { ptr, i32 } poison, ptr %232, 0
  %235 = insertvalue { ptr, i32 } %234, i32 %233, 1
  resume { ptr, i32 } %235
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #7

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #7

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZrsILi998244353EERSiS0_R6modintIXT_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #0

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZlsILi998244353EERSoS0_6modintIXT_EE(ptr noundef nonnull align 8 dereferenceable(8), i32) #0

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #6 = { mustprogress norecurse 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 = { "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 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{i64 0, i64 4, !8}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


; 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<modint<998244353>>, std::allocator<std::vector<modint<998244353>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<modint<998244353>>, std::allocator<std::vector<modint<998244353>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<modint<998244353>>, std::allocator<std::vector<modint<998244353>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<modint<998244353>>, std::allocator<std::vector<modint<998244353>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<modint<998244353>, std::allocator<modint<998244353>>>::_Vector_impl" }
%"struct.std::_Vector_base<modint<998244353>, std::allocator<modint<998244353>>>::_Vector_impl" = type { %"struct.std::_Vector_base<modint<998244353>, std::allocator<modint<998244353>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<modint<998244353>, std::allocator<modint<998244353>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%"class.std::allocator" = type { i8 }
%struct.modint = type { i32 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z10HessenbergSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #2 align 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: inlinehint mustprogress uwtable
declare dso_local i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_Z2yoSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EES1_(ptr noundef, i32) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8LagrangeRSt6vectorI6modintILi998244353EESaIS1_EES4_(ptr dead_on_unwind noalias writable sret(%"class.std::vector.0") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::vector.0", align 8
  %5 = alloca %"class.std::allocator.2", align 1
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca %"class.std::vector.0", align 8
  %10 = alloca %"class.std::allocator.2", align 1
  %11 = alloca %"class.std::vector.0", align 8
  %12 = alloca %"class.std::allocator.2", align 1
  %13 = alloca %struct.modint, align 4
  %14 = alloca %"class.std::vector", align 8
  %15 = alloca %"class.std::vector.0", align 8
  %16 = alloca %struct.modint, align 4
  %17 = alloca %struct.modint, align 4
  %18 = alloca %struct.modint, align 4
  %19 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %20 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %21 = getelementptr i8, ptr %20, i64 -24
  %22 = load i64, ptr %21, align 8
  %23 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %22
  %24 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %23, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  %27 = load i32, ptr %1, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  %28 = sext i32 %27 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #7
  call void @_ZNSaI6modintILi998244353EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %28, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %29 unwind label %35

29:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  call void @_ZNSaISt6vectorI6modintILi998244353EESaIS1_EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  invoke void @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EEC2EmRKS3_RKS4_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %28, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %30 unwind label %37

30:                                               ; preds = %29
  call void @_ZNSt15__new_allocatorISt6vectorI6modintILi998244353EESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  %31 = load i32, ptr %1, align 4, !tbaa !8
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %.preheader54, label %._crit_edge57

.preheader54:                                     ; preds = %30, %._crit_edge
  %33 = phi i32 [ %40, %._crit_edge ], [ %31, %30 ]
  %indvars.iv73 = phi i64 [ %indvars.iv.next74, %._crit_edge ], [ 0, %30 ]
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %.lr.ph, label %.preheader54.._crit_edge_crit_edge

.preheader54.._crit_edge_crit_edge:               ; preds = %.preheader54
  %.pre = sext i32 %33 to i64
  br label %._crit_edge

._crit_edge57:                                    ; preds = %._crit_edge, %30
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  invoke void @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %51 unwind label %65

35:                                               ; preds = %0
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %39

37:                                               ; preds = %29
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorI6modintILi998244353EESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  br label %39

39:                                               ; preds = %37, %35
  %.pn = phi { ptr, i32 } [ %38, %37 ], [ %36, %35 ]
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  br label %119

._crit_edge:                                      ; preds = %45, %.preheader54.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader54.._crit_edge_crit_edge ], [ %47, %45 ]
  %40 = phi i32 [ %33, %.preheader54.._crit_edge_crit_edge ], [ %46, %45 ]
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %41 = icmp slt i64 %indvars.iv.next74, %.pre-phi
  br i1 %41, label %.preheader54, label %._crit_edge57, !llvm.loop !11

.lr.ph:                                           ; preds = %.preheader54, %45
  %indvars.iv = phi i64 [ %indvars.iv.next, %45 ], [ 0, %.preheader54 ]
  %42 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv73) #7
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %indvars.iv) #7
  %44 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZrsILi998244353EERSiS0_R6modintIXT_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %43)
          to label %45 unwind label %49

45:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %46 = load i32, ptr %1, align 4, !tbaa !8
  %47 = sext i32 %46 to i64
  %48 = icmp slt i64 %indvars.iv.next, %47
  br i1 %48, label %.lr.ph, label %._crit_edge, !llvm.loop !14

49:                                               ; preds = %.lr.ph
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %118

51:                                               ; preds = %._crit_edge57
  invoke void @_Z10HessenbergSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %7, ptr noundef nonnull %8)
          to label %52 unwind label %67

52:                                               ; preds = %51
  %53 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EEaSEOS5_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #7
  %54 = load i32, ptr %1, align 4, !tbaa !8
  %55 = add nsw i32 %54, 1
  %56 = sext i32 %55 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #7
  call void @_ZNSaI6modintILi998244353EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %56, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %57 unwind label %70

57:                                               ; preds = %52
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #7
  %58 = load i32, ptr %1, align 4, !tbaa !8
  %59 = add nsw i32 %58, 1
  %60 = sext i32 %59 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #7
  call void @_ZNSaI6modintILi998244353EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %60, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %61 unwind label %72

61:                                               ; preds = %57
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #7
  %62 = load i32, ptr %1, align 4, !tbaa !8
  %.not58 = icmp slt i32 %62, 0
  br i1 %.not58, label %._crit_edge62, label %.lr.ph61

._crit_edge62:                                    ; preds = %80, %61
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #7
  invoke void @_Z8LagrangeRSt6vectorI6modintILi998244353EESaIS1_EES4_(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.0") align 8 %15, ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %.preheader unwind label %92

.preheader:                                       ; preds = %._crit_edge62
  %63 = load i32, ptr %2, align 4, !tbaa !8
  %64 = add nsw i32 %63, -1
  store i32 %64, ptr %2, align 4, !tbaa !8
  %.not4068 = icmp eq i32 %63, 0
  br i1 %.not4068, label %._crit_edge70, label %.lr.ph69

65:                                               ; preds = %._crit_edge57
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %69

67:                                               ; preds = %51
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  br label %69

69:                                               ; preds = %67, %65
  %.pn38 = phi { ptr, i32 } [ %68, %67 ], [ %66, %65 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  br label %118

70:                                               ; preds = %52
  %71 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #7
  br label %117

72:                                               ; preds = %57
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #7
  br label %116

.lr.ph61:                                         ; preds = %61, %80
  %indvars.iv76 = phi i64 [ %indvars.iv.next77, %80 ], [ 0, %61 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %74 = trunc nuw nsw i64 %indvars.iv.next77 to i32
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %13, i32 noundef %74)
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv76) #7
  %76 = load i32, ptr %13, align 4, !tbaa !8
  store i32 %76, ptr %75, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  invoke void @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %77 unwind label %84

77:                                               ; preds = %.lr.ph61
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv76) #7
  %.sroa.06.0.copyload = load i32, ptr %78, align 4, !tbaa !8
  %79 = invoke i32 @_Z2yoSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EES1_(ptr noundef nonnull %14, i32 %.sroa.06.0.copyload)
          to label %80 unwind label %86

80:                                               ; preds = %77
  %81 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %indvars.iv76) #7
  store i32 %79, ptr %81, align 4, !tbaa !8
  call void @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  %82 = load i32, ptr %1, align 4, !tbaa !8
  %83 = sext i32 %82 to i64
  %.not.not = icmp slt i64 %indvars.iv76, %83
  br i1 %.not.not, label %.lr.ph61, label %._crit_edge62, !llvm.loop !15

84:                                               ; preds = %.lr.ph61
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %115

86:                                               ; preds = %77
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  br label %115

.lr.ph69:                                         ; preds = %.preheader, %109
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  %88 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZrsILi998244353EERSiS0_R6modintIXT_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %89 unwind label %94

89:                                               ; preds = %.lr.ph69
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #7
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %17, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #7
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %18, i32 noundef 1)
  %90 = load i32, ptr %1, align 4, !tbaa !8
  %.not4163 = icmp slt i32 %90, 0
  br i1 %.not4163, label %._crit_edge67, label %.lr.ph66

._crit_edge67:                                    ; preds = %100, %89
  %.sroa.0.0.copyload = load i32, ptr %17, align 4, !tbaa !8
  %91 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsILi998244353EERSoS0_6modintIXT_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %.sroa.0.0.copyload)
          to label %107 unwind label %96

92:                                               ; preds = %._crit_edge62
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %114

94:                                               ; preds = %.lr.ph69
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %113

96:                                               ; preds = %107, %._crit_edge67
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %112

.lr.ph66:                                         ; preds = %89, %100
  %indvars.iv79 = phi i64 [ %indvars.iv.next80, %100 ], [ 0, %89 ]
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %indvars.iv79) #7
  %.sroa.02.0.copyload = load i32, ptr %98, align 4, !tbaa !8
  %99 = invoke i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %18, i32 %.sroa.02.0.copyload)
          to label %100 unwind label %105

100:                                              ; preds = %.lr.ph66
  %101 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %17, i32 %99)
  %.sroa.01.0.copyload = load i32, ptr %16, align 4, !tbaa !8
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4) %18, i32 %.sroa.01.0.copyload)
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %103 = load i32, ptr %1, align 4, !tbaa !8
  %104 = sext i32 %103 to i64
  %.not41.not = icmp slt i64 %indvars.iv79, %104
  br i1 %.not41.not, label %.lr.ph66, label %._crit_edge67, !llvm.loop !16

105:                                              ; preds = %.lr.ph66
  %106 = landingpad { ptr, i32 }
          cleanup
  br label %112

107:                                              ; preds = %._crit_edge67
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %91, i8 noundef signext 32)
          to label %109 unwind label %96

109:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  %110 = load i32, ptr %2, align 4, !tbaa !8
  %111 = add nsw i32 %110, -1
  store i32 %111, ptr %2, align 4, !tbaa !8
  %.not40 = icmp eq i32 %110, 0
  br i1 %.not40, label %._crit_edge70, label %.lr.ph69, !llvm.loop !17

112:                                              ; preds = %105, %96
  %.pn42 = phi { ptr, i32 } [ %106, %105 ], [ %97, %96 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #7
  br label %113

113:                                              ; preds = %112, %94
  %.pn42.pn = phi { ptr, i32 } [ %.pn42, %112 ], [ %95, %94 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  br label %114

._crit_edge70:                                    ; preds = %109, %.preheader
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #7
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #7
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  call void @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

114:                                              ; preds = %113, %92
  %.pn42.pn.pn = phi { ptr, i32 } [ %.pn42.pn, %113 ], [ %93, %92 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #7
  br label %115

115:                                              ; preds = %84, %86, %114
  %.pn46.pn = phi { ptr, i32 } [ %.pn42.pn.pn, %114 ], [ %87, %86 ], [ %85, %84 ]
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  br label %116

116:                                              ; preds = %115, %72
  %.pn46.pn.pn = phi { ptr, i32 } [ %.pn46.pn, %115 ], [ %73, %72 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #7
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  br label %117

117:                                              ; preds = %116, %70
  %.pn46.pn.pn.pn = phi { ptr, i32 } [ %.pn46.pn.pn, %116 ], [ %71, %70 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  br label %118

118:                                              ; preds = %117, %69, %49
  %.pn51 = phi { ptr, i32 } [ %50, %49 ], [ %.pn46.pn.pn.pn, %117 ], [ %.pn38, %69 ]
  call void @_ZNSt6vectorIS_I6modintILi998244353EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  br label %119

119:                                              ; preds = %118, %39
  %.pn51.pn = phi { ptr, i32 } [ %.pn51, %118 ], [ %.pn, %39 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn51.pn
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #2 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZrsILi998244353EERSiS0_R6modintIXT_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZlsILi998244353EERSoS0_6modintIXT_EE(ptr noundef nonnull align 8 dereferenceable(8), i32) local_unnamed_addr #0

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 #5 = { mustprogress norecurse 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 #6 = { "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 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12, !13}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.unswitch.partial.disable"}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass