; LLVM IR from kazunetakahashi/atcoder :: 2019/1103_AGC040 (F2)

; 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_ostream" = type { ptr, %"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_istream" = type { ptr, i64, %"class.std::basic_ios" }
%class.Combination = type { %"class.std::vector", %"class.std::vector", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Mint<>, std::allocator<Mint<>>>::_Vector_impl" }
%"struct.std::_Vector_base<Mint<>, std::allocator<Mint<>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Mint<>, std::allocator<Mint<>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Mint<>, std::allocator<Mint<>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%class.Mint = type { i64 }

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %class.Combination, align 8
  %6 = alloca i64, align 8
  %7 = alloca %"class.std::initializer_list", align 8
  %8 = alloca [3 x i64], align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %class.Mint, align 8
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca %class.Mint, align 8
  %17 = alloca i64, align 8
  %18 = alloca %class.Mint, align 8
  %19 = alloca %class.Mint, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.start.p0(i64 72, ptr %5) #7
  call void @_ZN11CombinationILx998244353ELx20000010EEC2Ev(ptr noundef nonnull align 8 dereferenceable(72) %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #7
  %23 = load i64, ptr %3, align 8, !tbaa !5
  store i64 %23, ptr %8, align 8, !tbaa !5
  %24 = getelementptr inbounds i64, ptr %8, i64 1
  %25 = load i64, ptr %2, align 8, !tbaa !5
  %26 = load i64, ptr %4, align 8, !tbaa !5
  %27 = sub nsw i64 %25, %26
  store i64 %27, ptr %24, align 8, !tbaa !5
  %28 = getelementptr inbounds i64, ptr %8, i64 2
  %29 = load i64, ptr %4, align 8, !tbaa !5
  %30 = sub nsw i64 %29, 1
  store i64 %30, ptr %28, align 8, !tbaa !5
  %31 = getelementptr inbounds %"class.std::initializer_list", ptr %7, i32 0, i32 0
  store ptr %8, ptr %31, align 8, !tbaa !9
  %32 = getelementptr inbounds %"class.std::initializer_list", ptr %7, i32 0, i32 1
  store i64 3, ptr %32, align 8, !tbaa !13
  %33 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8
  %35 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 1
  %36 = load i64, ptr %35, align 8
  %37 = invoke noundef i64 @_ZSt3minIxET_St16initializer_listIS0_E(ptr %34, i64 %36)
          to label %38 unwind label %47

38:                                               ; preds = %0
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #7
  store i64 %37, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  invoke void @_ZN4MintILx998244353EEC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %11, i64 noundef 0)
          to label %39 unwind label %51

39:                                               ; preds = %38
  %40 = load i64, ptr %4, align 8, !tbaa !5
  %41 = icmp eq i64 %40, 0
  br i1 %41, label %42, label %55

42:                                               ; preds = %39
  %43 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 1)
          to label %44 unwind label %51

44:                                               ; preds = %42
  %45 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %46 unwind label %51

46:                                               ; preds = %44
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  br label %141

47:                                               ; preds = %0
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %9, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #7
  br label %151

51:                                               ; preds = %44, %42, %38
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %9, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %10, align 4
  br label %150

55:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %56 = load i64, ptr %4, align 8, !tbaa !5
  store i64 %56, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %57 = load i64, ptr %4, align 8, !tbaa !5
  %58 = load i64, ptr %3, align 8, !tbaa !5
  %59 = sub nsw i64 %57, %58
  store i64 %59, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store i64 0, ptr %15, align 8, !tbaa !5
  br label %60

60:                                               ; preds = %131, %55
  %61 = load i64, ptr %15, align 8, !tbaa !5
  %62 = load i64, ptr %6, align 8, !tbaa !5
  %63 = icmp sle i64 %61, %62
  br i1 %63, label %65, label %64

64:                                               ; preds = %60
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %136

65:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %66 = load i64, ptr %13, align 8, !tbaa !5
  %67 = sub nsw i64 %66, 1
  %68 = trunc i64 %67 to i32
  %69 = load i64, ptr %15, align 8, !tbaa !5
  %70 = trunc i64 %69 to i32
  %71 = invoke i64 @_ZN11CombinationILx998244353ELx20000010EE7catalanEii(ptr noundef nonnull align 8 dereferenceable(72) %5, i32 noundef %68, i32 noundef %70)
          to label %72 unwind label %90

72:                                               ; preds = %65
  %73 = getelementptr inbounds %class.Mint, ptr %16, i32 0, i32 0
  store i64 %71, ptr %73, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %74 = load i64, ptr %2, align 8, !tbaa !5
  %75 = load i64, ptr %13, align 8, !tbaa !5
  %76 = sub nsw i64 %74, %75
  %77 = load i64, ptr %15, align 8, !tbaa !5
  %78 = sub nsw i64 %76, %77
  store i64 %78, ptr %17, align 8, !tbaa !5
  %79 = load i64, ptr %17, align 8, !tbaa !5
  %80 = icmp eq i64 %79, 0
  br i1 %80, label %81, label %98

81:                                               ; preds = %72
  %82 = load i64, ptr %13, align 8, !tbaa !5
  %83 = load i64, ptr %15, align 8, !tbaa !5
  %84 = sub nsw i64 %82, %83
  %85 = load i64, ptr %14, align 8, !tbaa !5
  %86 = icmp eq i64 %84, %85
  br i1 %86, label %87, label %98

87:                                               ; preds = %81
  %88 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN4MintILx998244353EEpLERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %89 unwind label %94

89:                                               ; preds = %87
  br label %130

90:                                               ; preds = %65
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %9, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %10, align 4
  br label %135

94:                                               ; preds = %87
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %9, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %10, align 4
  br label %134

98:                                               ; preds = %81, %72
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %99 = load i64, ptr %13, align 8, !tbaa !5
  %100 = load i64, ptr %15, align 8, !tbaa !5
  %101 = sub nsw i64 %99, %100
  %102 = load i64, ptr %14, align 8, !tbaa !5
  %103 = sub nsw i64 %101, %102
  %104 = add nsw i64 %103, 1
  %105 = sub nsw i64 %104, 1
  %106 = load i64, ptr %17, align 8, !tbaa !5
  %107 = sub nsw i64 %106, 1
  %108 = add nsw i64 %105, %107
  %109 = trunc i64 %108 to i32
  %110 = load i64, ptr %13, align 8, !tbaa !5
  %111 = load i64, ptr %15, align 8, !tbaa !5
  %112 = sub nsw i64 %110, %111
  %113 = load i64, ptr %14, align 8, !tbaa !5
  %114 = sub nsw i64 %112, %113
  %115 = add nsw i64 %114, 1
  %116 = sub nsw i64 %115, 1
  %117 = trunc i64 %116 to i32
  %118 = invoke i64 @_ZN11CombinationILx998244353ELx20000010EEclEii(ptr noundef nonnull align 8 dereferenceable(72) %5, i32 noundef %109, i32 noundef %117)
          to label %119 unwind label %126

119:                                              ; preds = %98
  %120 = getelementptr inbounds %class.Mint, ptr %19, i32 0, i32 0
  store i64 %118, ptr %120, align 8
  %121 = invoke i64 @_ZNK4MintILx998244353EEmlERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %122 unwind label %126

122:                                              ; preds = %119
  %123 = getelementptr inbounds %class.Mint, ptr %18, i32 0, i32 0
  store i64 %121, ptr %123, align 8
  %124 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN4MintILx998244353EEpLERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %125 unwind label %126

125:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %130

126:                                              ; preds = %122, %119, %98
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %9, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %134

130:                                              ; preds = %125, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %131

131:                                              ; preds = %130
  %132 = load i64, ptr %15, align 8, !tbaa !5
  %133 = add nsw i64 %132, 1
  store i64 %133, ptr %15, align 8, !tbaa !5
  br label %60, !llvm.loop !14

134:                                              ; preds = %126, %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %135

135:                                              ; preds = %134, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %149

136:                                              ; preds = %64
  %137 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsILx998244353EERSoS0_RK4MintIXT_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %138 unwind label %145

138:                                              ; preds = %136
  %139 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %137, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %140 unwind label %145

140:                                              ; preds = %138
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  store i32 0, ptr %12, align 4
  br label %141

141:                                              ; preds = %140, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @_ZN11CombinationILx998244353ELx20000010EED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %5) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  %142 = load i32, ptr %12, align 4
  switch i32 %142, label %157 [
    i32 0, label %143
    i32 1, label %143
  ]

143:                                              ; preds = %141, %141
  %144 = load i32, ptr %1, align 4
  ret i32 %144

145:                                              ; preds = %138, %136
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %9, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %10, align 4
  br label %149

149:                                              ; preds = %145, %135
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %150

150:                                              ; preds = %149, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %151

151:                                              ; preds = %150, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @_ZN11CombinationILx998244353ELx20000010EED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %5) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  br label %152

152:                                              ; preds = %151
  %153 = load ptr, ptr %9, align 8
  %154 = load i32, ptr %10, align 4
  %155 = insertvalue { ptr, i32 } poison, ptr %153, 0
  %156 = insertvalue { ptr, i32 } %155, i32 %154, 1
  resume { ptr, i32 } %156

157:                                              ; preds = %141
  unreachable
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt3minIxET_St16initializer_listIS0_E(ptr, i64) #1

