; LLVM IR from kazunetakahashi/atcoder :: 2019/0601_m-solutions2019 (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_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" }

@inv = external dso_local global [1000010 x i64], align 16
@N = external dso_local global i64, align 8
@A = external dso_local global i64, align 8
@B = external dso_local global i64, align 8
@K = external dso_local global i64, align 8
@ans = external dso_local global i64, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z4initv() #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z1Cii(i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z5powerxx(i64 noundef, i64 noundef) #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 i32, align 4
  store i32 0, ptr %1, align 4
  call void @_Z4initv()
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(8) @A)
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(8) @B)
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(8) @K)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  %9 = load i64, ptr @A, align 8, !tbaa !5
  %10 = load i64, ptr @A, align 8, !tbaa !5
  %11 = load i64, ptr @B, align 8, !tbaa !5
  %12 = add nsw i64 %10, %11
  %13 = getelementptr inbounds [1000010 x i64], ptr @inv, i64 0, i64 %12
  %14 = load i64, ptr %13, align 8, !tbaa !5
  %15 = mul nsw i64 %9, %14
  %16 = srem i64 %15, 1000000007
  store i64 %16, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %17 = load i64, ptr @B, align 8, !tbaa !5
  %18 = load i64, ptr @A, align 8, !tbaa !5
  %19 = load i64, ptr @B, align 8, !tbaa !5
  %20 = add nsw i64 %18, %19
  %21 = getelementptr inbounds [1000010 x i64], ptr @inv, i64 0, i64 %20
  %22 = load i64, ptr %21, align 8, !tbaa !5
  %23 = mul nsw i64 %17, %22
  %24 = srem i64 %23, 1000000007
  store i64 %24, ptr %3, align 8, !tbaa !5
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str)
  %26 = load i64, ptr %2, align 8, !tbaa !5
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %25, i64 noundef %26)
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef @.str.1)
  %29 = load i64, ptr %3, align 8, !tbaa !5
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %28, i64 noundef %29)
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %32

32:                                               ; preds = %97, %0
  %33 = load i32, ptr %4, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = load i64, ptr @N, align 8, !tbaa !5
  %36 = icmp slt i64 %34, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %100

38:                                               ; preds = %32
  %39 = load i64, ptr %2, align 8, !tbaa !5
  %40 = load i64, ptr @N, align 8, !tbaa !5
  %41 = call noundef i64 @_Z5powerxx(i64 noundef %39, i64 noundef %40)
  %42 = load i64, ptr %3, align 8, !tbaa !5
  %43 = load i32, ptr %4, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = call noundef i64 @_Z5powerxx(i64 noundef %42, i64 noundef %44)
  %46 = mul nsw i64 %41, %45
  %47 = srem i64 %46, 1000000007
  %48 = load i64, ptr @N, align 8, !tbaa !5
  %49 = load i32, ptr %4, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = add nsw i64 %48, %50
  %52 = sub nsw i64 %51, 1
  %53 = trunc i64 %52 to i32
  %54 = load i32, ptr %4, align 4, !tbaa !9
  %55 = call noundef i64 @_Z1Cii(i32 noundef %53, i32 noundef %54)
  %56 = mul nsw i64 %47, %55
  %57 = srem i64 %56, 1000000007
  %58 = load i64, ptr @N, align 8, !tbaa !5
  %59 = load i32, ptr %4, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = add nsw i64 %58, %60
  %62 = mul nsw i64 %57, %61
  %63 = srem i64 %62, 1000000007
  %64 = load i64, ptr @ans, align 8, !tbaa !5
  %65 = add nsw i64 %64, %63
  store i64 %65, ptr @ans, align 8, !tbaa !5
  %66 = load i64, ptr @ans, align 8, !tbaa !5
  %67 = srem i64 %66, 1000000007
  store i64 %67, ptr @ans, align 8, !tbaa !5
  %68 = load i64, ptr %3, align 8, !tbaa !5
  %69 = load i64, ptr @N, align 8, !tbaa !5
  %70 = call noundef i64 @_Z5powerxx(i64 noundef %68, i64 noundef %69)
  %71 = load i64, ptr %2, align 8, !tbaa !5
  %72 = load i32, ptr %4, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %74 = call noundef i64 @_Z5powerxx(i64 noundef %71, i64 noundef %73)
  %75 = mul nsw i64 %70, %74
  %76 = srem i64 %75, 1000000007
  %77 = load i64, ptr @N, align 8, !tbaa !5
  %78 = load i32, ptr %4, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = add nsw i64 %77, %79
  %81 = sub nsw i64 %80, 1
  %82 = trunc i64 %81 to i32
  %83 = load i32, ptr %4, align 4, !tbaa !9
  %84 = call noundef i64 @_Z1Cii(i32 noundef %82, i32 noundef %83)
  %85 = mul nsw i64 %76, %84
  %86 = srem i64 %85, 1000000007
  %87 = load i64, ptr @N, align 8, !tbaa !5
  %88 = load i32, ptr %4, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = add nsw i64 %87, %89
  %91 = mul nsw i64 %86, %90
  %92 = srem i64 %91, 1000000007
  %93 = load i64, ptr @ans, align 8, !tbaa !5
  %94 = add nsw i64 %93, %92
  store i64 %94, ptr @ans, align 8, !tbaa !5
  %95 = load i64, ptr @ans, align 8, !tbaa !5
  %96 = srem i64 %95, 1000000007
  store i64 %96, ptr @ans, align 8, !tbaa !5
  br label %97

97:                                               ; preds = %38
  %98 = load i32, ptr %4, align 4, !tbaa !9
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %4, align 4, !tbaa !9
  br label %32, !llvm.loop !11

100:                                              ; preds = %37
  %101 = load i64, ptr @K, align 8, !tbaa !5
  %102 = icmp sgt i64 %101, 0
  br i1 %102, label %103, label %115

103:                                              ; preds = %100
  %104 = load i64, ptr @A, align 8, !tbaa !5
  %105 = load i64, ptr @B, align 8, !tbaa !5
  %106 = add nsw i64 %104, %105
  %107 = getelementptr inbounds [1000010 x i64], ptr @inv, i64 0, i64 %106
  %108 = load i64, ptr %107, align 8, !tbaa !5
  %109 = mul nsw i64 100, %108
  %110 = srem i64 %109, 1000000007
  %111 = load i64, ptr @ans, align 8, !tbaa !5
  %112 = mul nsw i64 %111, %110
  store i64 %112, ptr @ans, align 8, !tbaa !5
  %113 = load i64, ptr @ans, align 8, !tbaa !5
  %114 = srem i64 %113, 1000000007
  store i64 %114, ptr @ans, align 8, !tbaa !5
  br label %115

115:                                              ; preds = %103, %100
  %116 = load i64, ptr @ans, align 8, !tbaa !5
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %116)
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %117, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  %119 = load i32, ptr %1, align 4
  ret i32 %119
}

; 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)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 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)) #4

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = { 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 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"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_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" }

@inv = external dso_local local_unnamed_addr global [1000010 x i64], align 16
@N = external dso_local global i64, align 8
@A = external dso_local global i64, align 8
@B = external dso_local global i64, align 8
@K = external dso_local global i64, align 8
@ans = external dso_local local_unnamed_addr global i64, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z4initv() local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z1Cii(i32 noundef, i32 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  tail call void @_Z4initv()
  %1 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %2 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(8) @A)
  %3 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(8) @B)
  %4 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) @K)
  %5 = load i64, ptr @A, align 8, !tbaa !5
  %6 = load i64, ptr @B, align 8, !tbaa !5
  %7 = add nsw i64 %6, %5
  %8 = getelementptr inbounds [1000010 x i64], ptr @inv, i64 0, i64 %7
  %9 = load i64, ptr %8, align 8, !tbaa !5
  %10 = mul nsw i64 %9, %5
  %11 = srem i64 %10, 1000000007
  %12 = mul nsw i64 %9, %6
  %13 = srem i64 %12, 1000000007
  %14 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str)
  %15 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %14, i64 noundef %11)
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull @.str.1)
  %17 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %16, i64 noundef %13)
  %18 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %19 = load i64, ptr @N, align 8, !tbaa !5
  %20 = icmp sgt i64 %19, 0
  br i1 %20, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %0
  %.pre.pre = load i64, ptr @ans, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.._crit_edge_crit_edge
  %.pre = phi i64 [ %.pre.pre, %.._crit_edge_crit_edge ], [ %60, %.lr.ph ]
  %21 = load i64, ptr @K, align 8, !tbaa !5
  %22 = icmp sgt i64 %21, 0
  br i1 %22, label %62, label %72

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %23 = phi i64 [ %54, %.lr.ph ], [ %19, %0 ]
  %24 = tail call noundef i64 @_Z5powerxx(i64 noundef %11, i64 noundef %23)
  %25 = tail call noundef i64 @_Z5powerxx(i64 noundef %13, i64 noundef %indvars.iv)
  %26 = mul nsw i64 %25, %24
  %27 = srem i64 %26, 1000000007
  %28 = load i64, ptr @N, align 8, !tbaa !5
  %29 = trunc i64 %28 to i32
  %30 = trunc i64 %indvars.iv to i32
  %31 = add i32 %30, -1
  %32 = add i32 %31, %29
  %33 = trunc nuw nsw i64 %indvars.iv to i32
  %34 = tail call noundef i64 @_Z1Cii(i32 noundef %32, i32 noundef %33)
  %35 = mul nsw i64 %27, %34
  %36 = srem i64 %35, 1000000007
  %37 = load i64, ptr @N, align 8, !tbaa !5
  %38 = add nsw i64 %37, %indvars.iv
  %39 = mul nsw i64 %36, %38
  %40 = srem i64 %39, 1000000007
  %41 = load i64, ptr @ans, align 8, !tbaa !5
  %42 = add nsw i64 %40, %41
  %43 = srem i64 %42, 1000000007
  store i64 %43, ptr @ans, align 8, !tbaa !5
  %44 = tail call noundef i64 @_Z5powerxx(i64 noundef %13, i64 noundef %37)
  %45 = tail call noundef i64 @_Z5powerxx(i64 noundef %11, i64 noundef %indvars.iv)
  %46 = mul nsw i64 %45, %44
  %47 = srem i64 %46, 1000000007
  %48 = load i64, ptr @N, align 8, !tbaa !5
  %49 = trunc i64 %48 to i32
  %50 = add i32 %31, %49
  %51 = tail call noundef i64 @_Z1Cii(i32 noundef %50, i32 noundef %33)
  %52 = mul nsw i64 %47, %51
  %53 = srem i64 %52, 1000000007
  %54 = load i64, ptr @N, align 8, !tbaa !5
  %55 = add nsw i64 %54, %indvars.iv
  %56 = mul nsw i64 %53, %55
  %57 = srem i64 %56, 1000000007
  %58 = load i64, ptr @ans, align 8, !tbaa !5
  %59 = add nsw i64 %57, %58
  %60 = srem i64 %59, 1000000007
  store i64 %60, ptr @ans, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %61 = icmp sgt i64 %54, %indvars.iv.next
  br i1 %61, label %.lr.ph, label %._crit_edge, !llvm.loop !9

62:                                               ; preds = %._crit_edge
  %63 = load i64, ptr @A, align 8, !tbaa !5
  %64 = load i64, ptr @B, align 8, !tbaa !5
  %65 = add nsw i64 %64, %63
  %66 = getelementptr inbounds [1000010 x i64], ptr @inv, i64 0, i64 %65
  %67 = load i64, ptr %66, align 8, !tbaa !5
  %68 = mul nsw i64 %67, 100
  %69 = srem i64 %68, 1000000007
  %70 = mul nsw i64 %69, %.pre
  %71 = srem i64 %70, 1000000007
  store i64 %71, ptr @ans, align 8, !tbaa !5
  br label %72

72:                                               ; preds = %62, %._crit_edge
  %73 = phi i64 [ %71, %62 ], [ %.pre, %._crit_edge ]
  %74 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %73)
  %75 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

; 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 #1 align 2

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

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

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

attributes #0 = { 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 #1 = { 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 = { 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" }

!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,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass