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

; 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.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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::initializer_list" = type { ptr, i64 }
%class.mint = type { i64 }

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

; 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK4mint(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0

; 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 uwtable
declare dso_local i64 @_Z7catalanxx(i64 noundef, i64 noundef) #0

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"class.std::initializer_list", align 8
  %7 = alloca [3 x i64], align 8
  %8 = alloca %class.mint, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca %class.mint, align 8
  %14 = alloca i64, align 8
  %15 = alloca %class.mint, align 8
  %16 = alloca %class.mint, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %17 = 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)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #6
  %20 = load i64, ptr %3, align 8, !tbaa !5
  store i64 %20, ptr %7, align 8, !tbaa !5
  %21 = getelementptr inbounds i64, ptr %7, i64 1
  %22 = load i64, ptr %2, align 8, !tbaa !5
  %23 = load i64, ptr %4, align 8, !tbaa !5
  %24 = sub nsw i64 %22, %23
  store i64 %24, ptr %21, align 8, !tbaa !5
  %25 = getelementptr inbounds i64, ptr %7, i64 2
  %26 = load i64, ptr %4, align 8, !tbaa !5
  %27 = sub nsw i64 %26, 1
  store i64 %27, ptr %25, align 8, !tbaa !5
  %28 = getelementptr inbounds %"class.std::initializer_list", ptr %6, i32 0, i32 0
  store ptr %7, ptr %28, align 8, !tbaa !9
  %29 = getelementptr inbounds %"class.std::initializer_list", ptr %6, i32 0, i32 1
  store i64 3, ptr %29, align 8, !tbaa !13
  %30 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 0
  %31 = load ptr, ptr %30, align 8
  %32 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 1
  %33 = load i64, ptr %32, align 8
  %34 = call noundef i64 @_ZSt3minIxET_St16initializer_listIS0_E(ptr %31, i64 %33)
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  store i64 %34, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @_ZN4mintC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %8, i64 noundef 0)
  %35 = load i64, ptr %4, align 8, !tbaa !5
  %36 = icmp eq i64 %35, 0
  br i1 %36, label %37, label %40

37:                                               ; preds = %0
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 1)
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %102

40:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %41 = load i64, ptr %4, align 8, !tbaa !5
  store i64 %41, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %42 = load i64, ptr %4, align 8, !tbaa !5
  %43 = load i64, ptr %3, align 8, !tbaa !5
  %44 = sub nsw i64 %42, %43
  store i64 %44, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 0, ptr %12, align 8, !tbaa !5
  br label %45

45:                                               ; preds = %96, %40
  %46 = load i64, ptr %12, align 8, !tbaa !5
  %47 = load i64, ptr %5, align 8, !tbaa !5
  %48 = icmp sle i64 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %99

50:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %51 = load i64, ptr %10, align 8, !tbaa !5
  %52 = sub nsw i64 %51, 1
  %53 = load i64, ptr %12, align 8, !tbaa !5
  %54 = call i64 @_Z7catalanxx(i64 noundef %52, i64 noundef %53)
  %55 = getelementptr inbounds %class.mint, ptr %13, i32 0, i32 0
  store i64 %54, ptr %55, align 8
  %56 = load i64, ptr %10, align 8, !tbaa !5
  %57 = load i64, ptr %12, align 8, !tbaa !5
  %58 = add nsw i64 %56, %57
  %59 = load i64, ptr %2, align 8, !tbaa !5
  %60 = icmp eq i64 %58, %59
  br i1 %60, label %61, label %67

61:                                               ; preds = %50
  %62 = load i64, ptr %12, align 8, !tbaa !5
  %63 = load i64, ptr %3, align 8, !tbaa !5
  %64 = icmp eq i64 %62, %63
  br i1 %64, label %65, label %67

65:                                               ; preds = %61
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %13)
  br label %95

67:                                               ; preds = %61, %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %68 = load i64, ptr %2, align 8, !tbaa !5
  %69 = load i64, ptr %10, align 8, !tbaa !5
  %70 = sub nsw i64 %68, %69
  %71 = load i64, ptr %12, align 8, !tbaa !5
  %72 = sub nsw i64 %70, %71
  store i64 %72, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %73 = load i64, ptr %10, align 8, !tbaa !5
  %74 = load i64, ptr %12, align 8, !tbaa !5
  %75 = sub nsw i64 %73, %74
  %76 = load i64, ptr %11, align 8, !tbaa !5
  %77 = sub nsw i64 %75, %76
  %78 = load i64, ptr %14, align 8, !tbaa !5
  %79 = add nsw i64 %77, %78
  %80 = sub nsw i64 %79, 1
  %81 = sub nsw i64 %80, 1
  %82 = trunc i64 %81 to i32
  %83 = load i64, ptr %10, align 8, !tbaa !5
  %84 = load i64, ptr %12, align 8, !tbaa !5
  %85 = sub nsw i64 %83, %84
  %86 = load i64, ptr %11, align 8, !tbaa !5
  %87 = sub nsw i64 %85, %86
  %88 = sub nsw i64 %87, 1
  %89 = trunc i64 %88 to i32
  %90 = call i64 @_ZN11combinationclEii(ptr noundef nonnull align 8 dereferenceable(72) @C, i32 noundef %82, i32 noundef %89)
  %91 = getelementptr inbounds %class.mint, ptr %16, i32 0, i32 0
  store i64 %90, ptr %91, align 8
  %92 = call i64 @_ZNK4mintmlERKS_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %16)
  %93 = getelementptr inbounds %class.mint, ptr %15, i32 0, i32 0
  store i64 %92, ptr %93, align 8
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %95

95:                                               ; preds = %67, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %96

96:                                               ; preds = %95
  %97 = load i64, ptr %12, align 8, !tbaa !5
  %98 = add nsw i64 %97, 1
  store i64 %98, ptr %12, align 8, !tbaa !5
  br label %45, !llvm.loop !14

99:                                               ; preds = %49
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK4mint(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %100, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  store i32 0, ptr %9, align 4
  br label %102

102:                                              ; preds = %99, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %103 = load i32, ptr %9, align 4
  switch i32 %103, label %106 [
    i32 0, label %104
    i32 1, label %104
  ]

104:                                              ; preds = %102, %102
  %105 = load i32, ptr %1, align 4
  ret i32 %105

106:                                              ; preds = %102
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4mintC2Ex(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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(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 @_ZNK4mintmlERKS_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { 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.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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%class.mint = type { i64 }

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

; 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK4mint(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

; 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 uwtable
declare dso_local i64 @_Z7catalanxx(i64 noundef, i64 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) #2

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca [3 x i64], align 8
  %5 = alloca %class.mint, align 8
  %6 = alloca %class.mint, align 8
  %7 = alloca %class.mint, align 8
  %8 = alloca %class.mint, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %9 = 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)
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %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) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  %12 = load i64, ptr %2, align 8, !tbaa !5
  store i64 %12, ptr %4, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %4, i64 8
  %14 = load i64, ptr %1, align 8, !tbaa !5
  %15 = load i64, ptr %3, align 8, !tbaa !5
  %16 = sub nsw i64 %14, %15
  store i64 %16, ptr %13, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %4, i64 16
  %18 = add nsw i64 %15, -1
  store i64 %18, ptr %17, align 8, !tbaa !5
  %19 = call noundef i64 @_ZSt3minIxET_St16initializer_listIS0_E(ptr nonnull %4, i64 3)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  call void @_ZN4mintC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %5, i64 noundef 0)
  %20 = load i64, ptr %3, align 8, !tbaa !5
  %21 = icmp eq i64 %20, 0
  br i1 %21, label %22, label %24

22:                                               ; preds = %0
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 1)
  br label %51

24:                                               ; preds = %0
  %25 = load i64, ptr %2, align 8, !tbaa !5
  %.neg = sub i64 %25, %20
  %.not21 = icmp slt i64 %19, 0
  br i1 %.not21, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %24
  %26 = add nsw i64 %20, -1
  br label %28

._crit_edge:                                      ; preds = %49, %24
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK4mint(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(8) %5)
  br label %51

28:                                               ; preds = %.lr.ph, %49
  %.01822 = phi i64 [ 0, %.lr.ph ], [ %50, %49 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %29 = call i64 @_Z7catalanxx(i64 noundef %26, i64 noundef %.01822)
  store i64 %29, ptr %6, align 8
  %30 = add nsw i64 %.01822, %20
  %31 = load i64, ptr %1, align 8, !tbaa !5
  %32 = icmp eq i64 %30, %31
  %33 = load i64, ptr %2, align 8
  %34 = icmp eq i64 %.01822, %33
  %or.cond = select i1 %32, i1 %34, i1 false
  br i1 %or.cond, label %35, label %37

35:                                               ; preds = %28
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  br label %49

37:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %38 = sub nsw i64 %20, %.01822
  %39 = add i64 %38, %.neg
  %40 = sub i64 %39, %30
  %41 = add i64 %40, %31
  %42 = trunc i64 %41 to i32
  %43 = add i32 %42, -2
  %44 = trunc i64 %39 to i32
  %45 = add i32 %44, -1
  %46 = call i64 @_ZN11combinationclEii(ptr noundef nonnull align 8 dereferenceable(72) @C, i32 noundef %43, i32 noundef %45)
  store i64 %46, ptr %8, align 8
  %47 = call i64 @_ZNK4mintmlERKS_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %8)
  store i64 %47, ptr %7, align 8
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %49

49:                                               ; preds = %37, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %50 = add nuw i64 %.01822, 1
  %exitcond.not = icmp eq i64 %.01822, %19
  br i1 %exitcond.not, label %._crit_edge, label %28, !llvm.loop !9

51:                                               ; preds = %._crit_edge, %22
  %.sink = phi ptr [ %27, %._crit_edge ], [ %23, %22 ]
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %.sink, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 0
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4mintC2Ex(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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(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 @_ZNK4mintmlERKS_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { 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