declare i32 @__gxx_personality_v0(...)

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #5

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11CombinationILx998244353ELx20000010EED2Ev(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #6 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 = { 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 #2 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSSt16initializer_listIxE", !11, i64 0, !12, i64 8}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!10, !12, i64 8}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; 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_ostream" = type { ptr, %"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_istream" = type { ptr, i64, %"class.std::basic_ios" }
%class.Combination = type { %"class.std::vector", %"class.std::vector", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Mint<>, std::allocator<Mint<>>>::_Vector_impl" }
%"struct.std::_Vector_base<Mint<>, std::allocator<Mint<>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Mint<>, std::allocator<Mint<>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Mint<>, std::allocator<Mint<>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Mint = type { i64 }

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %class.Combination, align 8
  %5 = alloca [3 x i64], align 8
  %6 = alloca %class.Mint, align 8
  %7 = alloca %class.Mint, align 8
  %8 = alloca %class.Mint, align 8
  %9 = alloca %class.Mint, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %4) #7
  call void @_ZN11CombinationILx998244353ELx20000010EEC2Ev(ptr noundef nonnull align 8 dereferenceable(72) %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  %13 = load i64, ptr %2, align 8, !tbaa !5
  store i64 %13, ptr %5, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %5, i64 8
  %15 = load i64, ptr %1, align 8, !tbaa !5
  %16 = load i64, ptr %3, align 8, !tbaa !5
  %17 = sub nsw i64 %15, %16
  store i64 %17, ptr %14, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %5, i64 16
  %19 = add nsw i64 %16, -1
  store i64 %19, ptr %18, align 8, !tbaa !5
  %20 = invoke noundef i64 @_ZSt3minIxET_St16initializer_listIS0_E(ptr nonnull %5, i64 3)
          to label %21 unwind label %28

21:                                               ; preds = %0
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  call void @_ZN4MintILx998244353EEC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef 0)
  %22 = load i64, ptr %3, align 8, !tbaa !5
  %23 = icmp eq i64 %22, 0
  br i1 %23, label %24, label %32

24:                                               ; preds = %21
  %25 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 1)
          to label %26 unwind label %30

26:                                               ; preds = %24
  %27 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %69 unwind label %30

28:                                               ; preds = %0
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  br label %73

30:                                               ; preds = %26, %24
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %72

32:                                               ; preds = %21
  %33 = load i64, ptr %2, align 8, !tbaa !5
  %.neg = sub i64 %33, %22
  %.not31 = icmp slt i64 %20, 0
  br i1 %.not31, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %32
  %34 = trunc i64 %22 to i32
  %35 = add i32 %34, -1
  br label %37

._crit_edge:                                      ; preds = %64, %32
  %36 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsILx998244353EERSoS0_RK4MintIXT_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %67 unwind label %70

37:                                               ; preds = %.lr.ph, %64
  %.02032 = phi i64 [ 0, %.lr.ph ], [ %65, %64 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %38 = trunc i64 %.02032 to i32
  %39 = invoke i64 @_ZN11CombinationILx998244353ELx20000010EE7catalanEii(ptr noundef nonnull align 8 dereferenceable(72) %4, i32 noundef %35, i32 noundef %38)
          to label %40 unwind label %47

40:                                               ; preds = %37
  store i64 %39, ptr %7, align 8
  %41 = load i64, ptr %1, align 8, !tbaa !5
  %42 = add i64 %.02032, %22
  %43 = icmp eq i64 %41, %42
  %44 = icmp eq i64 %33, %.02032
  %or.cond = select i1 %43, i1 %44, i1 false
  br i1 %or.cond, label %45, label %49

45:                                               ; preds = %40
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4MintILx998244353EEpLERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
  br label %64

47:                                               ; preds = %37
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %66

49:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %50 = sub nsw i64 %22, %.02032
  %51 = add i64 %50, %.neg
  %52 = xor i64 %42, -1
  %53 = add i64 %51, %52
  %54 = add i64 %53, %41
  %55 = trunc i64 %54 to i32
  %56 = trunc i64 %51 to i32
  %57 = invoke i64 @_ZN11CombinationILx998244353ELx20000010EEclEii(ptr noundef nonnull align 8 dereferenceable(72) %4, i32 noundef %55, i32 noundef %56)
          to label %58 unwind label %62

58:                                               ; preds = %49
  store i64 %57, ptr %9, align 8
  %59 = invoke i64 @_ZNK4MintILx998244353EEmlERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %60 unwind label %62

60:                                               ; preds = %58
  store i64 %59, ptr %8, align 8
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4MintILx998244353EEpLERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %64

62:                                               ; preds = %58, %49
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %66

64:                                               ; preds = %60, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  %65 = add nuw i64 %.02032, 1
  %exitcond.not = icmp eq i64 %.02032, %20
  br i1 %exitcond.not, label %._crit_edge, label %37, !llvm.loop !9

66:                                               ; preds = %62, %47
  %.pn = phi { ptr, i32 } [ %63, %62 ], [ %48, %47 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %72

67:                                               ; preds = %._crit_edge
  %68 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %69 unwind label %70

69:                                               ; preds = %67, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @_ZN11CombinationILx998244353ELx20000010EED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %4) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret i32 0

70:                                               ; preds = %67, %._crit_edge
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %72

72:                                               ; preds = %66, %70, %30
  %.pn28 = phi { ptr, i32 } [ %31, %30 ], [ %.pn, %66 ], [ %71, %70 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %73

73:                                               ; preds = %72, %28
  %.pn28.pn = phi { ptr, i32 } [ %.pn28, %72 ], [ %29, %28 ]
  call void @_ZN11CombinationILx998244353ELx20000010EED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %4) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn28.pn
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt3minIxET_St16initializer_listIS0_E(ptr, i64) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #5

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11CombinationILx998244353ELx20000010EED2Ev(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #6 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 = { 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 #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass