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

; 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.Mint = type { i64 }
%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 }

@_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 %class.Mint, align 8
  %4 = alloca %class.Mint, align 8
  %5 = alloca %class.Mint, align 8
  %6 = alloca %class.Combination, align 8
  %7 = alloca i64, align 8
  %8 = alloca %class.Mint, align 8
  %9 = alloca %class.Mint, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %class.Mint, align 8
  %13 = alloca %class.Mint, align 8
  %14 = alloca %class.Mint, align 8
  %15 = alloca %class.Mint, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  %16 = 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)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  call void @_ZN4MintILx998244353EEC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef 3)
  %17 = load i64, ptr %2, align 8, !tbaa !5
  %18 = call i64 @_ZN4MintILx998244353EE5powerEx(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %17)
  %19 = getelementptr inbounds %class.Mint, ptr %3, i32 0, i32 0
  store i64 %18, ptr %19, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  call void @_ZN4MintILx998244353EEC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %5, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 72, ptr %6) #6
  call void @_ZN11CombinationILx998244353ELx20000010EEC2Ev(ptr noundef nonnull align 8 dereferenceable(72) %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %20 = load i64, ptr %2, align 8, !tbaa !5
  %21 = sdiv i64 %20, 2
  %22 = add nsw i64 %21, 1
  store i64 %22, ptr %7, align 8, !tbaa !5
  br label %23

23:                                               ; preds = %48, %0
  %24 = load i64, ptr %7, align 8, !tbaa !5
  %25 = load i64, ptr %2, align 8, !tbaa !5
  %26 = icmp sle i64 %24, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %60

28:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %29 = load i64, ptr %2, align 8, !tbaa !5
  %30 = trunc i64 %29 to i32
  %31 = load i64, ptr %7, align 8, !tbaa !5
  %32 = trunc i64 %31 to i32
  %33 = invoke i64 @_ZN11CombinationILx998244353ELx20000010EEclEii(ptr noundef nonnull align 8 dereferenceable(72) %6, i32 noundef %30, i32 noundef %32)
          to label %34 unwind label %51

34:                                               ; preds = %28
  %35 = getelementptr inbounds %class.Mint, ptr %9, i32 0, i32 0
  store i64 %33, ptr %35, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  invoke void @_ZN4MintILx998244353EEC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %13, i64 noundef 2)
          to label %36 unwind label %55

36:                                               ; preds = %34
  %37 = load i64, ptr %2, align 8, !tbaa !5
  %38 = load i64, ptr %7, align 8, !tbaa !5
  %39 = sub nsw i64 %37, %38
  %40 = invoke i64 @_ZN4MintILx998244353EE5powerEx(ptr noundef nonnull align 8 dereferenceable(8) %13, i64 noundef %39)
          to label %41 unwind label %55

41:                                               ; preds = %36
  %42 = getelementptr inbounds %class.Mint, ptr %12, i32 0, i32 0
  store i64 %40, ptr %42, align 8
  %43 = invoke i64 @_ZNK4MintILx998244353EEmlERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %44 unwind label %55

44:                                               ; preds = %41
  %45 = getelementptr inbounds %class.Mint, ptr %8, i32 0, i32 0
  store i64 %43, ptr %45, align 8
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN4MintILx998244353EEpLERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %47 unwind label %55

47:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %48

48:                                               ; preds = %47
  %49 = load i64, ptr %7, align 8, !tbaa !5
  %50 = add nsw i64 %49, 1
  store i64 %50, ptr %7, align 8, !tbaa !5
  br label %23, !llvm.loop !9

51:                                               ; preds = %28
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %10, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %11, align 4
  br label %59

55:                                               ; preds = %44, %41, %36, %34
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %10, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %59

59:                                               ; preds = %55, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %80

60:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  invoke void @_ZN4MintILx998244353EEC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %15, i64 noundef 2)
          to label %61 unwind label %72

61:                                               ; preds = %60
  %62 = invoke i64 @_ZNK4MintILx998244353EEmlERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %63 unwind label %72

63:                                               ; preds = %61
  %64 = getelementptr inbounds %class.Mint, ptr %14, i32 0, i32 0
  store i64 %62, ptr %64, align 8
  %65 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN4MintILx998244353EEmIERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %66 unwind label %72

66:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  %67 = 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) %3)
          to label %68 unwind label %76

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

70:                                               ; preds = %68
  call void @_ZN11CombinationILx998244353ELx20000010EED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %6) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %71 = load i32, ptr %1, align 4
  ret i32 %71

72:                                               ; preds = %63, %61, %60
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %10, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %80

76:                                               ; preds = %68, %66
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %10, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %11, align 4
  br label %80

80:                                               ; preds = %76, %72, %59
  call void @_ZN11CombinationILx998244353ELx20000010EED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %6) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %81

81:                                               ; preds = %80
  %82 = load ptr, ptr %10, align 8
  %83 = load i32, ptr %11, align 4
  %84 = insertvalue { ptr, i32 } poison, ptr %82, 0
  %85 = insertvalue { ptr, i32 } %84, i32 %83, 1
  resume { ptr, i32 } %85
}

; 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 nounwind uwtable
declare dso_local void @_ZN4MintILx998244353EEC2Ex(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11CombinationILx998244353ELx20000010EEC2Ev(ptr noundef nonnull align 8 dereferenceable(72)) 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) #0 align 2

declare i32 @__gxx_personality_v0(...)

; 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 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZN4MintILx998244353EEmIERKS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #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 #5 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 = { 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 = { 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"}


; 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.Mint = type { i64 }
%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 }

@_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 %class.Mint, align 8
  %3 = alloca %class.Mint, align 8
  %4 = alloca %class.Mint, align 8
  %5 = alloca %class.Combination, 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
  %10 = alloca %class.Mint, align 8
  %11 = alloca %class.Mint, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  %12 = 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)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  call void @_ZN4MintILx998244353EEC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef 3)
  %13 = load i64, ptr %1, align 8, !tbaa !5
  %14 = call i64 @_ZN4MintILx998244353EE5powerEx(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %13)
  store i64 %14, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @_ZN4MintILx998244353EEC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %5) #6
  call void @_ZN11CombinationILx998244353ELx20000010EEC2Ev(ptr noundef nonnull align 8 dereferenceable(72) %5)
  %15 = load i64, ptr %1, align 8, !tbaa !5
  %.not.not12 = icmp sgt i64 %15, 0
  br i1 %.not.not12, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %0
  %16 = lshr i64 %15, 1
  br label %.lr.ph

._crit_edge:                                      ; preds = %28, %0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  call void @_ZN4MintILx998244353EEC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %11, i64 noundef 2)
  %17 = invoke i64 @_ZNK4MintILx998244353EEmlERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %36 unwind label %43

.lr.ph:                                           ; preds = %.lr.ph.preheader, %28
  %18 = phi i64 [ %30, %28 ], [ %15, %.lr.ph.preheader ]
  %.0813.in = phi i64 [ %.0813, %28 ], [ %16, %.lr.ph.preheader ]
  %.0813 = add nuw nsw i64 %.0813.in, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %19 = trunc i64 %18 to i32
  %20 = trunc i64 %.0813 to i32
  %21 = invoke i64 @_ZN11CombinationILx998244353ELx20000010EEclEii(ptr noundef nonnull align 8 dereferenceable(72) %5, i32 noundef %19, i32 noundef %20)
          to label %22 unwind label %31

22:                                               ; preds = %.lr.ph
  store i64 %21, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  call void @_ZN4MintILx998244353EEC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %9, i64 noundef 2)
  %23 = load i64, ptr %1, align 8, !tbaa !5
  %24 = sub nsw i64 %23, %.0813
  %25 = invoke i64 @_ZN4MintILx998244353EE5powerEx(ptr noundef nonnull align 8 dereferenceable(8) %9, i64 noundef %24)
          to label %26 unwind label %33

26:                                               ; preds = %22
  store i64 %25, ptr %8, align 8
  %27 = invoke i64 @_ZNK4MintILx998244353EEmlERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %28 unwind label %33

28:                                               ; preds = %26
  store i64 %27, ptr %6, align 8
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4MintILx998244353EEpLERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %30 = load i64, ptr %1, align 8, !tbaa !5
  %.not.not = icmp slt i64 %.0813, %30
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

31:                                               ; preds = %.lr.ph
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %35

33:                                               ; preds = %26, %22
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %35

35:                                               ; preds = %33, %31
  %.pn = phi { ptr, i32 } [ %34, %33 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %47

36:                                               ; preds = %._crit_edge
  store i64 %17, ptr %10, align 8
  %37 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN4MintILx998244353EEmIERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %38 unwind label %43

38:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  %39 = 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) %2)
          to label %40 unwind label %45

40:                                               ; preds = %38
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %42 unwind label %45

42:                                               ; preds = %40
  call void @_ZN11CombinationILx998244353ELx20000010EED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %5) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #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

43:                                               ; preds = %36, %._crit_edge
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br label %47

45:                                               ; preds = %40, %38
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %47

47:                                               ; preds = %45, %43, %35
  %.pn.pn = phi { ptr, i32 } [ %.pn, %35 ], [ %46, %45 ], [ %44, %43 ]
  call void @_ZN11CombinationILx998244353ELx20000010EED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %5) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #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
  resume { ptr, i32 } %.pn.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 nounwind uwtable
declare dso_local void @_ZN4MintILx998244353EEC2Ex(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZN4MintILx998244353EE5powerEx(ptr noundef nonnull align 8 dereferenceable(8), i64 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) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11CombinationILx998244353ELx20000010EEC2Ev(ptr noundef nonnull align 8 dereferenceable(72)) 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

declare i32 @__gxx_personality_v0(...)

; 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 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZN4MintILx998244353EEmIERKS0_(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 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 #5 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 = { 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 = { 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: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass